import java.util.Map;
-import javax.jcr.Node;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
-import org.argeo.app.api.EntityConstants;
-import org.argeo.app.api.EntityDefinition;
+import org.argeo.api.app.EntityConstants;
+import org.argeo.api.app.EntityDefinition;
import org.argeo.cms.jcr.CmsJcrUtils;
import org.argeo.jcr.Jcr;
import org.osgi.framework.BundleContext;
/** An entity definition based on a JCR data structure. */
+@Deprecated
public class JcrEntityDefinition implements EntityDefinition {
private Repository repository;
private String type;
- private String defaultEditorId;
+// private String defaultEditorId;
public void init(BundleContext bundleContext, Map<String, String> properties) throws RepositoryException {
Session adminSession = CmsJcrUtils.openDataAdminSession(repository, null);
type = properties.get(EntityConstants.TYPE);
if (type == null)
throw new IllegalArgumentException("Entity type property " + EntityConstants.TYPE + " must be set.");
- defaultEditorId = properties.get(EntityConstants.DEFAULT_EDITOR_ID);
+// defaultEditorId = properties.get(EntityConstants.DEFAULT_EDITOR_ID);
// String definitionPath = EntityNames.ENTITY_DEFINITIONS_PATH + '/' + type;
// if (!adminSession.itemExists(definitionPath)) {
// Node entityDefinition = JcrUtils.mkdirs(adminSession, definitionPath, EntityTypes.ENTITY_DEFINITION);
}
- @Override
- public String getEditorId(Node entity) {
- return defaultEditorId;
- }
+// @Override
+// public String getEditorId(Node entity) {
+// return defaultEditorId;
+// }
@Override
public String getType() {