chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcaru...@apache.org
Subject svn commit: r936922 [10/18] - in /incubator/chemistry/opencmis/trunk/chemistry-opencmis-client: chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/ chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/...
Date Thu, 22 Apr 2010 16:04:22 GMT
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ObjectServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ObjectServiceImpl.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ObjectServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ObjectServiceImpl.java Thu Apr 22 16:04:19 2010
@@ -59,493 +59,493 @@ import org.apache.chemistry.opencmis.com
  */
 public class ObjectServiceImpl extends AbstractWebServicesService implements ObjectService {
 
-	private final PortProvider fPortProvider;
+    private final PortProvider fPortProvider;
 
-	/**
-	 * Constructor.
-	 */
-	public ObjectServiceImpl(Session session, PortProvider portProvider) {
-		setSession(session);
-		fPortProvider = portProvider;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#createDocument(java
-	 * .lang.String, org.apache.opencmis.client.provider.PropertiesData,
-	 * java.lang.String, org.apache.opencmis.client.provider.ContentStreamData,
-	 * org.apache.opencmis.commons.enums.VersioningState, java.util.List,
-	 * org.apache.opencmis.client.provider.AccessControlList,
-	 * org.apache.opencmis.client.provider.AccessControlList,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public String createDocument(String repositoryId, Properties properties, String folderId,
-			ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addACEs,
-			Acl removeACEs, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			javax.xml.ws.Holder<String> objectId = new javax.xml.ws.Holder<String>();
-			javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
-
-			port.createDocument(repositoryId, convert(properties), folderId, convert(contentStream), convert(
-					EnumVersioningState.class, versioningState), policies, convert(addACEs), convert(removeACEs),
-					portExtension, objectId);
-
-			setExtensionValues(portExtension, extension);
-
-			return objectId.value;
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#createDocumentFromSource
-	 * (java.lang.String, java.lang.String,
-	 * org.apache.opencmis.client.provider.PropertiesData, java.lang.String,
-	 * org.apache.opencmis.commons.enums.VersioningState, java.util.List,
-	 * org.apache.opencmis.client.provider.AccessControlList,
-	 * org.apache.opencmis.client.provider.AccessControlList,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public String createDocumentFromSource(String repositoryId, String sourceId, Properties properties,
-			String folderId, VersioningState versioningState, List<String> policies, Acl addACEs, Acl removeACEs,
-			ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			javax.xml.ws.Holder<String> objectId = new javax.xml.ws.Holder<String>();
-			javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
-
-			port.createDocumentFromSource(repositoryId, sourceId, convert(properties), folderId, convert(
-					EnumVersioningState.class, versioningState), policies, convert(addACEs), convert(removeACEs),
-					portExtension, objectId);
-
-			setExtensionValues(portExtension, extension);
-
-			return objectId.value;
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#createFolder(java.lang
-	 * .String, org.apache.opencmis.client.provider.PropertiesData,
-	 * java.lang.String, java.util.List,
-	 * org.apache.opencmis.client.provider.AccessControlList,
-	 * org.apache.opencmis.client.provider.AccessControlList,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public String createFolder(String repositoryId, Properties properties, String folderId, List<String> policies,
-			Acl addACEs, Acl removeACEs, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			javax.xml.ws.Holder<String> objectId = new javax.xml.ws.Holder<String>();
-			javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
-
-			port.createFolder(repositoryId, convert(properties), folderId, policies, convert(addACEs),
-					convert(removeACEs), portExtension, objectId);
-
-			setExtensionValues(portExtension, extension);
-
-			return objectId.value;
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#createPolicy(java.lang
-	 * .String, org.apache.opencmis.client.provider.PropertiesData,
-	 * java.lang.String, java.util.List,
-	 * org.apache.opencmis.client.provider.AccessControlList,
-	 * org.apache.opencmis.client.provider.AccessControlList,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public String createPolicy(String repositoryId, Properties properties, String folderId, List<String> policies,
-			Acl addACEs, Acl removeACEs, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			javax.xml.ws.Holder<String> objectId = new javax.xml.ws.Holder<String>();
-			javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
-
-			port.createPolicy(repositoryId, convert(properties), folderId, policies, convert(addACEs),
-					convert(removeACEs), portExtension, objectId);
-
-			setExtensionValues(portExtension, extension);
-
-			return objectId.value;
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#createRelationship(
-	 * java.lang.String, org.apache.opencmis.client.provider.PropertiesData,
-	 * java.util.List, org.apache.opencmis.client.provider.AccessControlList,
-	 * org.apache.opencmis.client.provider.AccessControlList,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public String createRelationship(String repositoryId, Properties properties, List<String> policies, Acl addACEs,
-			Acl removeACEs, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			javax.xml.ws.Holder<String> objectId = new javax.xml.ws.Holder<String>();
-			javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
-
-			port.createRelationship(repositoryId, convert(properties), policies, convert(addACEs), convert(removeACEs),
-					portExtension, objectId);
-
-			setExtensionValues(portExtension, extension);
-
-			return objectId.value;
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#updateProperties(java
-	 * .lang.String, org.apache.opencmis.client.provider.Holder,
-	 * org.apache.opencmis.client.provider.Holder,
-	 * org.apache.opencmis.client.provider.PropertiesData,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
-			Properties properties, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			javax.xml.ws.Holder<String> portObjectId = convertHolder(objectId);
-			javax.xml.ws.Holder<String> portChangeToken = convertHolder(changeToken);
-			javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
-
-			port.updateProperties(repositoryId, portObjectId, portChangeToken, convert(properties), portExtension);
-
-			setHolderValue(portObjectId, objectId);
-			setHolderValue(portChangeToken, changeToken);
-			setExtensionValues(portExtension, extension);
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#deleteObject(java.lang
-	 * .String, java.lang.String, java.lang.Boolean,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public void deleteObject(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
-
-			port.deleteObject(repositoryId, objectId, allVersions, portExtension);
-
-			setExtensionValues(portExtension, extension);
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#deleteTree(java.lang
-	 * .String, java.lang.String, java.lang.Boolean,
-	 * org.apache.opencmis.commons.enums.UnfileObject, java.lang.Boolean,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions,
-			UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			return convert(port.deleteTree(repositoryId, folderId, allVersions, convert(EnumUnfileObject.class,
-					unfileObjects), continueOnFailure, convert(extension)));
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#getAllowableActions
-	 * (java.lang.String, java.lang.String,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			return convert(port.getAllowableActions(repositoryId, objectId, convert(extension)));
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#getContentStream(java
-	 * .lang.String, java.lang.String, java.lang.String, java.math.BigInteger,
-	 * java.math.BigInteger, org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset,
-			BigInteger length, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			return convert(port.getContentStream(repositoryId, objectId, streamId, offset, length, convert(extension)));
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#getObject(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.client.provider.ExtensionsData)
-	 */
-	public ObjectData getObject(String repositoryId, String objectId, String filter, Boolean includeAllowableActions,
-			IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
-			Boolean includeACL, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			return convert(port.getObject(repositoryId, objectId, filter, includeAllowableActions, convert(
-					EnumIncludeRelationships.class, includeRelationships), renditionFilter, includePolicyIds,
-					includeACL, convert(extension)));
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#getObjectByPath(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.client.provider.ExtensionsData)
-	 */
-	public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions,
-			IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
-			Boolean includeACL, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			return convert(port.getObjectByPath(repositoryId, path, filter, includeAllowableActions, convert(
-					EnumIncludeRelationships.class, includeRelationships), renditionFilter, includePolicyIds,
-					includeACL, convert(extension)));
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#getProperties(java.
-	 * lang.String, java.lang.String, java.lang.String,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			return convert(port.getProperties(repositoryId, objectId, filter, convert(extension)));
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#getRenditions(java.
-	 * lang.String, java.lang.String, java.lang.String, java.math.BigInteger,
-	 * java.math.BigInteger, org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter,
-			BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			List<CmisRenditionType> renditionList = port.getRenditions(repositoryId, objectId, renditionFilter,
-					maxItems, skipCount, convert(extension));
-
-			// no list?
-			if (renditionList == null) {
-				return null;
-			}
-
-			// convert list
-			List<RenditionData> result = new ArrayList<RenditionData>();
-			for (CmisRenditionType rendition : renditionList) {
-				result.add(convert(rendition));
-			}
-
-			return result;
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#moveObject(java.lang
-	 * .String, org.apache.opencmis.client.provider.Holder, java.lang.String,
-	 * java.lang.String, org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId,
-			ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			javax.xml.ws.Holder<String> portObjectId = convertHolder(objectId);
-			javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
-
-			port.moveObject(repositoryId, portObjectId, targetFolderId, sourceFolderId, portExtension);
-
-			setHolderValue(portObjectId, objectId);
-			setExtensionValues(portExtension, extension);
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#setContentStream(java
-	 * .lang.String, org.apache.opencmis.client.provider.Holder,
-	 * java.lang.Boolean, org.apache.opencmis.client.provider.Holder,
-	 * org.apache.opencmis.client.provider.ContentStreamData,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
-			Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			javax.xml.ws.Holder<String> portObjectId = convertHolder(objectId);
-			javax.xml.ws.Holder<String> portChangeToken = convertHolder(changeToken);
-			javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
-
-			port.setContentStream(repositoryId, portObjectId, overwriteFlag, portChangeToken, convert(contentStream),
-					portExtension);
-
-			setHolderValue(portObjectId, objectId);
-			setHolderValue(portChangeToken, changeToken);
-			setExtensionValues(portExtension, extension);
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.ObjectService#deleteContentStream
-	 * (java.lang.String, org.apache.opencmis.client.provider.Holder,
-	 * org.apache.opencmis.client.provider.Holder,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
-			ExtensionsData extension) {
-		ObjectServicePort port = fPortProvider.getObjectServicePort();
-
-		try {
-			javax.xml.ws.Holder<String> portObjectId = convertHolder(objectId);
-			javax.xml.ws.Holder<String> portChangeToken = convertHolder(changeToken);
-			javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
-
-			port.deleteContentStream(repositoryId, portObjectId, portChangeToken, portExtension);
-
-			setHolderValue(portObjectId, objectId);
-			setHolderValue(portChangeToken, changeToken);
-			setExtensionValues(portExtension, extension);
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
+    /**
+     * Constructor.
+     */
+    public ObjectServiceImpl(Session session, PortProvider portProvider) {
+        setSession(session);
+        fPortProvider = portProvider;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#createDocument(java
+     * .lang.String, org.apache.opencmis.client.provider.PropertiesData,
+     * java.lang.String, org.apache.opencmis.client.provider.ContentStreamData,
+     * org.apache.opencmis.commons.enums.VersioningState, java.util.List,
+     * org.apache.opencmis.client.provider.AccessControlList,
+     * org.apache.opencmis.client.provider.AccessControlList,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public String createDocument(String repositoryId, Properties properties, String folderId,
+            ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addACEs,
+            Acl removeACEs, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            javax.xml.ws.Holder<String> objectId = new javax.xml.ws.Holder<String>();
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.createDocument(repositoryId, convert(properties), folderId, convert(contentStream), convert(
+                    EnumVersioningState.class, versioningState), policies, convert(addACEs), convert(removeACEs),
+                    portExtension, objectId);
+
+            setExtensionValues(portExtension, extension);
+
+            return objectId.value;
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#createDocumentFromSource
+     * (java.lang.String, java.lang.String,
+     * org.apache.opencmis.client.provider.PropertiesData, java.lang.String,
+     * org.apache.opencmis.commons.enums.VersioningState, java.util.List,
+     * org.apache.opencmis.client.provider.AccessControlList,
+     * org.apache.opencmis.client.provider.AccessControlList,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public String createDocumentFromSource(String repositoryId, String sourceId, Properties properties,
+            String folderId, VersioningState versioningState, List<String> policies, Acl addACEs, Acl removeACEs,
+            ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            javax.xml.ws.Holder<String> objectId = new javax.xml.ws.Holder<String>();
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.createDocumentFromSource(repositoryId, sourceId, convert(properties), folderId, convert(
+                    EnumVersioningState.class, versioningState), policies, convert(addACEs), convert(removeACEs),
+                    portExtension, objectId);
+
+            setExtensionValues(portExtension, extension);
+
+            return objectId.value;
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#createFolder(java.lang
+     * .String, org.apache.opencmis.client.provider.PropertiesData,
+     * java.lang.String, java.util.List,
+     * org.apache.opencmis.client.provider.AccessControlList,
+     * org.apache.opencmis.client.provider.AccessControlList,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public String createFolder(String repositoryId, Properties properties, String folderId, List<String> policies,
+            Acl addACEs, Acl removeACEs, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            javax.xml.ws.Holder<String> objectId = new javax.xml.ws.Holder<String>();
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.createFolder(repositoryId, convert(properties), folderId, policies, convert(addACEs),
+                    convert(removeACEs), portExtension, objectId);
+
+            setExtensionValues(portExtension, extension);
+
+            return objectId.value;
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#createPolicy(java.lang
+     * .String, org.apache.opencmis.client.provider.PropertiesData,
+     * java.lang.String, java.util.List,
+     * org.apache.opencmis.client.provider.AccessControlList,
+     * org.apache.opencmis.client.provider.AccessControlList,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public String createPolicy(String repositoryId, Properties properties, String folderId, List<String> policies,
+            Acl addACEs, Acl removeACEs, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            javax.xml.ws.Holder<String> objectId = new javax.xml.ws.Holder<String>();
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.createPolicy(repositoryId, convert(properties), folderId, policies, convert(addACEs),
+                    convert(removeACEs), portExtension, objectId);
+
+            setExtensionValues(portExtension, extension);
+
+            return objectId.value;
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#createRelationship(
+     * java.lang.String, org.apache.opencmis.client.provider.PropertiesData,
+     * java.util.List, org.apache.opencmis.client.provider.AccessControlList,
+     * org.apache.opencmis.client.provider.AccessControlList,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public String createRelationship(String repositoryId, Properties properties, List<String> policies, Acl addACEs,
+            Acl removeACEs, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            javax.xml.ws.Holder<String> objectId = new javax.xml.ws.Holder<String>();
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.createRelationship(repositoryId, convert(properties), policies, convert(addACEs), convert(removeACEs),
+                    portExtension, objectId);
+
+            setExtensionValues(portExtension, extension);
+
+            return objectId.value;
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#updateProperties(java
+     * .lang.String, org.apache.opencmis.client.provider.Holder,
+     * org.apache.opencmis.client.provider.Holder,
+     * org.apache.opencmis.client.provider.PropertiesData,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public void updateProperties(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
+            Properties properties, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            javax.xml.ws.Holder<String> portObjectId = convertHolder(objectId);
+            javax.xml.ws.Holder<String> portChangeToken = convertHolder(changeToken);
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.updateProperties(repositoryId, portObjectId, portChangeToken, convert(properties), portExtension);
+
+            setHolderValue(portObjectId, objectId);
+            setHolderValue(portChangeToken, changeToken);
+            setExtensionValues(portExtension, extension);
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#deleteObject(java.lang
+     * .String, java.lang.String, java.lang.Boolean,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public void deleteObject(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.deleteObject(repositoryId, objectId, allVersions, portExtension);
+
+            setExtensionValues(portExtension, extension);
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#deleteTree(java.lang
+     * .String, java.lang.String, java.lang.Boolean,
+     * org.apache.opencmis.commons.enums.UnfileObject, java.lang.Boolean,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public FailedToDeleteData deleteTree(String repositoryId, String folderId, Boolean allVersions,
+            UnfileObject unfileObjects, Boolean continueOnFailure, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            return convert(port.deleteTree(repositoryId, folderId, allVersions, convert(EnumUnfileObject.class,
+                    unfileObjects), continueOnFailure, convert(extension)));
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#getAllowableActions
+     * (java.lang.String, java.lang.String,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            return convert(port.getAllowableActions(repositoryId, objectId, convert(extension)));
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#getContentStream(java
+     * .lang.String, java.lang.String, java.lang.String, java.math.BigInteger,
+     * java.math.BigInteger, org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public ContentStream getContentStream(String repositoryId, String objectId, String streamId, BigInteger offset,
+            BigInteger length, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            return convert(port.getContentStream(repositoryId, objectId, streamId, offset, length, convert(extension)));
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#getObject(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.client.provider.ExtensionsData)
+     */
+    public ObjectData getObject(String repositoryId, String objectId, String filter, Boolean includeAllowableActions,
+            IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
+            Boolean includeACL, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            return convert(port.getObject(repositoryId, objectId, filter, includeAllowableActions, convert(
+                    EnumIncludeRelationships.class, includeRelationships), renditionFilter, includePolicyIds,
+                    includeACL, convert(extension)));
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#getObjectByPath(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.client.provider.ExtensionsData)
+     */
+    public ObjectData getObjectByPath(String repositoryId, String path, String filter, Boolean includeAllowableActions,
+            IncludeRelationships includeRelationships, String renditionFilter, Boolean includePolicyIds,
+            Boolean includeACL, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            return convert(port.getObjectByPath(repositoryId, path, filter, includeAllowableActions, convert(
+                    EnumIncludeRelationships.class, includeRelationships), renditionFilter, includePolicyIds,
+                    includeACL, convert(extension)));
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#getProperties(java.
+     * lang.String, java.lang.String, java.lang.String,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public Properties getProperties(String repositoryId, String objectId, String filter, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            return convert(port.getProperties(repositoryId, objectId, filter, convert(extension)));
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#getRenditions(java.
+     * lang.String, java.lang.String, java.lang.String, java.math.BigInteger,
+     * java.math.BigInteger, org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public List<RenditionData> getRenditions(String repositoryId, String objectId, String renditionFilter,
+            BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            List<CmisRenditionType> renditionList = port.getRenditions(repositoryId, objectId, renditionFilter,
+                    maxItems, skipCount, convert(extension));
+
+            // no list?
+            if (renditionList == null) {
+                return null;
+            }
+
+            // convert list
+            List<RenditionData> result = new ArrayList<RenditionData>();
+            for (CmisRenditionType rendition : renditionList) {
+                result.add(convert(rendition));
+            }
+
+            return result;
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#moveObject(java.lang
+     * .String, org.apache.opencmis.client.provider.Holder, java.lang.String,
+     * java.lang.String, org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public void moveObject(String repositoryId, Holder<String> objectId, String targetFolderId, String sourceFolderId,
+            ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            javax.xml.ws.Holder<String> portObjectId = convertHolder(objectId);
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.moveObject(repositoryId, portObjectId, targetFolderId, sourceFolderId, portExtension);
+
+            setHolderValue(portObjectId, objectId);
+            setExtensionValues(portExtension, extension);
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#setContentStream(java
+     * .lang.String, org.apache.opencmis.client.provider.Holder,
+     * java.lang.Boolean, org.apache.opencmis.client.provider.Holder,
+     * org.apache.opencmis.client.provider.ContentStreamData,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public void setContentStream(String repositoryId, Holder<String> objectId, Boolean overwriteFlag,
+            Holder<String> changeToken, ContentStream contentStream, ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            javax.xml.ws.Holder<String> portObjectId = convertHolder(objectId);
+            javax.xml.ws.Holder<String> portChangeToken = convertHolder(changeToken);
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.setContentStream(repositoryId, portObjectId, overwriteFlag, portChangeToken, convert(contentStream),
+                    portExtension);
+
+            setHolderValue(portObjectId, objectId);
+            setHolderValue(portChangeToken, changeToken);
+            setExtensionValues(portExtension, extension);
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.ObjectService#deleteContentStream
+     * (java.lang.String, org.apache.opencmis.client.provider.Holder,
+     * org.apache.opencmis.client.provider.Holder,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public void deleteContentStream(String repositoryId, Holder<String> objectId, Holder<String> changeToken,
+            ExtensionsData extension) {
+        ObjectServicePort port = fPortProvider.getObjectServicePort();
+
+        try {
+            javax.xml.ws.Holder<String> portObjectId = convertHolder(objectId);
+            javax.xml.ws.Holder<String> portChangeToken = convertHolder(changeToken);
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.deleteContentStream(repositoryId, portObjectId, portChangeToken, portExtension);
+
+            setHolderValue(portObjectId, objectId);
+            setHolderValue(portChangeToken, changeToken);
+            setExtensionValues(portExtension, extension);
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PolicyServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PolicyServiceImpl.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PolicyServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PolicyServiceImpl.java Thu Apr 22 16:04:19 2010
@@ -43,96 +43,96 @@ import org.apache.chemistry.opencmis.com
  */
 public class PolicyServiceImpl extends AbstractWebServicesService implements PolicyService {
 
-	private final PortProvider fPortProvider;
+    private final PortProvider fPortProvider;
 
-	/**
-	 * Constructor.
-	 */
-	public PolicyServiceImpl(Session session, PortProvider portProvider) {
-		setSession(session);
-		fPortProvider = portProvider;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.PolicyService#applyPolicy(java.lang
-	 * .String, java.lang.String, java.lang.String,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public void applyPolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
-		PolicyServicePort port = fPortProvider.getPolicyServicePort();
-
-		try {
-			javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
-
-			port.applyPolicy(repositoryId, policyId, objectId, portExtension);
-
-			setExtensionValues(portExtension, extension);
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.PolicyService#removePolicy(java.lang
-	 * .String, java.lang.String, java.lang.String,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public void removePolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
-		PolicyServicePort port = fPortProvider.getPolicyServicePort();
-
-		try {
-			javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
-
-			port.removePolicy(repositoryId, policyId, objectId, portExtension);
-
-			setExtensionValues(portExtension, extension);
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.PolicyService#getAppliedPolicies(
-	 * java.lang.String, java.lang.String, java.lang.String,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public List<ObjectData> getAppliedPolicies(String repositoryId, String objectId, String filter,
-			ExtensionsData extension) {
-		PolicyServicePort port = fPortProvider.getPolicyServicePort();
-
-		try {
-			List<CmisObjectType> policyList = port.getAppliedPolicies(repositoryId, objectId, filter,
-					convert(extension));
-
-			// no list?
-			if (policyList == null) {
-				return null;
-			}
-
-			// convert list
-			List<ObjectData> result = new ArrayList<ObjectData>();
-			for (CmisObjectType policy : policyList) {
-				result.add(convert(policy));
-			}
-
-			return result;
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
+    /**
+     * Constructor.
+     */
+    public PolicyServiceImpl(Session session, PortProvider portProvider) {
+        setSession(session);
+        fPortProvider = portProvider;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.PolicyService#applyPolicy(java.lang
+     * .String, java.lang.String, java.lang.String,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public void applyPolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
+        PolicyServicePort port = fPortProvider.getPolicyServicePort();
+
+        try {
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.applyPolicy(repositoryId, policyId, objectId, portExtension);
+
+            setExtensionValues(portExtension, extension);
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.PolicyService#removePolicy(java.lang
+     * .String, java.lang.String, java.lang.String,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public void removePolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
+        PolicyServicePort port = fPortProvider.getPolicyServicePort();
+
+        try {
+            javax.xml.ws.Holder<CmisExtensionType> portExtension = convertExtensionHolder(extension);
+
+            port.removePolicy(repositoryId, policyId, objectId, portExtension);
+
+            setExtensionValues(portExtension, extension);
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.PolicyService#getAppliedPolicies(
+     * java.lang.String, java.lang.String, java.lang.String,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public List<ObjectData> getAppliedPolicies(String repositoryId, String objectId, String filter,
+            ExtensionsData extension) {
+        PolicyServicePort port = fPortProvider.getPolicyServicePort();
+
+        try {
+            List<CmisObjectType> policyList = port.getAppliedPolicies(repositoryId, objectId, filter,
+                    convert(extension));
+
+            // no list?
+            if (policyList == null) {
+                return null;
+            }
+
+            // convert list
+            List<ObjectData> result = new ArrayList<ObjectData>();
+            for (CmisObjectType policy : policyList) {
+                result.add(convert(policy));
+            }
+
+            return result;
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java Thu Apr 22 16:04:19 2010
@@ -71,230 +71,230 @@ import com.sun.xml.ws.developer.WSBindin
  */
 public class PortProvider {
 
-	private static Log log = LogFactory.getLog(PortProvider.class);
+    private static Log log = LogFactory.getLog(PortProvider.class);
 
-	public static final String CMIS_NAMESPACE = "http://docs.oasis-open.org/ns/cmis/ws/200908/";
+    public static final String CMIS_NAMESPACE = "http://docs.oasis-open.org/ns/cmis/ws/200908/";
 
-	public static final String REPOSITORY_SERVICE = "RepositoryService";
-	public static final String OBJECT_SERVICE = "ObjectService";
-	public static final String DISCOVERY_SERVICE = "DiscoveryService";
-	public static final String NAVIGATION_SERVICE = "NavigationService";
-	public static final String MULTIFILING_SERVICE = "MulifilingService";
-	public static final String VERSIONING_SERVICE = "VersioningService";
-	public static final String RELATIONSHIP_SERVICE = "RelationshipService";
-	public static final String POLICY_SERVICE = "PolicyService";
-	public static final String ACL_SERVICE = "ACLService";
-
-	private static final int CHUNK_SIZE = 64 * 1024;
-
-	private final Session fSession;
-
-	/**
-	 * Constructor.
-	 */
-	public PortProvider(Session session) {
-		fSession = session;
-	}
-
-	/**
-	 * Return the Repository Service port object.
-	 */
-	public RepositoryServicePort getRepositoryServicePort() {
-		return (RepositoryServicePort) getPortObject(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE);
-	}
-
-	/**
-	 * Return the Navigation Service port object.
-	 */
-	public NavigationServicePort getNavigationServicePort() {
-		return (NavigationServicePort) getPortObject(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE);
-	}
-
-	/**
-	 * Return the Object Service port object.
-	 */
-	public ObjectServicePort getObjectServicePort() {
-		return (ObjectServicePort) getPortObject(SessionParameter.WEBSERVICES_OBJECT_SERVICE);
-	}
-
-	/**
-	 * Return the Versioning Service port object.
-	 */
-	public VersioningServicePort getVersioningServicePort() {
-		return (VersioningServicePort) getPortObject(SessionParameter.WEBSERVICES_VERSIONING_SERVICE);
-	}
-
-	/**
-	 * Return the Discovery Service port object.
-	 */
-	public DiscoveryServicePort getDiscoveryServicePort() {
-		return (DiscoveryServicePort) getPortObject(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE);
-	}
-
-	/**
-	 * Return the MultiFiling Service port object.
-	 */
-	public MultiFilingServicePort getMultiFilingServicePort() {
-		return (MultiFilingServicePort) getPortObject(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE);
-	}
-
-	/**
-	 * Return the Relationship Service port object.
-	 */
-	public RelationshipServicePort getRelationshipServicePort() {
-		return (RelationshipServicePort) getPortObject(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE);
-	}
-
-	/**
-	 * Return the Policy Service port object.
-	 */
-	public PolicyServicePort getPolicyServicePort() {
-		return (PolicyServicePort) getPortObject(SessionParameter.WEBSERVICES_POLICY_SERVICE);
-	}
-
-	/**
-	 * Return the ACL Service port object.
-	 */
-	public ACLServicePort getACLServicePort() {
-		return (ACLServicePort) getPortObject(SessionParameter.WEBSERVICES_ACL_SERVICE);
-	}
-
-	// ---- internal ----
-
-	/**
-	 * Gets a port object from the session or (re-)initializes the port objects.
-	 */
-	@SuppressWarnings("unchecked")
-	private Object getPortObject(String portKey) {
-		Map<String, Object> portMap = (Map<String, Object>) fSession.get(SpiSessionParameter.PORTS);
-
-		// does the port map exist?
-		if (portMap == null) {
-			fSession.writeLock();
-			try {
-				// try again
-				portMap = (Map<String, Object>) fSession.get(SpiSessionParameter.PORTS);
-				if (portMap == null) {
-					portMap = Collections.synchronizedMap(new HashMap<String, Object>());
-					fSession.put(SpiSessionParameter.PORTS, portMap, true);
-				}
-
-				if (portMap.containsKey(portKey)) {
-					return portMap.get(portKey);
-				}
-
-				// create object
-				Object portObject = initPortObject(portKey);
-				portMap.put(portKey, portObject);
-
-				return portObject;
-			} finally {
-				fSession.writeUnlock();
-			}
-		}
-
-		// is the port in the port map?
-		if (!portMap.containsKey(portKey)) {
-			fSession.writeLock();
-			try {
-				// try again
-				if (portMap.containsKey(portKey)) {
-					return portMap.get(portKey);
-				}
-
-				// create object
-				Object portObject = initPortObject(portKey);
-				portMap.put(portKey, portObject);
-
-				return portObject;
-			} finally {
-				fSession.writeUnlock();
-			}
-		}
-
-		return portMap.get(portKey);
-	}
-
-	/**
-	 * Creates a port object.
-	 */
-	private Object initPortObject(String portKey) {
-		Object portObject = null;
-
-		if (log.isDebugEnabled()) {
-			log.debug("Initializing Web Service " + portKey + "...");
-		}
-
-		try {
-			// get WSDL URL
-			URL wsdlUrl = new URL((String) fSession.get(portKey));
-
-			// build the requested port object
-			if (SessionParameter.WEBSERVICES_REPOSITORY_SERVICE.equals(portKey)) {
-				RepositoryService service = new RepositoryService(wsdlUrl,
-						new QName(CMIS_NAMESPACE, REPOSITORY_SERVICE));
-				portObject = service.getRepositoryServicePort(new MTOMFeature());
-			} else if (SessionParameter.WEBSERVICES_NAVIGATION_SERVICE.equals(portKey)) {
-				NavigationService service = new NavigationService(wsdlUrl,
-						new QName(CMIS_NAMESPACE, NAVIGATION_SERVICE));
-				portObject = service.getNavigationServicePort(new MTOMFeature());
-			} else if (SessionParameter.WEBSERVICES_OBJECT_SERVICE.equals(portKey)) {
-				ObjectService service = new ObjectService(wsdlUrl, new QName(CMIS_NAMESPACE, OBJECT_SERVICE));
-				portObject = service.getObjectServicePort(new MTOMFeature(), new StreamingAttachmentFeature(null, true,
-						4 * 1024 * 1024));
-				((BindingProvider) portObject).getRequestContext().put(
-						JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE, CHUNK_SIZE);
-			} else if (SessionParameter.WEBSERVICES_VERSIONING_SERVICE.equals(portKey)) {
-				VersioningService service = new VersioningService(wsdlUrl,
-						new QName(CMIS_NAMESPACE, VERSIONING_SERVICE));
-				portObject = service.getVersioningServicePort(new MTOMFeature());
-			} else if (SessionParameter.WEBSERVICES_DISCOVERY_SERVICE.equals(portKey)) {
-				DiscoveryService service = new DiscoveryService(wsdlUrl, new QName(CMIS_NAMESPACE, DISCOVERY_SERVICE));
-				portObject = service.getDiscoveryServicePort(new MTOMFeature());
-			} else if (SessionParameter.WEBSERVICES_MULTIFILING_SERVICE.equals(portKey)) {
-				MultiFilingService service = new MultiFilingService(wsdlUrl, new QName(CMIS_NAMESPACE,
-						MULTIFILING_SERVICE));
-				portObject = service.getMultiFilingServicePort(new MTOMFeature());
-			} else if (SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE.equals(portKey)) {
-				RelationshipService service = new RelationshipService(wsdlUrl, new QName(CMIS_NAMESPACE,
-						RELATIONSHIP_SERVICE));
-				portObject = service.getRelationshipServicePort(new MTOMFeature());
-			} else if (SessionParameter.WEBSERVICES_POLICY_SERVICE.equals(portKey)) {
-				PolicyService service = new PolicyService(wsdlUrl, new QName(CMIS_NAMESPACE, POLICY_SERVICE));
-				portObject = service.getPolicyServicePort(new MTOMFeature());
-			} else if (SessionParameter.WEBSERVICES_ACL_SERVICE.equals(portKey)) {
-				ACLService service = new ACLService(wsdlUrl, new QName(CMIS_NAMESPACE, ACL_SERVICE));
-				portObject = service.getACLServicePort(new MTOMFeature());
-			}
-
-			// add SOAP and HTTP authentication headers
-			AbstractAuthenticationProvider authProvider = CmisBindingsHelper.getAuthenticationProvider(fSession);
-			if (authProvider != null) {
-				// SOAP header
-				Element soapHeader = authProvider.getSOAPHeaders(portObject);
-				if (soapHeader != null) {
-					((WSBindingProvider) portObject).setOutboundHeaders(Headers.create(soapHeader));
-				}
-
-				// HTTP header
-				Map<String, List<String>> httpHeaders = authProvider.getHTTPHeaders(wsdlUrl.toString());
-				if (httpHeaders != null) {
-					((BindingProvider) portObject).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS,
-							httpHeaders);
-				}
-			}
-		} catch (CmisBaseException ce) {
-			throw ce;
-		} catch (Exception e) {
-			throw new CmisConnectionException("Cannot initalize Web Services port object [" + portKey + "]: "
-					+ e.getMessage(), e);
-		}
-
-		// we have no object ... strange ...
-		if (portObject == null) {
-			throw new CmisRuntimeException("Cannot find Web Services port object [" + portKey + "]!");
-		}
+    public static final String REPOSITORY_SERVICE = "RepositoryService";
+    public static final String OBJECT_SERVICE = "ObjectService";
+    public static final String DISCOVERY_SERVICE = "DiscoveryService";
+    public static final String NAVIGATION_SERVICE = "NavigationService";
+    public static final String MULTIFILING_SERVICE = "MulifilingService";
+    public static final String VERSIONING_SERVICE = "VersioningService";
+    public static final String RELATIONSHIP_SERVICE = "RelationshipService";
+    public static final String POLICY_SERVICE = "PolicyService";
+    public static final String ACL_SERVICE = "ACLService";
+
+    private static final int CHUNK_SIZE = 64 * 1024;
+
+    private final Session fSession;
+
+    /**
+     * Constructor.
+     */
+    public PortProvider(Session session) {
+        fSession = session;
+    }
+
+    /**
+     * Return the Repository Service port object.
+     */
+    public RepositoryServicePort getRepositoryServicePort() {
+        return (RepositoryServicePort) getPortObject(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE);
+    }
+
+    /**
+     * Return the Navigation Service port object.
+     */
+    public NavigationServicePort getNavigationServicePort() {
+        return (NavigationServicePort) getPortObject(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE);
+    }
+
+    /**
+     * Return the Object Service port object.
+     */
+    public ObjectServicePort getObjectServicePort() {
+        return (ObjectServicePort) getPortObject(SessionParameter.WEBSERVICES_OBJECT_SERVICE);
+    }
+
+    /**
+     * Return the Versioning Service port object.
+     */
+    public VersioningServicePort getVersioningServicePort() {
+        return (VersioningServicePort) getPortObject(SessionParameter.WEBSERVICES_VERSIONING_SERVICE);
+    }
+
+    /**
+     * Return the Discovery Service port object.
+     */
+    public DiscoveryServicePort getDiscoveryServicePort() {
+        return (DiscoveryServicePort) getPortObject(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE);
+    }
+
+    /**
+     * Return the MultiFiling Service port object.
+     */
+    public MultiFilingServicePort getMultiFilingServicePort() {
+        return (MultiFilingServicePort) getPortObject(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE);
+    }
+
+    /**
+     * Return the Relationship Service port object.
+     */
+    public RelationshipServicePort getRelationshipServicePort() {
+        return (RelationshipServicePort) getPortObject(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE);
+    }
+
+    /**
+     * Return the Policy Service port object.
+     */
+    public PolicyServicePort getPolicyServicePort() {
+        return (PolicyServicePort) getPortObject(SessionParameter.WEBSERVICES_POLICY_SERVICE);
+    }
+
+    /**
+     * Return the ACL Service port object.
+     */
+    public ACLServicePort getACLServicePort() {
+        return (ACLServicePort) getPortObject(SessionParameter.WEBSERVICES_ACL_SERVICE);
+    }
+
+    // ---- internal ----
+
+    /**
+     * Gets a port object from the session or (re-)initializes the port objects.
+     */
+    @SuppressWarnings("unchecked")
+    private Object getPortObject(String portKey) {
+        Map<String, Object> portMap = (Map<String, Object>) fSession.get(SpiSessionParameter.PORTS);
+
+        // does the port map exist?
+        if (portMap == null) {
+            fSession.writeLock();
+            try {
+                // try again
+                portMap = (Map<String, Object>) fSession.get(SpiSessionParameter.PORTS);
+                if (portMap == null) {
+                    portMap = Collections.synchronizedMap(new HashMap<String, Object>());
+                    fSession.put(SpiSessionParameter.PORTS, portMap, true);
+                }
+
+                if (portMap.containsKey(portKey)) {
+                    return portMap.get(portKey);
+                }
+
+                // create object
+                Object portObject = initPortObject(portKey);
+                portMap.put(portKey, portObject);
+
+                return portObject;
+            } finally {
+                fSession.writeUnlock();
+            }
+        }
+
+        // is the port in the port map?
+        if (!portMap.containsKey(portKey)) {
+            fSession.writeLock();
+            try {
+                // try again
+                if (portMap.containsKey(portKey)) {
+                    return portMap.get(portKey);
+                }
+
+                // create object
+                Object portObject = initPortObject(portKey);
+                portMap.put(portKey, portObject);
+
+                return portObject;
+            } finally {
+                fSession.writeUnlock();
+            }
+        }
+
+        return portMap.get(portKey);
+    }
+
+    /**
+     * Creates a port object.
+     */
+    private Object initPortObject(String portKey) {
+        Object portObject = null;
+
+        if (log.isDebugEnabled()) {
+            log.debug("Initializing Web Service " + portKey + "...");
+        }
+
+        try {
+            // get WSDL URL
+            URL wsdlUrl = new URL((String) fSession.get(portKey));
+
+            // build the requested port object
+            if (SessionParameter.WEBSERVICES_REPOSITORY_SERVICE.equals(portKey)) {
+                RepositoryService service = new RepositoryService(wsdlUrl,
+                        new QName(CMIS_NAMESPACE, REPOSITORY_SERVICE));
+                portObject = service.getRepositoryServicePort(new MTOMFeature());
+            } else if (SessionParameter.WEBSERVICES_NAVIGATION_SERVICE.equals(portKey)) {
+                NavigationService service = new NavigationService(wsdlUrl,
+                        new QName(CMIS_NAMESPACE, NAVIGATION_SERVICE));
+                portObject = service.getNavigationServicePort(new MTOMFeature());
+            } else if (SessionParameter.WEBSERVICES_OBJECT_SERVICE.equals(portKey)) {
+                ObjectService service = new ObjectService(wsdlUrl, new QName(CMIS_NAMESPACE, OBJECT_SERVICE));
+                portObject = service.getObjectServicePort(new MTOMFeature(), new StreamingAttachmentFeature(null, true,
+                        4 * 1024 * 1024));
+                ((BindingProvider) portObject).getRequestContext().put(
+                        JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE, CHUNK_SIZE);
+            } else if (SessionParameter.WEBSERVICES_VERSIONING_SERVICE.equals(portKey)) {
+                VersioningService service = new VersioningService(wsdlUrl,
+                        new QName(CMIS_NAMESPACE, VERSIONING_SERVICE));
+                portObject = service.getVersioningServicePort(new MTOMFeature());
+            } else if (SessionParameter.WEBSERVICES_DISCOVERY_SERVICE.equals(portKey)) {
+                DiscoveryService service = new DiscoveryService(wsdlUrl, new QName(CMIS_NAMESPACE, DISCOVERY_SERVICE));
+                portObject = service.getDiscoveryServicePort(new MTOMFeature());
+            } else if (SessionParameter.WEBSERVICES_MULTIFILING_SERVICE.equals(portKey)) {
+                MultiFilingService service = new MultiFilingService(wsdlUrl, new QName(CMIS_NAMESPACE,
+                        MULTIFILING_SERVICE));
+                portObject = service.getMultiFilingServicePort(new MTOMFeature());
+            } else if (SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE.equals(portKey)) {
+                RelationshipService service = new RelationshipService(wsdlUrl, new QName(CMIS_NAMESPACE,
+                        RELATIONSHIP_SERVICE));
+                portObject = service.getRelationshipServicePort(new MTOMFeature());
+            } else if (SessionParameter.WEBSERVICES_POLICY_SERVICE.equals(portKey)) {
+                PolicyService service = new PolicyService(wsdlUrl, new QName(CMIS_NAMESPACE, POLICY_SERVICE));
+                portObject = service.getPolicyServicePort(new MTOMFeature());
+            } else if (SessionParameter.WEBSERVICES_ACL_SERVICE.equals(portKey)) {
+                ACLService service = new ACLService(wsdlUrl, new QName(CMIS_NAMESPACE, ACL_SERVICE));
+                portObject = service.getACLServicePort(new MTOMFeature());
+            }
+
+            // add SOAP and HTTP authentication headers
+            AbstractAuthenticationProvider authProvider = CmisBindingsHelper.getAuthenticationProvider(fSession);
+            if (authProvider != null) {
+                // SOAP header
+                Element soapHeader = authProvider.getSOAPHeaders(portObject);
+                if (soapHeader != null) {
+                    ((WSBindingProvider) portObject).setOutboundHeaders(Headers.create(soapHeader));
+                }
+
+                // HTTP header
+                Map<String, List<String>> httpHeaders = authProvider.getHTTPHeaders(wsdlUrl.toString());
+                if (httpHeaders != null) {
+                    ((BindingProvider) portObject).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS,
+                            httpHeaders);
+                }
+            }
+        } catch (CmisBaseException ce) {
+            throw ce;
+        } catch (Exception e) {
+            throw new CmisConnectionException("Cannot initalize Web Services port object [" + portKey + "]: "
+                    + e.getMessage(), e);
+        }
+
+        // we have no object ... strange ...
+        if (portObject == null) {
+            throw new CmisRuntimeException("Cannot find Web Services port object [" + portKey + "]!");
+        }
 
-		return portObject;
-	}
+        return portObject;
+    }
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RelationshipServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RelationshipServiceImpl.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RelationshipServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RelationshipServiceImpl.java Thu Apr 22 16:04:19 2010
@@ -40,41 +40,41 @@ import org.apache.chemistry.opencmis.com
  */
 public class RelationshipServiceImpl extends AbstractWebServicesService implements RelationshipService {
 
-	private final PortProvider fPortProvider;
+    private final PortProvider fPortProvider;
 
-	/**
-	 * Constructor.
-	 */
-	public RelationshipServiceImpl(Session session, PortProvider portProvider) {
-		setSession(session);
-		fPortProvider = portProvider;
-	}
+    /**
+     * Constructor.
+     */
+    public RelationshipServiceImpl(Session session, PortProvider portProvider) {
+        setSession(session);
+        fPortProvider = portProvider;
+    }
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @seeorg.apache.opencmis.client.provider.RelationshipService#
-	 * getObjectRelationships(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.client.provider.ExtensionsData)
-	 */
-	public ObjectList getObjectRelationships(String repositoryId, String objectId, Boolean includeSubRelationshipTypes,
-			RelationshipDirection relationshipDirection, String typeId, String filter, Boolean includeAllowableActions,
-			BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-		RelationshipServicePort port = fPortProvider.getRelationshipServicePort();
+    /*
+     * (non-Javadoc)
+     * 
+     * @seeorg.apache.opencmis.client.provider.RelationshipService#
+     * getObjectRelationships(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.client.provider.ExtensionsData)
+     */
+    public ObjectList getObjectRelationships(String repositoryId, String objectId, Boolean includeSubRelationshipTypes,
+            RelationshipDirection relationshipDirection, String typeId, String filter, Boolean includeAllowableActions,
+            BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        RelationshipServicePort port = fPortProvider.getRelationshipServicePort();
 
-		try {
-			return convert(port.getObjectRelationships(repositoryId, objectId, includeSubRelationshipTypes, convert(
-					EnumRelationshipDirection.class, relationshipDirection), typeId, filter, includeAllowableActions,
-					maxItems, skipCount, convert(extension)));
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
+        try {
+            return convert(port.getObjectRelationships(repositoryId, objectId, includeSubRelationshipTypes, convert(
+                    EnumRelationshipDirection.class, relationshipDirection), typeId, filter, includeAllowableActions,
+                    maxItems, skipCount, convert(extension)));
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RepositoryServiceImpl.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RepositoryServiceImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/RepositoryServiceImpl.java Thu Apr 22 16:04:19 2010
@@ -46,131 +46,131 @@ import org.apache.chemistry.opencmis.com
  */
 public class RepositoryServiceImpl extends AbstractWebServicesService implements RepositoryService {
 
-	private final PortProvider fPortProvider;
+    private final PortProvider fPortProvider;
 
-	/**
-	 * Constructor.
-	 */
-	public RepositoryServiceImpl(Session session, PortProvider portProvider) {
-		setSession(session);
-		fPortProvider = portProvider;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.RepositoryService#getRepositoryInfos
-	 * (org.apache.opencmis.client.provider .ExtensionsData)
-	 */
-	public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
-		RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
-
-		List<RepositoryInfo> infos = null;
-		try {
-			// get the list of repositories
-			List<CmisRepositoryEntryType> entries = port.getRepositories(convert(extension));
-
-			if (entries != null) {
-				infos = new ArrayList<RepositoryInfo>();
-
-				// iterate through the list and fetch repository infos
-				for (CmisRepositoryEntryType entry : entries) {
-					CmisRepositoryInfoType info = port.getRepositoryInfo(entry.getRepositoryId(), null);
-					infos.add(convert(info));
-				}
-			}
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-
-		return infos;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.RepositoryService#getRepositoryInfo
-	 * (java.lang.String, org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
-		RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
-
-		try {
-			return convert(port.getRepositoryInfo(repositoryId, convert(extension)));
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.RepositoryService#getTypeDefinition
-	 * (java.lang.String, java.lang.String,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
-		RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
-
-		try {
-			return convert(port.getTypeDefinition(repositoryId, typeId, convert(extension)));
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.RepositoryService#getTypeChildren
-	 * (java.lang.String, java.lang.String, java.lang.Boolean,
-	 * java.math.BigInteger, java.math.BigInteger,
-	 * org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions,
-			BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
-		RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
-
-		try {
-			return convert(port.getTypeChildren(repositoryId, typeId, includePropertyDefinitions, maxItems, skipCount,
-					convert(extension)));
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.apache.opencmis.client.provider.RepositoryService#getTypeDescendants
-	 * (java.lang.String, java.lang.String, java.math.BigInteger,
-	 * java.lang.Boolean, org.apache.opencmis.client.provider.ExtensionsData)
-	 */
-	public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth,
-			Boolean includePropertyDefinitions, ExtensionsData extension) {
-		RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
-
-		try {
-			return convertTypeContainerList(port.getTypeDescendants(repositoryId, typeId, depth,
-					includePropertyDefinitions, convert(extension)));
-		} catch (CmisException e) {
-			throw convertException(e);
-		} catch (Exception e) {
-			throw new CmisRuntimeException("Error: " + e.getMessage(), e);
-		}
-	}
+    /**
+     * Constructor.
+     */
+    public RepositoryServiceImpl(Session session, PortProvider portProvider) {
+        setSession(session);
+        fPortProvider = portProvider;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.RepositoryService#getRepositoryInfos
+     * (org.apache.opencmis.client.provider .ExtensionsData)
+     */
+    public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
+        RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
+
+        List<RepositoryInfo> infos = null;
+        try {
+            // get the list of repositories
+            List<CmisRepositoryEntryType> entries = port.getRepositories(convert(extension));
+
+            if (entries != null) {
+                infos = new ArrayList<RepositoryInfo>();
+
+                // iterate through the list and fetch repository infos
+                for (CmisRepositoryEntryType entry : entries) {
+                    CmisRepositoryInfoType info = port.getRepositoryInfo(entry.getRepositoryId(), null);
+                    infos.add(convert(info));
+                }
+            }
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+
+        return infos;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.RepositoryService#getRepositoryInfo
+     * (java.lang.String, org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
+        RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
+
+        try {
+            return convert(port.getRepositoryInfo(repositoryId, convert(extension)));
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.RepositoryService#getTypeDefinition
+     * (java.lang.String, java.lang.String,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
+        RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
+
+        try {
+            return convert(port.getTypeDefinition(repositoryId, typeId, convert(extension)));
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.RepositoryService#getTypeChildren
+     * (java.lang.String, java.lang.String, java.lang.Boolean,
+     * java.math.BigInteger, java.math.BigInteger,
+     * org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions,
+            BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+        RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
+
+        try {
+            return convert(port.getTypeChildren(repositoryId, typeId, includePropertyDefinitions, maxItems, skipCount,
+                    convert(extension)));
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.opencmis.client.provider.RepositoryService#getTypeDescendants
+     * (java.lang.String, java.lang.String, java.math.BigInteger,
+     * java.lang.Boolean, org.apache.opencmis.client.provider.ExtensionsData)
+     */
+    public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth,
+            Boolean includePropertyDefinitions, ExtensionsData extension) {
+        RepositoryServicePort port = fPortProvider.getRepositoryServicePort();
+
+        try {
+            return convertTypeContainerList(port.getTypeDescendants(repositoryId, typeId, depth,
+                    includePropertyDefinitions, convert(extension)));
+        } catch (CmisException e) {
+            throw convertException(e);
+        } catch (Exception e) {
+            throw new CmisRuntimeException("Error: " + e.getMessage(), e);
+        }
+    }
 
 }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SpiSessionParameter.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SpiSessionParameter.java?rev=936922&r1=936921&r2=936922&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SpiSessionParameter.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/SpiSessionParameter.java Thu Apr 22 16:04:19 2010
@@ -24,8 +24,8 @@ package org.apache.chemistry.opencmis.cl
  */
 public final class SpiSessionParameter {
 
-	public static final String PORTS = "org.apache.chemistry.opencmis.binding.webservices.ports";
+    public static final String PORTS = "org.apache.chemistry.opencmis.binding.webservices.ports";
 
-	private SpiSessionParameter() {
-	}
+    private SpiSessionParameter() {
+    }
 }



Mime
View raw message