You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2013/08/21 20:36:17 UTC
svn commit: r1516250 [2/4] - in /chemistry/opencmis/trunk:
chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/api/
chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/ap...
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrFolder.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrFolder.java?rev=1516250&r1=1516249&r2=1516250&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrFolder.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrFolder.java Wed Aug 21 18:36:15 2013
@@ -56,27 +56,29 @@ import org.apache.chemistry.opencmis.jcr
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
/**
- * Instances of this class represent a cmis:folder backed by an underlying JCR <code>Node</code>.
+ * Instances of this class represent a cmis:folder backed by an underlying JCR
+ * <code>Node</code>.
*/
public class JcrFolder extends JcrNode {
private static final Logger log = LoggerFactory.getLogger(JcrFolder.class);
- public JcrFolder(Node node, JcrTypeManager typeManager, PathManager pathManager, JcrTypeHandlerManager typeHandlerManager) {
+ public JcrFolder(Node node, JcrTypeManager typeManager, PathManager pathManager,
+ JcrTypeHandlerManager typeHandlerManager) {
super(node, typeManager, pathManager, typeHandlerManager);
}
/**
* See CMIS 1.0 section 2.2.3.1 getChildren
*
- * @return Iterator of <code>JcrNode</code>. Children which are created in the checked out
- * state are left out from the iterator.
+ * @return Iterator of <code>JcrNode</code>. Children which are created in
+ * the checked out state are left out from the iterator.
* @throws CmisRuntimeException
*/
public Iterator<JcrNode> getNodes() {
try {
- final FilterIterator<Node> nodes = new FilterIterator<Node>(getNode().getNodes(), typeHandlerManager.getNodePredicate());
+ final FilterIterator<Node> nodes = new FilterIterator<Node>(getNode().getNodes(),
+ typeHandlerManager.getNodePredicate());
Iterator<JcrNode> jcrNodes = new Iterator<JcrNode>() {
public boolean hasNext() {
@@ -92,28 +94,27 @@ public class JcrFolder extends JcrNode {
}
};
- // Filter out nodes which are checked out and do not have a version history (i.e. only a root version)
- // These are created with VersioningState checkedout and not yet checked in.
+ // Filter out nodes which are checked out and do not have a version
+ // history (i.e. only a root version)
+ // These are created with VersioningState checkedout and not yet
+ // checked in.
return new FilterIterator<JcrNode>(jcrNodes, new Predicate<JcrNode>() {
public boolean evaluate(JcrNode node) {
try {
if (node.isVersionable()) {
Version baseVersion = getBaseVersion(node.getNode());
return baseVersion.getPredecessors().length > 0;
- }
- else {
+ } else {
return true;
}
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
}
});
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
@@ -121,7 +122,7 @@ public class JcrFolder extends JcrNode {
/**
* See CMIS 1.0 section 2.2.4.2 createDocumentFromSource
- *
+ *
* @throws CmisStorageException
*/
public JcrNode addNodeFromSource(JcrDocument source, Properties properties) {
@@ -129,7 +130,7 @@ public class JcrFolder extends JcrNode {
String destPath = PathManager.createCmisPath(getNode().getPath(), source.getName());
Session session = getNode().getSession();
- session.getWorkspace().copy(source.getNode().getPath(), destPath);
+ session.getWorkspace().copy(source.getNode().getPath(), destPath);
JcrNode jcrNode = create(session.getNode(destPath));
// overlay new properties
@@ -139,8 +140,7 @@ public class JcrFolder extends JcrNode {
session.save();
return jcrNode;
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisStorageException(e.getMessage(), e);
}
@@ -148,7 +148,7 @@ public class JcrFolder extends JcrNode {
/**
* See CMIS 1.0 section 2.2.4.14 deleteObject
- *
+ *
* @throws CmisRuntimeException
*/
@Override
@@ -156,12 +156,10 @@ public class JcrFolder extends JcrNode {
try {
if (getNode().hasNodes()) {
throw new CmisConstraintException("Folder is not empty!");
- }
- else {
+ } else {
super.delete(allVersions, isPwc);
}
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
@@ -177,23 +175,21 @@ public class JcrFolder extends JcrNode {
try {
Node node = getNode();
if (hasCheckOuts(node)) {
- result.setIds(Collections.<String>singletonList(id));
- }
- else {
+ result.setIds(Collections.<String> singletonList(id));
+ } else {
Session session = node.getSession();
node.remove();
session.save();
- result.setIds(Collections.<String>emptyList());
+ result.setIds(Collections.<String> emptyList());
}
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
result.setIds(Collections.singletonList(id));
}
return result;
}
- //------------------------------------------< protected >---
+ // ------------------------------------------< protected >---
@Override
protected void compileProperties(PropertiesImpl properties, Set<String> filter, ObjectInfoImpl objectInfo)
@@ -212,9 +208,8 @@ public class JcrFolder extends JcrNode {
// folder properties
if (pathManager.isRoot(getNode())) {
objectInfo.setHasParent(false);
- addPropertyList(properties, typeId, filter, PropertyIds.PARENT_ID, Collections.<String>emptyList());
- }
- else {
+ addPropertyList(properties, typeId, filter, PropertyIds.PARENT_ID, Collections.<String> emptyList());
+ } else {
objectInfo.setHasParent(true);
addPropertyId(properties, typeId, filter, PropertyIds.PARENT_ID, getParent().getObjectId());
}
@@ -243,9 +238,7 @@ public class JcrFolder extends JcrNode {
@Override
protected String getObjectId() throws RepositoryException {
- return isRoot()
- ? PathManager.CMIS_ROOT_ID
- : super.getObjectId();
+ return isRoot() ? PathManager.CMIS_ROOT_ID : super.getObjectId();
}
@Override
@@ -304,26 +297,25 @@ public class JcrFolder extends JcrNode {
addedProps.add(prop.getId());
}
- // check if required properties are missing and try to add default values if defined
+ // check if required properties are missing and try to add default
+ // values if defined
for (PropertyDefinition<?> propDef : type.getPropertyDefinitions().values()) {
if (!addedProps.contains(propDef.getId()) && propDef.getUpdatability() != Updatability.READONLY) {
PropertyData<?> prop = PropertyHelper.getDefaultValue(propDef);
if (prop == null && propDef.isRequired()) {
throw new CmisConstraintException("Property '" + propDef.getId() + "' is required!");
- }
- else if (prop != null) {
+ } else if (prop != null) {
JcrConverter.setProperty(node, prop);
}
}
}
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisStorageException(e.getMessage(), e);
}
}
- //------------------------------------------< private >---
+ // ------------------------------------------< private >---
private static boolean hasCheckOuts(Node node) throws RepositoryException {
// Build xpath query of the form
@@ -341,24 +333,26 @@ public class JcrFolder extends JcrNode {
QueryResult queryResult = query.execute();
return queryResult.getNodes().hasNext();
}
-
+
/**
- * Add property "cmis:allowedChildObjectTypeIds" to the CMIS object.
- * See CMIS specification v.1.0, 2.1.5.4.2 Property Definitions.
+ * Add property "cmis:allowedChildObjectTypeIds" to the CMIS object. See
+ * CMIS specification v.1.0, 2.1.5.4.2 Property Definitions.
*
- * @param properties - the properties of the CMIS object represented by this instance.
+ * @param properties
+ * - the properties of the CMIS object represented by this
+ * instance.
* @param filter
- * @param typeId - type ID of the instance.
+ * @param typeId
+ * - type ID of the instance.
*/
- private void addPropertyAllowedChildObjectTypeIds(PropertiesImpl properties,
- Set<String> filter, String typeId) {
- Iterator<TypeDefinitionContainer> typeDefIterator = super.typeManager.getTypeDefinitionList().iterator();
+ private void addPropertyAllowedChildObjectTypeIds(PropertiesImpl properties, Set<String> filter, String typeId) {
+ Iterator<TypeDefinitionContainer> typeDefIterator = super.typeManager.getTypeDefinitionList().iterator();
List<String> typeIds = new ArrayList<String>(super.typeManager.getTypeDefinitionList().size());
while (typeDefIterator.hasNext()) {
- TypeDefinitionContainer definition = typeDefIterator.next();
- typeIds.add(definition.getTypeDefinition().getId());
+ TypeDefinitionContainer definition = typeDefIterator.next();
+ typeIds.add(definition.getTypeDefinition().getId());
}
- addPropertyList(properties, typeId, filter, PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS, typeIds);
- }
-
+ addPropertyList(properties, typeId, filter, PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS, typeIds);
+ }
+
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrNode.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrNode.java?rev=1516250&r1=1516249&r2=1516250&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrNode.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrNode.java Wed Aug 21 18:36:15 2013
@@ -70,8 +70,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Common base class for all JCR <code>Node</code>s to be represented as CMIS objects. Instances of this class
- * are responsible for mapping from CMIS to JCR and vice versa.
+ * Common base class for all JCR <code>Node</code>s to be represented as CMIS
+ * objects. Instances of this class are responsible for mapping from CMIS to JCR
+ * and vice versa.
*/
public abstract class JcrNode {
@@ -83,8 +84,8 @@ public abstract class JcrNode {
public static final String USER_UNKNOWN = "unknown";
/**
- * Default value for cmis:createdBy and cmis:lastModifiedDate
- * (Thu Jan 01 01:00:00 CET 1970)
+ * Default value for cmis:createdBy and cmis:lastModifiedDate (Thu Jan 01
+ * 01:00:00 CET 1970)
*/
public static final GregorianCalendar DATE_UNKNOWN;
@@ -100,13 +101,15 @@ public abstract class JcrNode {
/**
* Create a new instance wrapping a JCR <code>node</code>.
- *
- * @param node the JCR <code>node</code> to represent
+ *
+ * @param node
+ * the JCR <code>node</code> to represent
* @param typeManager
* @param pathManager
* @param typeHandlerManager
*/
- protected JcrNode(Node node, JcrTypeManager typeManager, PathManager pathManager, JcrTypeHandlerManager typeHandlerManager) {
+ protected JcrNode(Node node, JcrTypeManager typeManager, PathManager pathManager,
+ JcrTypeHandlerManager typeHandlerManager) {
this.node = node;
this.typeManager = typeManager;
this.pathManager = pathManager;
@@ -114,134 +117,134 @@ public abstract class JcrNode {
}
/**
- * @return the JCR <code>node</code> represented by this instance
+ * @return the JCR <code>node</code> represented by this instance
*/
public Node getNode() {
return node;
}
/**
- * @return the name of the CMIS object represented by this instance
- * @throws CmisRuntimeException
+ * @return the name of the CMIS object represented by this instance
+ * @throws CmisRuntimeException
*/
public String getName() {
try {
return getNodeName();
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
}
/**
- * @return the id of the CMIS object represented by this instance
- * @throws CmisRuntimeException
+ * @return the id of the CMIS object represented by this instance
+ * @throws CmisRuntimeException
*/
public String getId() {
try {
return getObjectId();
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
}
/**
- * @return the typeId of the CMIS object represented by this instance
+ * @return the typeId of the CMIS object represented by this instance
*/
public String getTypeId() {
return getTypeIdInternal();
}
/**
- * @return <code>true</code> iff this instance represent the root of the CMIS folder hierarchy.
+ * @return <code>true</code> iff this instance represent the root of the
+ * CMIS folder hierarchy.
*/
public boolean isRoot() {
return pathManager.isRoot(node);
}
/**
- * @return <code>true</code> iff this instance represents a cmis:document type
+ * @return <code>true</code> iff this instance represents a cmis:document
+ * type
*/
public boolean isDocument() {
return BaseTypeId.CMIS_DOCUMENT == getBaseTypeId();
}
/**
- * @return <code>true</code> iff this instance represents a cmis:folder type
+ * @return <code>true</code> iff this instance represents a cmis:folder type
*/
public boolean isFolder() {
return BaseTypeId.CMIS_FOLDER == getBaseTypeId();
}
/**
- * @return <code>true</code> iff this instance represents a versionable CMIS object
+ * @return <code>true</code> iff this instance represents a versionable CMIS
+ * object
*/
public boolean isVersionable() {
TypeDefinition typeDef = typeManager.getType(getTypeIdInternal());
- return typeDef instanceof DocumentTypeDefinition
- ? ((DocumentTypeDefinition) typeDef).isVersionable()
- : false;
+ return typeDef instanceof DocumentTypeDefinition ? ((DocumentTypeDefinition) typeDef).isVersionable() : false;
}
/**
- * @return this instance as a <code>JcrDocument</code>
- * @throws CmisConstraintException if <code>this.isDocument() == false</code>
+ * @return this instance as a <code>JcrDocument</code>
+ * @throws CmisConstraintException
+ * if <code>this.isDocument() == false</code>
*/
public JcrDocument asDocument() {
if (isDocument()) {
return (JcrDocument) this;
- }
- else {
+ } else {
throw new CmisConstraintException("Not a document: " + this);
}
}
/**
- * @return this instance as a <code>JcrFolder</code>
- * @throws CmisConstraintException if <code>this.isFolder() == false</code>
+ * @return this instance as a <code>JcrFolder</code>
+ * @throws CmisConstraintException
+ * if <code>this.isFolder() == false</code>
*/
public JcrFolder asFolder() {
if (isFolder()) {
return (JcrFolder) this;
- }
- else {
+ } else {
throw new CmisObjectNotFoundException("Not a folder: " + this);
}
}
/**
- * @return this instance as a <code>JcrVersionBase</code>
- * @throws CmisConstraintException if <code>this.isVersionable() == false</code>
+ * @return this instance as a <code>JcrVersionBase</code>
+ * @throws CmisConstraintException
+ * if <code>this.isVersionable() == false</code>
*/
public JcrVersionBase asVersion() {
if (isVersionable()) {
return (JcrVersionBase) this;
- }
- else {
+ } else {
throw new CmisObjectNotFoundException("Not a version: " + this);
}
}
/**
- * Factory method creating a new <code>JcrNode</code> from a node at a given JCR path.
- *
- * @param path JCR path of the node
- * @return A new instance representing the JCR node at <code>path</code>
- * @throws CmisObjectNotFoundException if <code>path</code> does not identify a JCR node
+ * Factory method creating a new <code>JcrNode</code> from a node at a given
+ * JCR path.
+ *
+ * @param path
+ * JCR path of the node
+ * @return A new instance representing the JCR node at <code>path</code>
+ * @throws CmisObjectNotFoundException
+ * if <code>path</code> does not identify a JCR node
* @throws CmisRuntimeException
*/
public JcrNode getNode(String path) {
try {
return create(node.getNode(path));
- }
- catch (PathNotFoundException e) {
+ } catch (PathNotFoundException e) {
log.debug(e.getMessage(), e);
throw new CmisObjectNotFoundException(e.getMessage(), e);
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
@@ -275,8 +278,7 @@ public abstract class JcrNode {
}
return result;
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
@@ -293,20 +295,19 @@ public abstract class JcrNode {
/**
* See CMIS 1.0 section 2.2.3.5 getObjectParents
- *
- * @return parent of this object
- * @throws CmisObjectNotFoundException if this is the root folder
- * @throws CmisRuntimeException
+ *
+ * @return parent of this object
+ * @throws CmisObjectNotFoundException
+ * if this is the root folder
+ * @throws CmisRuntimeException
*/
public JcrFolder getParent() {
try {
return create(node.getParent()).asFolder();
- }
- catch (ItemNotFoundException e) {
+ } catch (ItemNotFoundException e) {
log.debug(e.getMessage(), e);
throw new CmisObjectNotFoundException(e.getMessage(), e);
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
@@ -314,7 +315,7 @@ public abstract class JcrNode {
/**
* See CMIS 1.0 section 2.2.4.12 updateProperties
- *
+ *
* @throws CmisStorageException
*/
public JcrNode updateProperties(Properties properties) {
@@ -332,17 +333,14 @@ public abstract class JcrNode {
String destPath = PathManager.createCmisPath(node.getParent().getPath(), newName);
session.move(node.getPath(), destPath);
newNode = session.getNode(destPath);
- }
- else {
+ } else {
newNode = node;
}
// Are there properties to update?
PropertyUpdater propertyUpdater = PropertyUpdater.create(typeManager, getTypeId(), properties);
- JcrVersionBase jcrVersion = isVersionable()
- ? asVersion()
- : null;
+ JcrVersionBase jcrVersion = isVersionable() ? asVersion() : null;
// Update properties. Checkout if required
boolean autoCheckout = false;
@@ -361,18 +359,15 @@ public abstract class JcrNode {
if (autoCheckout) {
// auto versioning -> return new version created by checkin
return jcrVersion.checkin(null, null, "auto checkout");
- }
- else if (jcrVersion != null && jcrVersion.isCheckedOut()) {
+ } else if (jcrVersion != null && jcrVersion.isCheckedOut()) {
// the node is checked out -> return pwc.
JcrVersionBase jcrNewVersion = create(newNode).asVersion();
return jcrNewVersion.getPwc();
- }
- else {
+ } else {
// non versionable or not a new node -> return this
return create(newNode);
}
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisStorageException(e.getMessage(), e);
}
@@ -381,7 +376,7 @@ public abstract class JcrNode {
/**
* See CMIS 1.0 section 2.2.4.14 deleteObject
- *
+ *
* @throws CmisRuntimeException
*/
public void delete(boolean allVersions, boolean isPwc) {
@@ -389,8 +384,7 @@ public abstract class JcrNode {
Session session = getNode().getSession();
getNode().remove();
session.save();
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
@@ -398,7 +392,7 @@ public abstract class JcrNode {
/**
* See CMIS 1.0 section 2.2.4.13 moveObject
- *
+ *
* @throws CmisStorageException
*/
public JcrNode move(JcrFolder parent) {
@@ -409,8 +403,7 @@ public abstract class JcrNode {
Node newNode;
if (srcPath.equals(destPath)) {
newNode = node;
- }
- else {
+ } else {
Session session = getNode().getSession();
session.move(srcPath, destPath);
newNode = session.getNode(destPath);
@@ -418,8 +411,7 @@ public abstract class JcrNode {
}
return create(newNode);
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisStorageException(e.getMessage(), e);
}
@@ -429,40 +421,40 @@ public abstract class JcrNode {
public String toString() {
try {
return node.getPath();
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
return e.getMessage();
}
}
- //------------------------------------------< protected >---
+ // ------------------------------------------< protected >---
/**
- * Retrieve the context node of the CMIS object represented by this instance. The
- * context node is the node which is used to derive the common properties from
- * (creation date, modification date, ...)
- *
- * @return the context node
+ * Retrieve the context node of the CMIS object represented by this
+ * instance. The context node is the node which is used to derive the common
+ * properties from (creation date, modification date, ...)
+ *
+ * @return the context node
* @throws RepositoryException
*/
protected abstract Node getContextNode() throws RepositoryException;
/**
- * @return the value of the <code>cmis:baseTypeId</code> property
+ * @return the value of the <code>cmis:baseTypeId</code> property
*/
protected abstract BaseTypeId getBaseTypeId();
/**
- * @return the value of the <code>cmis:objectTypeId</code> property
+ * @return the value of the <code>cmis:objectTypeId</code> property
*/
protected abstract String getTypeIdInternal();
/**
* Compile the properties of the CMIS object represented by this instance.
* See CMIS 1.0 section 2.2.4.7 getObject
- *
- * @param properties compilation of properties
+ *
+ * @param properties
+ * compilation of properties
* @param filter
* @param objectInfo
* @throws RepositoryException
@@ -491,8 +483,8 @@ public abstract class JcrNode {
// name
String name = getNodeName();
if (PathManager.CMIS_ROOT_ID.equals(objectId) && "".equals(name)) {
- //set default name for the root node
- name = PathManager.CMIS_ROOT_ID;
+ // set default name for the root node
+ name = PathManager.CMIS_ROOT_ID;
}
addPropertyString(properties, typeId, filter, PropertyIds.NAME, name);
objectInfo.setName(name);
@@ -521,10 +513,11 @@ public abstract class JcrNode {
}
/**
- * Compile the allowed actions on the CMIS object represented by this instance
- * See CMIS 1.0 section 2.2.4.6 getAllowableActions
- *
- * @param aas compilation of allowed actions
+ * Compile the allowed actions on the CMIS object represented by this
+ * instance See CMIS 1.0 section 2.2.4.6 getAllowableActions
+ *
+ * @param aas
+ * compilation of allowed actions
* @return
*/
protected Set<Action> compileAllowableActions(Set<Action> aas) {
@@ -546,7 +539,7 @@ public abstract class JcrNode {
}
/**
- * @return the change token of the CMIS object represented by this instance
+ * @return the change token of the CMIS object represented by this instance
* @throws RepositoryException
*/
protected String getChangeToken() throws RepositoryException {
@@ -554,7 +547,7 @@ public abstract class JcrNode {
}
/**
- * @return the last modifier of the CMIS object represented by this instance
+ * @return the last modifier of the CMIS object represented by this instance
* @throws RepositoryException
*/
protected String getLastModifiedBy() throws RepositoryException {
@@ -562,7 +555,8 @@ public abstract class JcrNode {
}
/**
- * @return the last modification date of the CMIS object represented by this instance
+ * @return the last modification date of the CMIS object represented by this
+ * instance
* @throws RepositoryException
*/
protected GregorianCalendar getLastModified() throws RepositoryException {
@@ -570,7 +564,7 @@ public abstract class JcrNode {
}
/**
- * @return the creation date of the CMIS object represented by this instance
+ * @return the creation date of the CMIS object represented by this instance
* @throws RepositoryException
*/
protected GregorianCalendar getCreated() throws RepositoryException {
@@ -578,7 +572,7 @@ public abstract class JcrNode {
}
/**
- * @return the creator of the CMIS object represented by this instance
+ * @return the creator of the CMIS object represented by this instance
* @throws RepositoryException
*/
protected String getCreatedBy() throws RepositoryException {
@@ -586,7 +580,7 @@ public abstract class JcrNode {
}
/**
- * @return the name of the underlying JCR <code>node</code>.
+ * @return the name of the underlying JCR <code>node</code>.
* @throws RepositoryException
*/
protected String getNodeName() throws RepositoryException {
@@ -594,7 +588,7 @@ public abstract class JcrNode {
}
/**
- * @return the object id of the CMIS object represented by this instance
+ * @return the object id of the CMIS object represented by this instance
* @throws RepositoryException
*/
protected String getObjectId() throws RepositoryException {
@@ -602,7 +596,8 @@ public abstract class JcrNode {
}
/**
- * @return the versions series id of the CMIS object represented by this instance
+ * @return the versions series id of the CMIS object represented by this
+ * instance
* @throws RepositoryException
*/
protected String getVersionSeriesId() throws RepositoryException {
@@ -610,10 +605,12 @@ public abstract class JcrNode {
}
/**
- * Factory method for creating a new <code>JcrNode</code> instance from a JCR <code>Node</code>
- *
- * @param node the JCR <code>Node</code>
- * @return a new <code>JcrNode</code>
+ * Factory method for creating a new <code>JcrNode</code> instance from a
+ * JCR <code>Node</code>
+ *
+ * @param node
+ * the JCR <code>Node</code>
+ * @return a new <code>JcrNode</code>
*/
protected final JcrNode create(Node node) {
return typeHandlerManager.create(node);
@@ -639,7 +636,8 @@ public abstract class JcrNode {
/**
* Add string property to the CMIS object represented by this instance
*/
- protected final void addPropertyString(PropertiesImpl props, String typeId, Set<String> filter, String id, String value) {
+ protected final void addPropertyString(PropertiesImpl props, String typeId, Set<String> filter, String id,
+ String value) {
if (!checkAddProperty(props, typeId, filter, id)) {
return;
}
@@ -652,7 +650,8 @@ public abstract class JcrNode {
/**
* Add integer property to the CMIS object represented by this instance
*/
- protected final void addPropertyInteger(PropertiesImpl props, String typeId, Set<String> filter, String id, long value) {
+ protected final void addPropertyInteger(PropertiesImpl props, String typeId, Set<String> filter, String id,
+ long value) {
if (!checkAddProperty(props, typeId, filter, id)) {
return;
}
@@ -665,7 +664,8 @@ public abstract class JcrNode {
/**
* Add boolean property to the CMIS object represented by this instance
*/
- protected final void addPropertyBoolean(PropertiesImpl props, String typeId, Set<String> filter, String id, boolean value) {
+ protected final void addPropertyBoolean(PropertiesImpl props, String typeId, Set<String> filter, String id,
+ boolean value) {
if (!checkAddProperty(props, typeId, filter, id)) {
return;
}
@@ -689,18 +689,18 @@ public abstract class JcrNode {
prop.setQueryName(id);
props.addProperty(prop);
}
-
- protected final void addPropertyList(PropertiesImpl props, String typeId, Set<String> filter, String id,
- List<String> values) {
-
- if (!checkAddProperty(props, typeId, filter, id)) {
- return;
- }
-
- PropertyStringImpl prop = new PropertyStringImpl(id, values);
- prop.setQueryName(id);
- props.addProperty(prop);
-
+
+ protected final void addPropertyList(PropertiesImpl props, String typeId, Set<String> filter, String id,
+ List<String> values) {
+
+ if (!checkAddProperty(props, typeId, filter, id)) {
+ return;
+ }
+
+ PropertyStringImpl prop = new PropertyStringImpl(id, values);
+ prop.setQueryName(id);
+ props.addProperty(prop);
+
}
/**
@@ -728,8 +728,7 @@ public abstract class JcrNode {
if (queryName != null && filter != null) {
if (filter.contains(queryName)) {
filter.remove(queryName);
- }
- else {
+ } else {
return false;
}
}
@@ -744,7 +743,8 @@ public abstract class JcrNode {
private final List<PropertyData<?>> removeProperties = new ArrayList<PropertyData<?>>();
private final List<PropertyData<?>> updateProperties = new ArrayList<PropertyData<?>>();
- private PropertyUpdater() { }
+ private PropertyUpdater() {
+ }
public static PropertyUpdater create(JcrTypeManager typeManager, String typeId, Properties properties) {
if (properties == null) {
@@ -789,15 +789,12 @@ public abstract class JcrNode {
// default or value
PropertyData<?> newProp;
- newProp = PropertyHelper.isPropertyEmpty(prop)
- ? PropertyHelper.getDefaultValue(propDef)
- : prop;
+ newProp = PropertyHelper.isPropertyEmpty(prop) ? PropertyHelper.getDefaultValue(propDef) : prop;
// Schedule for remove or update
if (newProp == null) {
propertyUpdater.removeProperties.add(prop);
- }
- else {
+ } else {
propertyUpdater.updateProperties.add(newProp);
}
}
@@ -811,14 +808,13 @@ public abstract class JcrNode {
public void apply(Node node) {
try {
- for (PropertyData<?> prop: removeProperties) {
+ for (PropertyData<?> prop : removeProperties) {
JcrConverter.removeProperty(node, prop);
}
- for (PropertyData<?> prop: updateProperties) {
+ for (PropertyData<?> prop : updateProperties) {
JcrConverter.setProperty(node, prop);
}
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisStorageException(e.getMessage(), e);
}
@@ -833,19 +829,23 @@ public abstract class JcrNode {
}
/**
- * Utility function for retrieving the version history of a JCR <code>Node</code>.
- *
- * @param node the node for which to retrieve the version history
- * @return version history of <code>node</code>
- * @throws RepositoryException if <code>node</code> is not versionable
+ * Utility function for retrieving the version history of a JCR
+ * <code>Node</code>.
+ *
+ * @param node
+ * the node for which to retrieve the version history
+ * @return version history of <code>node</code>
+ * @throws RepositoryException
+ * if <code>node</code> is not versionable
*/
protected static VersionHistory getVersionHistory(Node node) throws RepositoryException {
return getVersionManager(node).getVersionHistory(node.getPath());
}
/**
- * Utility function for retrieving the version manager from a JCR <code>Node</code>.
- *
+ * Utility function for retrieving the version manager from a JCR
+ * <code>Node</code>.
+ *
* @param node
* @return
* @throws RepositoryException
@@ -855,34 +855,36 @@ public abstract class JcrNode {
}
/**
- * Utility function for retrieving the base version of a JCR <code>Node</code>.
- *
- * @param node the node for which to retrieve the base version
- * @return version base version of <code>node</code>
- * @throws RepositoryException if <code>node</code> is not versionable
+ * Utility function for retrieving the base version of a JCR
+ * <code>Node</code>.
+ *
+ * @param node
+ * the node for which to retrieve the base version
+ * @return version base version of <code>node</code>
+ * @throws RepositoryException
+ * if <code>node</code> is not versionable
*/
protected static Version getBaseVersion(Node node) throws RepositoryException {
return getVersionManager(node).getBaseVersion(node.getPath());
}
/**
- * Utility function to retrieve the length of a property of a JCR <code>Node</code>.
- *
+ * Utility function to retrieve the length of a property of a JCR
+ * <code>Node</code>.
+ *
* @param node
* @param propertyName
* @return
* @throws RepositoryException
*/
protected static long getPropertyLength(Node node, String propertyName) throws RepositoryException {
- return node.hasProperty(propertyName)
- ? node.getProperty(propertyName).getLength()
- : -1;
+ return node.hasProperty(propertyName) ? node.getProperty(propertyName).getLength() : -1;
}
/**
- * Utility function for retrieving a string property from a JCR <code>Node</code> or a default
- * value in case of an error.
- *
+ * Utility function for retrieving a string property from a JCR
+ * <code>Node</code> or a default value in case of an error.
+ *
* @param node
* @param propertyName
* @param defaultValue
@@ -892,15 +894,13 @@ public abstract class JcrNode {
protected static String getPropertyOrElse(Node node, String propertyName, String defaultValue)
throws RepositoryException {
- return node.hasProperty(propertyName)
- ? node.getProperty(propertyName).getString()
- : defaultValue;
+ return node.hasProperty(propertyName) ? node.getProperty(propertyName).getString() : defaultValue;
}
/**
- * Utility function for retrieving a date property from a JCR <code>Node</code> or a default
- * value in case of an error.
- *
+ * Utility function for retrieving a date property from a JCR
+ * <code>Node</code> or a default value in case of an error.
+ *
* @param node
* @param propertyName
* @param defaultValue
@@ -913,15 +913,15 @@ public abstract class JcrNode {
if (node.hasProperty(propertyName)) {
Calendar date = node.getProperty(propertyName).getDate();
return Util.toCalendar(date);
- }
- else {
+ } else {
return defaultValue;
}
}
/**
- * Add <code>action</code> to <code>actions</code> iff <code>condition</code> is true.
- *
+ * Add <code>action</code> to <code>actions</code> iff
+ * <code>condition</code> is true.
+ *
* @param actions
* @param action
* @param condition
@@ -929,8 +929,7 @@ public abstract class JcrNode {
protected static void setAction(Set<Action> actions, Action action, boolean condition) {
if (condition) {
actions.add(action);
- }
- else {
+ } else {
actions.remove(action);
}
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrPrivateWorkingCopy.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrPrivateWorkingCopy.java?rev=1516250&r1=1516249&r2=1516250&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrPrivateWorkingCopy.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrPrivateWorkingCopy.java Wed Aug 21 18:36:15 2013
@@ -28,11 +28,11 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Instances of this class represent a private working copy of a cmis:document backed by an underlying
- * JCR <code>Node</code>.
+ * Instances of this class represent a private working copy of a cmis:document
+ * backed by an underlying JCR <code>Node</code>.
*/
public class JcrPrivateWorkingCopy extends JcrVersionBase {
- private static final Logger log = LoggerFactory.getLogger(JcrPrivateWorkingCopy.class);
+ private static final Logger LOG = LoggerFactory.getLogger(JcrPrivateWorkingCopy.class);
/**
* Name of a private working copy
@@ -41,12 +41,13 @@ public class JcrPrivateWorkingCopy exten
public JcrPrivateWorkingCopy(Node node, JcrTypeManager typeManager, PathManager pathManager,
JcrTypeHandlerManager typeHandlerManager) {
-
+
super(node, typeManager, pathManager, typeHandlerManager);
}
/**
- * @return <code>true</code> iff <code>versionName</code> is the name of private working copy.
+ * @return <code>true</code> iff <code>versionName</code> is the name of
+ * private working copy.
* @see JcrPrivateWorkingCopy#PWC_NAME
*/
public static boolean denotesPwc(String versionName) {
@@ -55,22 +56,22 @@ public class JcrPrivateWorkingCopy exten
/**
* @param objectId
- * @return <code>true</code> iff <code>objectId</code> is the id of a private working copy.
+ * @return <code>true</code> iff <code>objectId</code> is the id of a
+ * private working copy.
* @see JcrPrivateWorkingCopy#PWC_NAME
*/
public static boolean isPwc(String objectId) {
- return objectId.equals(PWC_NAME);
+ return objectId.equals(PWC_NAME);
}
- //------------------------------------------< protected >---
+ // ------------------------------------------< protected >---
@Override
protected Node getContextNode() {
try {
return getNode().getNode(Node.JCR_CONTENT);
- }
- catch (RepositoryException e) {
- log.debug(e.getMessage(), e);
+ } catch (RepositoryException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisObjectNotFoundException(e.getMessage(), e);
}
}
@@ -102,7 +103,7 @@ public class JcrPrivateWorkingCopy exten
@Override
protected boolean isLatestMajorVersion() throws RepositoryException {
- return false;
+ return false;
}
@Override
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrRepository.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrRepository.java?rev=1516250&r1=1516249&r2=1516250&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrRepository.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrRepository.java Wed Aug 21 18:36:15 2013
@@ -90,7 +90,7 @@ import org.slf4j.LoggerFactory;
* JCR back-end for CMIS server.
*/
public class JcrRepository {
- private static final Logger log = LoggerFactory.getLogger(JcrRepository.class);
+ private static final Logger LOG = LoggerFactory.getLogger(JcrRepository.class);
protected final Repository repository;
protected final JcrTypeManager typeManager;
@@ -98,14 +98,17 @@ public class JcrRepository {
protected final JcrTypeHandlerManager typeHandlerManager;
/**
- * Create a new <code>JcrRepository</code> instance backed by a JCR repository.
- *
- * @param repository the JCR repository
+ * Create a new <code>JcrRepository</code> instance backed by a JCR
+ * repository.
+ *
+ * @param repository
+ * the JCR repository
* @param pathManager
- * @param typeManager
+ * @param typeManager
* @param typeHandlerManager
*/
- public JcrRepository(Repository repository, PathManager pathManager, JcrTypeManager typeManager, JcrTypeHandlerManager typeHandlerManager) {
+ public JcrRepository(Repository repository, PathManager pathManager, JcrTypeManager typeManager,
+ JcrTypeHandlerManager typeHandlerManager) {
this.repository = repository;
this.typeManager = typeManager;
this.typeHandlerManager = typeHandlerManager;
@@ -125,17 +128,14 @@ public class JcrRepository {
public Session login(Credentials credentials, String workspaceName) {
try {
return repository.login(credentials, workspaceName);
- }
- catch (LoginException e) {
- log.debug(e.getMessage(), e);
+ } catch (LoginException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisPermissionDeniedException(e.getMessage(), e);
- }
- catch (NoSuchWorkspaceException e) {
- log.debug(e.getMessage(), e);
+ } catch (NoSuchWorkspaceException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisObjectNotFoundException(e.getMessage(), e);
- }
- catch (RepositoryException e) {
- log.debug(e.getMessage(), e);
+ } catch (RepositoryException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
}
@@ -144,7 +144,7 @@ public class JcrRepository {
* See CMIS 1.0 section 2.2.2.2 getRepositoryInfo
*/
public RepositoryInfo getRepositoryInfo(Session session) {
- log.debug("getRepositoryInfo");
+ LOG.debug("getRepositoryInfo");
return compileRepositoryInfo(session.getWorkspace().getName());
}
@@ -160,9 +160,8 @@ public class JcrRepository {
}
return infos;
- }
- catch (RepositoryException e) {
- log.debug(e.getMessage(), e);
+ } catch (RepositoryException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
}
@@ -172,8 +171,8 @@ public class JcrRepository {
*/
public TypeDefinitionList getTypeChildren(Session session, String typeId, boolean includePropertyDefinitions,
BigInteger maxItems, BigInteger skipCount) {
-
- log.debug("getTypesChildren");
+
+ LOG.debug("getTypesChildren");
return typeManager.getTypeChildren(typeId, includePropertyDefinitions, maxItems, skipCount);
}
@@ -181,7 +180,7 @@ public class JcrRepository {
* See CMIS 1.0 section 2.2.2.5 getTypeDefinition
*/
public TypeDefinition getTypeDefinition(Session session, String typeId) {
- log.debug("getTypeDefinition");
+ LOG.debug("getTypeDefinition");
TypeDefinition type = typeManager.getType(typeId);
if (type == null) {
@@ -197,7 +196,7 @@ public class JcrRepository {
public List<TypeDefinitionContainer> getTypesDescendants(Session session, String typeId, BigInteger depth,
Boolean includePropertyDefinitions) {
- log.debug("getTypesDescendants");
+ LOG.debug("getTypesDescendants");
return typeManager.getTypesDescendants(typeId, depth, includePropertyDefinitions);
}
@@ -207,7 +206,7 @@ public class JcrRepository {
public String createDocument(Session session, Properties properties, String folderId, ContentStream contentStream,
VersioningState versioningState) {
- log.debug("createDocument");
+ LOG.debug("createDocument");
// check properties
if (properties == null || properties.getProperties() == null) {
@@ -235,7 +234,8 @@ public class JcrRepository {
// get parent Node and create child
JcrFolder parent = getJcrNode(session, folderId).asFolder();
JcrDocumentTypeHandler typeHandler = typeHandlerManager.getDocumentTypeHandler(typeId);
- JcrNode jcrNode = typeHandler.createDocument(parent, JcrConverter.toJcrName(name), properties, contentStream, versioningState);
+ JcrNode jcrNode = typeHandler.createDocument(parent, JcrConverter.toJcrName(name), properties, contentStream,
+ versioningState);
return jcrNode.getId();
}
@@ -245,7 +245,7 @@ public class JcrRepository {
public String createDocumentFromSource(Session session, String sourceId, Properties properties, String folderId,
VersioningState versioningState) {
- log.debug("createDocumentFromSource");
+ LOG.debug("createDocumentFromSource");
// get parent folder Node
JcrFolder parent = getJcrNode(session, folderId).asFolder();
@@ -271,7 +271,7 @@ public class JcrRepository {
* See CMIS 1.0 section 2.2.4.3 createFolder
*/
public String createFolder(Session session, Properties properties, String folderId) {
- log.debug("createFolder");
+ LOG.debug("createFolder");
// check properties
if (properties == null || properties.getProperties() == null) {
@@ -300,7 +300,7 @@ public class JcrRepository {
public ObjectData moveObject(Session session, Holder<String> objectId, String targetFolderId,
ObjectInfoHandler objectInfos, boolean requiresObjectInfo) {
- log.debug("moveObject");
+ LOG.debug("moveObject");
if (objectId == null || objectId.getValue() == null) {
throw new CmisInvalidArgumentException("Id is not valid!");
@@ -320,7 +320,7 @@ public class JcrRepository {
public void setContentStream(Session session, Holder<String> objectId, Boolean overwriteFlag,
ContentStream contentStream) {
- log.debug("setContentStream or deleteContentStream");
+ LOG.debug("setContentStream or deleteContentStream");
if (objectId == null || objectId.getValue() == null) {
throw new CmisInvalidArgumentException("Id is not valid!");
@@ -335,7 +335,7 @@ public class JcrRepository {
* See CMIS 1.0 section 2.2.4.14 deleteObject
*/
public void deleteObject(Session session, String objectId, Boolean allVersions) {
- log.debug("deleteObject");
+ LOG.debug("deleteObject");
// get the node
JcrNode jcrNode = getJcrNode(session, objectId);
@@ -344,9 +344,8 @@ public class JcrRepository {
boolean isPwc = jcrNode.isVersionable()
&& JcrPrivateWorkingCopy.isPwc(jcrNode.asVersion().getVersionLabel());
jcrNode.delete(Boolean.TRUE.equals(allVersions), isPwc);
- }
- catch(RepositoryException rex) {
- log.debug(rex.getMessage(), rex);
+ } catch (RepositoryException rex) {
+ LOG.debug(rex.getMessage(), rex);
throw new CmisRuntimeException(rex.getMessage(), rex);
}
}
@@ -355,7 +354,7 @@ public class JcrRepository {
* See CMIS 1.0 section 2.2.4.15 deleteTree
*/
public FailedToDeleteData deleteTree(Session session, String folderId) {
- log.debug("deleteTree");
+ LOG.debug("deleteTree");
// get the folder
JcrFolder jcrFolder = getJcrNode(session, folderId).asFolder();
@@ -368,7 +367,7 @@ public class JcrRepository {
public ObjectData updateProperties(Session session, Holder<String> objectId, Properties properties,
ObjectInfoHandler objectInfos, boolean objectInfoRequired) {
- log.debug("updateProperties");
+ LOG.debug("updateProperties");
if (objectId == null) {
throw new CmisInvalidArgumentException("Id is not valid!");
@@ -387,7 +386,7 @@ public class JcrRepository {
public ObjectData getObject(Session session, String objectId, String filter, Boolean includeAllowableActions,
ObjectInfoHandler objectInfos, boolean requiresObjectInfo) {
- log.debug("getObject");
+ LOG.debug("getObject");
// check id
if (objectId == null) {
@@ -407,7 +406,8 @@ public class JcrRepository {
public Properties getProperties(Session session, String objectId, String filter, Boolean includeAllowableActions,
ObjectInfoHandler objectInfos, boolean requiresObjectInfo) {
- ObjectData object = getObject(session, objectId, filter, includeAllowableActions, objectInfos, requiresObjectInfo);
+ ObjectData object = getObject(session, objectId, filter, includeAllowableActions, objectInfos,
+ requiresObjectInfo);
return object.getProperties();
}
@@ -415,7 +415,7 @@ public class JcrRepository {
* See CMIS 1.0 section 2.2.4.6 getAllowableActions
*/
public AllowableActions getAllowableActions(Session session, String objectId) {
- log.debug("getAllowableActions");
+ LOG.debug("getAllowableActions");
JcrNode jcrNode = getJcrNode(session, objectId);
return jcrNode.getAllowableActions();
@@ -425,7 +425,7 @@ public class JcrRepository {
* See CMIS 1.0 section 2.2.4.10 getContentStream
*/
public ContentStream getContentStream(Session session, String objectId, BigInteger offset, BigInteger length) {
- log.debug("getContentStream");
+ LOG.debug("getContentStream");
if (offset != null || length != null) {
throw new CmisInvalidArgumentException("Offset and Length are not supported!");
@@ -433,7 +433,7 @@ public class JcrRepository {
// get the node
JcrDocument jcrDocument = getJcrNode(session, objectId).asDocument();
- return jcrDocument.getContentStream();
+ return jcrDocument.getContentStream();
}
/**
@@ -443,7 +443,7 @@ public class JcrRepository {
Boolean includeAllowableActions, Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount,
ObjectInfoHandler objectInfos, boolean requiresObjectInfo) {
- log.debug("getChildren");
+ LOG.debug("getChildren");
// skip and max
int skip = skipCount == null ? 0 : skipCount.intValue();
@@ -474,7 +474,7 @@ public class JcrRepository {
Set<String> splitFilter = splitFilter(filter);
Iterator<JcrNode> childNodes = jcrFolder.getNodes();
while (childNodes.hasNext()) {
- JcrNode child = childNodes.next();
+ JcrNode child = childNodes.next();
count++;
if (skip > 0) {
@@ -510,7 +510,7 @@ public class JcrRepository {
String filter, Boolean includeAllowableActions, Boolean includePathSegment, ObjectInfoHandler objectInfos,
boolean requiresObjectInfo, boolean foldersOnly) {
- log.debug("getDescendants or getFolderTree");
+ LOG.debug("getDescendants or getFolderTree");
// check depth
int d = depth == null ? 2 : depth.intValue();
@@ -560,7 +560,7 @@ public class JcrRepository {
Boolean includeAllowableActions, Boolean includeRelativePathSegment, ObjectInfoHandler objectInfos,
boolean requiresObjectInfo) {
- log.debug("getObjectParents");
+ LOG.debug("getObjectParents");
// get the file or folder
JcrNode jcrNode = getJcrNode(session, objectId);
@@ -592,12 +592,13 @@ public class JcrRepository {
/**
* See CMIS 1.0 section 2.2.4.9 getObjectByPath
*/
- public ObjectData getObjectByPath(Session session, String folderPath, String filter, boolean includeAllowableActions,
- boolean includeACL, ObjectInfoHandler objectInfos, boolean requiresObjectInfo) {
+ public ObjectData getObjectByPath(Session session, String folderPath, String filter,
+ boolean includeAllowableActions, boolean includeACL, ObjectInfoHandler objectInfos,
+ boolean requiresObjectInfo) {
- log.debug("getObjectByPath");
+ LOG.debug("getObjectByPath");
- // check path
+ // check path
if (folderPath == null || !PathManager.isAbsolute(folderPath)) {
throw new CmisInvalidArgumentException("Invalid folder path!");
}
@@ -606,8 +607,7 @@ public class JcrRepository {
JcrNode jcrNode;
if (PathManager.isRoot(folderPath)) {
jcrNode = root;
- }
- else {
+ } else {
String path = PathManager.relativize(PathManager.CMIS_ROOT_PATH, folderPath);
jcrNode = root.getNode(path);
}
@@ -621,7 +621,7 @@ public class JcrRepository {
public ObjectList getCheckedOutDocs(Session session, String folderId, String filter, String orderBy,
Boolean includeAllowableActions, BigInteger maxItems, BigInteger skipCount) {
- log.debug("getCheckedOutDocs");
+ LOG.debug("getCheckedOutDocs");
// skip and max
int skip = skipCount == null ? 0 : skipCount.intValue();
@@ -636,10 +636,11 @@ public class JcrRepository {
try {
// Build xpath query of the form
- // '//path/to/folderId//*[jcr:isCheckedOut='true' and (not(@jcr:createdBy) or @jcr:createdBy='admin')]'
- String xPath = "/*[jcr:isCheckedOut='true' " +
- "and (not(@jcr:createdBy) or @jcr:createdBy='" + session.getUserID() + "')]";
-
+ // '//path/to/folderId//*[jcr:isCheckedOut='true' and
+ // (not(@jcr:createdBy) or @jcr:createdBy='admin')]'
+ String xPath = "/*[jcr:isCheckedOut='true' " + "and (not(@jcr:createdBy) or @jcr:createdBy='"
+ + session.getUserID() + "')]";
+
if (folderId != null) {
JcrFolder jcrFolder = getJcrNode(session, folderId).asFolder();
String path = jcrFolder.getNode().getPath();
@@ -647,8 +648,7 @@ public class JcrRepository {
path = "";
}
xPath = '/' + Util.escape(path) + xPath;
- }
- else {
+ } else {
xPath = '/' + xPath;
}
@@ -684,7 +684,7 @@ public class JcrRepository {
result.setHasMoreItems(true);
continue;
}
-
+
// build and add child object
JcrPrivateWorkingCopy jcrVersion = jcrNode.asVersion().getPwc();
ObjectData objectData = jcrVersion.compileObjectType(splitFilter, includeAllowableActions, null, false);
@@ -693,9 +693,8 @@ public class JcrRepository {
result.setNumItems(BigInteger.valueOf(count));
return result;
- }
- catch (RepositoryException e) {
- log.debug(e.getMessage(), e);
+ } catch (RepositoryException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
}
@@ -704,9 +703,9 @@ public class JcrRepository {
* See CMIS 1.0 section 2.2.7.1 checkOut
*/
public void checkOut(Session session, Holder<String> objectId, Holder<Boolean> contentCopied) {
- log.debug("checkout");
+ LOG.debug("checkout");
- // check id
+ // check id
if (objectId == null || objectId.getValue() == null) {
throw new CmisInvalidArgumentException("Object Id must be set.");
}
@@ -729,7 +728,7 @@ public class JcrRepository {
* See CMIS 1.0 section 2.2.7.2 cancelCheckout
*/
public void cancelCheckout(Session session, String objectId) {
- log.debug("cancelCheckout");
+ LOG.debug("cancelCheckout");
// check id
if (objectId == null) {
@@ -752,7 +751,7 @@ public class JcrRepository {
public void checkIn(Session session, Holder<String> objectId, Boolean major, Properties properties,
ContentStream contentStream, String checkinComment) {
- log.debug("checkin");
+ LOG.debug("checkin");
// check id
if (objectId == null || objectId.getValue() == null) {
@@ -763,11 +762,10 @@ public class JcrRepository {
JcrNode jcrNode;
try {
jcrNode = getJcrNode(session, objectId.getValue());
- }
- catch (CmisObjectNotFoundException e) {
+ } catch (CmisObjectNotFoundException e) {
throw new CmisUpdateConflictException(e.getCause().getMessage(), e.getCause());
}
-
+
if (!jcrNode.isVersionable()) {
throw new CmisUpdateConflictException("Not a version: " + jcrNode);
}
@@ -783,7 +781,7 @@ public class JcrRepository {
public List<ObjectData> getAllVersions(Session session, String objectId, String filter,
Boolean includeAllowableActions, ObjectInfoHandler objectInfos, boolean requiresObjectInfo) {
- log.debug("getAllVersions");
+ LOG.debug("getAllVersions");
// check id
if (objectId == null) {
@@ -824,8 +822,7 @@ public class JcrRepository {
// CMIS mandates descending order
Collections.reverse(allVersions);
return allVersions;
- }
- else {
+ } else {
// Single version
ObjectData objectData = jcrNode.compileObjectType(splitFilter, includeAllowableActions, objectInfos,
requiresObjectInfo);
@@ -841,14 +838,14 @@ public class JcrRepository {
public ObjectList query(final Session session, String statement, Boolean searchAllVersions,
Boolean includeAllowableActions, BigInteger maxItems, BigInteger skipCount) {
- log.debug("query");
+ LOG.debug("query");
if (searchAllVersions) {
throw new CmisNotSupportedException("Not supported: query for all versions");
}
// skip and max
- int skip = skipCount == null ? 0 : skipCount.intValue();
+ int skip = skipCount == null ? 0 : skipCount.intValue();
if (skip < 0) {
skip = 0;
}
@@ -864,10 +861,9 @@ public class JcrRepository {
try {
JcrFolder folder = getJcrNode(session, id).asFolder();
String path = folder.getNode().getPath();
- return Util.escape(path);
- }
- catch (RepositoryException e) {
- log.debug(e.getMessage(), e);
+ return Util.escape(path);
+ } catch (RepositoryException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
}
@@ -889,7 +885,7 @@ public class JcrRepository {
};
String xPath = queryTranslator.translateToXPath(statement);
- try {
+ try {
// Execute query
QueryManager queryManager = session.getWorkspace().getQueryManager();
Query query = queryManager.createQuery(xPath, Query.XPATH);
@@ -898,7 +894,8 @@ public class JcrRepository {
query.setOffset(skip);
}
if (max < Integer.MAX_VALUE) {
- query.setLimit(max + 1); // One more in order to detect whether there are more items
+ query.setLimit(max + 1); // One more in order to detect whether
+ // there are more items
}
QueryResult queryResult = query.execute();
@@ -929,14 +926,13 @@ public class JcrRepository {
result.setHasMoreItems(nodes.hasNext());
result.setNumItems(BigInteger.valueOf(count));
return result;
- }
- catch (RepositoryException e) {
- log.debug(e.getMessage(), e);
+ } catch (RepositoryException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
}
- //------------------------------------------< protected >---
+ // ------------------------------------------< protected >---
protected RepositoryInfo compileRepositoryInfo(String repositoryId) {
RepositoryInfoImpl fRepositoryInfo = new RepositoryInfoImpl();
@@ -970,7 +966,7 @@ public class JcrRepository {
capabilities.setSupportsGetFolderTree(true);
capabilities.setCapabilityRendition(CapabilityRenditions.NONE);
fRepositoryInfo.setCapabilities(capabilities);
-
+
return fRepositoryInfo;
}
@@ -982,11 +978,7 @@ public class JcrRepository {
StringBuilder description = new StringBuilder();
for (String key : repository.getDescriptorKeys()) {
- description
- .append(key)
- .append('=')
- .append(repository.getDescriptor(key))
- .append('\n');
+ description.append(key).append('=').append(repository.getDescriptor(key)).append('\n');
}
return description.toString();
@@ -1004,28 +996,25 @@ public class JcrRepository {
Node node = session.getNodeByIdentifier(id);
JcrNode jcrNode = typeHandlerManager.create(node);
-
- // if node isn't under versioning, then return retrieved object
+
+ // if node isn't under versioning, then return retrieved object
if (!jcrNode.isVersionable()) {
- return jcrNode;
+ return jcrNode;
}
-
+
JcrVersionBase versionNode = jcrNode.asVersion();
if (JcrPrivateWorkingCopy.denotesPwc(versionNode.getVersionLabel())) {
return versionNode.getPwc();
- }
- else {
- JcrVersion version = versionNode.getVersion(((JcrVersion) versionNode).getVersionName());
- return version;
+ } else {
+ JcrVersion version = versionNode.getVersion(((JcrVersion) versionNode).getVersionName());
+ return version;
}
- }
- catch (ItemNotFoundException e) {
- log.debug(e.getMessage(), e);
+ } catch (ItemNotFoundException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisObjectNotFoundException(e.getMessage(), e);
- }
- catch (RepositoryException e) {
- log.debug(e.getMessage(), e);
+ } catch (RepositoryException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
}
@@ -1033,29 +1022,26 @@ public class JcrRepository {
protected Node getRootNode(Session session) {
try {
return session.getNode(pathManager.getJcrRootPath());
- }
- catch (PathNotFoundException e) {
- log.debug(e.getMessage(), e);
+ } catch (PathNotFoundException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisObjectNotFoundException(e.getMessage(), e);
- }
- catch (ItemNotFoundException e) {
- log.debug(e.getMessage(), e);
+ } catch (ItemNotFoundException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisObjectNotFoundException(e.getMessage(), e);
- }
- catch (RepositoryException e) {
- log.debug(e.getMessage(), e);
+ } catch (RepositoryException e) {
+ LOG.debug(e.getMessage(), e);
throw new CmisRuntimeException(e.getMessage(), e);
}
}
- //------------------------------------------< private >---
+ // ------------------------------------------< private >---
/**
* Transitively gather the children of a node down to a specific depth
*/
- private static void gatherDescendants(JcrFolder jcrFolder, List<ObjectInFolderContainer> list,
- boolean foldersOnly, int depth, Set<String> filter, Boolean includeAllowableActions,
- Boolean includePathSegments, ObjectInfoHandler objectInfos, boolean requiresObjectInfo) {
+ private static void gatherDescendants(JcrFolder jcrFolder, List<ObjectInFolderContainer> list, boolean foldersOnly,
+ int depth, Set<String> filter, Boolean includeAllowableActions, Boolean includePathSegments,
+ ObjectInfoHandler objectInfos, boolean requiresObjectInfo) {
// iterate through children
Iterator<JcrNode> childNodes = jcrFolder.getNodes();
@@ -1120,7 +1106,6 @@ public class JcrRepository {
return result;
}
-
public Repository getRepository() {
return repository;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrService.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrService.java?rev=1516250&r1=1516249&r2=1516250&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrService.java Wed Aug 21 18:36:15 2013
@@ -69,7 +69,7 @@ public class JcrService extends Abstract
for (Session session : sessions.values()) {
session.logout();
}
-
+
super.close();
}
@@ -81,7 +81,7 @@ public class JcrService extends Abstract
return context;
}
- //------------------------------------------< repository service >---
+ // ------------------------------------------< repository service >---
@Override
public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
@@ -96,8 +96,9 @@ public class JcrService extends Abstract
@Override
public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions,
BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-
- return jcrRepository.getTypeChildren(login(repositoryId), typeId, includePropertyDefinitions, maxItems, skipCount);
+
+ return jcrRepository.getTypeChildren(login(repositoryId), typeId, includePropertyDefinitions, maxItems,
+ skipCount);
}
@Override
@@ -108,11 +109,11 @@ public class JcrService extends Abstract
@Override
public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth,
Boolean includePropertyDefinitions, ExtensionsData extension) {
-
+
return jcrRepository.getTypesDescendants(login(repositoryId), typeId, depth, includePropertyDefinitions);
}
- //------------------------------------------< navigation service >---
+ // ------------------------------------------< navigation service >---
@Override
public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
@@ -134,7 +135,8 @@ public class JcrService extends Abstract
@Override
public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
- return jcrRepository.getFolderParent(login(repositoryId), folderId, filter, this, context.isObjectInfoRequired());
+ return jcrRepository.getFolderParent(login(repositoryId), folderId, filter, this,
+ context.isObjectInfoRequired());
}
@Override
@@ -163,14 +165,14 @@ public class JcrService extends Abstract
return jcrRepository.getCheckedOutDocs(login(repositoryId), folderId, filter, orderBy, includeAllowableActions,
maxItems, skipCount);
}
-
- //------------------------------------------< object service >---
+
+ // ------------------------------------------< object service >---
@Override
public String createDocument(String repositoryId, Properties properties, String folderId,
ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
Acl removeAces, ExtensionsData extension) {
-
+
return jcrRepository.createDocument(login(repositoryId), properties, folderId, contentStream, versioningState);
}
@@ -179,7 +181,8 @@ public class JcrService extends Abstract
String folderId, VersioningState versioningState, List<String> policies, Acl addAces, Acl removeAces,
ExtensionsData extension) {
- return jcrRepository.createDocumentFromSource(login(repositoryId), sourceId, properties, folderId, versioningState);
+ return jcrRepository.createDocumentFromSource(login(repositoryId), sourceId, properties, folderId,
+ versioningState);
}
@Override
@@ -192,7 +195,7 @@ public class JcrService extends Abstract
@Override
public void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
ExtensionsData extension) {
-
+
jcrRepository.setContentStream(login(repositoryId), objectId, true, null);
}
@@ -206,7 +209,7 @@ public class JcrService extends Abstract
@Override
public void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions,
ExtensionsData extension) {
-
+
jcrRepository.deleteObject(login(repositoryId), objectId, allVersions);
}
@@ -225,7 +228,7 @@ public class JcrService extends Abstract
@Override
public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset,
BigInteger length, ExtensionsData extension) {
-
+
return jcrRepository.getContentStream(login(repositoryId), objectId, offset, length);
}
@@ -242,7 +245,7 @@ public class JcrService extends Abstract
public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions,
IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
Boolean includeAcl, ExtensionsData extension) {
-
+
return jcrRepository.getObjectByPath(login(repositoryId), path, filter, includeAllowableActions, includeAcl,
this, context.isObjectInfoRequired());
}
@@ -267,7 +270,7 @@ public class JcrService extends Abstract
jcrRepository.updateProperties(login(repositoryId), objectId, properties, this, context.isObjectInfoRequired());
}
- //------------------------------------------< versioning service >---
+ // ------------------------------------------< versioning service >---
@Override
public void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension,
@@ -285,7 +288,7 @@ public class JcrService extends Abstract
public void checkIn(String repositoryId, Holder<String> objectId, Boolean major, Properties properties,
ContentStream contentStream, String checkinComment, List<String> policies, Acl addAces, Acl removeAces,
ExtensionsData extension) {
-
+
jcrRepository.checkIn(login(repositoryId), objectId, major, properties, contentStream, checkinComment);
}
@@ -293,7 +296,7 @@ public class JcrService extends Abstract
public List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
Boolean includeAllowableActions, ExtensionsData extension) {
- return jcrRepository.getAllVersions(login(repositoryId), versionSeriesId == null ? objectId : versionSeriesId,
+ return jcrRepository.getAllVersions(login(repositoryId), versionSeriesId == null ? objectId : versionSeriesId,
filter, includeAllowableActions, this, context.isObjectInfoRequired());
}
@@ -312,7 +315,7 @@ public class JcrService extends Abstract
ObjectData object = getObjectOfLatestVersion(repositoryId, objectId, versionSeriesId, major, filter, false,
null, null, false, false, extension);
-
+
return object.getProperties();
}
@@ -326,8 +329,8 @@ public class JcrService extends Abstract
return jcrRepository.query(login(repositoryId), statement, searchAllVersions, includeAllowableActions,
maxItems, skipCount);
}
-
- //------------------------------------------< protected >---
+
+ // ------------------------------------------< protected >---
protected Session login(String workspaceName) {
if (context == null) {
@@ -338,9 +341,8 @@ public class JcrService extends Abstract
if (session == null) {
String userName = context.getUsername();
String password = context.getPassword();
- Credentials credentials = userName == null
- ? null
- : new SimpleCredentials(userName, password == null ? "".toCharArray() : password.toCharArray());
+ Credentials credentials = userName == null ? null : new SimpleCredentials(userName,
+ password == null ? "".toCharArray() : password.toCharArray());
session = jcrRepository.login(credentials, workspaceName);
sessions.put(workspaceName, session);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrServiceFactory.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrServiceFactory.java?rev=1516250&r1=1516249&r2=1516250&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrServiceFactory.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/JcrServiceFactory.java Wed Aug 21 18:36:15 2013
@@ -46,7 +46,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * A {@link CmisServiceFactory} implementation which returns {@link JcrService} instances.
+ * A {@link CmisServiceFactory} implementation which returns {@link JcrService}
+ * instances.
*/
public class JcrServiceFactory extends AbstractServiceFactory {
private static final Logger log = LoggerFactory.getLogger(JcrServiceFactory.class);
@@ -81,24 +82,25 @@ public class JcrServiceFactory extends A
@Override
public CmisService getService(CallContext context) {
- CmisServiceWrapper<JcrService> serviceWrapper = new CmisServiceWrapper<JcrService>(
- createJcrService(jcrRepository, context), DEFAULT_MAX_ITEMS_TYPES, DEFAULT_DEPTH_TYPES,
- DEFAULT_MAX_ITEMS_OBJECTS, DEFAULT_DEPTH_OBJECTS);
+ CmisServiceWrapper<JcrService> serviceWrapper = new CmisServiceWrapper<JcrService>(createJcrService(
+ jcrRepository, context), DEFAULT_MAX_ITEMS_TYPES, DEFAULT_DEPTH_TYPES, DEFAULT_MAX_ITEMS_OBJECTS,
+ DEFAULT_DEPTH_OBJECTS);
serviceWrapper.getWrappedService().setCallContext(context);
return serviceWrapper;
}
- //------------------------------------------< factories >---
+ // ------------------------------------------< factories >---
/**
- * Acquire the JCR repository given a configuration. This implementation used
- * {@link javax.imageio.spi.ServiceRegistry#lookupProviders(Class)} for
+ * Acquire the JCR repository given a configuration. This implementation
+ * used {@link javax.imageio.spi.ServiceRegistry#lookupProviders(Class)} for
* locating <code>RepositoryFactory</code> instances. The first instance
- * which can handle the <code>jcrConfig</code> parameters is used to
- * acquire the repository.
- *
- * @param jcrConfig configuration determining the JCR repository to be returned
+ * which can handle the <code>jcrConfig</code> parameters is used to acquire
+ * the repository.
+ *
+ * @param jcrConfig
+ * configuration determining the JCR repository to be returned
* @return
* @throws RepositoryException
*/
@@ -112,22 +114,20 @@ public class JcrServiceFactory extends A
if (repository != null) {
log.debug("Successfully acquired JCR repository from factory " + factory);
return repository;
- }
- else {
+ } else {
log.debug("Could not acquire JCR repository from factory " + factory);
}
}
throw new CmisConnectionException("No JCR repository factory for configured parameters");
- }
- catch (RepositoryException e) {
+ } catch (RepositoryException e) {
log.debug(e.getMessage(), e);
throw new CmisConnectionException(e.getMessage(), e);
}
}
/**
- * Create a <code>JcrService</code> from a <code>JcrRepository</code>JcrRepository> and
- * <code>CallContext</code>.
+ * Create a <code>JcrService</code> from a <code>JcrRepository</code>
+ * JcrRepository> and <code>CallContext</code>.
*
* @param jcrRepository
* @param context
@@ -149,7 +149,7 @@ public class JcrServiceFactory extends A
return typeHandlerManager;
}
- //------------------------------------------< private >---
+ // ------------------------------------------< private >---
private void readConfiguration(Map<String, String> parameters) {
Map<String, String> map = new HashMap<String, String>();
@@ -216,7 +216,6 @@ public class JcrServiceFactory extends A
return typeManager;
}
-
public JcrRepository getJcrRepository() {
return jcrRepository;
}