chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcaru...@apache.org
Subject svn commit: r936938 [29/29] - in /incubator/chemistry/opencmis/trunk/chemistry-opencmis-server: chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/ chemistry-opencmis-server-bindings/src/main/java/org/apache/chem...
Date Thu, 22 Apr 2010 16:28:00 GMT
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/ObjectServiceWrapper.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/ObjectServiceWrapper.java?rev=936938&r1=936937&r2=936938&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/ObjectServiceWrapper.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/ObjectServiceWrapper.java Thu Apr 22 16:27:57 2010
@@ -45,475 +45,476 @@ import org.apache.chemistry.opencmis.ser
  */
 public class ObjectServiceWrapper extends AbstractServiceWrapper implements CmisObjectService {
 
-	private CmisObjectService fService;
+    private CmisObjectService fService;
 
-	/**
-	 * Constructor.
-	 * 
-	 * @param service
-	 *            the real service object
-	 * @param defaultMaxItems
-	 *            default value for <code>maxItems</code> parameters
-	 */
-	public ObjectServiceWrapper(CmisObjectService service, BigInteger defaultMaxItems) {
-		if (service == null) {
-			throw new IllegalArgumentException("Service must be set!");
-		}
-
-		fService = service;
-		setDefaultMaxItems(defaultMaxItems);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#create(org.apache.opencmis
-	 * .server.spi.CallContext , java.lang.String,
-	 * org.apache.opencmis.commons.provider.PropertiesData, java.lang.String,
-	 * org.apache.opencmis.commons.provider.ContentStreamData,
-	 * org.apache.opencmis.commons.enums.VersioningState, java.util.List,
-	 * org.apache.opencmis.commons.api.ExtensionsData,
-	 * org.apache.opencmis.server.spi.ObjectInfoHolder)
-	 */
-	public ObjectData create(CallContext context, String repositoryId, Properties properties, String folderId,
-			ContentStream contentStream, VersioningState versioningState, List<String> policies,
-			ExtensionsData extension, ObjectInfoHolder objectInfos) {
-		checkRepositoryId(repositoryId);
-		checkProperties(properties);
-		versioningState = getDefault(versioningState);
-
-		try {
-			return fService.create(context, repositoryId, properties, folderId, contentStream, versioningState,
-					policies, extension, objectInfos);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#createDocument(org.apache
-	 * .opencmis.server. spi.CallContext, java.lang.String,
-	 * org.apache.opencmis.commons.provider.PropertiesData, java.lang.String,
-	 * org.apache.opencmis.commons.provider.ContentStreamData,
-	 * org.apache.opencmis.commons.enums.VersioningState, java.util.List,
-	 * org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public String createDocument(CallContext context, String repositoryId, Properties properties, String folderId,
-			ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
-			Acl removeAces, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkProperties(properties);
-		versioningState = getDefault(versioningState);
-
-		try {
-			return fService.createDocument(context, repositoryId, properties, folderId, contentStream, versioningState,
-					policies, addAces, removeAces, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#createDocumentFromSource
-	 * (org.apache.opencmis .server.spi.CallContext, java.lang.String,
-	 * java.lang.String, org.apache.opencmis.commons.provider.PropertiesData,
-	 * java.lang.String, org.apache.opencmis.commons.enums.VersioningState,
-	 * java.util.List, org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public String createDocumentFromSource(CallContext context, String repositoryId, String sourceId,
-			Properties properties, String folderId, VersioningState versioningState, List<String> policies,
-			Acl addAces, Acl removeAces, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkId("Source Id", sourceId);
-		versioningState = getDefault(versioningState);
-
-		try {
-			return fService.createDocumentFromSource(context, repositoryId, sourceId, properties, folderId,
-					versioningState, policies, addAces, removeAces, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#createFolder(org.apache
-	 * .opencmis.server.spi .CallContext, java.lang.String,
-	 * org.apache.opencmis.commons.provider.PropertiesData, java.lang.String,
-	 * java.util.List, org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public String createFolder(CallContext context, String repositoryId, Properties properties, String folderId,
-			List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkProperties(properties);
-		checkId("Folder Id", folderId);
-
-		try {
-			return fService.createFolder(context, repositoryId, properties, folderId, policies, addAces, removeAces,
-					extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#createPolicy(org.apache
-	 * .opencmis.server.spi .CallContext, java.lang.String,
-	 * org.apache.opencmis.commons.provider.PropertiesData, java.lang.String,
-	 * java.util.List, org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public String createPolicy(CallContext context, String repositoryId, Properties properties, String folderId,
-			List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkProperties(properties);
-
-		try {
-			return fService.createPolicy(context, repositoryId, properties, folderId, policies, addAces, removeAces,
-					extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#createRelationship(org
-	 * .apache.opencmis.server .spi.CallContext, java.lang.String,
-	 * org.apache.opencmis.commons.provider.PropertiesData, java.util.List,
-	 * org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public String createRelationship(CallContext context, String repositoryId, Properties properties,
-			List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkProperties(properties);
-
-		try {
-			return fService.createRelationship(context, repositoryId, properties, policies, addAces, removeAces,
-					extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#deleteContentStream(
-	 * org.apache.opencmis.server .spi.CallContext, java.lang.String,
-	 * org.apache.opencmis.commons.provider.Holder,
-	 * org.apache.opencmis.commons.provider.Holder,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public void deleteContentStream(CallContext context, String repositoryId, Holder<String> objectId,
-			Holder<String> changeToken, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkHolderId("Object Id", objectId);
-
-		try {
-			fService.deleteContentStream(context, repositoryId, objectId, changeToken, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#deleteObjectOrCancelCheckOut
-	 * (org.apache.opencmis .server.spi.CallContext, java.lang.String,
-	 * java.lang.String, java.lang.Boolean,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public void deleteObjectOrCancelCheckOut(CallContext context, String repositoryId, String objectId,
-			Boolean allVersions, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkId("Object Id", objectId);
-		allVersions = getDefaultTrue(allVersions);
-
-		try {
-			fService.deleteObjectOrCancelCheckOut(context, repositoryId, objectId, allVersions, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#deleteTree(org.apache
-	 * .opencmis.server.spi. CallContext, java.lang.String, java.lang.String,
-	 * java.lang.Boolean, org.apache.opencmis.commons.enums.UnfileObjects,
-	 * java.lang.Boolean, org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public FailedToDeleteData deleteTree(CallContext context, String repositoryId, String folderId,
-			Boolean allVersions, UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkId("Folder Id", folderId);
-		allVersions = getDefaultTrue(allVersions);
-		unfileObjects = getDefault(unfileObjects);
-		continueOnFailure = getDefaultFalse(continueOnFailure);
-
-		try {
-			return fService.deleteTree(context, repositoryId, folderId, allVersions, unfileObjects, continueOnFailure,
-					extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#getAllowableActions(
-	 * org.apache.opencmis.server .spi.CallContext, java.lang.String,
-	 * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public AllowableActions getAllowableActions(CallContext context, String repositoryId, String objectId,
-			ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkId("Object Id", objectId);
-
-		try {
-			return fService.getAllowableActions(context, repositoryId, objectId, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#getContentStream(org
-	 * .apache.opencmis.server .spi.CallContext, java.lang.String,
-	 * java.lang.String, java.lang.String, java.math.BigInteger,
-	 * java.math.BigInteger, org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public ContentStream getContentStream(CallContext context, String repositoryId, String objectId, String streamId,
-			BigInteger offset, BigInteger length, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkId("Object Id", objectId);
-		checkNullOrPositive("Offset", offset);
-		checkNullOrPositive("Length", length);
-
-		try {
-			return fService.getContentStream(context, repositoryId, objectId, streamId, offset, length, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * 
-	 * @seeorg.apache.opencmis.server.spi.CmisObjectService#getObject(org.apache.
-	 * opencmis.server.spi. CallContext, java.lang.String, java.lang.String,
-	 * java.lang.String, java.lang.Boolean,
-	 * org.apache.opencmis.commons.enums.IncludeRelationships, java.lang.String,
-	 * java.lang.Boolean, java.lang.Boolean,
-	 * org.apache.opencmis.commons.api.ExtensionsData,
-	 * org.apache.opencmis.server.spi.ObjectInfoHolder)
-	 */
-	public ObjectData getObject(CallContext context, String repositoryId, String objectId, String filter,
-			Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
-			Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension, ObjectInfoHolder objectInfos) {
-		checkRepositoryId(repositoryId);
-		checkId("Object Id", objectId);
-		includeAllowableActions = getDefaultFalse(includeAllowableActions);
-		includeRelationships = getDefault(includeRelationships);
-		renditionFilter = getDefaultRenditionFilter(renditionFilter);
-		includePolicyIds = getDefaultFalse(includePolicyIds);
-		includeAcl = getDefaultFalse(includeAcl);
-
-		try {
-			return fService.getObject(context, repositoryId, objectId, filter, includeAllowableActions,
-					includeRelationships, renditionFilter, includePolicyIds, includeAcl, extension, objectInfos);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#getObjectByPath(org.
-	 * apache.opencmis.server .spi.CallContext, java.lang.String,
-	 * java.lang.String, java.lang.String, java.lang.Boolean,
-	 * org.apache.opencmis.commons.enums.IncludeRelationships, java.lang.String,
-	 * java.lang.Boolean, java.lang.Boolean,
-	 * org.apache.opencmis.commons.api.ExtensionsData,
-	 * org.apache.opencmis.server.spi.ObjectInfoHolder)
-	 */
-	public ObjectData getObjectByPath(CallContext context, String repositoryId, String path, String filter,
-			Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
-			Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension, ObjectInfoHolder objectInfos) {
-		checkRepositoryId(repositoryId);
-		checkPath("Path", path);
-		includeAllowableActions = getDefaultFalse(includeAllowableActions);
-		includeRelationships = getDefault(includeRelationships);
-		renditionFilter = getDefaultRenditionFilter(renditionFilter);
-		includePolicyIds = getDefaultFalse(includePolicyIds);
-		includeAcl = getDefaultFalse(includeAcl);
-
-		try {
-			return fService.getObjectByPath(context, repositoryId, path, filter, includeAllowableActions,
-					includeRelationships, renditionFilter, includePolicyIds, includeAcl, extension, objectInfos);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#getProperties(org.apache
-	 * .opencmis.server.spi .CallContext, java.lang.String, java.lang.String,
-	 * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public Properties getProperties(CallContext context, String repositoryId, String objectId, String filter,
-			ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkId("Object Id", objectId);
-
-		try {
-			return fService.getProperties(context, repositoryId, objectId, filter, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#getRenditions(org.apache
-	 * .opencmis.server.spi .CallContext, java.lang.String, java.lang.String,
-	 * java.lang.String, java.math.BigInteger, java.math.BigInteger,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public List<RenditionData> getRenditions(CallContext context, String repositoryId, String objectId,
-			String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkId("Object Id", objectId);
-		renditionFilter = getDefaultRenditionFilter(renditionFilter);
-		maxItems = getMaxItems(maxItems);
-		skipCount = getSkipCount(skipCount);
-
-		try {
-			return fService.getRenditions(context, repositoryId, objectId, renditionFilter, maxItems, skipCount,
-					extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#moveObject(org.apache
-	 * .opencmis.server.spi. CallContext, java.lang.String,
-	 * org.apache.opencmis.commons.provider.Holder, java.lang.String,
-	 * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData,
-	 * org.apache.opencmis.server.spi.ObjectInfoHolder)
-	 */
-	public ObjectData moveObject(CallContext context, String repositoryId, Holder<String> objectId,
-			String targetFolderId, String sourceFolderId, ExtensionsData extension, ObjectInfoHolder objectInfos) {
-		checkRepositoryId(repositoryId);
-		checkHolderId("Object Id", objectId);
-		checkId("Target Folder Id", targetFolderId);
-
-		try {
-			return fService.moveObject(context, repositoryId, objectId, targetFolderId, sourceFolderId, extension,
-					objectInfos);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#setContentStream(org
-	 * .apache.opencmis.server .spi.CallContext, java.lang.String,
-	 * org.apache.opencmis.commons.provider.Holder, java.lang.Boolean,
-	 * org.apache.opencmis.commons.provider.Holder,
-	 * org.apache.opencmis.commons.provider.ContentStreamData,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public void setContentStream(CallContext context, String repositoryId, Holder<String> objectId,
-			Boolean overwriteFlag, Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkHolderId("Object Id", objectId);
-		overwriteFlag = getDefaultTrue(overwriteFlag);
-		checkContentStream(contentStream);
-
-		try {
-			fService.setContentStream(context, repositoryId, objectId, overwriteFlag, changeToken, contentStream,
-					extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisObjectService#updateProperties(org
-	 * .apache.opencmis.server .spi.CallContext, java.lang.String,
-	 * org.apache.opencmis.commons.provider.Holder,
-	 * org.apache.opencmis.commons.provider.Holder,
-	 * org.apache.opencmis.commons.provider.PropertiesData,
-	 * org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.api.ExtensionsData,
-	 * org.apache.opencmis.server.spi.ObjectInfoHolder)
-	 */
-	public ObjectData updateProperties(CallContext context, String repositoryId, Holder<String> objectId,
-			Holder<String> changeToken, Properties properties, Acl acl, ExtensionsData extension,
-			ObjectInfoHolder objectInfos) {
-		checkRepositoryId(repositoryId);
-		checkHolderId("Object Id", objectId);
-		checkProperties(properties);
-
-		try {
-			return fService.updateProperties(context, repositoryId, objectId, changeToken, properties, acl, extension,
-					objectInfos);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
+    /**
+     * Constructor.
+     * 
+     * @param service
+     *            the real service object
+     * @param defaultMaxItems
+     *            default value for <code>maxItems</code> parameters
+     */
+    public ObjectServiceWrapper(CmisObjectService service, BigInteger defaultMaxItems) {
+        if (service == null) {
+            throw new IllegalArgumentException("Service must be set!");
+        }
+
+        fService = service;
+        setDefaultMaxItems(defaultMaxItems);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#create(org.apache.opencmis
+     * .server.spi.CallContext , java.lang.String,
+     * org.apache.opencmis.commons.provider.PropertiesData, java.lang.String,
+     * org.apache.opencmis.commons.provider.ContentStreamData,
+     * org.apache.opencmis.commons.enums.VersioningState, java.util.List,
+     * org.apache.opencmis.commons.api.ExtensionsData,
+     * org.apache.opencmis.server.spi.ObjectInfoHolder)
+     */
+    public ObjectData create(CallContext context, String repositoryId, Properties properties, String folderId,
+            ContentStream contentStream, VersioningState versioningState, List<String> policies,
+            ExtensionsData extension, ObjectInfoHolder objectInfos) {
+        checkRepositoryId(repositoryId);
+        checkProperties(properties);
+        versioningState = getDefault(versioningState);
+
+        try {
+            return fService.create(context, repositoryId, properties, folderId, contentStream, versioningState,
+                    policies, extension, objectInfos);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#createDocument(org.apache
+     * .opencmis.server. spi.CallContext, java.lang.String,
+     * org.apache.opencmis.commons.provider.PropertiesData, java.lang.String,
+     * org.apache.opencmis.commons.provider.ContentStreamData,
+     * org.apache.opencmis.commons.enums.VersioningState, java.util.List,
+     * org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public String createDocument(CallContext context, String repositoryId, Properties properties, String folderId,
+            ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
+            Acl removeAces, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkProperties(properties);
+        versioningState = getDefault(versioningState);
+
+        try {
+            return fService.createDocument(context, repositoryId, properties, folderId, contentStream, versioningState,
+                    policies, addAces, removeAces, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#createDocumentFromSource
+     * (org.apache.opencmis .server.spi.CallContext, java.lang.String,
+     * java.lang.String, org.apache.opencmis.commons.provider.PropertiesData,
+     * java.lang.String, org.apache.opencmis.commons.enums.VersioningState,
+     * java.util.List, org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public String createDocumentFromSource(CallContext context, String repositoryId, String sourceId,
+            Properties properties, String folderId, VersioningState versioningState, List<String> policies,
+            Acl addAces, Acl removeAces, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkId("Source Id", sourceId);
+        versioningState = getDefault(versioningState);
+
+        try {
+            return fService.createDocumentFromSource(context, repositoryId, sourceId, properties, folderId,
+                    versioningState, policies, addAces, removeAces, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#createFolder(org.apache
+     * .opencmis.server.spi .CallContext, java.lang.String,
+     * org.apache.opencmis.commons.provider.PropertiesData, java.lang.String,
+     * java.util.List, org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public String createFolder(CallContext context, String repositoryId, Properties properties, String folderId,
+            List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkProperties(properties);
+        checkId("Folder Id", folderId);
+
+        try {
+            return fService.createFolder(context, repositoryId, properties, folderId, policies, addAces, removeAces,
+                    extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#createPolicy(org.apache
+     * .opencmis.server.spi .CallContext, java.lang.String,
+     * org.apache.opencmis.commons.provider.PropertiesData, java.lang.String,
+     * java.util.List, org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public String createPolicy(CallContext context, String repositoryId, Properties properties, String folderId,
+            List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkProperties(properties);
+
+        try {
+            return fService.createPolicy(context, repositoryId, properties, folderId, policies, addAces, removeAces,
+                    extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#createRelationship(org
+     * .apache.opencmis.server .spi.CallContext, java.lang.String,
+     * org.apache.opencmis.commons.provider.PropertiesData, java.util.List,
+     * org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public String createRelationship(CallContext context, String repositoryId, Properties properties,
+            List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkProperties(properties);
+
+        try {
+            return fService.createRelationship(context, repositoryId, properties, policies, addAces, removeAces,
+                    extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#deleteContentStream(
+     * org.apache.opencmis.server .spi.CallContext, java.lang.String,
+     * org.apache.opencmis.commons.provider.Holder,
+     * org.apache.opencmis.commons.provider.Holder,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public void deleteContentStream(CallContext context, String repositoryId, Holder<String> objectId,
+            Holder<String> changeToken, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkHolderId("Object Id", objectId);
+
+        try {
+            fService.deleteContentStream(context, repositoryId, objectId, changeToken, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#deleteObjectOrCancelCheckOut
+     * (org.apache.opencmis .server.spi.CallContext, java.lang.String,
+     * java.lang.String, java.lang.Boolean,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public void deleteObjectOrCancelCheckOut(CallContext context, String repositoryId, String objectId,
+            Boolean allVersions, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkId("Object Id", objectId);
+        allVersions = getDefaultTrue(allVersions);
+
+        try {
+            fService.deleteObjectOrCancelCheckOut(context, repositoryId, objectId, allVersions, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#deleteTree(org.apache
+     * .opencmis.server.spi. CallContext, java.lang.String, java.lang.String,
+     * java.lang.Boolean, org.apache.opencmis.commons.enums.UnfileObjects,
+     * java.lang.Boolean, org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public FailedToDeleteData deleteTree(CallContext context, String repositoryId, String folderId,
+            Boolean allVersions, UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkId("Folder Id", folderId);
+        allVersions = getDefaultTrue(allVersions);
+        unfileObjects = getDefault(unfileObjects);
+        continueOnFailure = getDefaultFalse(continueOnFailure);
+
+        try {
+            return fService.deleteTree(context, repositoryId, folderId, allVersions, unfileObjects, continueOnFailure,
+                    extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#getAllowableActions(
+     * org.apache.opencmis.server .spi.CallContext, java.lang.String,
+     * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public AllowableActions getAllowableActions(CallContext context, String repositoryId, String objectId,
+            ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkId("Object Id", objectId);
+
+        try {
+            return fService.getAllowableActions(context, repositoryId, objectId, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#getContentStream(org
+     * .apache.opencmis.server .spi.CallContext, java.lang.String,
+     * java.lang.String, java.lang.String, java.math.BigInteger,
+     * java.math.BigInteger, org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public ContentStream getContentStream(CallContext context, String repositoryId, String objectId, String streamId,
+            BigInteger offset, BigInteger length, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkId("Object Id", objectId);
+        checkNullOrPositive("Offset", offset);
+        checkNullOrPositive("Length", length);
+
+        try {
+            return fService.getContentStream(context, repositoryId, objectId, streamId, offset, length, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * 
+     * 
+     * @seeorg.apache.opencmis.server.spi.CmisObjectService#getObject(org.apache.
+     * opencmis.server.spi. CallContext, java.lang.String, java.lang.String,
+     * java.lang.String, java.lang.Boolean,
+     * org.apache.opencmis.commons.enums.IncludeRelationships, java.lang.String,
+     * java.lang.Boolean, java.lang.Boolean,
+     * org.apache.opencmis.commons.api.ExtensionsData,
+     * org.apache.opencmis.server.spi.ObjectInfoHolder)
+     */
+    public ObjectData getObject(CallContext context, String repositoryId, String objectId, String filter,
+            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+            Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension, ObjectInfoHolder objectInfos) {
+        checkRepositoryId(repositoryId);
+        checkId("Object Id", objectId);
+        includeAllowableActions = getDefaultFalse(includeAllowableActions);
+        includeRelationships = getDefault(includeRelationships);
+        renditionFilter = getDefaultRenditionFilter(renditionFilter);
+        includePolicyIds = getDefaultFalse(includePolicyIds);
+        includeAcl = getDefaultFalse(includeAcl);
+
+        try {
+            return fService.getObject(context, repositoryId, objectId, filter, includeAllowableActions,
+                    includeRelationships, renditionFilter, includePolicyIds, includeAcl, extension, objectInfos);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#getObjectByPath(org.
+     * apache.opencmis.server .spi.CallContext, java.lang.String,
+     * java.lang.String, java.lang.String, java.lang.Boolean,
+     * org.apache.opencmis.commons.enums.IncludeRelationships, java.lang.String,
+     * java.lang.Boolean, java.lang.Boolean,
+     * org.apache.opencmis.commons.api.ExtensionsData,
+     * org.apache.opencmis.server.spi.ObjectInfoHolder)
+     */
+    public ObjectData getObjectByPath(CallContext context, String repositoryId, String path, String filter,
+            Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+            Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension, ObjectInfoHolder objectInfos) {
+        checkRepositoryId(repositoryId);
+        checkPath("Path", path);
+        includeAllowableActions = getDefaultFalse(includeAllowableActions);
+        includeRelationships = getDefault(includeRelationships);
+        renditionFilter = getDefaultRenditionFilter(renditionFilter);
+        includePolicyIds = getDefaultFalse(includePolicyIds);
+        includeAcl = getDefaultFalse(includeAcl);
+
+        try {
+            return fService.getObjectByPath(context, repositoryId, path, filter, includeAllowableActions,
+                    includeRelationships, renditionFilter, includePolicyIds, includeAcl, extension, objectInfos);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#getProperties(org.apache
+     * .opencmis.server.spi .CallContext, java.lang.String, java.lang.String,
+     * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public Properties getProperties(CallContext context, String repositoryId, String objectId, String filter,
+            ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkId("Object Id", objectId);
+
+        try {
+            return fService.getProperties(context, repositoryId, objectId, filter, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#getRenditions(org.apache
+     * .opencmis.server.spi .CallContext, java.lang.String, java.lang.String,
+     * java.lang.String, java.math.BigInteger, java.math.BigInteger,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public List<RenditionData> getRenditions(CallContext context, String repositoryId, String objectId,
+            String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkId("Object Id", objectId);
+        renditionFilter = getDefaultRenditionFilter(renditionFilter);
+        maxItems = getMaxItems(maxItems);
+        skipCount = getSkipCount(skipCount);
+
+        try {
+            return fService.getRenditions(context, repositoryId, objectId, renditionFilter, maxItems, skipCount,
+                    extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#moveObject(org.apache
+     * .opencmis.server.spi. CallContext, java.lang.String,
+     * org.apache.opencmis.commons.provider.Holder, java.lang.String,
+     * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData,
+     * org.apache.opencmis.server.spi.ObjectInfoHolder)
+     */
+    public ObjectData moveObject(CallContext context, String repositoryId, Holder<String> objectId,
+            String targetFolderId, String sourceFolderId, ExtensionsData extension, ObjectInfoHolder objectInfos) {
+        checkRepositoryId(repositoryId);
+        checkHolderId("Object Id", objectId);
+        checkId("Target Folder Id", targetFolderId);
+
+        try {
+            return fService.moveObject(context, repositoryId, objectId, targetFolderId, sourceFolderId, extension,
+                    objectInfos);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#setContentStream(org
+     * .apache.opencmis.server .spi.CallContext, java.lang.String,
+     * org.apache.opencmis.commons.provider.Holder, java.lang.Boolean,
+     * org.apache.opencmis.commons.provider.Holder,
+     * org.apache.opencmis.commons.provider.ContentStreamData,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public void setContentStream(CallContext context, String repositoryId, Holder<String> objectId,
+            Boolean overwriteFlag, Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkHolderId("Object Id", objectId);
+        overwriteFlag = getDefaultTrue(overwriteFlag);
+        checkContentStream(contentStream);
+
+        try {
+            fService.setContentStream(context, repositoryId, objectId, overwriteFlag, changeToken, contentStream,
+                    extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisObjectService#updateProperties(org
+     * .apache.opencmis.server .spi.CallContext, java.lang.String,
+     * org.apache.opencmis.commons.provider.Holder,
+     * org.apache.opencmis.commons.provider.Holder,
+     * org.apache.opencmis.commons.provider.PropertiesData,
+     * org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.api.ExtensionsData,
+     * org.apache.opencmis.server.spi.ObjectInfoHolder)
+     */
+    public ObjectData updateProperties(CallContext context, String repositoryId, Holder<String> objectId,
+            Holder<String> changeToken, Properties properties, Acl acl, ExtensionsData extension,
+            ObjectInfoHolder objectInfos) {
+        checkRepositoryId(repositoryId);
+        checkHolderId("Object Id", objectId);
+        checkProperties(properties);
+
+        try {
+            return fService.updateProperties(context, repositoryId, objectId, changeToken, properties, acl, extension,
+                    objectInfos);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/PolicyServiceWrapper.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/PolicyServiceWrapper.java?rev=936938&r1=936937&r2=936938&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/PolicyServiceWrapper.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/PolicyServiceWrapper.java Thu Apr 22 16:27:57 2010
@@ -34,84 +34,84 @@ import org.apache.chemistry.opencmis.ser
  */
 public class PolicyServiceWrapper extends AbstractServiceWrapper implements CmisPolicyService {
 
-	private CmisPolicyService fService;
+    private CmisPolicyService fService;
 
-	/**
-	 * Constructor.
-	 * 
-	 * @param service
-	 *            the real service object
-	 */
-	public PolicyServiceWrapper(CmisPolicyService service) {
-		if (service == null) {
-			throw new IllegalArgumentException("Service must be set!");
-		}
-
-		fService = service;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisPolicyService#applyPolicy(org.apache
-	 * .opencmis.server.spi .CallContext, java.lang.String, java.lang.String,
-	 * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData,
-	 * org.apache.opencmis.server.spi.ObjectInfoHolder)
-	 */
-	public ObjectData applyPolicy(CallContext context, String repositoryId, String policyId, String objectId,
-			ExtensionsData extension, ObjectInfoHolder objectInfos) {
-		checkRepositoryId(repositoryId);
-		checkId("Policy Id", policyId);
-		checkId("Object Id", objectId);
-
-		try {
-			return fService.applyPolicy(context, repositoryId, policyId, objectId, extension, objectInfos);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisPolicyService#getAppliedPolicies(org
-	 * .apache.opencmis.server .spi.CallContext, java.lang.String,
-	 * java.lang.String, java.lang.String,
-	 * org.apache.opencmis.commons.api.ExtensionsData,
-	 * org.apache.opencmis.server.spi.ObjectInfoHolder)
-	 */
-	public List<ObjectData> getAppliedPolicies(CallContext context, String repositoryId, String objectId,
-			String filter, ExtensionsData extension, ObjectInfoHolder objectInfos) {
-		checkRepositoryId(repositoryId);
-		checkId("Object Id", objectId);
-
-		try {
-			return fService.getAppliedPolicies(context, repositoryId, objectId, filter, extension, objectInfos);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisPolicyService#removePolicy(org.apache
-	 * .opencmis.server.spi .CallContext, java.lang.String, java.lang.String,
-	 * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public void removePolicy(CallContext context, String repositoryId, String policyId, String objectId,
-			ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkId("Policy Id", policyId);
-		checkId("Object Id", objectId);
-
-		try {
-			fService.removePolicy(context, repositoryId, policyId, objectId, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
+    /**
+     * Constructor.
+     * 
+     * @param service
+     *            the real service object
+     */
+    public PolicyServiceWrapper(CmisPolicyService service) {
+        if (service == null) {
+            throw new IllegalArgumentException("Service must be set!");
+        }
+
+        fService = service;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisPolicyService#applyPolicy(org.apache
+     * .opencmis.server.spi .CallContext, java.lang.String, java.lang.String,
+     * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData,
+     * org.apache.opencmis.server.spi.ObjectInfoHolder)
+     */
+    public ObjectData applyPolicy(CallContext context, String repositoryId, String policyId, String objectId,
+            ExtensionsData extension, ObjectInfoHolder objectInfos) {
+        checkRepositoryId(repositoryId);
+        checkId("Policy Id", policyId);
+        checkId("Object Id", objectId);
+
+        try {
+            return fService.applyPolicy(context, repositoryId, policyId, objectId, extension, objectInfos);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisPolicyService#getAppliedPolicies(org
+     * .apache.opencmis.server .spi.CallContext, java.lang.String,
+     * java.lang.String, java.lang.String,
+     * org.apache.opencmis.commons.api.ExtensionsData,
+     * org.apache.opencmis.server.spi.ObjectInfoHolder)
+     */
+    public List<ObjectData> getAppliedPolicies(CallContext context, String repositoryId, String objectId,
+            String filter, ExtensionsData extension, ObjectInfoHolder objectInfos) {
+        checkRepositoryId(repositoryId);
+        checkId("Object Id", objectId);
+
+        try {
+            return fService.getAppliedPolicies(context, repositoryId, objectId, filter, extension, objectInfos);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisPolicyService#removePolicy(org.apache
+     * .opencmis.server.spi .CallContext, java.lang.String, java.lang.String,
+     * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public void removePolicy(CallContext context, String repositoryId, String policyId, String objectId,
+            ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkId("Policy Id", policyId);
+        checkId("Object Id", objectId);
+
+        try {
+            fService.removePolicy(context, repositoryId, policyId, objectId, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/RelationshipServiceWrapper.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/RelationshipServiceWrapper.java?rev=936938&r1=936937&r2=936938&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/RelationshipServiceWrapper.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/RelationshipServiceWrapper.java Thu Apr 22 16:27:57 2010
@@ -35,57 +35,57 @@ import org.apache.chemistry.opencmis.ser
  */
 public class RelationshipServiceWrapper extends AbstractServiceWrapper implements CmisRelationshipService {
 
-	private CmisRelationshipService fService;
+    private CmisRelationshipService fService;
 
-	/**
-	 * Constructor.
-	 * 
-	 * @param service
-	 *            the real service object
-	 * @param defaultMaxItems
-	 *            default value for <code>maxItems</code> parameters
-	 */
-	public RelationshipServiceWrapper(CmisRelationshipService service, BigInteger defaultMaxItems) {
-		if (service == null) {
-			throw new IllegalArgumentException("Service must be set!");
-		}
-
-		fService = service;
-		setDefaultMaxItems(defaultMaxItems);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisRelationshipService#getObjectRelationships
-	 * (org.apache.opencmis .server.spi.CallContext, java.lang.String,
-	 * java.lang.String, java.lang.Boolean,
-	 * org.apache.opencmis.commons.enums.RelationshipDirection,
-	 * java.lang.String, java.lang.String, java.lang.Boolean,
-	 * java.math.BigInteger, java.math.BigInteger,
-	 * org.apache.opencmis.commons.api.ExtensionsData,
-	 * org.apache.opencmis.server.spi.ObjectInfoHolder)
-	 */
-	public ObjectList getObjectRelationships(CallContext context, String repositoryId, String objectId,
-			Boolean includeSubRelationshipTypes, RelationshipDirection relationshipDirection, String typeId,
-			String filter, Boolean includeAllowableActions, BigInteger maxItems, BigInteger skipCount,
-			ExtensionsData extension, ObjectInfoHolder objectInfos) {
-		checkRepositoryId(repositoryId);
-		checkId("Object Id", objectId);
-		includeSubRelationshipTypes = getDefaultFalse(includeSubRelationshipTypes);
-		relationshipDirection = getDefault(relationshipDirection);
-		includeAllowableActions = getDefaultFalse(includeAllowableActions);
-		maxItems = getMaxItems(maxItems);
-		skipCount = getSkipCount(skipCount);
-
-		try {
-			return fService.getObjectRelationships(context, repositoryId, objectId, includeSubRelationshipTypes,
-					relationshipDirection, typeId, filter, includeAllowableActions, maxItems, skipCount, extension,
-					objectInfos);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
+    /**
+     * Constructor.
+     * 
+     * @param service
+     *            the real service object
+     * @param defaultMaxItems
+     *            default value for <code>maxItems</code> parameters
+     */
+    public RelationshipServiceWrapper(CmisRelationshipService service, BigInteger defaultMaxItems) {
+        if (service == null) {
+            throw new IllegalArgumentException("Service must be set!");
+        }
+
+        fService = service;
+        setDefaultMaxItems(defaultMaxItems);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisRelationshipService#getObjectRelationships
+     * (org.apache.opencmis .server.spi.CallContext, java.lang.String,
+     * java.lang.String, java.lang.Boolean,
+     * org.apache.opencmis.commons.enums.RelationshipDirection,
+     * java.lang.String, java.lang.String, java.lang.Boolean,
+     * java.math.BigInteger, java.math.BigInteger,
+     * org.apache.opencmis.commons.api.ExtensionsData,
+     * org.apache.opencmis.server.spi.ObjectInfoHolder)
+     */
+    public ObjectList getObjectRelationships(CallContext context, String repositoryId, String objectId,
+            Boolean includeSubRelationshipTypes, RelationshipDirection relationshipDirection, String typeId,
+            String filter, Boolean includeAllowableActions, BigInteger maxItems, BigInteger skipCount,
+            ExtensionsData extension, ObjectInfoHolder objectInfos) {
+        checkRepositoryId(repositoryId);
+        checkId("Object Id", objectId);
+        includeSubRelationshipTypes = getDefaultFalse(includeSubRelationshipTypes);
+        relationshipDirection = getDefault(relationshipDirection);
+        includeAllowableActions = getDefaultFalse(includeAllowableActions);
+        maxItems = getMaxItems(maxItems);
+        skipCount = getSkipCount(skipCount);
+
+        try {
+            return fService.getObjectRelationships(context, repositoryId, objectId, includeSubRelationshipTypes,
+                    relationshipDirection, typeId, filter, includeAllowableActions, maxItems, skipCount, extension,
+                    objectInfos);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/RepositoryServiceWrapper.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/RepositoryServiceWrapper.java?rev=936938&r1=936937&r2=936938&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/RepositoryServiceWrapper.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/RepositoryServiceWrapper.java Thu Apr 22 16:27:57 2010
@@ -37,127 +37,127 @@ import org.apache.chemistry.opencmis.ser
  */
 public class RepositoryServiceWrapper extends AbstractServiceWrapper implements CmisRepositoryService {
 
-	private CmisRepositoryService fService;
+    private CmisRepositoryService fService;
 
-	/**
-	 * Constructor.
-	 * 
-	 * @param service
-	 *            the real service object
-	 * @param defaultMaxItems
-	 *            default value for <code>maxItems</code> parameters
-	 * @param defaultDepth
-	 *            default value for <code>depth</code> parameters
-	 */
-	public RepositoryServiceWrapper(CmisRepositoryService service, BigInteger defaultMaxItems, BigInteger defaultDepth) {
-		if (service == null) {
-			throw new IllegalArgumentException("Service must be set!");
-		}
-
-		fService = service;
-		setDefaultMaxItems(defaultMaxItems);
-		setDefaultDepth(defaultDepth);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisRepositoryService#getRepositoryInfo
-	 * (org.apache.opencmis. server.spi.CallContext, java.lang.String,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public RepositoryInfo getRepositoryInfo(CallContext context, String repositoryId, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-
-		try {
-			return fService.getRepositoryInfo(context, repositoryId, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisRepositoryService#getRepositoryInfos
-	 * (org.apache.opencmis .server.spi.CallContext,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public List<RepositoryInfo> getRepositoryInfos(CallContext context, ExtensionsData extension) {
-		try {
-			return fService.getRepositoryInfos(context, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisRepositoryService#getTypeChildren(
-	 * org.apache.opencmis.server .spi.CallContext, java.lang.String,
-	 * java.lang.String, java.lang.Boolean, java.math.BigInteger,
-	 * java.math.BigInteger, org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public TypeDefinitionList getTypeChildren(CallContext context, String repositoryId, String typeId,
-			Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		includePropertyDefinitions = getDefaultFalse(includePropertyDefinitions);
-		maxItems = getMaxItems(maxItems);
-		skipCount = getSkipCount(skipCount);
-
-		try {
-			return fService.getTypeChildren(context, repositoryId, typeId, includePropertyDefinitions, maxItems,
-					skipCount, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisRepositoryService#getTypeDefinition
-	 * (org.apache.opencmis. server.spi.CallContext, java.lang.String,
-	 * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public TypeDefinition getTypeDefinition(CallContext context, String repositoryId, String typeId,
-			ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkId("Type Id", typeId);
-
-		try {
-			return fService.getTypeDefinition(context, repositoryId, typeId, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisRepositoryService#getTypeDescendants
-	 * (org.apache.opencmis .server.spi.CallContext, java.lang.String,
-	 * java.lang.String, java.math.BigInteger, java.lang.Boolean,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public List<TypeDefinitionContainer> getTypeDescendants(CallContext context, String repositoryId, String typeId,
-			BigInteger depth, Boolean includePropertyDefinitions, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		includePropertyDefinitions = getDefaultFalse(includePropertyDefinitions);
-		depth = getDepth(depth);
-
-		try {
-			return fService.getTypeDescendants(context, repositoryId, typeId, depth, includePropertyDefinitions,
-					extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
+    /**
+     * Constructor.
+     * 
+     * @param service
+     *            the real service object
+     * @param defaultMaxItems
+     *            default value for <code>maxItems</code> parameters
+     * @param defaultDepth
+     *            default value for <code>depth</code> parameters
+     */
+    public RepositoryServiceWrapper(CmisRepositoryService service, BigInteger defaultMaxItems, BigInteger defaultDepth) {
+        if (service == null) {
+            throw new IllegalArgumentException("Service must be set!");
+        }
+
+        fService = service;
+        setDefaultMaxItems(defaultMaxItems);
+        setDefaultDepth(defaultDepth);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisRepositoryService#getRepositoryInfo
+     * (org.apache.opencmis. server.spi.CallContext, java.lang.String,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public RepositoryInfo getRepositoryInfo(CallContext context, String repositoryId, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+
+        try {
+            return fService.getRepositoryInfo(context, repositoryId, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisRepositoryService#getRepositoryInfos
+     * (org.apache.opencmis .server.spi.CallContext,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public List<RepositoryInfo> getRepositoryInfos(CallContext context, ExtensionsData extension) {
+        try {
+            return fService.getRepositoryInfos(context, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisRepositoryService#getTypeChildren(
+     * org.apache.opencmis.server .spi.CallContext, java.lang.String,
+     * java.lang.String, java.lang.Boolean, java.math.BigInteger,
+     * java.math.BigInteger, org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public TypeDefinitionList getTypeChildren(CallContext context, String repositoryId, String typeId,
+            Boolean includePropertyDefinitions, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        includePropertyDefinitions = getDefaultFalse(includePropertyDefinitions);
+        maxItems = getMaxItems(maxItems);
+        skipCount = getSkipCount(skipCount);
+
+        try {
+            return fService.getTypeChildren(context, repositoryId, typeId, includePropertyDefinitions, maxItems,
+                    skipCount, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisRepositoryService#getTypeDefinition
+     * (org.apache.opencmis. server.spi.CallContext, java.lang.String,
+     * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public TypeDefinition getTypeDefinition(CallContext context, String repositoryId, String typeId,
+            ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkId("Type Id", typeId);
+
+        try {
+            return fService.getTypeDefinition(context, repositoryId, typeId, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisRepositoryService#getTypeDescendants
+     * (org.apache.opencmis .server.spi.CallContext, java.lang.String,
+     * java.lang.String, java.math.BigInteger, java.lang.Boolean,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public List<TypeDefinitionContainer> getTypeDescendants(CallContext context, String repositoryId, String typeId,
+            BigInteger depth, Boolean includePropertyDefinitions, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        includePropertyDefinitions = getDefaultFalse(includePropertyDefinitions);
+        depth = getDepth(depth);
+
+        try {
+            return fService.getTypeDescendants(context, repositoryId, typeId, depth, includePropertyDefinitions,
+                    extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/VersioningServiceWrapper.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/VersioningServiceWrapper.java?rev=936938&r1=936937&r2=936938&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/VersioningServiceWrapper.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/VersioningServiceWrapper.java Thu Apr 22 16:27:57 2010
@@ -39,170 +39,170 @@ import org.apache.chemistry.opencmis.ser
  */
 public class VersioningServiceWrapper extends AbstractServiceWrapper implements CmisVersioningService {
 
-	private CmisVersioningService fService;
+    private CmisVersioningService fService;
 
-	/**
-	 * Constructor.
-	 * 
-	 * @param service
-	 *            the real service object
-	 */
-	public VersioningServiceWrapper(CmisVersioningService service) {
-		if (service == null) {
-			throw new IllegalArgumentException("Service must be set!");
-		}
-
-		fService = service;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisVersioningService#cancelCheckOut(org
-	 * .apache.opencmis.server .spi.CallContext, java.lang.String,
-	 * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public void cancelCheckOut(CallContext context, String repositoryId, String objectId, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkId("Object Id", objectId);
-
-		try {
-			fService.cancelCheckOut(context, repositoryId, objectId, extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisVersioningService#checkIn(org.apache
-	 * .opencmis.server.spi .CallContext, java.lang.String,
-	 * org.apache.opencmis.commons.provider.Holder, java.lang.Boolean,
-	 * org.apache.opencmis.commons.provider.PropertiesData,
-	 * org.apache.opencmis.commons.provider.ContentStreamData, java.lang.String,
-	 * java.util.List, org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.provider.AccessControlList,
-	 * org.apache.opencmis.commons.api.ExtensionsData,
-	 * org.apache.opencmis.server.spi.ObjectInfoHolder)
-	 */
-	public ObjectData checkIn(CallContext context, String repositoryId, Holder<String> objectId, Boolean major,
-			Properties properties, ContentStream contentStream, String checkinComment, List<String> policies,
-			Acl addAces, Acl removeAces, ExtensionsData extension, ObjectInfoHolder objectInfos) {
-		checkRepositoryId(repositoryId);
-		checkHolderId("Object Id", objectId);
-		major = getDefaultTrue(major);
-
-		try {
-			return fService.checkIn(context, repositoryId, objectId, major, properties, contentStream, checkinComment,
-					policies, addAces, removeAces, extension, objectInfos);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisVersioningService#checkOut(org.apache
-	 * .opencmis.server.spi .CallContext, java.lang.String,
-	 * org.apache.opencmis.commons.provider.Holder,
-	 * org.apache.opencmis.commons.api.ExtensionsData,
-	 * org.apache.opencmis.commons.provider.Holder,
-	 * org.apache.opencmis.server.spi.ObjectInfoHolder)
-	 */
-	public ObjectData checkOut(CallContext context, String repositoryId, Holder<String> objectId,
-			ExtensionsData extension, Holder<Boolean> contentCopied, ObjectInfoHolder objectInfos) {
-		checkRepositoryId(repositoryId);
-		checkHolderId("Object Id", objectId);
-
-		try {
-			return fService.checkOut(context, repositoryId, objectId, extension, contentCopied, objectInfos);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisVersioningService#getAllVersions(org
-	 * .apache.opencmis.server .spi.CallContext, java.lang.String,
-	 * java.lang.String, java.lang.String, java.lang.Boolean,
-	 * org.apache.opencmis.commons.api.ExtensionsData,
-	 * org.apache.opencmis.server.spi.ObjectInfoHolder)
-	 */
-	public List<ObjectData> getAllVersions(CallContext context, String repositoryId, String versionSeriesId,
-			String filter, Boolean includeAllowableActions, ExtensionsData extension, ObjectInfoHolder objectInfos) {
-		checkRepositoryId(repositoryId);
-		checkId("Version Series Id", versionSeriesId);
-		includeAllowableActions = getDefaultFalse(includeAllowableActions);
-
-		try {
-			return fService.getAllVersions(context, repositoryId, versionSeriesId, filter, includeAllowableActions,
-					extension, objectInfos);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.server.spi.CmisVersioningService#getObjectOfLatestVersion
-	 * (org.apache.opencmis .server.spi.CallContext, java.lang.String,
-	 * java.lang.String, java.lang.Boolean, java.lang.String, java.lang.Boolean,
-	 * org.apache.opencmis.commons.enums.IncludeRelationships, java.lang.String,
-	 * java.lang.Boolean, java.lang.Boolean,
-	 * org.apache.opencmis.commons.api.ExtensionsData,
-	 * org.apache.opencmis.server.spi.ObjectInfoHolder)
-	 */
-	public ObjectData getObjectOfLatestVersion(CallContext context, String repositoryId, String versionSeriesId,
-			Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
-			String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension,
-			ObjectInfoHolder objectInfos) {
-		checkRepositoryId(repositoryId);
-		checkId("Object Id", versionSeriesId);
-		major = getDefaultFalse(major);
-		includeAllowableActions = getDefaultFalse(includeAllowableActions);
-		includeRelationships = getDefault(includeRelationships);
-		renditionFilter = getDefaultRenditionFilter(renditionFilter);
-		includePolicyIds = getDefaultFalse(includePolicyIds);
-		includeAcl = getDefaultFalse(includeAcl);
-
-		try {
-			return fService.getObjectOfLatestVersion(context, repositoryId, versionSeriesId, major, filter,
-					includeAllowableActions, includeRelationships, renditionFilter, includePolicyIds, includeAcl,
-					extension, objectInfos);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @seeorg.apache.opencmis.server.spi.CmisVersioningService#
-	 * getPropertiesOfLatestVersion(org.apache .opencmis.server.spi.CallContext,
-	 * java.lang.String, java.lang.String, java.lang.Boolean, java.lang.String,
-	 * org.apache.opencmis.commons.api.ExtensionsData)
-	 */
-	public Properties getPropertiesOfLatestVersion(CallContext context, String repositoryId, String versionSeriesId,
-			Boolean major, String filter, ExtensionsData extension) {
-		checkRepositoryId(repositoryId);
-		checkId("Object Id", versionSeriesId);
-		major = getDefaultFalse(major);
-
-		try {
-			return fService.getPropertiesOfLatestVersion(context, repositoryId, versionSeriesId, major, filter,
-					extension);
-		} catch (Exception e) {
-			throw createCmisException(e);
-		}
-	}
+    /**
+     * Constructor.
+     * 
+     * @param service
+     *            the real service object
+     */
+    public VersioningServiceWrapper(CmisVersioningService service) {
+        if (service == null) {
+            throw new IllegalArgumentException("Service must be set!");
+        }
+
+        fService = service;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisVersioningService#cancelCheckOut(org
+     * .apache.opencmis.server .spi.CallContext, java.lang.String,
+     * java.lang.String, org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public void cancelCheckOut(CallContext context, String repositoryId, String objectId, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkId("Object Id", objectId);
+
+        try {
+            fService.cancelCheckOut(context, repositoryId, objectId, extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisVersioningService#checkIn(org.apache
+     * .opencmis.server.spi .CallContext, java.lang.String,
+     * org.apache.opencmis.commons.provider.Holder, java.lang.Boolean,
+     * org.apache.opencmis.commons.provider.PropertiesData,
+     * org.apache.opencmis.commons.provider.ContentStreamData, java.lang.String,
+     * java.util.List, org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.provider.AccessControlList,
+     * org.apache.opencmis.commons.api.ExtensionsData,
+     * org.apache.opencmis.server.spi.ObjectInfoHolder)
+     */
+    public ObjectData checkIn(CallContext context, String repositoryId, Holder<String> objectId, Boolean major,
+            Properties properties, ContentStream contentStream, String checkinComment, List<String> policies,
+            Acl addAces, Acl removeAces, ExtensionsData extension, ObjectInfoHolder objectInfos) {
+        checkRepositoryId(repositoryId);
+        checkHolderId("Object Id", objectId);
+        major = getDefaultTrue(major);
+
+        try {
+            return fService.checkIn(context, repositoryId, objectId, major, properties, contentStream, checkinComment,
+                    policies, addAces, removeAces, extension, objectInfos);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisVersioningService#checkOut(org.apache
+     * .opencmis.server.spi .CallContext, java.lang.String,
+     * org.apache.opencmis.commons.provider.Holder,
+     * org.apache.opencmis.commons.api.ExtensionsData,
+     * org.apache.opencmis.commons.provider.Holder,
+     * org.apache.opencmis.server.spi.ObjectInfoHolder)
+     */
+    public ObjectData checkOut(CallContext context, String repositoryId, Holder<String> objectId,
+            ExtensionsData extension, Holder<Boolean> contentCopied, ObjectInfoHolder objectInfos) {
+        checkRepositoryId(repositoryId);
+        checkHolderId("Object Id", objectId);
+
+        try {
+            return fService.checkOut(context, repositoryId, objectId, extension, contentCopied, objectInfos);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisVersioningService#getAllVersions(org
+     * .apache.opencmis.server .spi.CallContext, java.lang.String,
+     * java.lang.String, java.lang.String, java.lang.Boolean,
+     * org.apache.opencmis.commons.api.ExtensionsData,
+     * org.apache.opencmis.server.spi.ObjectInfoHolder)
+     */
+    public List<ObjectData> getAllVersions(CallContext context, String repositoryId, String versionSeriesId,
+            String filter, Boolean includeAllowableActions, ExtensionsData extension, ObjectInfoHolder objectInfos) {
+        checkRepositoryId(repositoryId);
+        checkId("Version Series Id", versionSeriesId);
+        includeAllowableActions = getDefaultFalse(includeAllowableActions);
+
+        try {
+            return fService.getAllVersions(context, repositoryId, versionSeriesId, filter, includeAllowableActions,
+                    extension, objectInfos);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.server.spi.CmisVersioningService#getObjectOfLatestVersion
+     * (org.apache.opencmis .server.spi.CallContext, java.lang.String,
+     * java.lang.String, java.lang.Boolean, java.lang.String, java.lang.Boolean,
+     * org.apache.opencmis.commons.enums.IncludeRelationships, java.lang.String,
+     * java.lang.Boolean, java.lang.Boolean,
+     * org.apache.opencmis.commons.api.ExtensionsData,
+     * org.apache.opencmis.server.spi.ObjectInfoHolder)
+     */
+    public ObjectData getObjectOfLatestVersion(CallContext context, String repositoryId, String versionSeriesId,
+            Boolean major, String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+            String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension,
+            ObjectInfoHolder objectInfos) {
+        checkRepositoryId(repositoryId);
+        checkId("Object Id", versionSeriesId);
+        major = getDefaultFalse(major);
+        includeAllowableActions = getDefaultFalse(includeAllowableActions);
+        includeRelationships = getDefault(includeRelationships);
+        renditionFilter = getDefaultRenditionFilter(renditionFilter);
+        includePolicyIds = getDefaultFalse(includePolicyIds);
+        includeAcl = getDefaultFalse(includeAcl);
+
+        try {
+            return fService.getObjectOfLatestVersion(context, repositoryId, versionSeriesId, major, filter,
+                    includeAllowableActions, includeRelationships, renditionFilter, includePolicyIds, includeAcl,
+                    extension, objectInfos);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @seeorg.apache.opencmis.server.spi.CmisVersioningService#
+     * getPropertiesOfLatestVersion(org.apache .opencmis.server.spi.CallContext,
+     * java.lang.String, java.lang.String, java.lang.Boolean, java.lang.String,
+     * org.apache.opencmis.commons.api.ExtensionsData)
+     */
+    public Properties getPropertiesOfLatestVersion(CallContext context, String repositoryId, String versionSeriesId,
+            Boolean major, String filter, ExtensionsData extension) {
+        checkRepositoryId(repositoryId);
+        checkId("Object Id", versionSeriesId);
+        major = getDefaultFalse(major);
+
+        try {
+            return fService.getPropertiesOfLatestVersion(context, repositoryId, versionSeriesId, major, filter,
+                    extension);
+        } catch (Exception e) {
+            throw createCmisException(e);
+        }
+    }
 }



Mime
View raw message