X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=org.argeo.entity.core%2Fsrc%2Forg%2Fargeo%2Fentity%2Fcore%2FJcrEntityDefinition.java;h=7fd26d1c078de79409d456fb6cc2984baa642071;hp=f76eb63fa96491b4df5874f246ff896de56cdfa1;hb=921e69ca45d5e257429c019b984428a59f891487;hpb=25ed06d42600a81063515220c51ac2d93fefa27a diff --git a/org.argeo.entity.core/src/org/argeo/entity/core/JcrEntityDefinition.java b/org.argeo.entity.core/src/org/argeo/entity/core/JcrEntityDefinition.java index f76eb63..7fd26d1 100644 --- a/org.argeo.entity.core/src/org/argeo/entity/core/JcrEntityDefinition.java +++ b/org.argeo.entity.core/src/org/argeo/entity/core/JcrEntityDefinition.java @@ -10,10 +10,7 @@ import javax.jcr.Session; import org.argeo.api.NodeUtils; import org.argeo.entity.EntityConstants; import org.argeo.entity.EntityDefinition; -import org.argeo.entity.EntityNames; -import org.argeo.entity.EntityTypes; import org.argeo.jcr.Jcr; -import org.argeo.jcr.JcrUtils; import org.osgi.framework.BundleContext; /** An entity definition based on a JCR data structure. */ @@ -30,12 +27,12 @@ public class JcrEntityDefinition implements EntityDefinition { if (type == null) throw new IllegalArgumentException("Entity type property " + EntityConstants.TYPE + " must be set."); defaultEditoryId = properties.get(EntityConstants.DEFAULT_EDITORY_ID); - String definitionPath = EntityNames.ENTITY_DEFINITIONS_PATH + '/' + type; - if (!adminSession.itemExists(definitionPath)) { - Node entityDefinition = JcrUtils.mkdirs(adminSession, definitionPath, EntityTypes.ENTITY_DEFINITION); -// entityDefinition.addMixin(EntityTypes.ENTITY_DEFINITION); - adminSession.save(); - } +// String definitionPath = EntityNames.ENTITY_DEFINITIONS_PATH + '/' + type; +// if (!adminSession.itemExists(definitionPath)) { +// Node entityDefinition = JcrUtils.mkdirs(adminSession, definitionPath, EntityTypes.ENTITY_DEFINITION); +//// entityDefinition.addMixin(EntityTypes.ENTITY_DEFINITION); +// adminSession.save(); +// } initJcr(adminSession); } finally { Jcr.logout(adminSession);