[Castore-commits] CollectionBeanFactory.java 1.3 1.4
Arnaud Thimel
thimel at adullact1.hosting.cri74.org
Mer 14 Juin 20:16:25 CEST 2006
Update of /cvsroot/castore/castore-presentation/src/java/fr/emn/castor/presentation/collection
In directory adullact1:/tmp/cvs-serv5984/src/java/fr/emn/castor/presentation/collection
Modified Files:
CollectionBeanFactory.java
Log Message:
Support des collections natives
Index: CollectionBeanFactory.java
===================================================================
RCS file: /cvsroot/castore/castore-presentation/src/java/fr/emn/castor/presentation/collection/CollectionBeanFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CollectionBeanFactory.java 12 Jun 2006 13:11:10 -0000 1.3
--- CollectionBeanFactory.java 14 Jun 2006 18:16:22 -0000 1.4
***************
*** 40,43 ****
--- 40,44 ----
package fr.emn.castor.presentation.collection;
+ import static fr.emn.castor.collections.CollectionsConstants.COLLECTION_NATIVE;
import static fr.emn.castor.collections.CollectionsConstants.COLLECTION_PRIVEE;
import static fr.emn.castor.collections.CollectionsConstants.COLLECTION_PUBLIQUE;
***************
*** 118,134 ****
String docBeanState = getBeanState(idDoc);
if (!collId.equals("panier")) {
!
! if (fColl
! .getTypeCollection(collId)
! .equals(COLLECTION_PUBLIQUE)) {
docBean = DocumentBeanFactory.getDocumentBean(
idDoc, userOnLine, docBeanState,
! COLL_TYP_PUB, "");
! } else if (fColl
! .getTypeCollection(collId)
! .equals(COLLECTION_PRIVEE)) {
docBean = DocumentBeanFactory.getDocumentBean(
idDoc, userOnLine, docBeanState,
COLL_TYP_PRV, collId);
}
} else {
--- 119,140 ----
String docBeanState = getBeanState(idDoc);
if (!collId.equals("panier")) {
! String collType = fColl.getTypeCollection(collId);
! if (COLLECTION_PUBLIQUE.equals(collType)) {
docBean = DocumentBeanFactory.getDocumentBean(
idDoc, userOnLine, docBeanState,
! COLL_TYP_PUB, collId);
! } else if (COLLECTION_PRIVEE.equals(collType)) {
docBean = DocumentBeanFactory.getDocumentBean(
idDoc, userOnLine, docBeanState,
COLL_TYP_PRV, collId);
+ } else if (COLLECTION_NATIVE.equals(collType)) {
+ docBean = DocumentBeanFactory.getDocumentBean(
+ idDoc, userOnLine, docBeanState);
+ } else {
+ docBean = DocumentBeanFactory.getDocumentBean(
+ idDoc, userOnLine, docBeanState);
+ if (log.isErrorEnabled()) {
+ log.warn("Type de collection inconnue : " + collType);
+ }
}
} else {
Plus d'informations sur la liste de diffusion Castore-commits