You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by je...@apache.org on 2013/08/23 15:20:32 UTC
svn commit: r1516840 [1/2] - in /chemistry/opencmis/trunk:
chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/
chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org...
Author: jens
Date: Fri Aug 23 13:20:30 2013
New Revision: 1516840
URL: http://svn.apache.org/r1516840
Log:
InMemory: Javadoc and checkstyle
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/FilterParser.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/NameValidator.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/RepositoryInfoCreator.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeCreator.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeManagerImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeValidator.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AbstractServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AtomLinkInfoProvider.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/BaseServiceValidatorImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryAbstractServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryMultiFilingServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryService.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceContext.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceFactoryImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Children.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/CmisServiceValidator.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Content.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Document.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/DocumentVersion.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Fileable.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Filing.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Folder.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Item.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/MultiFiling.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStore.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Policy.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Relationship.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/StoreManager.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/StoredObject.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/TypeManagerCreatable.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Version.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/VersionedDocument.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ContentStreamDataImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/DocumentVersionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/InMemoryServiceValidatorImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/ObjectStoreImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerFactory.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoredObjectImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/VersionedDocumentImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DefaultTypeSystemCreator.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/DocumentTypeCreationHelper.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/FolderTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/NavigationServiceTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/ObjectServiceTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/RepositoryServiceMutabilityTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/RepositoryServiceTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/TypeValidationTest.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/UnitTestTypeSystemCreator.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/query/QueryConditionProcessor.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/opencmis/inmemory/query/QueryTestDataCreator.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeValidator.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserStrict.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tools/src/main/java/org/apache/chemistry/opencmis/tools/mapper/PropertyMapper.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tools/src/main/java/org/apache/chemistry/opencmis/tools/parser/MetadataParser.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tools/src/main/java/org/apache/chemistry/opencmis/tools/parser/MetadataParserExif.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tools/src/main/java/org/apache/chemistry/opencmis/tools/parser/MetadataParserTika.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-util/src/main/java/org/apache/chemistry/opencmis/util/repository/ObjectGenerator.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-util/src/main/java/org/apache/chemistry/opencmis/util/repository/TimeLogger.java
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java Fri Aug 23 13:20:30 2013
@@ -51,7 +51,7 @@ import org.apache.chemistry.opencmis.inm
import org.apache.chemistry.opencmis.server.support.TypeManager;
/**
- * @author Jens A collection of utility functions to fill the data objects used
+ * A collection of utility functions to fill the data objects used
* as return values for the service object calls
*/
public final class DataObjectCreator {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/FilterParser.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/FilterParser.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/FilterParser.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/FilterParser.java Fri Aug 23 13:20:30 2013
@@ -25,9 +25,6 @@ import java.util.List;
import org.apache.chemistry.opencmis.commons.PropertyIds;
-/**
- * @author Jens
- */
public final class FilterParser {
// Utility class
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/NameValidator.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/NameValidator.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/NameValidator.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/NameValidator.java Fri Aug 23 13:20:30 2013
@@ -21,8 +21,10 @@ package org.apache.chemistry.opencmis.in
public final class NameValidator {
- public static final String ERROR_ILLEGAL_ID = "Id contains illegal characters, allowed are 'a'..'z', 'A'..'Z', '0'..'9', '-', '_'";
- public static final String ERROR_ILLEGAL_NAME = "Name contains illegal characters, not allowed are '/', '\\', ':', '\"', '*'. '?', '<','>', '|'";
+ public static final String ERROR_ILLEGAL_ID = "Id contains illegal characters, allowed are "
+ + "'a'..'z', 'A'..'Z', '0'..'9', '-', '_'";
+ public static final String ERROR_ILLEGAL_NAME = "Name contains illegal characters, not allowed are "
+ + "'/', '\\', ':', '\"', '*'. '?', '<','>', '|'";
// Utility class
private NameValidator() {
@@ -30,10 +32,11 @@ public final class NameValidator {
/**
* check whether id contains only valid characters Allowed are 'a'..'z',
- * 'A'..'Z', '0'..'9', '.', '-', ' ', '_';
+ * 'A'..'Z', '0'..'9', '.', '-', ' ', '_'.
*
* @param s
* string to verify
+ * @return true if valid name, false otherwise
*/
public static boolean isValidId(String s) {
if (null == s || s.length() == 0) {
@@ -60,6 +63,7 @@ public final class NameValidator {
*
* @param s
* string to verify
+ * @return true if valid name, false otherwise
*/
public static boolean isValidName(String s) {
if (null == s || s.length() == 0) {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/RepositoryInfoCreator.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/RepositoryInfoCreator.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/RepositoryInfoCreator.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/RepositoryInfoCreator.java Fri Aug 23 13:20:30 2013
@@ -25,9 +25,6 @@ import org.apache.chemistry.opencmis.com
* implemented by a client (like a unit test) in class and the name of the class
* is passed to the session. The in-memory repository creates an instance of
* this class to generate the repository info for its instance.
- *
- * @author Jens
- *
*/
public interface RepositoryInfoCreator {
RepositoryInfo createRepositoryInfo();
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeCreator.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeCreator.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeCreator.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeCreator.java Fri Aug 23 13:20:30 2013
@@ -27,9 +27,6 @@ import org.apache.chemistry.opencmis.com
* client (like a unit test) in class and the name of the class is passed to the
* session. The in-memory repository creates an instance of this class to
* generate the type system for this instance
- *
- * @author Jens
- *
*/
public interface TypeCreator {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeManagerImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeManagerImpl.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeManagerImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeManagerImpl.java Fri Aug 23 13:20:30 2013
@@ -41,15 +41,12 @@ import org.slf4j.LoggerFactory;
/**
* Class that manages a type system for a repository types can be added, the
* inheritance can be managed and type can be retrieved for a given type id.
- *
- * @author Jens
- *
*/
public class TypeManagerImpl implements TypeManagerCreatable {
private static final Logger LOG = LoggerFactory.getLogger(TypeManagerImpl.class.getName());
/**
- * map from repository id to a types map
+ * map from repository id to a types map.
*/
private final Map<String, TypeDefinitionContainer> fTypesMap = new HashMap<String, TypeDefinitionContainer>();
@@ -121,6 +118,8 @@ public class TypeManagerImpl implements
* @param typesList
* list of types to add to the repository
*
+ * @param createCmisDefaultTypes
+ * indicates if CMIS base types should be added to list
*/
public void initTypeSystem(List<TypeDefinition> typesList, boolean createCmisDefaultTypes) {
@@ -138,14 +137,13 @@ public class TypeManagerImpl implements
}
- /**
- * Add a type to the type system. Add all properties from inherited types,
- * add type to children of parent types.
+ /*
+ * (non-Javadoc)
*
- * @param repositoryId
- * repository to which the type is added
- * @param cmisType
- * new type to add
+ * @see
+ * org.apache.chemistry.opencmis.inmemory.storedobj.api.TypeManagerCreatable
+ * #addTypeDefinition(org.apache.chemistry.opencmis.commons.definitions.
+ * TypeDefinition, boolean)
*/
@Override
public void addTypeDefinition(TypeDefinition cmisType, boolean addInheritedProperties) {
@@ -170,15 +168,25 @@ public class TypeManagerImpl implements
fTypesMap.put(cmisType.getId(), typeContainer);
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.chemistry.opencmis.inmemory.storedobj.api.TypeManagerCreatable
+ * #updateTypeDefinition(org.apache.chemistry.opencmis.commons.definitions.
+ * TypeDefinition)
+ */
@Override
public void updateTypeDefinition(TypeDefinition typeDefinition) {
throw new CmisNotSupportedException("updating a type definition is not supported.");
}
- /**
- * Remove a type from a type system
+ /*
+ * (non-Javadoc)
*
- * @param typeId
+ * @see
+ * org.apache.chemistry.opencmis.inmemory.storedobj.api.TypeManagerCreatable
+ * #deleteTypeDefinition(java.lang.String)
*/
@Override
public void deleteTypeDefinition(String typeId) {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeValidator.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeValidator.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeValidator.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/TypeValidator.java Fri Aug 23 13:20:30 2013
@@ -58,10 +58,7 @@ import org.apache.chemistry.opencmis.ser
/**
* A helper class doing some consistency checks when new type definitions are
- * added to the system
- *
- * @author Jens
- *
+ * added to the system.
*/
public final class TypeValidator {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java Fri Aug 23 13:20:30 2013
@@ -90,11 +90,36 @@ public class InMemoryQueryProcessor {
}
/**
- * Main entry function to process a query from discovery service
+ * Main entry function to process a query from discovery service.
+ *
+ * @param tm
+ * type manager for the given repository
+ * @param objectStore
+ * object store to gets object from
+ * @param user
+ * user execuing the query
+ * @param repositoryId
+ * id of repository
+ * @param statement
+ * query statement
+ * @param searchAllVersions
+ * search in all versions of objects
+ * @param includeAllowableActions
+ * include allowable actions
+ * @param includeRelationships
+ * include relationships
+ * @param renditionFilter
+ * include renditions
+ * @param maxItems
+ * max number of items to return
+ * @param skipCount
+ * items to skip
+ * @return list of objects matching the query
*/
public ObjectList query(TypeManager tm, ObjectStore objectStore, String user, String repositoryId,
String statement, Boolean searchAllVersions, Boolean includeAllowableActions,
- IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems, BigInteger skipCount) {
+ IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems,
+ BigInteger skipCount) {
processQueryAndCatchExc(statement, tm); // calls query processor
@@ -110,6 +135,13 @@ public class InMemoryQueryProcessor {
return objList;
}
+ /**
+ * Process a query.
+ * @param statement
+ * CMISQL statement to execute
+ * @param tm
+ * type manager for the repository
+ */
public void processQueryAndCatchExc(String statement, TypeManager tm) {
QueryUtilStrict queryUtil = new QueryUtilStrict(statement, tm, null);
queryUtil.processStatementUsingCmisExceptions();
@@ -120,8 +152,28 @@ public class InMemoryQueryProcessor {
doAdditionalChecks(walker);
}
+ /**
+ * Create the list of matching objects for this query.
+ * @param tm
+ * type manager for the given repository
+ * @param user
+ * user execuing the query
+ * @param includeAllowableActions
+ * include allowable actions
+ * @param includeRelationships
+ * include relationships
+ * @param renditionFilter
+ * include renditions
+ * @param maxItems
+ * max number of items to return
+ * @param skipCount
+ * items to skip
+ * @return
+ * list of objects matching the query
+ */
public ObjectList buildResultList(TypeManager tm, String user, Boolean includeAllowableActions,
- IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems, BigInteger skipCount) {
+ IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems,
+ BigInteger skipCount) {
sortMatches();
@@ -235,13 +287,10 @@ public class InMemoryQueryProcessor {
}
- /**
+ /*
* Check for each object contained in the in-memory repository if it matches
* the current query expression. If yes add it to the list of matched
* objects.
- *
- * @param so
- * object stored in the in-memory repository
*/
private void match(StoredObject so, String user, boolean searchAllVersions) {
// first check if type is matching...
@@ -274,16 +323,12 @@ public class InMemoryQueryProcessor {
}
}
- /**
+ /*
* For each object check if it matches and append it to match-list if it
* does. We do here our own walking mechanism so that we can pass additional
* parameters and define the return types.
- *
- * @param node
- * node in where clause
- * @return true if it matches, false if it not matches
*/
- boolean evalWhereNode(StoredObject so, String user, Tree node) {
+ private boolean evalWhereNode(StoredObject so, String user, Tree node) {
return new InMemoryWhereClauseWalker(so, user).walkPredicate(node);
}
@@ -679,7 +724,7 @@ public class InMemoryQueryProcessor {
throwIncompatibleTypesException(lValue, rVal);
}
break;
- case INTEGER: {
+ case INTEGER:
Long lLongValue = ((BigInteger) lValue).longValue();
if (rVal instanceof Long) {
return (lLongValue).compareTo((Long) rVal);
@@ -689,7 +734,6 @@ public class InMemoryQueryProcessor {
throwIncompatibleTypesException(lValue, rVal);
}
break;
- }
case DATETIME:
if (rVal instanceof GregorianCalendar) {
return ((GregorianCalendar) lValue).compareTo((GregorianCalendar) rVal);
@@ -697,7 +741,7 @@ public class InMemoryQueryProcessor {
throwIncompatibleTypesException(lValue, rVal);
}
break;
- case DECIMAL: {
+ case DECIMAL:
Double lDoubleValue = ((BigDecimal) lValue).doubleValue();
if (rVal instanceof Double) {
return lDoubleValue.compareTo((Double) rVal);
@@ -707,7 +751,6 @@ public class InMemoryQueryProcessor {
throwIncompatibleTypesException(lValue, rVal);
}
break;
- }
case HTML:
case STRING:
case URI:
@@ -761,7 +804,14 @@ public class InMemoryQueryProcessor {
}
}
- // translate SQL wildcards %, _ to Java regex syntax
+ /**
+ * Translate SQL wildcards %, _ to Java regex syntax.
+ *
+ * @param wildcardString
+ * string to process
+ * @return
+ * string with replaced characters
+ */
public static String translatePattern(String wildcardString) {
int index = 0;
int start = 0;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AbstractServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AbstractServiceImpl.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AbstractServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AbstractServiceImpl.java Fri Aug 23 13:20:30 2013
@@ -32,10 +32,7 @@ import org.apache.chemistry.opencmis.inm
import org.apache.chemistry.opencmis.inmemory.storedobj.api.VersionedDocument;
/**
- * Common functionality for all service implementations
- *
- * @author Jens
- *
+ * Common functionality for all service implementations.
*/
public class AbstractServiceImpl {
@@ -110,11 +107,11 @@ public class AbstractServiceImpl {
/**
* We allow checkin, cancel, checkout operations on a single version as well
* as on a version series This method returns the versioned document
- * (version series) in each case
+ * (version series) in each case.
*
- * @param value
- * version or version series id of a document
- * @return version series id
+ * @param so
+ * version or versioned document
+ * @return versioned document
*/
protected VersionedDocument getVersionedDocumentOfObjectId(StoredObject so) {
VersionedDocument verDoc;
@@ -171,7 +168,8 @@ public class AbstractServiceImpl {
protected void testIsCheckedOut(VersionedDocument verDoc) {
if (!verDoc.isCheckedOut()) {
- throw new CmisUpdateConflictException("Canot check-in: Document " + verDoc.getId() + " is not checked out.");
+ throw new CmisUpdateConflictException("Canot check-in: Document " + verDoc.getId()
+ + " is not checked out.");
}
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AtomLinkInfoProvider.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AtomLinkInfoProvider.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AtomLinkInfoProvider.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/AtomLinkInfoProvider.java Fri Aug 23 13:20:30 2013
@@ -50,8 +50,6 @@ import org.apache.chemistry.opencmis.ser
* service call provides (mainly to fill all the links). This class fills the
* objectInfoHolder that was introduced for this purpose
*
- * @author Jens
- *
*/
public class AtomLinkInfoProvider {
@@ -63,16 +61,19 @@ public class AtomLinkInfoProvider {
/**
* FillObjectInfoHolder object with required information needed for Atom
- * binding for a single object
+ * binding for a single object.
*
* @param repositoryId
* id of repository
- * @param objectId
+ * @param so
* object to retrieve information for
- * @param objectInfos
+ * @param od
+ * object data
+ * @param objInfo
* Holder to fill with information
*/
- public void fillInformationForAtomLinks(String repositoryId, StoredObject so, ObjectData od, ObjectInfoImpl objInfo) {
+ public void fillInformationForAtomLinks(String repositoryId, StoredObject so, ObjectData od,
+ ObjectInfoImpl objInfo) {
if (null == objInfo || null == so) {
return;
}
@@ -174,6 +175,17 @@ public class AtomLinkInfoProvider {
}
+ /**
+ * FillObjectInfoHolder object with required information needed for Atom
+ * binding for a single object.
+ *
+ * @param repositoryId
+ * id of repository
+ * @param so
+ * object to retrieve information for
+ * @param objectInfo
+ * Holder to fill with information
+ */
public void fillInformationForAtomLinks(String repositoryId, StoredObject so, ObjectInfoImpl objectInfo) {
TypeManager tm = fStoreManager.getTypeManager(repositoryId);
ObjectStore objStore = fStoreManager.getObjectStore(repositoryId);
@@ -184,13 +196,13 @@ public class AtomLinkInfoProvider {
/**
* FillObjectInfoHolder object with required information needed for Atom
- * binding for a single object
+ * binding for a single object.
*
* @param repositoryId
* id of repository
* @param objectId
* object to retrieve information for
- * @param objectInfos
+ * @param objectInfo
* Holder to fill with information
*/
public void fillInformationForAtomLinks(String repositoryId, String objectId, ObjectInfoImpl objectInfo) {
@@ -205,7 +217,7 @@ public class AtomLinkInfoProvider {
/**
* FillObjectInfoHolder object with required information needed for Atom
- * binding after a getChildren() call in navigation service
+ * binding after a getChildren() call in navigation service.
*
* @param repositoryId
* id of repository
@@ -238,7 +250,7 @@ public class AtomLinkInfoProvider {
/**
* FillObjectInfoHolder object with required information needed for Atom
- * binding for an object list
+ * binding for an object list.
*
* @param repositoryId
* id of repository
@@ -279,16 +291,14 @@ public class AtomLinkInfoProvider {
/**
* FillObjectInfoHolder object with required information needed for Atom
- * binding for an ObjectInFolderContainer
+ * binding for an ObjectInFolderContainer.
*
* @param repositoryId
* id of repository
- * @param objectId
- * object to retrieve information for
* @param objectInfos
* Holder to fill with information
- * @param objList
- * result of getChildren call
+ * @param oifc
+ * result of previous call
*/
private void fillInformationForAtomLinks(String repositoryId, ObjectInfoHandler objectInfos,
ObjectInFolderContainer oifc) {
@@ -312,7 +322,7 @@ public class AtomLinkInfoProvider {
/**
* FillObjectInfoHolder object with required information needed for Atom
- * binding for a list with ObjectInFolderContainers
+ * binding for a list with ObjectInFolderContainers.
*
* @param repositoryId
* id of repository
@@ -350,7 +360,7 @@ public class AtomLinkInfoProvider {
/**
* FillObjectInfoHolder object with required information needed for Atom
- * binding for a list with ObjectParentData objects
+ * binding for a list with ObjectParentData objects.
*
* @param repositoryId
* id of repository
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/BaseServiceValidatorImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/BaseServiceValidatorImpl.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/BaseServiceValidatorImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/BaseServiceValidatorImpl.java Fri Aug 23 13:20:30 2013
@@ -215,7 +215,8 @@ public class BaseServiceValidatorImpl im
}
@Override
- public StoredObject getChildren(CallContext context, String repositoryId, String folderId, ExtensionsData extension) {
+ public StoredObject getChildren(CallContext context, String repositoryId, String folderId,
+ ExtensionsData extension) {
return checkStandardParameters(repositoryId, folderId);
}
@@ -331,7 +332,8 @@ public class BaseServiceValidatorImpl im
}
@Override
- public StoredObject getObjectByPath(CallContext context, String repositoryId, String path, ExtensionsData extension) {
+ public StoredObject getObjectByPath(CallContext context, String repositoryId, String path,
+ ExtensionsData extension) {
return checkStandardParametersByPath(repositoryId, path, context.getUsername());
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryAbstractServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryAbstractServiceImpl.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryAbstractServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryAbstractServiceImpl.java Fri Aug 23 13:20:30 2013
@@ -37,8 +37,6 @@ import org.apache.chemistry.opencmis.inm
/**
* Common functionality for all service implementations
*
- * @author Jens
- *
*/
public class InMemoryAbstractServiceImpl {
@@ -81,7 +79,8 @@ public class InMemoryAbstractServiceImpl
for (String typeId : typeIds) {
TypeDefinitionContainer typeDefC = fStoreManager.getTypeById(repositoryId, typeId);
if (typeDefC == null) {
- throw new CmisInvalidArgumentException("Cannot create object, a type with id " + typeId + " is unknown");
+ throw new CmisInvalidArgumentException("Cannot create object, a type with id " + typeId
+ + " is unknown");
}
result.add(typeDefC.getTypeDefinition());
}
@@ -98,11 +97,11 @@ public class InMemoryAbstractServiceImpl
/**
* We allow checkin, cancel, checkout operations on a single version as well
* as on a version series This method returns the versioned document
- * (version series) in each case
+ * (version series) in each case.
*
- * @param value
- * version or version series id of a document
- * @return version series id
+ * @param so
+ * version or versioned document
+ * @return versioned document
*/
protected VersionedDocument getVersionedDocumentOfObjectId(StoredObject so) {
@@ -155,7 +154,8 @@ public class InMemoryAbstractServiceImpl
protected void testCheckedOutByCurrentUser(String user, VersionedDocument verDoc) {
if (!user.equals(verDoc.getCheckedOutBy())) {
- throw new CmisUpdateConflictException("User " + verDoc.getCheckedOutBy() + " has checked out the document.");
+ throw new CmisUpdateConflictException("User " + verDoc.getCheckedOutBy()
+ + " has checked out the document.");
}
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryMultiFilingServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryMultiFilingServiceImpl.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryMultiFilingServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryMultiFilingServiceImpl.java Fri Aug 23 13:20:30 2013
@@ -26,7 +26,6 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.impl.server.ObjectInfoImpl;
import org.apache.chemistry.opencmis.commons.server.CallContext;
import org.apache.chemistry.opencmis.commons.server.ObjectInfoHandler;
-import org.apache.chemistry.opencmis.inmemory.storedobj.api.Filing;
import org.apache.chemistry.opencmis.inmemory.storedobj.api.Folder;
import org.apache.chemistry.opencmis.inmemory.storedobj.api.ObjectStore;
import org.apache.chemistry.opencmis.inmemory.storedobj.api.StoreManager;
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java Fri Aug 23 13:20:30 2013
@@ -255,7 +255,8 @@ public class InMemoryObjectServiceImpl e
throw new CmisObjectNotFoundException(UNKNOWN_OBJECT_ID + objectId);
}
- if (so.getChangeToken() != null && (changeToken == null || !so.getChangeToken().equals(changeToken.getValue()))) {
+ if (so.getChangeToken() != null && (changeToken == null
+ || !so.getChangeToken().equals(changeToken.getValue()))) {
throw new CmisUpdateConflictException("deleteContentStream failed, ChangeToken does not match.");
}
@@ -689,8 +690,8 @@ public class InMemoryObjectServiceImpl e
if (propDef.getUpdatability() == Updatability.WHENCHECKEDOUT) {
if (!isCheckedOut) {
throw new CmisUpdateConflictException(
- "updateProperties failed, following property can't be updated, because it is not checked-out: "
- + key);
+ "updateProperties failed, following property can't be updated, because it is not "
+ + "checked-out: " + key);
}
} else if (propDef.getUpdatability() != Updatability.READWRITE) {
throw new CmisConstraintException(
@@ -856,7 +857,8 @@ public class InMemoryObjectServiceImpl e
StoredObject so = objectStore.getObjectById(folderId);
if (null == so) {
- throw new CmisInvalidArgumentException(" Cannot create document, folderId: " + folderId + " is invalid");
+ throw new CmisInvalidArgumentException(" Cannot create document, folderId: " + folderId
+ + " is invalid");
}
if (so instanceof Folder) {
@@ -971,7 +973,8 @@ public class InMemoryObjectServiceImpl e
// check if the given type is a folder type
if (!typeDef.getBaseTypeId().equals(BaseTypeId.CMIS_FOLDER)) {
- throw new CmisInvalidArgumentException("Cannot create a folder, with a non-folder type: " + typeDef.getId());
+ throw new CmisInvalidArgumentException("Cannot create a folder, with a non-folder type: "
+ + typeDef.getId());
}
Map<String, PropertyData<?>> propMap = propertiesNew.getProperties();
@@ -1205,16 +1208,11 @@ public class InMemoryObjectServiceImpl e
return false;
}
- /**
+ /*
* Recursively delete a tree by traversing it and first deleting all
- * children and then the object itself
+ * children and then the object itself.
*
- * @param objStore
- * @param parentFolder
- * @param continueOnFailure
- * @param allVersions
- * @param failedToDeleteIds
- * @return returns true if operation should continue, false if it should
+ * returns true if operation should continue, false if it should
* stop
*/
private boolean deleteRecursive(ObjectStore objStore, Folder parentFolder, boolean continueOnFailure,
@@ -1246,7 +1244,8 @@ public class InMemoryObjectServiceImpl e
return true;
}
- private static ContentStream getContentStream(StoredObject so, String streamId, BigInteger offset, BigInteger length) {
+ private static ContentStream getContentStream(StoredObject so, String streamId, BigInteger offset,
+ BigInteger length) {
ContentStream csd = null;
long lOffset = offset == null ? 0 : offset.longValue();
long lLength = length == null ? -1 : length.longValue();
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryService.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryService.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryService.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryService.java Fri Aug 23 13:20:30 2013
@@ -388,7 +388,8 @@ public class InMemoryService extends Abs
@Override
public ObjectList getContentChanges(String repositoryId, Holder<String> changeLogToken, Boolean includeProperties,
- String filter, Boolean includePolicyIds, Boolean includeAcl, BigInteger maxItems, ExtensionsData extension) {
+ String filter, Boolean includePolicyIds, Boolean includeAcl, BigInteger maxItems,
+ ExtensionsData extension) {
return fDisSvc.getContentChanges(getCallContext(), repositoryId, changeLogToken, includeProperties, filter,
includePolicyIds, includeAcl, maxItems, extension, this);
}
@@ -410,7 +411,8 @@ public class InMemoryService extends Abs
}
@Override
- public void removeObjectFromFolder(String repositoryId, String objectId, String folderId, ExtensionsData extension) {
+ public void removeObjectFromFolder(String repositoryId, String objectId, String folderId,
+ ExtensionsData extension) {
fMultiSvc.removeObjectFromFolder(getCallContext(), repositoryId, objectId, folderId, extension, this);
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceContext.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceContext.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceContext.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceContext.java Fri Aug 23 13:20:30 2013
@@ -22,7 +22,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.server.support.CmisServiceWrapper;
/**
- * Helper class to associate context information with each incoming call
+ * Helper class to associate context information with each incoming call.
*
*/
public final class InMemoryServiceContext {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceFactoryImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceFactoryImpl.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceFactoryImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryServiceFactoryImpl.java Fri Aug 23 13:20:30 2013
@@ -23,7 +23,6 @@ import static org.apache.chemistry.openc
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
-import java.io.IOException;
import java.math.BigInteger;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -46,6 +45,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
import org.apache.chemistry.opencmis.commons.enums.CmisVersion;
+import org.apache.chemistry.opencmis.commons.impl.IOUtils;
import org.apache.chemistry.opencmis.commons.impl.XMLConverter;
import org.apache.chemistry.opencmis.commons.impl.XMLUtils;
import org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractTypeDefinition;
@@ -291,13 +291,7 @@ public class InMemoryServiceFactoryImpl
} catch (Exception e) {
LOG.error("Could not load type definitions from file '" + typeDefsFileName + "': " + e);
} finally {
- if (stream != null) {
- try {
- stream.close();
- } catch (IOException ioe) {
- // ignore
- }
- }
+ IOUtils.closeQuietly(stream);
}
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Children.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Children.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Children.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Children.java Fri Aug 23 13:20:30 2013
@@ -23,24 +23,36 @@ import java.util.List;
/**
* A folder is a StoredObject that that has a path and children. Children can be
* folder or documents
- *
- * @author Jens
*/
public interface Children {
- class ChildrenResult {
+ /**
+ * Class to represent a result of get children calls
+ *
+ */
+ public final class ChildrenResult {
private int noItems;
private List<? extends StoredObject> children;
- public ChildrenResult(List<? extends StoredObject> children, int noItems) {
+ private ChildrenResult(List<? extends StoredObject> children, int noItems) {
this.children = children;
this.noItems = noItems;
}
+ /**
+ * Get number of items in this result.
+ * @return
+ * number of items
+ */
public int getNoItems() {
return noItems;
}
+ /**
+ * Get the children objects.
+ * @return
+ * list of children
+ */
public List<? extends StoredObject> getChildren() {
return children;
}
@@ -48,7 +60,7 @@ public interface Children {
/**
* get all the children of this folder. To support paging an initial offset
- * and a maximum number of children to retrieve can be passed
+ * and a maximum number of children to retrieve can be passed.
*
* @param maxItems
* max. number of items to return
@@ -74,12 +86,13 @@ public interface Children {
* @param skipCount
* initial offset where to start fetching
* @param user
+ * user to determine visible children
* @return list of children folders
*/
ChildrenResult getFolderChildren(int maxItems, int skipCount, String user);
/**
- * indicate if a child with the given name exists in this folder
+ * indicate if a child with the given name exists in this folder.
*
* @param name
* name to check
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/CmisServiceValidator.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/CmisServiceValidator.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/CmisServiceValidator.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/CmisServiceValidator.java Fri Aug 23 13:20:30 2013
@@ -69,7 +69,8 @@ public interface CmisServiceValidator {
StoredObject createPolicy(CallContext context, String repositoryId, String folderId, Acl addAces, Acl removeAces,
List<String> policyIds, ExtensionsData extension);
- StoredObject getAllowableActions(CallContext context, String repositoryId, String objectId, ExtensionsData extension);
+ StoredObject getAllowableActions(CallContext context, String repositoryId, String objectId,
+ ExtensionsData extension);
StoredObject getObject(CallContext context, String repositoryId, String objectId, ExtensionsData extension);
@@ -145,7 +146,8 @@ public interface CmisServiceValidator {
StoredObject[] removePolicy(CallContext context, String repositoryId, String policyId, String objectId,
ExtensionsData extension);
- StoredObject getAppliedPolicies(CallContext context, String repositoryId, String objectId, ExtensionsData extension);
+ StoredObject getAppliedPolicies(CallContext context, String repositoryId, String objectId,
+ ExtensionsData extension);
StoredObject create(CallContext context, String repositoryId, String folderId, ExtensionsData extension);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Content.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Content.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Content.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Content.java Fri Aug 23 13:20:30 2013
@@ -20,18 +20,27 @@ package org.apache.chemistry.opencmis.in
import org.apache.chemistry.opencmis.commons.data.ContentStream;
+/**
+ * Interface to represent a content stream according to the CMIS spec.
+ *
+ */
public interface Content {
/**
* return true if this object has content or false if there is no content
* attached.
*
- * @return
+ * @return true if hast content otherwise false
*/
boolean hasContent();
/**
- * retrieve the content of a document
+ * Retrieve the content of a document.
+ *
+ * @param offset
+ * offset in content stream
+ * @param length
+ * length of content to return
*
* @return object containing mime-type, length and a stream with content
*/
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Document.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Document.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Document.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Document.java Fri Aug 23 13:20:30 2013
@@ -21,11 +21,7 @@ package org.apache.chemistry.opencmis.in
/**
* A document is a concrete object (meaning it can be stored) and has content.
* It also has a path (is contained in a parent folder)
- *
- * @author Jens
- *
*/
-
public interface Document extends Fileable, Content {
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/DocumentVersion.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/DocumentVersion.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/DocumentVersion.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/DocumentVersion.java Fri Aug 23 13:20:30 2013
@@ -23,9 +23,6 @@ package org.apache.chemistry.opencmis.in
* id, is stored in the object store, has content and adds versioning
* functionality. It does not have a path. It inherits also properties so each
* version may have its own properties.
- *
- * @author Jens
- *
*/
public interface DocumentVersion extends Version, Content, Fileable {
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Fileable.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Fileable.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Fileable.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Fileable.java Fri Aug 23 13:20:30 2013
@@ -18,6 +18,10 @@
*/
package org.apache.chemistry.opencmis.inmemory.storedobj.api;
+/**
+ * Interface for convenience representing objects that can be filed to a folder.
+ *
+ */
public interface Fileable extends StoredObject, Filing {
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Filing.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Filing.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Filing.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Filing.java Fri Aug 23 13:20:30 2013
@@ -26,8 +26,6 @@ import java.util.List;
* where the parent is always a folder. Paths do not exist on its own but are
* part of other objects (documents and folders). Most of the functionality is
* defined in interfaces that are subclasses.
- *
- * @author Jens
*/
public interface Filing {
@@ -42,8 +40,6 @@ public interface Filing {
* object this list must contain only one element. returns an empty list if
* this is an unfiled document.
*
- * @param user
- * user id
* @return list of parent folders
*/
List<String> getParentIds();
@@ -58,9 +54,10 @@ public interface Filing {
boolean hasParent();
/**
- * get the path segment of this object
+ * get the path segment of this object.
*
* @return
+ * String with path segment
*/
String getPathSegment();
}
\ No newline at end of file
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Folder.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Folder.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Folder.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Folder.java Fri Aug 23 13:20:30 2013
@@ -24,22 +24,19 @@ import java.util.List;
* A folder is a concrete object (meaning it can be stored) and has Each folder
* is contained in a parent folder. The parent folder for the special root
* folder is null.
- *
- * @author Jens
- *
*/
public interface Folder extends Fileable {
/**
- * get parent if of this folder
+ * get parent if of this folder.
*
* @return parent id of this folder
*/
String getParentId();
/**
- * set the parent id of a folder
+ * set the parent id of a folder.
*
* @param parentId
* parent id of this folder
@@ -47,9 +44,10 @@ public interface Folder extends Fileable
void setParentId(String parentId);
/**
- * return a list of allowed types of children in this folder
+ * return a list of allowed types of children in this folder.
*
* @return
+ * list of allowed object child type ids
*/
List<String> getAllowedChildObjectTypeIds();
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Item.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Item.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Item.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Item.java Fri Aug 23 13:20:30 2013
@@ -18,6 +18,10 @@
*/
package org.apache.chemistry.opencmis.inmemory.storedobj.api;
+/**
+ * Interface to represent a CMIS item according to the CMIS specification.
+ *
+ */
public interface Item extends Fileable {
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/MultiFiling.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/MultiFiling.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/MultiFiling.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/MultiFiling.java Fri Aug 23 13:20:30 2013
@@ -21,14 +21,11 @@ package org.apache.chemistry.opencmis.in
/**
* Documents can have in the CMIS specification multiple parents. This interface
* describes the behavior of objects with multiple parent objects.
- *
- * @author Jens
- *
*/
public interface MultiFiling extends Filing {
/**
- * Add parent folder to this document
+ * Add parent folder to this document.
*
* @param parentId
* id of parent folder to be added.
@@ -36,7 +33,7 @@ public interface MultiFiling extends Fil
void addParentId(String parentId);
/**
- * Remove parent from this object
+ * Remove parent from this object.
*
* @param parentId
* id of parent folder to be removed.
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStore.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStore.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStore.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/ObjectStore.java Fri Aug 23 13:20:30 2013
@@ -30,38 +30,56 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.VersioningState;
/**
- * @author Jens
- *
- * This is the interface an implementation must provide to store any
- * kind of CMIS objects. The ObjectStore is the topmost container of all
- * CMIS object that get persisted. It is comparable to a file system,
- * one object store exists per repository id. The object store allows
- * access objects by an id. In addition a object can be retrieved by
- * path. Typically the object store owns the list of object ids and
- * maintains the path hierarchy.
+ * This is the interface an implementation must provide to store any kind of
+ * CMIS objects. The ObjectStore is the topmost container of all CMIS object
+ * that get persisted. It is comparable to a file system, one object store
+ * exists per repository id. The object store allows access objects by an id. In
+ * addition a object can be retrieved by path. Typically the object store owns
+ * the list of object ids and maintains the path hierarchy.
*/
public interface ObjectStore {
+ /**
+ * Class to represent a result of get children calls.
+ */
public static class ChildrenResult {
private int noItems;
private List<Fileable> children;
+ /**
+ * Create new children results object.
+ *
+ * @param children
+ * list of children
+ * @param noItems
+ * number of items in result
+ */
public ChildrenResult(List<Fileable> children, int noItems) {
this.children = children;
this.noItems = noItems;
}
+ /**
+ * Get number of items in this result.
+ *
+ * @return number of items
+ */
public int getNoItems() {
return noItems;
}
+ /**
+ * Get the children objects.
+ *
+ * @return list of children
+ */
public List<Fileable> getChildren() {
return children;
}
}
/**
- * Get the root folder of this object store
+ * Get the root folder of this object store.
*
* @return the root folder of this store
*/
@@ -72,12 +90,14 @@ public interface ObjectStore {
*
* @param path
* the path to the object
+ * @param user
+ * user to check visibility
* @return the stored object with this path
*/
StoredObject getObjectByPath(String path, String user);
/**
- * get an object by its id
+ * get an object by its id.
*
* @param folderId
* the id of the object
@@ -89,10 +109,12 @@ public interface ObjectStore {
* Deletes an object from the store. For a folders the folder must be empty.
*
* @param objectId
- * @param user
+ * id of object to be deleted
* @param allVersions
* is TRUE all version of the document are deleted, otherwise
* just this one
+ * @param user
+ * user to check visibility
*/
void deleteObject(String objectId, Boolean allVersions, String user);
@@ -164,6 +186,10 @@ public interface ObjectStore {
* aces that are added
* @param removeACEs
* aces that are removed
+ * @param contentStream
+ * content stream of the object to create
+ * @param versioningState
+ * version state of the object to be created in
* @return versioned document object
*/
DocumentVersion createVersionedDocument(String name, Map<String, PropertyData<?>> propMap, String user,
@@ -209,6 +235,10 @@ public interface ObjectStore {
* map of properties
* @param user
* the user who creates the document
+ * @param addACEs
+ * aces that are added
+ * @param removeACEs
+ * aces that are removed
* @return policy object
*/
StoredObject createPolicy(String name, String policyText, Map<String, PropertyData<?>> propMap, String user,
@@ -216,7 +246,7 @@ public interface ObjectStore {
/**
* get all the children of this folder. To support paging an initial offset
- * and a maximum number of children to retrieve can be passed
+ * and a maximum number of children to retrieve can be passed.
*
* @param folder
* folder to get children from
@@ -246,6 +276,7 @@ public interface ObjectStore {
* @param skipCount
* initial offset where to start fetching
* @param user
+ * the user who performs the call
* @return list of children folders
*/
ChildrenResult getFolderChildren(Folder folder, int maxItems, int skipCount, String user);
@@ -263,7 +294,7 @@ public interface ObjectStore {
void move(StoredObject so, Folder oldParent, Folder newParent);
/**
- * Rename an object
+ * Rename an object.
*
* @param so
* object to be renamed
@@ -273,14 +304,15 @@ public interface ObjectStore {
void rename(Fileable so, String newName);
/**
- * Persist a new version in the store (created from a check-out)
+ * Persist a new version in the store (created from a check-out).
*
* @param version
+ * version to be stored
*/
void storeVersion(DocumentVersion version);
/**
- * remove a version from the store (after a cancel check-out)
+ * remove a version from the store (after a cancel check-out).
*
* @param version
* version to be deleted
@@ -288,7 +320,7 @@ public interface ObjectStore {
void deleteVersion(DocumentVersion version);
/**
- * Persist an object after modifying the properties
+ * Persist an object after modifying the properties.
*
* @param so
* object to be updated
@@ -296,7 +328,7 @@ public interface ObjectStore {
void upateObject(StoredObject so);
/**
- * get the path of this folder (for folder in CMIS path is unique)
+ * get the path of this folder (for folder in CMIS path is unique).
*
* @param folderId
* id of folder
@@ -310,7 +342,7 @@ public interface ObjectStore {
void clear();
/**
- * For statistics: return the number of objects contained in the system
+ * For statistics: return the number of objects contained in the system.
*
* @return number of stored objects
*/
@@ -322,6 +354,8 @@ public interface ObjectStore {
* additional actions can take place (like assigning properties and a type)
* before it is persisted.
*
+ * @param name
+ * name of relationship
* @param sourceObject
* source of the relationship
* @param targetObject
@@ -330,8 +364,6 @@ public interface ObjectStore {
* map of properities
* @param user
* the user who creates the document
- * @param folder
- * the parent folder
* @param addACEs
* aces that are added
* @param removeACEs
@@ -356,7 +388,7 @@ public interface ObjectStore {
/**
* Apply a ACLs by relative adding and removing a list of ACEs to/from an
- * object
+ * object.
*
* @param so
* object where ACLs are applied
@@ -366,12 +398,14 @@ public interface ObjectStore {
* list of ACEs to be removed
* @param aclPropagation
* enum value how to propagate ACLs to child objects
+ * @param user
+ * the user who applies ACL
* @return new ACL of object
*/
- Acl applyAcl(StoredObject so, Acl addAces, Acl removeAces, AclPropagation aclPropagation, String principalId);
+ Acl applyAcl(StoredObject so, Acl addAces, Acl removeAces, AclPropagation aclPropagation, String user);
/**
- * Apply a ACLs by setting a new list of ACEs to an object
+ * Apply a ACLs by setting a new list of ACEs to an object.
*
* @param so
* object where ACLs are applied
@@ -379,12 +413,15 @@ public interface ObjectStore {
* list of ACEs to be applied
* @param aclPropagation
* enum value how to propagate ACLs to child objects
+ * @param user
+ * user who executes the call and needs to have permission to
+ * apply ACL
* @return new ACL of object
*/
- Acl applyAcl(StoredObject so, Acl aces, AclPropagation aclPropagation, String principalId);
+ Acl applyAcl(StoredObject so, Acl aces, AclPropagation aclPropagation, String user);
/**
- * Check if this store contains any object with the given type id
+ * Check if this store contains any object with the given type id.
*
* @param typeId
* id of type definition to check
@@ -394,20 +431,21 @@ public interface ObjectStore {
boolean isTypeInUse(String typeId);
/**
- * Get relationships to and from an object
+ * Get relationships to and from an object.
*
* @param objectId
* id of object to get relationships with
- * @param subTypeIds
+ * @param typeIds
* list of all types to be included
- * @param relationshipDirection
+ * @param direction
* direction of relationship
* @return
+ * list of relationships belonging to this object
*/
List<StoredObject> getRelationships(String objectId, List<String> typeIds, RelationshipDirection direction);
/**
- * get an ACL object from an ACL id
+ * get an ACL object from an ACL id.
*
* @param aclId
* id of ACL
@@ -417,8 +455,10 @@ public interface ObjectStore {
// Multifiling methods:
/**
- * get all parent ids of this object visible for a user
+ * get all parent ids of this object visible for a user.
*
+ * @param so
+ * objects to get parents from
* @param user
* user who can see parents
* @return list of folder ids
@@ -426,18 +466,22 @@ public interface ObjectStore {
List<String> getParentIds(StoredObject so, String user);
/**
- * Add this document to a new parent folder as child object
+ * Add this document to a new parent folder as child object.
*
- * @param parentId
- * id of parent folder the document is to be added to
+ * @param so
+ * objects to be added
+ * @param parent
+ * parent folder the object is to be added to
*/
void addParent(StoredObject so, Folder parent);
/**
- * Remove this object from the children of parent
+ * Remove this object from the children of parent.
*
- * @param parentId
- * id of parent folder the document is to be removed from
+ * @param so
+ * object to be removed
+ * @param parent
+ * parent folder the object is to be removed from
*/
void removeParent(StoredObject so, Folder parent);
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Policy.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Policy.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Policy.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Policy.java Fri Aug 23 13:20:30 2013
@@ -18,8 +18,17 @@
*/
package org.apache.chemistry.opencmis.inmemory.storedobj.api;
+/**
+ * Interface representing a policy according to the CMIS specification.
+ *
+ */
public interface Policy {
+ /**
+ * returns the policy text of this policy.
+ *
+ * @return policy text
+ */
String getPolicyText();
}
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Relationship.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Relationship.java?rev=1516840&r1=1516839&r2=1516840&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Relationship.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/api/Relationship.java Fri Aug 23 13:20:30 2013
@@ -18,9 +18,23 @@
*/
package org.apache.chemistry.opencmis.inmemory.storedobj.api;
+/**
+ * Interface representing a policy according to the CMIS specification.
+ *
+ */
public interface Relationship {
+ /**
+ * get the source objects of this relation.
+ *
+ * @return list of object ids
+ */
String getSourceObjectId();
+ /**
+ * get the target objects of this relation.
+ *
+ * @return list of object ids
+ */
String getTargetObjectId();
}