mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Merged DEV/CMIS0_61 to HEAD:
14395 : MOB-689 Support custom sub-types in CMIS Web Services ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/DEV/CMIS0_61:r14395 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14505 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -286,11 +286,21 @@
|
||||
<property name="lockService" ref="LockService" />
|
||||
<property name="checkOutCheckInService" ref="CheckoutCheckinService" />
|
||||
<property name="authorityService" ref="AuthorityService" />
|
||||
<property name="versionService" ref="VersionService" />
|
||||
<property name="cmisDictionaryService" ref="CMISDictionaryService" />
|
||||
<property name="fileFolderService" ref="FileFolderService" />
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
</bean>
|
||||
|
||||
<bean id="propertiesUtils" class="org.alfresco.repo.cmis.ws.utils.PropertyUtil">
|
||||
<property name="cmisDictionaryService" ref="CMISDictionaryService" />
|
||||
<property name="cmisObjectsUtils" ref="cmisObjectsUtils" />
|
||||
<property name="cmisService" ref="CMISService" />
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
<property name="dictionaryService" ref="DictionaryService" />
|
||||
<property name="namespaceService" ref="NamespaceService" />
|
||||
</bean>
|
||||
|
||||
<bean id="dmRepositoryService" parent="dmAbstractService" class="org.alfresco.repo.cmis.ws.DMRepositoryServicePort" />
|
||||
|
||||
<bean id="dmNavigationService" parent="dmAbstractService" class="org.alfresco.repo.cmis.ws.DMNavigationServicePort" />
|
||||
@@ -326,6 +336,7 @@
|
||||
<property name="searchService" ref="SearchService" />
|
||||
|
||||
<property name="cmisObjectsUtils" ref="cmisObjectsUtils" />
|
||||
<property name="propertiesUtil" ref="propertiesUtils" />
|
||||
</bean>
|
||||
|
||||
<!-- ========================================================================================================= -->
|
||||
|
@@ -42,15 +42,15 @@ import javax.xml.namespace.QName;
|
||||
"choice"
|
||||
})
|
||||
@XmlSeeAlso({
|
||||
CmisChoiceDateTimeType.class,
|
||||
CmisChoiceXmlType.class,
|
||||
CmisChoiceStringType.class,
|
||||
CmisChoiceDecimalType.class,
|
||||
CmisChoiceUriType.class,
|
||||
CmisChoiceIntegerType.class,
|
||||
CmisChoiceXmlType.class,
|
||||
CmisChoiceBooleanType.class,
|
||||
CmisChoiceIdType.class,
|
||||
CmisChoiceHtmlType.class
|
||||
CmisChoiceBooleanType.class,
|
||||
CmisChoiceHtmlType.class,
|
||||
CmisChoiceDateTimeType.class
|
||||
})
|
||||
public abstract class CmisChoiceType {
|
||||
|
||||
@@ -79,16 +79,16 @@ public abstract class CmisChoiceType {
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceUriType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceIntegerType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceXmlType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceHtmlType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceStringType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceDateTimeType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceIdType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceBooleanType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceDecimalType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceIdType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceDateTimeType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceUriType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceXmlType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceStringType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link CmisChoiceIntegerType }{@code >}
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
@@ -6,14 +6,14 @@ import javax.xml.ws.WebFault;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
|
||||
@WebFault(name = "cmisFault", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
public class CmisException extends Exception {
|
||||
public static final long serialVersionUID = 20090427210802L;
|
||||
public static final long serialVersionUID = 20090520150632L;
|
||||
|
||||
private org.alfresco.repo.cmis.ws.CmisFaultType cmisFault;
|
||||
|
||||
|
@@ -55,15 +55,15 @@ import org.w3c.dom.Element;
|
||||
public class CmisPropertiesType {
|
||||
|
||||
@XmlElements({
|
||||
@XmlElement(name = "propertyBoolean", type = CmisPropertyBoolean.class, nillable = true),
|
||||
@XmlElement(name = "propertyDecimal", type = CmisPropertyDecimal.class, nillable = true),
|
||||
@XmlElement(name = "propertyXml", type = CmisPropertyXml.class, nillable = true),
|
||||
@XmlElement(name = "propertyDateTime", type = CmisPropertyDateTime.class, nillable = true),
|
||||
@XmlElement(name = "propertyInteger", type = CmisPropertyInteger.class, nillable = true),
|
||||
@XmlElement(name = "propertyDecimal", type = CmisPropertyDecimal.class, nillable = true),
|
||||
@XmlElement(name = "propertyBoolean", type = CmisPropertyBoolean.class, nillable = true),
|
||||
@XmlElement(name = "propertyId", type = CmisPropertyId.class, nillable = true),
|
||||
@XmlElement(name = "propertyString", type = CmisPropertyString.class, nillable = true),
|
||||
@XmlElement(name = "propertyHtml", type = CmisPropertyHtml.class, nillable = true),
|
||||
@XmlElement(name = "propertyUri", type = CmisPropertyUri.class, nillable = true),
|
||||
@XmlElement(name = "propertyHtml", type = CmisPropertyHtml.class, nillable = true)
|
||||
@XmlElement(name = "propertyId", type = CmisPropertyId.class, nillable = true)
|
||||
})
|
||||
protected List<CmisProperty> property;
|
||||
@XmlAnyElement(lax = true)
|
||||
@@ -89,15 +89,15 @@ public class CmisPropertiesType {
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link CmisPropertyBoolean }
|
||||
* {@link CmisPropertyDecimal }
|
||||
* {@link CmisPropertyXml }
|
||||
* {@link CmisPropertyDateTime }
|
||||
* {@link CmisPropertyInteger }
|
||||
* {@link CmisPropertyDecimal }
|
||||
* {@link CmisPropertyBoolean }
|
||||
* {@link CmisPropertyId }
|
||||
* {@link CmisPropertyString }
|
||||
* {@link CmisPropertyUri }
|
||||
* {@link CmisPropertyHtml }
|
||||
* {@link CmisPropertyUri }
|
||||
* {@link CmisPropertyId }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
@@ -33,15 +33,15 @@ import javax.xml.namespace.QName;
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cmisProperty", namespace = "http://docs.oasis-open.org/ns/cmis/core/200901")
|
||||
@XmlSeeAlso({
|
||||
CmisPropertyHtml.class,
|
||||
CmisPropertyDecimal.class,
|
||||
CmisPropertyId.class,
|
||||
CmisPropertyDateTime.class,
|
||||
CmisPropertyXml.class,
|
||||
CmisPropertyBoolean.class,
|
||||
CmisPropertyUri.class,
|
||||
CmisPropertyDateTime.class,
|
||||
CmisPropertyString.class,
|
||||
CmisPropertyInteger.class
|
||||
CmisPropertyInteger.class,
|
||||
CmisPropertyBoolean.class,
|
||||
CmisPropertyId.class,
|
||||
CmisPropertyUri.class,
|
||||
CmisPropertyDecimal.class,
|
||||
CmisPropertyHtml.class
|
||||
})
|
||||
public class CmisProperty {
|
||||
|
||||
|
@@ -80,15 +80,15 @@ import org.w3c.dom.Element;
|
||||
"any"
|
||||
})
|
||||
@XmlSeeAlso({
|
||||
CmisPropertyUriDefinitionType.class,
|
||||
CmisPropertyHtmlDefinitionType.class,
|
||||
CmisPropertyStringDefinitionType.class,
|
||||
CmisPropertyIntegerDefinitionType.class,
|
||||
CmisPropertyIdDefinitionType.class,
|
||||
CmisPropertyXmlDefinitionType.class,
|
||||
CmisPropertyBooleanDefinitionType.class,
|
||||
CmisPropertyStringDefinitionType.class,
|
||||
CmisPropertyDateTimeDefinitionType.class,
|
||||
CmisPropertyUriDefinitionType.class,
|
||||
CmisPropertyDecimalDefinitionType.class,
|
||||
CmisPropertyDateTimeDefinitionType.class
|
||||
CmisPropertyIdDefinitionType.class,
|
||||
CmisPropertyXmlDefinitionType.class
|
||||
})
|
||||
public class CmisPropertyDefinitionType {
|
||||
|
||||
@@ -112,15 +112,15 @@ public class CmisPropertyDefinitionType {
|
||||
protected boolean queryable;
|
||||
protected boolean orderable;
|
||||
@XmlElements({
|
||||
@XmlElement(name = "choiceId", type = CmisChoiceIdType.class),
|
||||
@XmlElement(name = "choiceDateTime", type = CmisChoiceDateTimeType.class),
|
||||
@XmlElement(name = "choiceBoolean", type = CmisChoiceBooleanType.class),
|
||||
@XmlElement(name = "choiceUri", type = CmisChoiceUriType.class),
|
||||
@XmlElement(name = "choiceString", type = CmisChoiceStringType.class),
|
||||
@XmlElement(name = "choiceInteger", type = CmisChoiceIntegerType.class),
|
||||
@XmlElement(name = "choiceDecimal", type = CmisChoiceDecimalType.class),
|
||||
@XmlElement(name = "choiceHtml", type = CmisChoiceHtmlType.class),
|
||||
@XmlElement(name = "choiceXml", type = CmisChoiceXmlType.class),
|
||||
@XmlElement(name = "choiceId", type = CmisChoiceIdType.class),
|
||||
@XmlElement(name = "choiceString", type = CmisChoiceStringType.class)
|
||||
@XmlElement(name = "choiceHtml", type = CmisChoiceHtmlType.class),
|
||||
@XmlElement(name = "choiceBoolean", type = CmisChoiceBooleanType.class),
|
||||
@XmlElement(name = "choiceUri", type = CmisChoiceUriType.class)
|
||||
})
|
||||
protected List<CmisChoiceType> choice;
|
||||
protected Boolean openChoice;
|
||||
@@ -411,15 +411,15 @@ public class CmisPropertyDefinitionType {
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link CmisChoiceIdType }
|
||||
* {@link CmisChoiceDateTimeType }
|
||||
* {@link CmisChoiceBooleanType }
|
||||
* {@link CmisChoiceUriType }
|
||||
* {@link CmisChoiceStringType }
|
||||
* {@link CmisChoiceIntegerType }
|
||||
* {@link CmisChoiceDecimalType }
|
||||
* {@link CmisChoiceHtmlType }
|
||||
* {@link CmisChoiceXmlType }
|
||||
* {@link CmisChoiceIdType }
|
||||
* {@link CmisChoiceStringType }
|
||||
* {@link CmisChoiceHtmlType }
|
||||
* {@link CmisChoiceBooleanType }
|
||||
* {@link CmisChoiceUriType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
@@ -78,10 +78,10 @@ import org.w3c.dom.Element;
|
||||
"any"
|
||||
})
|
||||
@XmlSeeAlso({
|
||||
CmisTypeDocumentDefinitionType.class,
|
||||
CmisTypeRelationshipDefinitionType.class,
|
||||
CmisTypePolicyDefinitionType.class,
|
||||
CmisTypeFolderDefinitionType.class,
|
||||
CmisTypePolicyDefinitionType.class
|
||||
CmisTypeDocumentDefinitionType.class
|
||||
})
|
||||
public class CmisTypeDefinitionType {
|
||||
|
||||
@@ -104,15 +104,15 @@ public class CmisTypeDefinitionType {
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected boolean includedInSupertypeQuery;
|
||||
@XmlElements({
|
||||
@XmlElement(name = "propertyXmlDefinition", type = CmisPropertyXmlDefinitionType.class),
|
||||
@XmlElement(name = "propertyStringDefinition", type = CmisPropertyStringDefinitionType.class),
|
||||
@XmlElement(name = "propertyIdDefinition", type = CmisPropertyIdDefinitionType.class),
|
||||
@XmlElement(name = "propertyBooleanDefinition", type = CmisPropertyBooleanDefinitionType.class),
|
||||
@XmlElement(name = "propertyXmlDefinition", type = CmisPropertyXmlDefinitionType.class),
|
||||
@XmlElement(name = "propertyUriDefinition", type = CmisPropertyUriDefinitionType.class),
|
||||
@XmlElement(name = "propertyDecimalDefinition", type = CmisPropertyDecimalDefinitionType.class),
|
||||
@XmlElement(name = "propertyIntegerDefinition", type = CmisPropertyIntegerDefinitionType.class),
|
||||
@XmlElement(name = "propertyStringDefinition", type = CmisPropertyStringDefinitionType.class),
|
||||
@XmlElement(name = "propertyHtmlDefinition", type = CmisPropertyHtmlDefinitionType.class),
|
||||
@XmlElement(name = "propertyDateTimeDefinition", type = CmisPropertyDateTimeDefinitionType.class),
|
||||
@XmlElement(name = "propertyUriDefinition", type = CmisPropertyUriDefinitionType.class)
|
||||
@XmlElement(name = "propertyBooleanDefinition", type = CmisPropertyBooleanDefinitionType.class)
|
||||
})
|
||||
protected List<CmisPropertyDefinitionType> propertyDefinition;
|
||||
@XmlAnyElement(lax = true)
|
||||
@@ -386,15 +386,15 @@ public class CmisTypeDefinitionType {
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link CmisPropertyXmlDefinitionType }
|
||||
* {@link CmisPropertyStringDefinitionType }
|
||||
* {@link CmisPropertyIdDefinitionType }
|
||||
* {@link CmisPropertyBooleanDefinitionType }
|
||||
* {@link CmisPropertyXmlDefinitionType }
|
||||
* {@link CmisPropertyUriDefinitionType }
|
||||
* {@link CmisPropertyDecimalDefinitionType }
|
||||
* {@link CmisPropertyIntegerDefinitionType }
|
||||
* {@link CmisPropertyStringDefinitionType }
|
||||
* {@link CmisPropertyHtmlDefinitionType }
|
||||
* {@link CmisPropertyDateTimeDefinitionType }
|
||||
* {@link CmisPropertyUriDefinitionType }
|
||||
* {@link CmisPropertyBooleanDefinitionType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
@@ -15,14 +15,14 @@ import javax.xml.ws.WebServiceFeature;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@WebServiceClient(name = "DiscoveryService",
|
||||
wsdlLocation = "file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl",
|
||||
wsdlLocation = "file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl",
|
||||
targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200901")
|
||||
public class DiscoveryService extends Service {
|
||||
|
||||
@@ -32,9 +32,9 @@ public class DiscoveryService extends Service {
|
||||
static {
|
||||
URL url = null;
|
||||
try {
|
||||
url = new URL("file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
url = new URL("file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
} catch (MalformedURLException e) {
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
// e.printStackTrace();
|
||||
}
|
||||
WSDL_LOCATION = url;
|
||||
|
@@ -2,18 +2,16 @@ package org.alfresco.repo.cmis.ws;
|
||||
|
||||
import javax.jws.WebMethod;
|
||||
import javax.jws.WebParam;
|
||||
import javax.jws.WebParam.Mode;
|
||||
import javax.jws.WebResult;
|
||||
import javax.jws.WebService;
|
||||
import javax.jws.soap.SOAPBinding;
|
||||
import javax.jws.soap.SOAPBinding.ParameterStyle;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.ws.RequestWrapper;
|
||||
import javax.xml.ws.ResponseWrapper;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
@@ -30,8 +28,8 @@ public interface DiscoveryServicePort {
|
||||
CmisQueryType parameters
|
||||
) throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "getContentChanges", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetContentChanges")
|
||||
@ResponseWrapper(localName = "getContentChangesResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetContentChangesResponse")
|
||||
@RequestWrapper(localName = "getContentChanges", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetContentChanges")
|
||||
@WebMethod
|
||||
public void getContentChanges(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
|
@@ -15,14 +15,14 @@ import javax.xml.ws.WebServiceFeature;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@WebServiceClient(name = "MultiFilingService",
|
||||
wsdlLocation = "file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl",
|
||||
wsdlLocation = "file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl",
|
||||
targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200901")
|
||||
public class MultiFilingService extends Service {
|
||||
|
||||
@@ -32,9 +32,9 @@ public class MultiFilingService extends Service {
|
||||
static {
|
||||
URL url = null;
|
||||
try {
|
||||
url = new URL("file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
url = new URL("file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
} catch (MalformedURLException e) {
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
// e.printStackTrace();
|
||||
}
|
||||
WSDL_LOCATION = url;
|
||||
|
@@ -9,7 +9,7 @@ import javax.xml.ws.ResponseWrapper;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
@@ -18,20 +18,8 @@ import javax.xml.ws.ResponseWrapper;
|
||||
@XmlSeeAlso({ObjectFactory.class})
|
||||
public interface MultiFilingServicePort {
|
||||
|
||||
@RequestWrapper(localName = "removeObjectFromFolder", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.RemoveObjectFromFolder")
|
||||
@ResponseWrapper(localName = "removeObjectFromFolderResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.RemoveObjectFromFolderResponse")
|
||||
@WebMethod
|
||||
public void removeObjectFromFolder(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String objectId,
|
||||
@WebParam(name = "folderId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String folderId
|
||||
) throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "addObjectToFolder", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.AddObjectToFolder")
|
||||
@ResponseWrapper(localName = "addObjectToFolderResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.AddObjectToFolderResponse")
|
||||
@RequestWrapper(localName = "addObjectToFolder", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.AddObjectToFolder")
|
||||
@WebMethod
|
||||
public void addObjectToFolder(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@@ -41,4 +29,16 @@ public interface MultiFilingServicePort {
|
||||
@WebParam(name = "folderId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String folderId
|
||||
) throws CmisException;
|
||||
|
||||
@ResponseWrapper(localName = "removeObjectFromFolderResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.RemoveObjectFromFolderResponse")
|
||||
@RequestWrapper(localName = "removeObjectFromFolder", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.RemoveObjectFromFolder")
|
||||
@WebMethod
|
||||
public void removeObjectFromFolder(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String objectId,
|
||||
@WebParam(name = "folderId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String folderId
|
||||
) throws CmisException;
|
||||
}
|
||||
|
@@ -15,14 +15,14 @@ import javax.xml.ws.WebServiceFeature;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@WebServiceClient(name = "NavigationService",
|
||||
wsdlLocation = "file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl",
|
||||
wsdlLocation = "file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl",
|
||||
targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200901")
|
||||
public class NavigationService extends Service {
|
||||
|
||||
@@ -32,9 +32,9 @@ public class NavigationService extends Service {
|
||||
static {
|
||||
URL url = null;
|
||||
try {
|
||||
url = new URL("file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
url = new URL("file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
} catch (MalformedURLException e) {
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
// e.printStackTrace();
|
||||
}
|
||||
WSDL_LOCATION = url;
|
||||
|
@@ -5,12 +5,11 @@ import javax.jws.WebParam;
|
||||
import javax.jws.WebResult;
|
||||
import javax.jws.WebService;
|
||||
import javax.jws.soap.SOAPBinding;
|
||||
import javax.jws.soap.SOAPBinding.ParameterStyle;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
@@ -20,13 +19,6 @@ import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
|
||||
public interface NavigationServicePort {
|
||||
|
||||
@WebResult(name = "getFolderParentResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", partName = "parameters")
|
||||
@WebMethod
|
||||
public GetFolderParentResponse getFolderParent(
|
||||
@WebParam(partName = "parameters", name = "getFolderParent", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
GetFolderParent parameters
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "getObjectParentsResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", partName = "parameters")
|
||||
@WebMethod
|
||||
public GetObjectParentsResponse getObjectParents(
|
||||
@@ -34,11 +26,11 @@ public interface NavigationServicePort {
|
||||
GetObjectParents parameters
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "getCheckedoutDocsResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", partName = "parameters")
|
||||
@WebResult(name = "getChildrenResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", partName = "parameters")
|
||||
@WebMethod
|
||||
public GetCheckedoutDocsResponse getCheckedoutDocs(
|
||||
@WebParam(partName = "parameters", name = "getCheckedoutDocs", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
GetCheckedoutDocs parameters
|
||||
public GetChildrenResponse getChildren(
|
||||
@WebParam(partName = "parameters", name = "getChildren", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
GetChildren parameters
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "getDescendantsResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", partName = "parameters")
|
||||
@@ -48,10 +40,17 @@ public interface NavigationServicePort {
|
||||
GetDescendants parameters
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "getChildrenResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", partName = "parameters")
|
||||
@WebResult(name = "getCheckedoutDocsResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", partName = "parameters")
|
||||
@WebMethod
|
||||
public GetChildrenResponse getChildren(
|
||||
@WebParam(partName = "parameters", name = "getChildren", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
GetChildren parameters
|
||||
public GetCheckedoutDocsResponse getCheckedoutDocs(
|
||||
@WebParam(partName = "parameters", name = "getCheckedoutDocs", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
GetCheckedoutDocs parameters
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "getFolderParentResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", partName = "parameters")
|
||||
@WebMethod
|
||||
public GetFolderParentResponse getFolderParent(
|
||||
@WebParam(partName = "parameters", name = "getFolderParent", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
GetFolderParent parameters
|
||||
) throws CmisException;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -15,14 +15,14 @@ import javax.xml.ws.WebServiceFeature;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@WebServiceClient(name = "ObjectService",
|
||||
wsdlLocation = "file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl",
|
||||
wsdlLocation = "file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl",
|
||||
targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200901")
|
||||
public class ObjectService extends Service {
|
||||
|
||||
@@ -32,9 +32,9 @@ public class ObjectService extends Service {
|
||||
static {
|
||||
URL url = null;
|
||||
try {
|
||||
url = new URL("file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
url = new URL("file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
} catch (MalformedURLException e) {
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
// e.printStackTrace();
|
||||
}
|
||||
WSDL_LOCATION = url;
|
||||
|
@@ -2,18 +2,16 @@ package org.alfresco.repo.cmis.ws;
|
||||
|
||||
import javax.jws.WebMethod;
|
||||
import javax.jws.WebParam;
|
||||
import javax.jws.WebParam.Mode;
|
||||
import javax.jws.WebResult;
|
||||
import javax.jws.WebService;
|
||||
import javax.jws.soap.SOAPBinding;
|
||||
import javax.jws.soap.SOAPBinding.ParameterStyle;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.ws.RequestWrapper;
|
||||
import javax.xml.ws.ResponseWrapper;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
@@ -22,37 +20,52 @@ import javax.xml.ws.ResponseWrapper;
|
||||
@XmlSeeAlso({ObjectFactory.class})
|
||||
public interface ObjectServicePort {
|
||||
|
||||
@WebResult(name = "contentStream", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@RequestWrapper(localName = "getContentStream", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetContentStream")
|
||||
@ResponseWrapper(localName = "getContentStreamResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetContentStreamResponse")
|
||||
@ResponseWrapper(localName = "updatePropertiesResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.UpdatePropertiesResponse")
|
||||
@RequestWrapper(localName = "updateProperties", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.UpdateProperties")
|
||||
@WebMethod
|
||||
public org.alfresco.repo.cmis.ws.CmisContentStreamType getContentStream(
|
||||
public void updateProperties(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "documentId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String documentId
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@RequestWrapper(localName = "createRelationship", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreateRelationship")
|
||||
@ResponseWrapper(localName = "createRelationshipResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreateRelationshipResponse")
|
||||
@WebMethod
|
||||
public java.lang.String createRelationship(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "typeId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String typeId,
|
||||
@WebParam(mode = WebParam.Mode.INOUT, name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
javax.xml.ws.Holder<java.lang.String> objectId,
|
||||
@WebParam(name = "changeToken", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String changeToken,
|
||||
@WebParam(name = "properties", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
org.alfresco.repo.cmis.ws.CmisPropertiesType properties,
|
||||
@WebParam(name = "sourceObjectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String sourceObjectId,
|
||||
@WebParam(name = "targetObjectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String targetObjectId
|
||||
org.alfresco.repo.cmis.ws.CmisPropertiesType properties
|
||||
) throws CmisException;
|
||||
|
||||
@ResponseWrapper(localName = "moveObjectResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.MoveObjectResponse")
|
||||
@RequestWrapper(localName = "moveObject", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.MoveObject")
|
||||
@WebMethod
|
||||
public void moveObject(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String objectId,
|
||||
@WebParam(name = "targetFolderId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String targetFolderId,
|
||||
@WebParam(name = "sourceFolderId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String sourceFolderId
|
||||
) throws CmisException;
|
||||
|
||||
@ResponseWrapper(localName = "deleteTreeResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteTreeResponse")
|
||||
@RequestWrapper(localName = "deleteTree", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteTree")
|
||||
@WebResult(name = "failedToDelete", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@WebMethod
|
||||
public org.alfresco.repo.cmis.ws.DeleteTreeResponse.FailedToDelete deleteTree(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "folderId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String folderId,
|
||||
@WebParam(name = "unfileNonfolderObjects", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
org.alfresco.repo.cmis.ws.EnumUnfileNonfolderObjects unfileNonfolderObjects,
|
||||
@WebParam(name = "continueOnFailure", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.Boolean continueOnFailure
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@RequestWrapper(localName = "createDocument", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreateDocument")
|
||||
@ResponseWrapper(localName = "createDocumentResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreateDocumentResponse")
|
||||
@RequestWrapper(localName = "createDocument", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreateDocument")
|
||||
@WebResult(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@WebMethod
|
||||
public java.lang.String createDocument(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@@ -69,33 +82,15 @@ public interface ObjectServicePort {
|
||||
org.alfresco.repo.cmis.ws.EnumVersioningState versioningState
|
||||
) throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "updateProperties", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.UpdateProperties")
|
||||
@ResponseWrapper(localName = "updatePropertiesResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.UpdatePropertiesResponse")
|
||||
@ResponseWrapper(localName = "getContentStreamResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetContentStreamResponse")
|
||||
@RequestWrapper(localName = "getContentStream", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetContentStream")
|
||||
@WebResult(name = "contentStream", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@WebMethod
|
||||
public void updateProperties(
|
||||
public org.alfresco.repo.cmis.ws.CmisContentStreamType getContentStream(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(mode = WebParam.Mode.INOUT, name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
javax.xml.ws.Holder<java.lang.String> objectId,
|
||||
@WebParam(name = "changeToken", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String changeToken,
|
||||
@WebParam(name = "properties", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
org.alfresco.repo.cmis.ws.CmisPropertiesType properties
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@RequestWrapper(localName = "createFolder", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreateFolder")
|
||||
@ResponseWrapper(localName = "createFolderResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreateFolderResponse")
|
||||
@WebMethod
|
||||
public java.lang.String createFolder(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "typeId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String typeId,
|
||||
@WebParam(name = "properties", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
org.alfresco.repo.cmis.ws.CmisPropertiesType properties,
|
||||
@WebParam(name = "folderId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String folderId
|
||||
@WebParam(name = "documentId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String documentId
|
||||
) throws CmisException;
|
||||
|
||||
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
|
||||
@@ -106,9 +101,9 @@ public interface ObjectServicePort {
|
||||
GetProperties parameters
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@RequestWrapper(localName = "createPolicy", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreatePolicy")
|
||||
@ResponseWrapper(localName = "createPolicyResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreatePolicyResponse")
|
||||
@RequestWrapper(localName = "createPolicy", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreatePolicy")
|
||||
@WebResult(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@WebMethod
|
||||
public java.lang.String createPolicy(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@@ -121,23 +116,8 @@ public interface ObjectServicePort {
|
||||
java.lang.String folderId
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "failedToDelete", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@RequestWrapper(localName = "deleteTree", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteTree")
|
||||
@ResponseWrapper(localName = "deleteTreeResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteTreeResponse")
|
||||
@WebMethod
|
||||
public org.alfresco.repo.cmis.ws.DeleteTreeResponse.FailedToDelete deleteTree(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "folderId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String folderId,
|
||||
@WebParam(name = "unfileNonfolderObjects", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
org.alfresco.repo.cmis.ws.EnumUnfileNonfolderObjects unfileNonfolderObjects,
|
||||
@WebParam(name = "continueOnFailure", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.Boolean continueOnFailure
|
||||
) throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "setContentStream", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.SetContentStream")
|
||||
@ResponseWrapper(localName = "setContentStreamResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.SetContentStreamResponse")
|
||||
@RequestWrapper(localName = "setContentStream", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.SetContentStream")
|
||||
@WebMethod
|
||||
public void setContentStream(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@@ -150,18 +130,19 @@ public interface ObjectServicePort {
|
||||
org.alfresco.repo.cmis.ws.CmisContentStreamType contentStream
|
||||
) throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "deleteContentStream", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteContentStream")
|
||||
@ResponseWrapper(localName = "deleteContentStreamResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteContentStreamResponse")
|
||||
@ResponseWrapper(localName = "getAllowableActionsResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetAllowableActionsResponse")
|
||||
@RequestWrapper(localName = "getAllowableActions", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetAllowableActions")
|
||||
@WebResult(name = "allowableActions", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@WebMethod
|
||||
public void deleteContentStream(
|
||||
public org.alfresco.repo.cmis.ws.CmisAllowableActionsType getAllowableActions(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "documentId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String documentId
|
||||
@WebParam(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String objectId
|
||||
) throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "deleteObject", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteObject")
|
||||
@ResponseWrapper(localName = "deleteObjectResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteObjectResponse")
|
||||
@RequestWrapper(localName = "deleteObject", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteObject")
|
||||
@WebMethod
|
||||
public void deleteObject(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@@ -170,28 +151,45 @@ public interface ObjectServicePort {
|
||||
java.lang.String objectId
|
||||
) throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "moveObject", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.MoveObject")
|
||||
@ResponseWrapper(localName = "moveObjectResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.MoveObjectResponse")
|
||||
@ResponseWrapper(localName = "createFolderResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreateFolderResponse")
|
||||
@RequestWrapper(localName = "createFolder", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreateFolder")
|
||||
@WebResult(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@WebMethod
|
||||
public void moveObject(
|
||||
public java.lang.String createFolder(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String objectId,
|
||||
@WebParam(name = "targetFolderId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String targetFolderId,
|
||||
@WebParam(name = "sourceFolderId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String sourceFolderId
|
||||
@WebParam(name = "typeId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String typeId,
|
||||
@WebParam(name = "properties", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
org.alfresco.repo.cmis.ws.CmisPropertiesType properties,
|
||||
@WebParam(name = "folderId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String folderId
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "allowableActions", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@RequestWrapper(localName = "getAllowableActions", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetAllowableActions")
|
||||
@ResponseWrapper(localName = "getAllowableActionsResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetAllowableActionsResponse")
|
||||
@ResponseWrapper(localName = "deleteContentStreamResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteContentStreamResponse")
|
||||
@RequestWrapper(localName = "deleteContentStream", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteContentStream")
|
||||
@WebMethod
|
||||
public org.alfresco.repo.cmis.ws.CmisAllowableActionsType getAllowableActions(
|
||||
public void deleteContentStream(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String objectId
|
||||
@WebParam(name = "documentId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String documentId
|
||||
) throws CmisException;
|
||||
|
||||
@ResponseWrapper(localName = "createRelationshipResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreateRelationshipResponse")
|
||||
@RequestWrapper(localName = "createRelationship", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CreateRelationship")
|
||||
@WebResult(name = "objectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@WebMethod
|
||||
public java.lang.String createRelationship(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "typeId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String typeId,
|
||||
@WebParam(name = "properties", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
org.alfresco.repo.cmis.ws.CmisPropertiesType properties,
|
||||
@WebParam(name = "sourceObjectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String sourceObjectId,
|
||||
@WebParam(name = "targetObjectId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String targetObjectId
|
||||
) throws CmisException;
|
||||
}
|
||||
|
@@ -15,14 +15,14 @@ import javax.xml.ws.WebServiceFeature;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@WebServiceClient(name = "PolicyService",
|
||||
wsdlLocation = "file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl",
|
||||
wsdlLocation = "file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl",
|
||||
targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200901")
|
||||
public class PolicyService extends Service {
|
||||
|
||||
@@ -32,9 +32,9 @@ public class PolicyService extends Service {
|
||||
static {
|
||||
URL url = null;
|
||||
try {
|
||||
url = new URL("file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
url = new URL("file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
} catch (MalformedURLException e) {
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
// e.printStackTrace();
|
||||
}
|
||||
WSDL_LOCATION = url;
|
||||
|
@@ -5,14 +5,13 @@ import javax.jws.WebParam;
|
||||
import javax.jws.WebResult;
|
||||
import javax.jws.WebService;
|
||||
import javax.jws.soap.SOAPBinding;
|
||||
import javax.jws.soap.SOAPBinding.ParameterStyle;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.ws.RequestWrapper;
|
||||
import javax.xml.ws.ResponseWrapper;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
@@ -21,10 +20,10 @@ import javax.xml.ws.ResponseWrapper;
|
||||
@XmlSeeAlso({ObjectFactory.class})
|
||||
public interface PolicyServicePort {
|
||||
|
||||
@RequestWrapper(localName = "applyPolicy", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.ApplyPolicy")
|
||||
@ResponseWrapper(localName = "applyPolicyResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.ApplyPolicyResponse")
|
||||
@ResponseWrapper(localName = "removePolicyResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.RemovePolicyResponse")
|
||||
@RequestWrapper(localName = "removePolicy", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.RemovePolicy")
|
||||
@WebMethod
|
||||
public void applyPolicy(
|
||||
public void removePolicy(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "policyId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@@ -33,10 +32,10 @@ public interface PolicyServicePort {
|
||||
java.lang.String objectId
|
||||
) throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "removePolicy", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.RemovePolicy")
|
||||
@ResponseWrapper(localName = "removePolicyResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.RemovePolicyResponse")
|
||||
@ResponseWrapper(localName = "applyPolicyResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.ApplyPolicyResponse")
|
||||
@RequestWrapper(localName = "applyPolicy", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.ApplyPolicy")
|
||||
@WebMethod
|
||||
public void removePolicy(
|
||||
public void applyPolicy(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(name = "policyId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
|
@@ -15,14 +15,14 @@ import javax.xml.ws.WebServiceFeature;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@WebServiceClient(name = "RelationshipService",
|
||||
wsdlLocation = "file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl",
|
||||
wsdlLocation = "file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl",
|
||||
targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200901")
|
||||
public class RelationshipService extends Service {
|
||||
|
||||
@@ -32,9 +32,9 @@ public class RelationshipService extends Service {
|
||||
static {
|
||||
URL url = null;
|
||||
try {
|
||||
url = new URL("file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
url = new URL("file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
} catch (MalformedURLException e) {
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
// e.printStackTrace();
|
||||
}
|
||||
WSDL_LOCATION = url;
|
||||
|
@@ -5,12 +5,11 @@ import javax.jws.WebParam;
|
||||
import javax.jws.WebResult;
|
||||
import javax.jws.WebService;
|
||||
import javax.jws.soap.SOAPBinding;
|
||||
import javax.jws.soap.SOAPBinding.ParameterStyle;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
|
@@ -15,14 +15,14 @@ import javax.xml.ws.WebServiceFeature;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@WebServiceClient(name = "RepositoryService",
|
||||
wsdlLocation = "file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl",
|
||||
wsdlLocation = "file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl",
|
||||
targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200901")
|
||||
public class RepositoryService extends Service {
|
||||
|
||||
@@ -32,9 +32,9 @@ public class RepositoryService extends Service {
|
||||
static {
|
||||
URL url = null;
|
||||
try {
|
||||
url = new URL("file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
url = new URL("file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
} catch (MalformedURLException e) {
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
// e.printStackTrace();
|
||||
}
|
||||
WSDL_LOCATION = url;
|
||||
|
@@ -2,7 +2,6 @@ package org.alfresco.repo.cmis.ws;
|
||||
|
||||
import javax.jws.WebMethod;
|
||||
import javax.jws.WebParam;
|
||||
import javax.jws.WebParam.Mode;
|
||||
import javax.jws.WebResult;
|
||||
import javax.jws.WebService;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
@@ -11,7 +10,7 @@ import javax.xml.ws.ResponseWrapper;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
@@ -20,18 +19,18 @@ import javax.xml.ws.ResponseWrapper;
|
||||
@XmlSeeAlso({ObjectFactory.class})
|
||||
public interface RepositoryServicePort {
|
||||
|
||||
@WebResult(name = "repositoryInfo", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@RequestWrapper(localName = "getRepositoryInfo", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetRepositoryInfo")
|
||||
@ResponseWrapper(localName = "getRepositoryInfoResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetRepositoryInfoResponse")
|
||||
@RequestWrapper(localName = "getRepositoryInfo", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetRepositoryInfo")
|
||||
@WebResult(name = "repositoryInfo", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@WebMethod
|
||||
public org.alfresco.repo.cmis.ws.CmisRepositoryInfoType getRepositoryInfo(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "type", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@RequestWrapper(localName = "getTypeDefinition", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetTypeDefinition")
|
||||
@ResponseWrapper(localName = "getTypeDefinitionResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetTypeDefinitionResponse")
|
||||
@RequestWrapper(localName = "getTypeDefinition", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetTypeDefinition")
|
||||
@WebResult(name = "type", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@WebMethod
|
||||
public org.alfresco.repo.cmis.ws.CmisTypeDefinitionType getTypeDefinition(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@@ -40,14 +39,14 @@ public interface RepositoryServicePort {
|
||||
java.lang.String typeId
|
||||
) throws CmisException;
|
||||
|
||||
@WebResult(name = "repository", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@RequestWrapper(localName = "getRepositories", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetRepositories")
|
||||
@ResponseWrapper(localName = "getRepositoriesResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetRepositoriesResponse")
|
||||
@RequestWrapper(localName = "getRepositories", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetRepositories")
|
||||
@WebResult(name = "repository", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@WebMethod
|
||||
public java.util.List<org.alfresco.repo.cmis.ws.CmisRepositoryEntryType> getRepositories() throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "getTypes", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetTypes")
|
||||
@ResponseWrapper(localName = "getTypesResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetTypesResponse")
|
||||
@RequestWrapper(localName = "getTypes", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.GetTypes")
|
||||
@WebMethod
|
||||
public void getTypes(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
|
@@ -15,14 +15,14 @@ import javax.xml.ws.WebServiceFeature;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@WebServiceClient(name = "VersioningService",
|
||||
wsdlLocation = "file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl",
|
||||
wsdlLocation = "file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl",
|
||||
targetNamespace = "http://docs.oasis-open.org/ns/cmis/ws/200901")
|
||||
public class VersioningService extends Service {
|
||||
|
||||
@@ -32,9 +32,9 @@ public class VersioningService extends Service {
|
||||
static {
|
||||
URL url = null;
|
||||
try {
|
||||
url = new URL("file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
url = new URL("file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
} catch (MalformedURLException e) {
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/work/alfresco-cmis/WS-Binding-061c-t2/source/wsdl/CMISWS-Service.wsdl");
|
||||
System.err.println("Can not initialize the default wsdl from file:/D:/java/eclipse/work/WS-Binding-06c/source/wsdl/CMISWS-Service.wsdl");
|
||||
// e.printStackTrace();
|
||||
}
|
||||
WSDL_LOCATION = url;
|
||||
|
@@ -2,18 +2,16 @@ package org.alfresco.repo.cmis.ws;
|
||||
|
||||
import javax.jws.WebMethod;
|
||||
import javax.jws.WebParam;
|
||||
import javax.jws.WebParam.Mode;
|
||||
import javax.jws.WebResult;
|
||||
import javax.jws.WebService;
|
||||
import javax.jws.soap.SOAPBinding;
|
||||
import javax.jws.soap.SOAPBinding.ParameterStyle;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.ws.RequestWrapper;
|
||||
import javax.xml.ws.ResponseWrapper;
|
||||
|
||||
/**
|
||||
* This class was generated by Apache CXF 2.1.2
|
||||
* Mon Apr 27 21:08:02 EEST 2009
|
||||
* Wed May 20 15:06:32 EEST 2009
|
||||
* Generated source version: 2.1.2
|
||||
*
|
||||
*/
|
||||
@@ -22,28 +20,8 @@ import javax.xml.ws.ResponseWrapper;
|
||||
@XmlSeeAlso({ObjectFactory.class})
|
||||
public interface VersioningServicePort {
|
||||
|
||||
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
|
||||
@WebResult(name = "getAllVersionsResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", partName = "parameters")
|
||||
@WebMethod
|
||||
public GetAllVersionsResponse getAllVersions(
|
||||
@WebParam(partName = "parameters", name = "getAllVersions", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
GetAllVersions parameters
|
||||
) throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "checkOut", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CheckOut")
|
||||
@ResponseWrapper(localName = "checkOutResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CheckOutResponse")
|
||||
@WebMethod
|
||||
public void checkOut(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(mode = WebParam.Mode.INOUT, name = "documentId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
javax.xml.ws.Holder<java.lang.String> documentId,
|
||||
@WebParam(mode = WebParam.Mode.OUT, name = "contentCopied", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
javax.xml.ws.Holder<java.lang.Boolean> contentCopied
|
||||
) throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "checkIn", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CheckIn")
|
||||
@ResponseWrapper(localName = "checkInResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CheckInResponse")
|
||||
@RequestWrapper(localName = "checkIn", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CheckIn")
|
||||
@WebMethod
|
||||
public void checkIn(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@@ -60,16 +38,8 @@ public interface VersioningServicePort {
|
||||
java.lang.String checkinComment
|
||||
) throws CmisException;
|
||||
|
||||
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
|
||||
@WebResult(name = "getPropertiesOfLatestVersionResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", partName = "parameters")
|
||||
@WebMethod
|
||||
public GetPropertiesOfLatestVersionResponse getPropertiesOfLatestVersion(
|
||||
@WebParam(partName = "parameters", name = "getPropertiesOfLatestVersion", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
GetPropertiesOfLatestVersion parameters
|
||||
) throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "cancelCheckOut", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CancelCheckOut")
|
||||
@ResponseWrapper(localName = "cancelCheckOutResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CancelCheckOutResponse")
|
||||
@RequestWrapper(localName = "cancelCheckOut", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CancelCheckOut")
|
||||
@WebMethod
|
||||
public void cancelCheckOut(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@@ -78,8 +48,16 @@ public interface VersioningServicePort {
|
||||
java.lang.String documentId
|
||||
) throws CmisException;
|
||||
|
||||
@RequestWrapper(localName = "deleteAllVersions", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteAllVersions")
|
||||
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
|
||||
@WebResult(name = "getAllVersionsResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", partName = "parameters")
|
||||
@WebMethod
|
||||
public GetAllVersionsResponse getAllVersions(
|
||||
@WebParam(partName = "parameters", name = "getAllVersions", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
GetAllVersions parameters
|
||||
) throws CmisException;
|
||||
|
||||
@ResponseWrapper(localName = "deleteAllVersionsResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteAllVersionsResponse")
|
||||
@RequestWrapper(localName = "deleteAllVersions", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.DeleteAllVersions")
|
||||
@WebMethod
|
||||
public void deleteAllVersions(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
@@ -87,4 +65,24 @@ public interface VersioningServicePort {
|
||||
@WebParam(name = "versionSeriesId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String versionSeriesId
|
||||
) throws CmisException;
|
||||
|
||||
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
|
||||
@WebResult(name = "getPropertiesOfLatestVersionResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", partName = "parameters")
|
||||
@WebMethod
|
||||
public GetPropertiesOfLatestVersionResponse getPropertiesOfLatestVersion(
|
||||
@WebParam(partName = "parameters", name = "getPropertiesOfLatestVersion", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
GetPropertiesOfLatestVersion parameters
|
||||
) throws CmisException;
|
||||
|
||||
@ResponseWrapper(localName = "checkOutResponse", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CheckOutResponse")
|
||||
@RequestWrapper(localName = "checkOut", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901", className = "org.alfresco.repo.cmis.ws.CheckOut")
|
||||
@WebMethod
|
||||
public void checkOut(
|
||||
@WebParam(name = "repositoryId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
java.lang.String repositoryId,
|
||||
@WebParam(mode = WebParam.Mode.INOUT, name = "documentId", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
javax.xml.ws.Holder<java.lang.String> documentId,
|
||||
@WebParam(mode = WebParam.Mode.OUT, name = "contentCopied", targetNamespace = "http://docs.oasis-open.org/ns/cmis/messaging/200901")
|
||||
javax.xml.ws.Holder<java.lang.Boolean> contentCopied
|
||||
) throws CmisException;
|
||||
}
|
||||
|
@@ -40,6 +40,8 @@ import org.alfresco.repo.cmis.ws.utils.CmisObjectsUtils;
|
||||
*/
|
||||
public class PropertyFilter
|
||||
{
|
||||
public static final String PROPERTY_NAME_TOKENS_DELIMETER = ",";
|
||||
|
||||
private static final int MINIMAL_ALLOWED_STRUCTURE_SIZE = 1;
|
||||
private static final String MATCH_ALL_FILTER = "*";
|
||||
private static final Pattern PROPERTY_FILTER_REGEX = Pattern.compile("^(\\*)|([\\p{Alpha}\\p{Digit}_]+((,){1}( )*[\\p{Alpha}\\p{Digit}_]+)*)$");
|
||||
@@ -63,7 +65,7 @@ public class PropertyFilter
|
||||
|
||||
if (!filter.equals(MATCH_ALL_FILTER) && filter.length() >= MINIMAL_ALLOWED_STRUCTURE_SIZE)
|
||||
{
|
||||
splitFilterOnTokens(filter.split(","));
|
||||
splitFilterOnTokens(filter.split(PROPERTY_NAME_TOKENS_DELIMETER));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,5 +86,4 @@ public class PropertyFilter
|
||||
{
|
||||
return properties == null || properties.contains(property.toLowerCase());
|
||||
}
|
||||
|
||||
}
|
@@ -25,42 +25,31 @@
|
||||
package org.alfresco.repo.cmis.ws;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.datatype.DatatypeConfigurationException;
|
||||
import javax.xml.datatype.DatatypeFactory;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
import org.alfresco.cmis.CMISDictionaryModel;
|
||||
import org.alfresco.cmis.CMISDictionaryService;
|
||||
import org.alfresco.cmis.CMISQueryService;
|
||||
import org.alfresco.cmis.CMISScope;
|
||||
import org.alfresco.cmis.CMISServices;
|
||||
import org.alfresco.cmis.CMISTypeDefinition;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.cmis.PropertyFilter;
|
||||
import org.alfresco.repo.cmis.ws.utils.CmisObjectsUtils;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.cmis.ws.utils.PropertyUtil;
|
||||
import org.alfresco.repo.version.VersionModel;
|
||||
import org.alfresco.repo.web.util.paging.Cursor;
|
||||
import org.alfresco.repo.web.util.paging.Page;
|
||||
import org.alfresco.repo.web.util.paging.Paging;
|
||||
import org.alfresco.service.cmr.coci.CheckOutCheckInService;
|
||||
import org.alfresco.service.cmr.model.FileFolderService;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.cmr.version.Version;
|
||||
import org.alfresco.service.cmr.version.VersionHistory;
|
||||
import org.alfresco.service.cmr.version.VersionService;
|
||||
import org.alfresco.service.cmr.version.VersionType;
|
||||
import org.alfresco.service.descriptor.DescriptorService;
|
||||
@@ -74,13 +63,11 @@ import org.alfresco.service.descriptor.DescriptorService;
|
||||
*/
|
||||
public class DMAbstractServicePort
|
||||
{
|
||||
private static final String BASE_TYPE_PROPERTY_NAME = "BaseType";
|
||||
protected static final String INITIAL_VERSION_DESCRIPTION = "Initial version";
|
||||
|
||||
private static final String INVALID_REPOSITORY_ID_MESSAGE = "Invalid repository id";
|
||||
private static final String INVALID_FOLDER_OBJECT_ID_MESSAGE = "OID for non-existent object or not folder object";
|
||||
|
||||
private DatatypeFactory _datatypeFactory;
|
||||
private Paging paging = new Paging();
|
||||
|
||||
protected ObjectFactory cmisObjectFactory = new ObjectFactory();
|
||||
@@ -94,6 +81,7 @@ public class DMAbstractServicePort
|
||||
protected CheckOutCheckInService checkOutCheckInService;
|
||||
protected SearchService searchService;
|
||||
protected CmisObjectsUtils cmisObjectsUtils;
|
||||
protected PropertyUtil propertiesUtil;
|
||||
|
||||
public void setCmisService(CMISServices cmisService)
|
||||
{
|
||||
@@ -141,6 +129,11 @@ public class DMAbstractServicePort
|
||||
this.cmisObjectsUtils = cmisObjectsUtils;
|
||||
}
|
||||
|
||||
public void setPropertiesUtil(PropertyUtil propertiesUtil)
|
||||
{
|
||||
this.propertiesUtil = propertiesUtil;
|
||||
}
|
||||
|
||||
public void setSearchService(SearchService searchService)
|
||||
{
|
||||
this.searchService = searchService;
|
||||
@@ -167,35 +160,6 @@ public class DMAbstractServicePort
|
||||
return paging.createCursor(totalRows, window);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts Date object to XMLGregorianCalendar object
|
||||
*
|
||||
* @param date Date object
|
||||
* @return XMLGregorianCalendar object
|
||||
*/
|
||||
protected XMLGregorianCalendar convert(Date date)
|
||||
{
|
||||
GregorianCalendar calendar = new GregorianCalendar();
|
||||
calendar.setTime(date);
|
||||
return getDatatypeFactory().newXMLGregorianCalendar(calendar);
|
||||
}
|
||||
|
||||
private DatatypeFactory getDatatypeFactory()
|
||||
{
|
||||
if (_datatypeFactory == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
_datatypeFactory = DatatypeFactory.newInstance();
|
||||
}
|
||||
catch (DatatypeConfigurationException e)
|
||||
{
|
||||
// suppress
|
||||
}
|
||||
}
|
||||
return _datatypeFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method converts Alfresco's <b>NodeRef</b>'s to CMIS objects those will be stored in <b>resultList</b>-parameter. Properties for returning filtering also performs
|
||||
*
|
||||
@@ -219,10 +183,10 @@ public class DMAbstractServicePort
|
||||
* @param filter accepted properties filter
|
||||
* @return converted to CMIS object Alfresco object
|
||||
*/
|
||||
protected CmisObjectType createCmisObject(Object identifier, PropertyFilter filter)
|
||||
protected CmisObjectType createCmisObject(Object identifier, PropertyFilter filter) throws CmisException
|
||||
{
|
||||
CmisObjectType result = new CmisObjectType();
|
||||
result.setProperties(getPropertiesType(identifier.toString(), filter));
|
||||
result.setProperties(propertiesUtil.getPropertiesType(identifier.toString(), filter));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -254,98 +218,6 @@ public class DMAbstractServicePort
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get CMIS properties for object
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param filter property filter
|
||||
* @return properties
|
||||
*/
|
||||
protected CmisPropertiesType getPropertiesType(String identifier, PropertyFilter filter)
|
||||
{
|
||||
Map<String, Serializable> properties;
|
||||
if (NodeRef.isNodeRef(identifier))
|
||||
{
|
||||
properties = cmisService.getProperties(new NodeRef(identifier));
|
||||
}
|
||||
else
|
||||
{
|
||||
properties = createBaseRelationshipProperties(new AssociationRef(identifier));
|
||||
}
|
||||
return getPropertiesType(properties, filter);
|
||||
}
|
||||
|
||||
protected CmisPropertiesType getPropertiesType(Map<String, Serializable> alfrescoProperties, PropertyFilter filter)
|
||||
{
|
||||
String objectTypeId = (String) alfrescoProperties.get(CMISDictionaryModel.PROP_OBJECT_TYPE_ID);
|
||||
CMISTypeDefinition cmisTypeDef = cmisDictionaryService.findType(objectTypeId);
|
||||
|
||||
CmisPropertiesType properties = new CmisPropertiesType();
|
||||
|
||||
if (cmisTypeDef.getTypeId().getScope() == CMISScope.DOCUMENT)
|
||||
{
|
||||
addBooleanProperty(properties, filter, CMISDictionaryModel.PROP_IS_IMMUTABLE, alfrescoProperties);
|
||||
addBooleanProperty(properties, filter, CMISDictionaryModel.PROP_IS_LATEST_VERSION, alfrescoProperties);
|
||||
addBooleanProperty(properties, filter, CMISDictionaryModel.PROP_IS_MAJOR_VERSION, alfrescoProperties);
|
||||
addBooleanProperty(properties, filter, CMISDictionaryModel.PROP_IS_LATEST_MAJOR_VERSION, alfrescoProperties);
|
||||
addBooleanProperty(properties, filter, CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT, alfrescoProperties);
|
||||
addDateTimeProperty(properties, filter, CMISDictionaryModel.PROP_CREATION_DATE, alfrescoProperties);
|
||||
addDateTimeProperty(properties, filter, CMISDictionaryModel.PROP_LAST_MODIFICATION_DATE, alfrescoProperties);
|
||||
addIDProperty(properties, filter, CMISDictionaryModel.PROP_OBJECT_ID, alfrescoProperties);
|
||||
addIDProperty(properties, filter, CMISDictionaryModel.PROP_VERSION_SERIES_ID, alfrescoProperties);
|
||||
addIDProperty(properties, filter, CMISDictionaryModel.PROP_VERSION_SERIES_CHECKED_OUT_ID, alfrescoProperties);
|
||||
addIntegerProperty(properties, filter, CMISDictionaryModel.PROP_CONTENT_STREAM_LENGTH, alfrescoProperties);
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_NAME, alfrescoProperties);
|
||||
addStringProperty(properties, filter, BASE_TYPE_PROPERTY_NAME, "document");
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_OBJECT_TYPE_ID, alfrescoProperties);
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_CREATED_BY, alfrescoProperties);
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_LAST_MODIFIED_BY, alfrescoProperties);
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_CONTENT_STREAM_MIME_TYPE, alfrescoProperties);
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_CONTENT_STREAM_FILENAME, alfrescoProperties);
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_VERSION_LABEL, alfrescoProperties);
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_VERSION_SERIES_CHECKED_OUT_BY, alfrescoProperties);
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_CHECKIN_COMMENT, alfrescoProperties);
|
||||
addURIProperty(properties, filter, CMISDictionaryModel.PROP_CONTENT_STREAM_URI, alfrescoProperties);
|
||||
}
|
||||
else if (cmisTypeDef.getTypeId().getScope() == CMISScope.FOLDER)
|
||||
{
|
||||
addDateTimeProperty(properties, filter, CMISDictionaryModel.PROP_CREATION_DATE, alfrescoProperties);
|
||||
addDateTimeProperty(properties, filter, CMISDictionaryModel.PROP_LAST_MODIFICATION_DATE, alfrescoProperties);
|
||||
addIDProperty(properties, filter, CMISDictionaryModel.PROP_OBJECT_ID, alfrescoProperties);
|
||||
addIDProperty(properties, filter, CMISDictionaryModel.PROP_PARENT_ID, alfrescoProperties);
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_NAME, alfrescoProperties);
|
||||
addStringProperty(properties, filter, BASE_TYPE_PROPERTY_NAME, "folder");
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_OBJECT_TYPE_ID, alfrescoProperties);
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_CREATED_BY, alfrescoProperties);
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_LAST_MODIFIED_BY, alfrescoProperties);
|
||||
}
|
||||
else if (cmisTypeDef.getTypeId().getScope() == CMISScope.RELATIONSHIP)
|
||||
{
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_OBJECT_TYPE_ID, alfrescoProperties);
|
||||
addIDProperty(properties, filter, CMISDictionaryModel.PROP_OBJECT_ID, alfrescoProperties);
|
||||
addStringProperty(properties, filter, BASE_TYPE_PROPERTY_NAME, alfrescoProperties);
|
||||
addStringProperty(properties, filter, CMISDictionaryModel.PROP_CREATED_BY, alfrescoProperties);
|
||||
addDateTimeProperty(properties, filter, CMISDictionaryModel.PROP_CREATION_DATE, alfrescoProperties);
|
||||
addIDProperty(properties, filter, CMISDictionaryModel.PROP_SOURCE_ID, alfrescoProperties);
|
||||
addIDProperty(properties, filter, CMISDictionaryModel.PROP_TARGET_ID, alfrescoProperties);
|
||||
}
|
||||
|
||||
return properties;
|
||||
}
|
||||
|
||||
private Map<String, Serializable> createBaseRelationshipProperties(AssociationRef association)
|
||||
{
|
||||
Map<String, Serializable> result = new HashMap<String, Serializable>();
|
||||
result.put(CMISDictionaryModel.PROP_OBJECT_TYPE_ID, cmisDictionaryService.findTypeForClass(association.getTypeQName(), CMISScope.RELATIONSHIP).getTypeId());
|
||||
result.put(CMISDictionaryModel.PROP_OBJECT_ID, association.toString());
|
||||
result.put(BASE_TYPE_PROPERTY_NAME, CMISDictionaryModel.RELATIONSHIP_TYPE_ID.getId());
|
||||
result.put(CMISDictionaryModel.PROP_CREATED_BY, AuthenticationUtil.getFullyAuthenticatedUser());
|
||||
result.put(CMISDictionaryModel.PROP_CREATION_DATE, new Date());
|
||||
result.put(CMISDictionaryModel.PROP_SOURCE_ID, association.getSourceRef());
|
||||
result.put(CMISDictionaryModel.PROP_TARGET_ID, association.getTargetRef());
|
||||
return result;
|
||||
}
|
||||
|
||||
protected Map<String, Serializable> createVersionProperties(String versionDescription, VersionType versionType)
|
||||
{
|
||||
Map<String, Serializable> result = new HashMap<String, Serializable>();
|
||||
@@ -354,259 +226,6 @@ public class DMAbstractServicePort
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void addBooleanProperty(CmisPropertiesType properties, PropertyFilter filter, String name, Map<String, Serializable> alfrescoProperties)
|
||||
{
|
||||
Serializable value = alfrescoProperties.get(name);
|
||||
if (filter.allow(name) && value != null)
|
||||
{
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (Object multiValue : (Collection) value)
|
||||
{
|
||||
CmisPropertyBoolean propBoolean = new CmisPropertyBoolean();
|
||||
propBoolean.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propBoolean.getValue().add((Boolean) multiValue);
|
||||
properties.getProperty().add(propBoolean);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CmisPropertyBoolean propBoolean = new CmisPropertyBoolean();
|
||||
propBoolean.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propBoolean.getValue().add((Boolean) value);
|
||||
properties.getProperty().add(propBoolean);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void addDateTimeProperty(CmisPropertiesType properties, PropertyFilter filter, String name, Map<String, Serializable> alfrescoProperties)
|
||||
{
|
||||
Serializable value = alfrescoProperties.get(name);
|
||||
if (filter.allow(name) && value != null)
|
||||
{
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (Object multiValue : (Collection) value)
|
||||
{
|
||||
CmisPropertyDateTime propDateTime = new CmisPropertyDateTime();
|
||||
propDateTime.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propDateTime.getValue().add(convert((Date) multiValue));
|
||||
properties.getProperty().add(propDateTime);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CmisPropertyDateTime propDateTime = new CmisPropertyDateTime();
|
||||
propDateTime.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propDateTime.getValue().add(convert((Date) value));
|
||||
properties.getProperty().add(propDateTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void addIDProperty(CmisPropertiesType properties, PropertyFilter filter, String name, Map<String, Serializable> alfrescoProperties)
|
||||
{
|
||||
Serializable value = alfrescoProperties.get(name);
|
||||
if (filter.allow(name) && value != null)
|
||||
{
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (Object multiValue : (Collection) value)
|
||||
{
|
||||
CmisPropertyId propID = new CmisPropertyId();
|
||||
propID.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propID.getValue().add(multiValue.toString());
|
||||
properties.getProperty().add(propID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CmisPropertyId propID = new CmisPropertyId();
|
||||
propID.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propID.getValue().add(value.toString());
|
||||
properties.getProperty().add(propID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void addIntegerProperty(CmisPropertiesType properties, PropertyFilter filter, String name, Map<String, Serializable> alfrescoProperties)
|
||||
{
|
||||
Serializable value = alfrescoProperties.get(name);
|
||||
if (filter.allow(name) && value != null)
|
||||
{
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (Object multiValue : (Collection) value)
|
||||
{
|
||||
CmisPropertyInteger propInteger = new CmisPropertyInteger();
|
||||
propInteger.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propInteger.getValue().add(BigInteger.valueOf((Long) multiValue));
|
||||
properties.getProperty().add(propInteger);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CmisPropertyInteger propInteger = new CmisPropertyInteger();
|
||||
propInteger.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propInteger.getValue().add(BigInteger.valueOf((Long) value));
|
||||
properties.getProperty().add(propInteger);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void addDecimalProperty(CmisPropertiesType properties, PropertyFilter filter, String name, Map<String, Serializable> alfrescoProperties)
|
||||
{
|
||||
Serializable value = alfrescoProperties.get(name);
|
||||
if (filter.allow(name) && value != null)
|
||||
{
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (Object multiValue : (Collection) value)
|
||||
{
|
||||
CmisPropertyDecimal propDecimal = new CmisPropertyDecimal();
|
||||
propDecimal.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propDecimal.getValue().add(BigDecimal.valueOf((Long) multiValue));
|
||||
properties.getProperty().add(propDecimal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CmisPropertyDecimal propDecimal = new CmisPropertyDecimal();
|
||||
propDecimal.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propDecimal.getValue().add(BigDecimal.valueOf((Long) value));
|
||||
properties.getProperty().add(propDecimal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void addStringProperty(CmisPropertiesType properties, PropertyFilter filter, String name, Map<String, Serializable> alfrescoProperties)
|
||||
{
|
||||
Serializable value = alfrescoProperties.get(name);
|
||||
if (filter.allow(name) && value != null)
|
||||
{
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (Object multiValue : (Collection) value)
|
||||
{
|
||||
CmisPropertyString propString = new CmisPropertyString();
|
||||
propString.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propString.getValue().add(multiValue.toString());
|
||||
properties.getProperty().add(propString);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CmisPropertyString propString = new CmisPropertyString();
|
||||
propString.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propString.getValue().add(value.toString());
|
||||
properties.getProperty().add(propString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void addStringProperty(CmisPropertiesType properties, PropertyFilter filter, String name, String value)
|
||||
{
|
||||
if (filter.allow(name) && value != null)
|
||||
{
|
||||
CmisPropertyString propString = new CmisPropertyString();
|
||||
propString.setName(name);
|
||||
propString.getValue().add(value);
|
||||
properties.getProperty().add(propString);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void addURIProperty(CmisPropertiesType properties, PropertyFilter filter, String name, Map<String, Serializable> alfrescoProperties)
|
||||
{
|
||||
Serializable value = alfrescoProperties.get(name);
|
||||
if (filter.allow(name) && value != null)
|
||||
{
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (Object multiValue : (Collection) value)
|
||||
{
|
||||
CmisPropertyUri propString = new CmisPropertyUri();
|
||||
propString.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propString.getValue().add(multiValue.toString());
|
||||
properties.getProperty().add(propString);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CmisPropertyUri propString = new CmisPropertyUri();
|
||||
propString.setName(PropertyUtil.getCMISPropertyName(name));
|
||||
propString.getValue().add(value.toString());
|
||||
properties.getProperty().add(propString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets all <i>properties</i>' fields for specified node
|
||||
*
|
||||
* @param nodeRef the <b>NodeRef</b> for node for those properties must be setted
|
||||
* @param properties all necessary properties fields
|
||||
*/
|
||||
protected void setProperties(NodeRef nodeRef, CmisPropertiesType properties)
|
||||
{
|
||||
// TODO: properties setting
|
||||
|
||||
String name = (String) PropertyUtil.getProperty(properties, CMISDictionaryModel.PROP_NAME);
|
||||
if (name != null)
|
||||
{
|
||||
nodeService.setProperty(nodeRef, ContentModel.PROP_NAME, name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns latest minor or major version of document
|
||||
*
|
||||
* @param documentNodeRef document node reference
|
||||
* @param major need latest major version
|
||||
* @return latest version node reference
|
||||
*/
|
||||
protected NodeRef getLatestNode(NodeRef documentNodeRef, boolean major)
|
||||
{
|
||||
Version currentVersion = versionService.getCurrentVersion(documentNodeRef);
|
||||
NodeRef latestVersionNodeRef = documentNodeRef;
|
||||
|
||||
if (currentVersion != null)
|
||||
{
|
||||
latestVersionNodeRef = currentVersion.getVersionedNodeRef();
|
||||
|
||||
if (major)
|
||||
{
|
||||
Version latestVersion = versionService.getCurrentVersion(latestVersionNodeRef);
|
||||
|
||||
if ((latestVersion != null) && (VersionType.MAJOR != latestVersion.getVersionType()))
|
||||
{
|
||||
VersionHistory versionHistory = versionService.getVersionHistory(currentVersion.getVersionedNodeRef());
|
||||
|
||||
if (versionHistory != null)
|
||||
{
|
||||
do
|
||||
{
|
||||
latestVersion = versionHistory.getPredecessor(latestVersion);
|
||||
} while (latestVersion != null && (VersionType.MAJOR != latestVersion.getVersionType()));
|
||||
}
|
||||
|
||||
if (latestVersion != null)
|
||||
{
|
||||
latestVersionNodeRef = latestVersion.getFrozenStateNodeRef();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return latestVersionNodeRef;
|
||||
}
|
||||
|
||||
protected NodeRef checkoutNode(NodeRef documentNodeReference)
|
||||
{
|
||||
if (!this.nodeService.hasAspect(documentNodeReference, ContentModel.ASPECT_VERSIONABLE))
|
||||
@@ -627,5 +246,4 @@ public class DMAbstractServicePort
|
||||
throw new CmisException(("Invalid typeId " + typeId), cmisObjectsUtils.createCmisException(("Invalid typeId " + typeId), EnumServiceException.INVALID_ARGUMENT));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -31,13 +31,10 @@ import java.util.Map;
|
||||
|
||||
import javax.xml.ws.Holder;
|
||||
|
||||
import org.alfresco.cmis.CMISDataTypeEnum;
|
||||
import org.alfresco.cmis.CMISQueryOptions;
|
||||
import org.alfresco.cmis.CMISResultSet;
|
||||
import org.alfresco.cmis.CMISResultSetColumn;
|
||||
import org.alfresco.cmis.CMISResultSetMetaData;
|
||||
import org.alfresco.cmis.CMISResultSetRow;
|
||||
import org.alfresco.repo.cmis.PropertyFilter;
|
||||
|
||||
/**
|
||||
* Port for Discovery service.
|
||||
@@ -74,9 +71,7 @@ public class DMDiscoveryServicePort extends DMAbstractServicePort implements Dis
|
||||
|
||||
// execute query
|
||||
CMISResultSet resultSet = cmisQueryService.query(options);
|
||||
CMISResultSetMetaData metaData = resultSet.getMetaData();
|
||||
CMISResultSetColumn[] columns = metaData.getColumns();
|
||||
PropertyFilter filter = new PropertyFilter();
|
||||
CMISResultSetColumn[] columns = resultSet.getMetaData().getColumns();
|
||||
|
||||
// build query response
|
||||
QueryResponse response = new QueryResponse();
|
||||
@@ -90,44 +85,10 @@ public class DMDiscoveryServicePort extends DMAbstractServicePort implements Dis
|
||||
// for each column...
|
||||
for (CMISResultSetColumn column : columns)
|
||||
{
|
||||
CMISDataTypeEnum type = column.getCMISDataType();
|
||||
if (type == CMISDataTypeEnum.BOOLEAN)
|
||||
CmisProperty property = propertiesUtil.createProperty(column.getName(), column.getCMISDataType(), values.get(column.getName()));
|
||||
if (property != null)
|
||||
{
|
||||
addBooleanProperty(properties, filter, column.getName(), values);
|
||||
}
|
||||
else if (type == CMISDataTypeEnum.DATETIME)
|
||||
{
|
||||
addDateTimeProperty(properties, filter, column.getName(), values);
|
||||
}
|
||||
else if (type == CMISDataTypeEnum.DECIMAL)
|
||||
{
|
||||
addDecimalProperty(properties, filter, column.getName(), values);
|
||||
}
|
||||
else if (type == CMISDataTypeEnum.ID)
|
||||
{
|
||||
addIDProperty(properties, filter, column.getName(), values);
|
||||
}
|
||||
else if (type == CMISDataTypeEnum.INTEGER)
|
||||
{
|
||||
addIntegerProperty(properties, filter, column.getName(), values);
|
||||
}
|
||||
else if (type == CMISDataTypeEnum.STRING)
|
||||
{
|
||||
addStringProperty(properties, filter, column.getName(), values);
|
||||
}
|
||||
else if (type == CMISDataTypeEnum.URI)
|
||||
{
|
||||
addURIProperty(properties, filter, column.getName(), values);
|
||||
}
|
||||
else if (type == CMISDataTypeEnum.XML)
|
||||
{
|
||||
// TODO:
|
||||
throw cmisObjectsUtils.createCmisException("", EnumServiceException.NOT_SUPPORTED);
|
||||
}
|
||||
else if (type == CMISDataTypeEnum.HTML)
|
||||
{
|
||||
// TODO:
|
||||
throw cmisObjectsUtils.createCmisException("", EnumServiceException.NOT_SUPPORTED);
|
||||
properties.getProperty().add(property);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -49,16 +49,20 @@ public class DMMultiFilingServicePort extends DMAbstractServicePort implements M
|
||||
public void addObjectToFolder(String repositoryId, String objectId, String folderId) throws CmisException
|
||||
{
|
||||
checkRepositoryId(repositoryId);
|
||||
NodeRef objectNodeRef = cmisObjectsUtils.getIdentifierInstance(objectId, AlfrescoObjectType.DOCUMENT_OR_FOLDER_OBJECT).getConvertedIdentifier();
|
||||
NodeRef parentFolderNodeRef = cmisObjectsUtils.getIdentifierInstance(folderId, AlfrescoObjectType.FOLDER_OBJECT).getConvertedIdentifier();
|
||||
NodeRef objectNodeRef = cmisObjectsUtils.getIdentifierInstance(objectId, AlfrescoObjectType.DOCUMENT_OBJECT);
|
||||
NodeRef parentFolderNodeRef = cmisObjectsUtils.getIdentifierInstance(folderId, AlfrescoObjectType.FOLDER_OBJECT);
|
||||
|
||||
CMISTypeDefinition objectType = cmisDictionaryService.findType((String) cmisService.getProperty(objectNodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID));
|
||||
CMISTypeDefinition folderType = cmisDictionaryService.findType((String) cmisService.getProperty(parentFolderNodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID));
|
||||
CMISTypeDefinition objectType = cmisDictionaryService.findType(propertiesUtil.getProperty(objectNodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID, (String) null));
|
||||
CMISTypeDefinition folderType = cmisDictionaryService.findType(propertiesUtil.getProperty(parentFolderNodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID, (String) null));
|
||||
|
||||
if (!folderType.getAllowedTargetTypes().contains(objectType))
|
||||
if (folderType == null)
|
||||
{
|
||||
cmisObjectsUtils.createCmisException("The typeID of Object is not in the list of AllowedChildObjectTypeIds of the parent-folder specified by folderId",
|
||||
EnumServiceException.CONSTRAINT);
|
||||
throw cmisObjectsUtils.createCmisException("Type of the specified parent folder can't be resovled", EnumServiceException.RUNTIME);
|
||||
}
|
||||
|
||||
if (!folderType.getAllowedTargetTypes().isEmpty() && !folderType.getAllowedTargetTypes().contains(objectType))
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("The typeID of Object is not in the list of AllowedChildObjectTypeIds of the parent-folder specified by folderId", EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
cmisObjectsUtils.addObjectToFolder(objectNodeRef, parentFolderNodeRef);
|
||||
}
|
||||
@@ -75,7 +79,7 @@ public class DMMultiFilingServicePort extends DMAbstractServicePort implements M
|
||||
{
|
||||
checkRepositoryId(repositoryId);
|
||||
|
||||
NodeRef objectNodeReference = cmisObjectsUtils.getIdentifierInstance(objectId, AlfrescoObjectType.DOCUMENT_OR_FOLDER_OBJECT).getConvertedIdentifier();
|
||||
NodeRef objectNodeReference = cmisObjectsUtils.getIdentifierInstance(objectId, AlfrescoObjectType.DOCUMENT_OBJECT);
|
||||
NodeRef folderNodeReference = checkAndReceiveFolderIdentifier(folderId);
|
||||
|
||||
assertExistFolder(folderNodeReference);
|
||||
@@ -91,7 +95,7 @@ public class DMMultiFilingServicePort extends DMAbstractServicePort implements M
|
||||
{
|
||||
try
|
||||
{
|
||||
return cmisObjectsUtils.getIdentifierInstance(folderIdentifier, AlfrescoObjectType.FOLDER_OBJECT).getConvertedIdentifier();
|
||||
return cmisObjectsUtils.getIdentifierInstance(folderIdentifier, AlfrescoObjectType.FOLDER_OBJECT);
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2008 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -76,7 +76,7 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na
|
||||
String folderIdParam = parameters.getFolderId() == null ? null : parameters.getFolderId().getValue();
|
||||
if ((folderIdParam != null) && !folderIdParam.equals(""))
|
||||
{
|
||||
folderId = cmisObjectsUtils.getIdentifierInstance(folderIdParam, AlfrescoObjectType.FOLDER_OBJECT).getConvertedIdentifier();
|
||||
folderId = cmisObjectsUtils.getIdentifierInstance(folderIdParam, AlfrescoObjectType.FOLDER_OBJECT);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@@ -120,7 +120,7 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na
|
||||
checkRepositoryId(parameters.getRepositoryId());
|
||||
PropertyFilter propertyFilter = createPropertyFilter(parameters.getFilter());
|
||||
|
||||
NodeRef folderNodeRef = cmisObjectsUtils.getIdentifierInstance(parameters.getFolderId(), AlfrescoObjectType.FOLDER_OBJECT).getConvertedIdentifier();
|
||||
NodeRef folderNodeRef = cmisObjectsUtils.getIdentifierInstance(parameters.getFolderId(), AlfrescoObjectType.FOLDER_OBJECT);
|
||||
|
||||
EnumTypesOfFileableObjects types = EnumTypesOfFileableObjects.ANY;
|
||||
if ((parameters.getType() != null) && ((parameters.getType().getValue() != null)))
|
||||
@@ -146,8 +146,7 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na
|
||||
listing = cmisService.getChildren(folderNodeRef, CMISTypesFilterEnum.FOLDERS);
|
||||
break;
|
||||
case POLICIES:
|
||||
throw new CmisException(POLICIES_LISTING_UNSUPPORTED_EXCEPTION_MESSAGE, cmisObjectsUtils.createCmisException(POLICIES_LISTING_UNSUPPORTED_EXCEPTION_MESSAGE,
|
||||
EnumServiceException.NOT_SUPPORTED));
|
||||
throw cmisObjectsUtils.createCmisException(POLICIES_LISTING_UNSUPPORTED_EXCEPTION_MESSAGE, EnumServiceException.NOT_SUPPORTED);
|
||||
case ANY:
|
||||
listing = cmisService.getChildren(folderNodeRef, CMISTypesFilterEnum.ANY);
|
||||
break;
|
||||
@@ -249,7 +248,7 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na
|
||||
checkRepositoryId(parameters.getRepositoryId());
|
||||
|
||||
String filter = parameters.getFilter();
|
||||
if (filter != null)
|
||||
if ((filter != null) && !filter.equals("") && !filter.equals("*"))
|
||||
{
|
||||
if (!filter.contains(CMISDictionaryModel.PROP_PARENT_ID))
|
||||
{
|
||||
@@ -262,7 +261,7 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na
|
||||
}
|
||||
}
|
||||
|
||||
PropertyFilter propertyFilter = createPropertyFilter(parameters.getFilter());
|
||||
PropertyFilter propertyFilter = createPropertyFilter(filter);
|
||||
GetFolderParentResponse response = new GetFolderParentResponse();
|
||||
|
||||
boolean returnToRoot = ((parameters.getReturnToRoot() != null) && (parameters.getReturnToRoot().getValue() != null)) ? (parameters.getReturnToRoot().getValue()) : false;
|
||||
@@ -290,8 +289,7 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na
|
||||
PropertyFilter propertyFilter = createPropertyFilter(parameters.getFilter());
|
||||
GetObjectParentsResponse response = new GetObjectParentsResponse();
|
||||
|
||||
List<NodeRef> parents = receiveObjectParents((NodeRef) cmisObjectsUtils.getIdentifierInstance(parameters.getObjectId(), AlfrescoObjectType.DOCUMENT_OBJECT)
|
||||
.getConvertedIdentifier());
|
||||
List<NodeRef> parents = receiveObjectParents((NodeRef) cmisObjectsUtils.getIdentifierInstance(parameters.getObjectId(), AlfrescoObjectType.DOCUMENT_OBJECT));
|
||||
createCmisObjectList(propertyFilter, parents, response.getObject());
|
||||
|
||||
// TODO: includeAllowableActions, includeRelationships
|
||||
@@ -307,8 +305,7 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na
|
||||
return result;
|
||||
}
|
||||
|
||||
NodeRef currentParent = receiveNextParentNodeReference((NodeRef) cmisObjectsUtils.getIdentifierInstance(targetChildIdentifier, AlfrescoObjectType.FOLDER_OBJECT)
|
||||
.getConvertedIdentifier(), result);
|
||||
NodeRef currentParent = receiveNextParentNodeReference((NodeRef) cmisObjectsUtils.getIdentifierInstance(targetChildIdentifier, AlfrescoObjectType.FOLDER_OBJECT), result);
|
||||
return (fullParentsHierarchy) ? (receiveFullAncestorsHierachy(currentParent, result)) : (result);
|
||||
}
|
||||
|
||||
@@ -420,7 +417,7 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na
|
||||
*/
|
||||
public List<NodeRef> receiveHierarchy(String rootFolderIdentifier, List<Pair<String, Boolean>> orderingFields) throws CmisException
|
||||
{
|
||||
descendantsFolders.add((NodeRef) cmisObjectsUtils.getIdentifierInstance(rootFolderIdentifier, AlfrescoObjectType.FOLDER_OBJECT).getConvertedIdentifier());
|
||||
descendantsFolders.add((NodeRef) cmisObjectsUtils.getIdentifierInstance(rootFolderIdentifier, AlfrescoObjectType.FOLDER_OBJECT));
|
||||
while (!descendantsFolders.isEmpty())
|
||||
{
|
||||
descendantsFolders = performDescendantsResultObjectsStoring(returnObjectsType, resultList, descendantsFolders, new LinkedList<NodeRef>(),
|
||||
@@ -457,7 +454,7 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na
|
||||
*/
|
||||
public List<NodeRef> receiveHierarchy(String rootFolderIdentifier, List<Pair<String, Boolean>> orderingFields) throws CmisException
|
||||
{
|
||||
descendantsFolders.add((NodeRef) cmisObjectsUtils.getIdentifierInstance(rootFolderIdentifier, AlfrescoObjectType.FOLDER_OBJECT).getConvertedIdentifier());
|
||||
descendantsFolders.add((NodeRef) cmisObjectsUtils.getIdentifierInstance(rootFolderIdentifier, AlfrescoObjectType.FOLDER_OBJECT));
|
||||
|
||||
do
|
||||
{
|
||||
@@ -469,5 +466,4 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na
|
||||
return this.resultList;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -26,9 +26,7 @@ package org.alfresco.repo.cmis.ws;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -37,7 +35,6 @@ import javax.xml.ws.Holder;
|
||||
|
||||
import org.alfresco.cmis.CMISContentStreamAllowedEnum;
|
||||
import org.alfresco.cmis.CMISDictionaryModel;
|
||||
import org.alfresco.cmis.CMISPropertyDefinition;
|
||||
import org.alfresco.cmis.CMISScope;
|
||||
import org.alfresco.cmis.CMISTypeDefinition;
|
||||
import org.alfresco.model.ContentModel;
|
||||
@@ -45,10 +42,10 @@ import org.alfresco.repo.cmis.PropertyFilter;
|
||||
import org.alfresco.repo.cmis.ws.DeleteTreeResponse.FailedToDelete;
|
||||
import org.alfresco.repo.cmis.ws.utils.AlfrescoObjectType;
|
||||
import org.alfresco.repo.cmis.ws.utils.CmisObjectsUtils;
|
||||
import org.alfresco.repo.cmis.ws.utils.CmisObjectsUtils.IdentifierConversionResults;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.dictionary.TypeDefinition;
|
||||
import org.alfresco.service.cmr.lock.NodeLockedException;
|
||||
import org.alfresco.service.cmr.model.FileExistsException;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
@@ -58,7 +55,6 @@ import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.security.AccessStatus;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.cmr.version.Version;
|
||||
import org.alfresco.service.cmr.version.VersionType;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
@@ -105,7 +101,7 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
{
|
||||
checkRepositoryId(repositoryId);
|
||||
NodeRef parentNodeRef = safeGetFolderNodeRef(folderId);
|
||||
Map<String, Serializable> propertiesMap = getPropertiesMap(properties);
|
||||
Map<String, Object> propertiesMap = propertiesUtil.getPropertiesMap(properties);
|
||||
CMISTypeDefinition typeDef = cmisDictionaryService.findType(typeId);
|
||||
|
||||
String documentName = checkConstraintsAndGetName(typeId, typeDef, parentNodeRef, contentStream, propertiesMap, versioningState);
|
||||
@@ -117,10 +113,14 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
{
|
||||
writer.setMimetype(mimeType);
|
||||
}
|
||||
else if (contentStream.getMimeType() != null)
|
||||
else if ((contentStream != null) && (contentStream.getMimeType() != null))
|
||||
{
|
||||
writer.setMimetype(contentStream.getMimeType());
|
||||
}
|
||||
else
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("ContentStream meime type was not specified", EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
InputStream inputstream = null;
|
||||
try
|
||||
{
|
||||
@@ -137,9 +137,7 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
versioningState = EnumVersioningState.MAJOR;
|
||||
}
|
||||
|
||||
// TODO:
|
||||
// cmisPropertyService.setProperties(newDocumentNodeRef, propertiesMap);
|
||||
|
||||
propertiesUtil.setProperties(newDocumentNodeRef, properties, createPropertyFilter(extendStandardFilter(CMISDictionaryModel.PROP_NAME)));
|
||||
switch (versioningState)
|
||||
{
|
||||
case CHECKEDOUT:
|
||||
@@ -153,14 +151,19 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
break;
|
||||
}
|
||||
|
||||
String versionLabel = (String) cmisService.getProperty(newDocumentNodeRef, CMISDictionaryModel.PROP_VERSION_LABEL);
|
||||
String versionLabel = propertiesUtil.getProperty(newDocumentNodeRef, CMISDictionaryModel.PROP_VERSION_LABEL, "");
|
||||
return versionLabel != null && versionLabel.contains(VERSION_DELIMETER) ? newDocumentNodeRef.toString() + CmisObjectsUtils.NODE_REFERENCE_ID_DELIMETER + versionLabel
|
||||
: newDocumentNodeRef.toString();
|
||||
}
|
||||
|
||||
private String checkConstraintsAndGetName(String documentTypeId, CMISTypeDefinition typeDef, NodeRef parentNodeRef, CmisContentStreamType contentStream,
|
||||
Map<String, Serializable> propertiesMap, EnumVersioningState versioningState) throws CmisException
|
||||
Map<String, Object> propertiesMap, EnumVersioningState versioningState) throws CmisException
|
||||
{
|
||||
if ((null == typeDef) || (null == typeDef.getTypeId()))
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException(("Type with " + documentTypeId + "typeId was not found"), EnumServiceException.RUNTIME);
|
||||
}
|
||||
|
||||
if ((typeDef.getTypeId().getScope() != CMISScope.DOCUMENT) || !typeDef.isCreatable())
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException(("Invalid document type \"" + documentTypeId + "\". Specified type is not Document type or type is not Creatable"),
|
||||
@@ -185,7 +188,7 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
throw cmisObjectsUtils.createCmisException(("Verioning for \"" + documentTypeId + "\" document type is not allowed"), EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
|
||||
String folderTypeId = (String) cmisService.getProperty(parentNodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID);
|
||||
String folderTypeId = propertiesUtil.getProperty(parentNodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID, null);
|
||||
CMISTypeDefinition folderTypeDefinition = cmisDictionaryService.findType(folderTypeId);
|
||||
if ((folderTypeDefinition.getAllowedTargetTypes() != null) && !folderTypeDefinition.getAllowedTargetTypes().isEmpty()
|
||||
&& !folderTypeDefinition.getAllowedTargetTypes().contains(typeDef))
|
||||
@@ -198,12 +201,7 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("Name property not found", EnumServiceException.INVALID_ARGUMENT);
|
||||
}
|
||||
|
||||
CMISPropertyDefinition nameProperty = cmisDictionaryService.findProperty(CMISDictionaryModel.PROP_NAME, null);
|
||||
if ((nameProperty.getMaximumLength() > 0) && (result.length() > nameProperty.getMaximumLength()))
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("Name property length too big", EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
propertiesUtil.checkProperty(null, typeDef, CMISDictionaryModel.PROP_NAME, result, (EnumVersioningState.CHECKEDOUT == versioningState));
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -224,31 +222,30 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
NodeRef folderNodeRef = null;
|
||||
try
|
||||
{
|
||||
folderNodeRef = cmisObjectsUtils.getIdentifierInstance(folderId, AlfrescoObjectType.FOLDER_OBJECT).getConvertedIdentifier();
|
||||
folderNodeRef = cmisObjectsUtils.getIdentifierInstance(folderId, AlfrescoObjectType.FOLDER_OBJECT);
|
||||
}
|
||||
catch (CmisException e)
|
||||
{
|
||||
e.getFaultInfo().setType(EnumServiceException.CONSTRAINT);
|
||||
throw e;
|
||||
}
|
||||
assertExistFolder(folderNodeRef);
|
||||
|
||||
CMISTypeDefinition type = getCmisTypeDefinition(typeId);
|
||||
if (type == null || type.getTypeId().getScope() != CMISScope.FOLDER)
|
||||
TypeDefinition nativeType = dictionaryService.getType(nodeService.getType(folderNodeRef));
|
||||
if (type == null || type.getTypeId() == null || type.getTypeId().getScope() != CMISScope.FOLDER)
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("The typeID is not an Object-Type whose baseType is 'Folder': " + typeId, EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
|
||||
Map<String, Serializable> propertiesMap = getPropertiesMap(properties);
|
||||
String name = (String) propertiesMap.get(CMISDictionaryModel.PROP_NAME);
|
||||
checkPropertyName(type, name);
|
||||
assertExistFolder(folderNodeRef);
|
||||
String name = propertiesUtil.getCmisPropertyValue(properties, CMISDictionaryModel.PROP_NAME, null);
|
||||
propertiesUtil.checkProperty(nativeType, type, CMISDictionaryModel.PROP_NAME, name, false);
|
||||
|
||||
try
|
||||
{
|
||||
NodeRef newFolderNodeRef = fileFolderService.create(folderNodeRef, name, type.getTypeId().getQName()).getNodeRef();
|
||||
// TODO:
|
||||
// cmisPropertyService.setProperties(newFolderNodeRef, propertiesMap);
|
||||
return (String) cmisService.getProperty(newFolderNodeRef, CMISDictionaryModel.PROP_OBJECT_ID);
|
||||
propertiesUtil.setProperties(newFolderNodeRef, properties, createPropertyFilter(extendStandardFilter(CMISDictionaryModel.PROP_NAME)));
|
||||
return propertiesUtil.getProperty(newFolderNodeRef, CMISDictionaryModel.PROP_OBJECT_ID, null);
|
||||
}
|
||||
catch (FileExistsException e)
|
||||
{
|
||||
@@ -256,6 +253,27 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
}
|
||||
}
|
||||
|
||||
private String extendStandardFilter(String propertyName)
|
||||
{
|
||||
return extendStandardFilter(new String[] { propertyName });
|
||||
}
|
||||
|
||||
private String extendStandardFilter(String[] propertyNames)
|
||||
{
|
||||
StringBuilder filter = new StringBuilder(propertiesUtil.createStandardNotUpdatablePropertiesFilter());
|
||||
|
||||
for (String propertyName : propertyNames)
|
||||
{
|
||||
if ((null != propertyName) && !propertyName.equals(""))
|
||||
{
|
||||
filter.append(PropertyFilter.PROPERTY_NAME_TOKENS_DELIMETER);
|
||||
filter.append(propertyName);
|
||||
}
|
||||
}
|
||||
|
||||
return filter.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a policy object of the specified type, and optionally adds the policy to a folder.
|
||||
*
|
||||
@@ -286,26 +304,23 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
{
|
||||
checkRepositoryId(repositoryId);
|
||||
|
||||
NodeRef sourceNodeRef;
|
||||
NodeRef targetNodeRef;
|
||||
|
||||
sourceNodeRef = cmisObjectsUtils.getIdentifierInstance(sourceObjectId, AlfrescoObjectType.ANY_OBJECT).getConvertedIdentifier();
|
||||
targetNodeRef = cmisObjectsUtils.getIdentifierInstance(targetObjectId, AlfrescoObjectType.ANY_OBJECT).getConvertedIdentifier();
|
||||
NodeRef sourceNodeRef = cmisObjectsUtils.getIdentifierInstance(sourceObjectId, AlfrescoObjectType.ANY_OBJECT);
|
||||
NodeRef targetNodeRef = cmisObjectsUtils.getIdentifierInstance(targetObjectId, AlfrescoObjectType.ANY_OBJECT);
|
||||
|
||||
CMISTypeDefinition relationshipType = cmisDictionaryService.findType(typeId);
|
||||
if (relationshipType == null || relationshipType.getTypeId().getScope() != CMISScope.RELATIONSHIP)
|
||||
if (relationshipType == null || relationshipType.getTypeId() == null || relationshipType.getTypeId().getScope() != CMISScope.RELATIONSHIP)
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException(typeId, EnumServiceException.INVALID_ARGUMENT);
|
||||
}
|
||||
|
||||
CMISTypeDefinition sourceType = cmisDictionaryService.findType((String) cmisService.getProperty(sourceNodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID));
|
||||
CMISTypeDefinition targetType = cmisDictionaryService.findType((String) cmisService.getProperty(targetNodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID));
|
||||
CMISTypeDefinition sourceType = cmisDictionaryService.findType(propertiesUtil.getProperty(sourceNodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID, (String) null));
|
||||
CMISTypeDefinition targetType = cmisDictionaryService.findType(propertiesUtil.getProperty(targetNodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID, (String) null));
|
||||
|
||||
if (!relationshipType.getAllowedSourceTypes().contains(sourceType))
|
||||
if ((null != relationshipType.getAllowedSourceTypes()) && !relationshipType.getAllowedSourceTypes().contains(sourceType))
|
||||
{
|
||||
cmisObjectsUtils.createCmisException(("Source object type is not allowed for \"" + typeId + "\" Relationship type"), EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
if (!relationshipType.getAllowedTargetTypes().contains(targetType))
|
||||
if ((null != relationshipType.getAllowedTargetTypes()) && !relationshipType.getAllowedTargetTypes().contains(targetType))
|
||||
{
|
||||
cmisObjectsUtils.createCmisException(("Target object type is not allowed for \"" + typeId + "\" Relationship type"), EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
@@ -345,17 +360,15 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
{
|
||||
// TODO: Where is changeToken?
|
||||
checkRepositoryId(repositoryId);
|
||||
NodeRef currentNode = (NodeRef) cmisObjectsUtils.getIdentifierInstance(documentId, AlfrescoObjectType.DOCUMENT_OBJECT).getConvertedIdentifier();
|
||||
NodeRef currentNode = cmisObjectsUtils.getIdentifierInstance(documentId, AlfrescoObjectType.DOCUMENT_OBJECT);
|
||||
|
||||
CMISTypeDefinition typeDef = cmisDictionaryService.findType((String) cmisService.getProperty(currentNode, CMISDictionaryModel.PROP_OBJECT_TYPE_ID));
|
||||
CMISTypeDefinition typeDef = cmisDictionaryService.findType(propertiesUtil.getProperty(currentNode, CMISDictionaryModel.PROP_OBJECT_TYPE_ID, (String) null));
|
||||
if (CMISContentStreamAllowedEnum.REQUIRED.equals(typeDef.getContentStreamAllowed()))
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("The Object<EFBFBD>s Object-Type definition 'contentStreamAllowed' attribute is set to 'required'.",
|
||||
throw cmisObjectsUtils.createCmisException("The 'contentStreamAllowed' attribute of the specified Object-Type definition is set to 'required'.",
|
||||
EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
|
||||
checkVersion(currentNode);
|
||||
|
||||
safeDeleteContentStream(currentNode);
|
||||
}
|
||||
|
||||
@@ -371,7 +384,7 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
{
|
||||
checkRepositoryId(repositoryId);
|
||||
|
||||
NodeRef objectNodeReference = cmisObjectsUtils.getIdentifierInstance(objectId, AlfrescoObjectType.DOCUMENT_OR_FOLDER_OBJECT).getConvertedIdentifier();
|
||||
NodeRef objectNodeReference = cmisObjectsUtils.getIdentifierInstance(objectId, AlfrescoObjectType.DOCUMENT_OR_FOLDER_OBJECT);
|
||||
checkForRootObject(repositoryId, objectId);
|
||||
checkObjectTypeAndAppropriateStates(objectNodeReference, nodeService.getType(objectNodeReference));
|
||||
if (!cmisObjectsUtils.deleteObject(objectNodeReference))
|
||||
@@ -399,7 +412,7 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
checkUnfilingIsNotRequested(unfileNonfolderObjects);
|
||||
checkForRootObject(repositoryId, folderId);
|
||||
|
||||
NodeRef folderNodeReference = cmisObjectsUtils.getIdentifierInstance(folderId, AlfrescoObjectType.FOLDER_OBJECT).getConvertedIdentifier();
|
||||
NodeRef folderNodeReference = cmisObjectsUtils.getIdentifierInstance(folderId, AlfrescoObjectType.FOLDER_OBJECT);
|
||||
FailedToDelete responce = new FailedToDelete();
|
||||
cmisObjectsUtils.deleteFolder(folderNodeReference, continueOnFailure, (unfileNonfolderObjects == EnumUnfileNonfolderObjects.DELETE), responce.getObjectId());
|
||||
|
||||
@@ -440,9 +453,9 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
// See http://tools.oasis-open.org/issues/browse/CMIS-134
|
||||
|
||||
checkRepositoryId(repositoryId);
|
||||
NodeRef nodeRef = cmisObjectsUtils.getIdentifierInstance(documentId, AlfrescoObjectType.DOCUMENT_OBJECT).getConvertedIdentifier();
|
||||
NodeRef nodeRef = cmisObjectsUtils.getIdentifierInstance(documentId, AlfrescoObjectType.DOCUMENT_OBJECT);
|
||||
|
||||
CMISTypeDefinition typeDefinition = cmisDictionaryService.findType((String) cmisService.getProperty(nodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID));
|
||||
CMISTypeDefinition typeDefinition = cmisDictionaryService.findType(propertiesUtil.getProperty(nodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID, (String) null));
|
||||
if (CMISContentStreamAllowedEnum.NOT_ALLOWED == typeDefinition.getContentStreamAllowed())
|
||||
{
|
||||
cmisObjectsUtils.createCmisException("Content stream not allowed", EnumServiceException.STREAM_NOT_SUPPORTED);
|
||||
@@ -453,7 +466,7 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
|
||||
response.setLength(BigInteger.valueOf(reader.getSize()));
|
||||
response.setMimeType(reader.getMimetype());
|
||||
String filename = (String) cmisService.getProperty(nodeRef, CMISDictionaryModel.PROP_NAME);
|
||||
String filename = propertiesUtil.getProperty(nodeRef, CMISDictionaryModel.PROP_NAME, null);
|
||||
response.setFilename(filename);
|
||||
response.setStream(new DataHandler(new ContentReaderDataSource(reader, filename)));
|
||||
|
||||
@@ -475,10 +488,9 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
checkRepositoryId(repositoryId);
|
||||
|
||||
NodeRef objectNodeRef = null;
|
||||
|
||||
try
|
||||
{
|
||||
objectNodeRef = cmisObjectsUtils.getIdentifierInstance(objectId, AlfrescoObjectType.DOCUMENT_OR_FOLDER_OBJECT).getConvertedIdentifier();
|
||||
objectNodeRef = cmisObjectsUtils.getIdentifierInstance(objectId, AlfrescoObjectType.DOCUMENT_OR_FOLDER_OBJECT);
|
||||
}
|
||||
catch (CmisException e)
|
||||
{
|
||||
@@ -486,16 +498,16 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
throw e;
|
||||
}
|
||||
|
||||
checkVersion(objectNodeRef);
|
||||
// TODO: maybe this check will be need in terms of document version instead of final document (version specific filing is not supported)
|
||||
// checkOnLatestVersion(objectNodeRef);
|
||||
|
||||
NodeRef targetFolderNodeRef = cmisObjectsUtils.getIdentifierInstance(targetFolderId, AlfrescoObjectType.FOLDER_OBJECT).getConvertedIdentifier();
|
||||
NodeRef targetFolderNodeRef = cmisObjectsUtils.getIdentifierInstance(targetFolderId, AlfrescoObjectType.FOLDER_OBJECT);
|
||||
List<ChildAssociationRef> parentsAssociations = nodeService.getParentAssocs(objectNodeRef);
|
||||
NodeRef sourceFolderNodeRef = null;
|
||||
if ((parentsAssociations != null) && (SINGLE_PARENT_CONDITION != nodeService.getParentAssocs(objectNodeRef).size()))
|
||||
{
|
||||
try
|
||||
{
|
||||
sourceFolderNodeRef = cmisObjectsUtils.getIdentifierInstance(sourceFolderId, AlfrescoObjectType.FOLDER_OBJECT).getConvertedIdentifier();
|
||||
NodeRef sourceFolderNodeRef = cmisObjectsUtils.getIdentifierInstance(sourceFolderId, AlfrescoObjectType.FOLDER_OBJECT);
|
||||
|
||||
if (!cmisObjectsUtils.isPrimaryObjectParent(sourceFolderNodeRef, objectNodeRef))
|
||||
{
|
||||
@@ -530,12 +542,12 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
{
|
||||
checkRepositoryId(repositoryId);
|
||||
|
||||
NodeRef nodeRef = cmisObjectsUtils.getIdentifierInstance(documentId.value, AlfrescoObjectType.DOCUMENT_OBJECT).getConvertedIdentifier();
|
||||
NodeRef nodeRef = cmisObjectsUtils.getIdentifierInstance(documentId.value, AlfrescoObjectType.DOCUMENT_OBJECT);
|
||||
|
||||
CMISTypeDefinition typeDef = cmisDictionaryService.findType((String) cmisService.getProperty(nodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID));
|
||||
CMISTypeDefinition typeDef = cmisDictionaryService.findType(propertiesUtil.getProperty(nodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID, (String) null));
|
||||
if (CMISContentStreamAllowedEnum.NOT_ALLOWED.equals(typeDef.getContentStreamAllowed()))
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("The Object<EFBFBD>s Object-Type definition 'contentStreamAllowed' attribute is set to 'notAllowed'.",
|
||||
throw cmisObjectsUtils.createCmisException("The Object's Object-Type definition 'contentStreamAllowed' attribute is set to 'notAllowed'.",
|
||||
EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
|
||||
@@ -562,6 +574,8 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
|
||||
writer.setMimetype(contentStream.getMimeType());
|
||||
writer.putContent(inputstream);
|
||||
|
||||
documentId.value = propertiesUtil.getProperty(cmisObjectsUtils.getLatestNode(nodeRef, false), CMISDictionaryModel.PROP_OBJECT_ID, documentId.value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -576,18 +590,14 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
*/
|
||||
public void updateProperties(String repositoryId, Holder<String> objectId, String changeToken, CmisPropertiesType properties) throws CmisException
|
||||
{
|
||||
checkRepositoryId(repositoryId);
|
||||
checkForReadOnlyProperties(properties);
|
||||
|
||||
NodeRef objectNodeRef = cmisObjectsUtils.getIdentifierInstance(objectId.value, AlfrescoObjectType.DOCUMENT_OR_FOLDER_OBJECT).getConvertedIdentifier();
|
||||
String name = (String) PropertyUtil.getProperty(properties, CMISDictionaryModel.PROP_NAME);
|
||||
checkPropertyName(objectNodeRef, name);
|
||||
setProperties(objectNodeRef, properties);
|
||||
|
||||
// TODO: change token
|
||||
checkRepositoryId(repositoryId);
|
||||
|
||||
NodeRef objectNodeRef = cmisObjectsUtils.getIdentifierInstance(objectId.value, AlfrescoObjectType.DOCUMENT_OR_FOLDER_OBJECT);
|
||||
propertiesUtil.setProperties(objectNodeRef, properties, createPropertyFilter(propertiesUtil.createStandardNotUpdatablePropertiesFilter()));
|
||||
|
||||
// no new version
|
||||
objectId.value = (String) cmisService.getProperty(objectNodeRef, CMISDictionaryModel.PROP_OBJECT_ID);
|
||||
objectId.value = propertiesUtil.getProperty(objectNodeRef, CMISDictionaryModel.PROP_OBJECT_ID, objectId.value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -603,19 +613,20 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
|
||||
PropertyFilter propertyFilter = createPropertyFilter(parameters.getFilter());
|
||||
|
||||
String identifier = ((NodeRef) cmisObjectsUtils.getIdentifierInstance(parameters.getObjectId(), AlfrescoObjectType.ANY_OBJECT).getConvertedIdentifier()).toString();
|
||||
Object identifierInstance = cmisObjectsUtils.getIdentifierInstance(parameters.getObjectId(), AlfrescoObjectType.ANY_OBJECT);
|
||||
String identifier = identifierInstance.toString();
|
||||
EnumReturnVersion returnVersion = (parameters.getReturnVersion() != null && parameters.getReturnVersion().getValue() != null) ? parameters.getReturnVersion().getValue()
|
||||
: null;
|
||||
|
||||
if ((returnVersion != null) && (cmisObjectsUtils.determineObjectType(identifier) == EnumObjectType.DOCUMENT))
|
||||
{
|
||||
identifier = getLatestNode(new NodeRef(identifier), (EnumReturnVersion.LATEST != returnVersion)).toString();
|
||||
identifier = cmisObjectsUtils.getLatestNode(new NodeRef(identifier), (EnumReturnVersion.LATEST != returnVersion)).toString();
|
||||
}
|
||||
|
||||
GetPropertiesResponse response = new GetPropertiesResponse();
|
||||
response.setObject(new CmisObjectType());
|
||||
CmisObjectType object = response.getObject();
|
||||
object.setProperties(getPropertiesType(identifier, propertyFilter));
|
||||
object.setProperties(propertiesUtil.getPropertiesType(identifier, propertyFilter));
|
||||
|
||||
if (parameters.getIncludeAllowableActions() != null && parameters.getIncludeAllowableActions().getValue())
|
||||
{
|
||||
@@ -630,24 +641,6 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
return response;
|
||||
}
|
||||
|
||||
private Map<String, Serializable> getPropertiesMap(CmisPropertiesType cmisProperties) throws CmisException
|
||||
{
|
||||
Map<String, Serializable> properties = new HashMap<String, Serializable>();
|
||||
|
||||
for (CmisProperty cmisProperty : cmisProperties.getProperty())
|
||||
{
|
||||
String name = PropertyUtil.getRepositoryPropertyName(cmisProperty.getName());
|
||||
if (name == null)
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException(("Unknown property with name " + name), EnumServiceException.INVALID_ARGUMENT);
|
||||
}
|
||||
|
||||
properties.put(name, PropertyUtil.getValue(cmisProperty));
|
||||
}
|
||||
|
||||
return properties;
|
||||
}
|
||||
|
||||
private void changeObjectParentAssociation(NodeRef objectNodeRef, NodeRef targetFolderNodeRef, NodeRef sourceFolderNodeReference) throws CmisException
|
||||
{
|
||||
if (!cmisObjectsUtils.removeObject(objectNodeRef, sourceFolderNodeReference) || !cmisObjectsUtils.addObjectToFolder(objectNodeRef, targetFolderNodeRef))
|
||||
@@ -676,7 +669,7 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
}
|
||||
catch (NodeLockedException e)
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("Content Stream Deletion is not allowed for specified Document", EnumServiceException.UPDATE_CONFLICT);
|
||||
throw cmisObjectsUtils.createCmisException("Content Stream Deletion is not allowed for specified Object", EnumServiceException.UPDATE_CONFLICT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -694,7 +687,7 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.cmisObjectsUtils.getIdentifierInstance(folderId, AlfrescoObjectType.FOLDER_OBJECT).getConvertedIdentifier();
|
||||
return this.cmisObjectsUtils.getIdentifierInstance(folderId, AlfrescoObjectType.FOLDER_OBJECT);
|
||||
}
|
||||
catch (CmisException e)
|
||||
{
|
||||
@@ -732,70 +725,31 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
}
|
||||
}
|
||||
|
||||
private void checkForReadOnlyProperties(CmisPropertiesType properties) throws CmisException
|
||||
// TODO: see moveObject
|
||||
// private void checkOnLatestVersion(NodeRef currentNode) throws CmisException
|
||||
// {
|
||||
// if (!cmisObjectsUtils.isFolder(currentNode) && !propertiesUtil.getProperty(currentNode, CMISDictionaryModel.PROP_IS_LATEST_VERSION, false))
|
||||
// {
|
||||
// throw cmisObjectsUtils.createCmisException("Document is a non-current Document Version", EnumServiceException.VERSIONING);
|
||||
// }
|
||||
// }
|
||||
|
||||
private CmisAllowableActionsType determineObjectAllowableActions(Object objectIdentifier) throws CmisException
|
||||
{
|
||||
for (CmisProperty property : properties.getProperty())
|
||||
if (objectIdentifier instanceof AssociationRef)
|
||||
{
|
||||
if (PropertyUtil.isReadOnlyRepositoryProperty(property.getName()))
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException(("The property " + property.getName() + " is Read Only and couldn't be updated"), EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
}
|
||||
return determineRelationshipAllowableActions((AssociationRef) objectIdentifier);
|
||||
}
|
||||
|
||||
private void checkVersion(NodeRef currentNode) throws CmisException
|
||||
{
|
||||
if (!cmisObjectsUtils.isFolder(currentNode))
|
||||
{
|
||||
NodeRef latestNode = getLatestNode(currentNode, true);
|
||||
Version currentVersion = versionService.getCurrentVersion(currentNode);
|
||||
Version latestVersion = versionService.getCurrentVersion(latestNode);
|
||||
if ((currentVersion != null && latestVersion != null) && (!currentVersion.getVersionLabel().equals(latestVersion.getVersionLabel())))
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("Document is a non-current Document Version", EnumServiceException.VERSIONING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkPropertyName(CMISTypeDefinition type, String name) throws CmisException
|
||||
{
|
||||
CMISPropertyDefinition propertyDefinition = cmisDictionaryService.findProperty(CMISDictionaryModel.PROP_NAME, type);
|
||||
|
||||
if (propertyDefinition.isRequired() && (name == null || name.length() < 1))
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("Name property required", EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
|
||||
if (name != null && (propertyDefinition.getMaximumLength() > 0) && (name.length() > propertyDefinition.getMaximumLength()))
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("Name is too long", EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
}
|
||||
|
||||
private void checkPropertyName(NodeRef node, String name) throws CmisException
|
||||
{
|
||||
CMISTypeDefinition type = cmisDictionaryService.findType((String) cmisService.getProperty(node, CMISDictionaryModel.PROP_OBJECT_TYPE_ID));
|
||||
checkPropertyName(type, name);
|
||||
}
|
||||
|
||||
private CmisAllowableActionsType determineObjectAllowableActions(IdentifierConversionResults objectIdentifierContainer) throws CmisException
|
||||
{
|
||||
Object objectNodeReference = objectIdentifierContainer.getConvertedIdentifier();
|
||||
|
||||
if (objectNodeReference instanceof AssociationRef)
|
||||
{
|
||||
return determineRelationshipAllowableActions((AssociationRef) objectIdentifierContainer.getConvertedIdentifier());
|
||||
}
|
||||
|
||||
switch (cmisObjectsUtils.determineObjectType(objectNodeReference.toString()))
|
||||
switch (cmisObjectsUtils.determineObjectType(objectIdentifier.toString()))
|
||||
{
|
||||
case DOCUMENT:
|
||||
{
|
||||
return determineDocumentAllowableActions((NodeRef) objectNodeReference);
|
||||
return determineDocumentAllowableActions((NodeRef) objectIdentifier);
|
||||
}
|
||||
case FOLDER:
|
||||
{
|
||||
return determineFolderAllowableActions((NodeRef) objectNodeReference);
|
||||
return determineFolderAllowableActions((NodeRef) objectIdentifier);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,5 +826,4 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object
|
||||
|
||||
throw cmisObjectsUtils.createCmisException("Couldn't to relocate multi-filed Object", EnumServiceException.UPDATE_CONFLICT);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -25,7 +25,6 @@
|
||||
package org.alfresco.repo.cmis.ws;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.cmis.CMISScope;
|
||||
@@ -84,11 +83,11 @@ public class DMRelationshipServicePort extends DMAbstractServicePort implements
|
||||
|
||||
// TODO: process 'includeAllowableActions' param, see DMObjectServicePort->determineObjectAllowableActions
|
||||
PropertyFilter propertyFilter = createPropertyFilter(parameters.getFilter());
|
||||
NodeRef objectNodeRef = (NodeRef) cmisObjectsUtils.getIdentifierInstance(parameters.getObjectId(), AlfrescoObjectType.DOCUMENT_OR_FOLDER_OBJECT).getConvertedIdentifier();
|
||||
NodeRef objectNodeRef = cmisObjectsUtils.getIdentifierInstance(parameters.getObjectId(), AlfrescoObjectType.DOCUMENT_OR_FOLDER_OBJECT);
|
||||
List<AssociationRef> assocs = null;
|
||||
try
|
||||
{
|
||||
assocs = receiveAssociations(objectNodeRef, associationType, direction, includingSubtypes);
|
||||
assocs = cmisObjectsUtils.receiveAssociations(objectNodeRef, new RelationshipTypeFilter(associationType, includingSubtypes), direction);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -97,25 +96,8 @@ public class DMRelationshipServicePort extends DMAbstractServicePort implements
|
||||
return formatResponse(propertyFilter, assocs.toArray(), new GetRelationshipsResponse(), skipCount, maxItems);
|
||||
}
|
||||
|
||||
private List<AssociationRef> receiveAssociations(NodeRef objectNodeReference, QName relationshipType, EnumRelationshipDirection direction, boolean includeSubtypes)
|
||||
{
|
||||
List<AssociationRef> result = new LinkedList<AssociationRef>();
|
||||
QNamePattern matcher = new RelationshipTypeFilter(relationshipType, includeSubtypes);
|
||||
|
||||
if ((direction == EnumRelationshipDirection.EITHER) || (direction == EnumRelationshipDirection.TARGET))
|
||||
{
|
||||
result.addAll(nodeService.getSourceAssocs(objectNodeReference, matcher));
|
||||
}
|
||||
|
||||
if ((direction == EnumRelationshipDirection.EITHER) || (direction == EnumRelationshipDirection.SOURCE))
|
||||
{
|
||||
result.addAll(nodeService.getTargetAssocs(objectNodeReference, matcher));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private GetRelationshipsResponse formatResponse(PropertyFilter filter, Object[] sourceArray, GetRelationshipsResponse result, BigInteger skipCount, BigInteger maxItems)
|
||||
throws CmisException
|
||||
{
|
||||
Cursor cursor = createCursor(sourceArray.length, skipCount, maxItems);
|
||||
for (int i = cursor.getStartRow(); i < cursor.getEndRow(); i++)
|
||||
@@ -153,5 +135,4 @@ public class DMRelationshipServicePort extends DMAbstractServicePort implements
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -27,7 +27,6 @@ package org.alfresco.repo.cmis.ws;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
@@ -121,9 +120,12 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
Descriptor serverDescriptor = descriptorService.getCurrentRepositoryDescriptor();
|
||||
repositoryEntryType.setRepositoryId(serverDescriptor.getId());
|
||||
repositoryEntryType.setRepositoryName(serverDescriptor.getName());
|
||||
// TODO: Hardcoded! repositoryUri should be reteived using standart mechanism
|
||||
|
||||
// TODO: Hardcoded! repositoryUri should be retrieved using standard mechanism
|
||||
repositoryEntryType.setRepositoryURI(repositoryUri);
|
||||
return Collections.singletonList(repositoryEntryType);
|
||||
List<CmisRepositoryEntryType> result = new LinkedList<CmisRepositoryEntryType>();
|
||||
result.add(repositoryEntryType);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,7 +148,7 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
repositoryInfoType.setVendorName("Alfresco");
|
||||
repositoryInfoType.setProductName("Alfresco Repository (" + serverDescriptor.getEdition() + ")");
|
||||
repositoryInfoType.setProductVersion(serverDescriptor.getVersion());
|
||||
repositoryInfoType.setRootFolderId((String) cmisService.getProperty(cmisService.getDefaultRootNodeRef(), CMISDictionaryModel.PROP_OBJECT_ID));
|
||||
repositoryInfoType.setRootFolderId(propertiesUtil.getProperty(cmisService.getDefaultRootNodeRef(), CMISDictionaryModel.PROP_OBJECT_ID, (String) null));
|
||||
CmisRepositoryCapabilitiesType capabilities = new CmisRepositoryCapabilitiesType();
|
||||
capabilities.setCapabilityMultifiling(true);
|
||||
capabilities.setCapabilityUnfiling(false);
|
||||
@@ -183,7 +185,7 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
case DATETIME:
|
||||
CmisChoiceDateTimeType choiceDateTimeType = new CmisChoiceDateTimeType();
|
||||
choiceDateTimeType.setKey(choice.getName());
|
||||
choiceDateTimeType.getValue().add(convert((Date) choice.getValue()));
|
||||
choiceDateTimeType.getValue().add(propertiesUtil.convert((Date) choice.getValue()));
|
||||
result = cmisObjectFactory.createChoiceDateTime(choiceDateTimeType);
|
||||
break;
|
||||
case DECIMAL:
|
||||
@@ -249,7 +251,6 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
* @param choices repository choice object
|
||||
* @param cmisChoices web service choice object
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private void addChoices(CMISDataTypeEnum propertyType, Collection<CMISChoice> choices, List<CmisChoiceType> cmisChoices)
|
||||
{
|
||||
for (CMISChoice choice : choices)
|
||||
@@ -345,17 +346,13 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
* @param typeDefinition repository type definition
|
||||
* @param includeProperties true if need property definitions for type definition
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private void setCmisTypeDefinitionProperties(CmisTypeDefinitionType cmisTypeDefinition, CMISTypeDefinition typeDefinition, boolean includeProperties) throws CmisException
|
||||
{
|
||||
cmisTypeDefinition.setTypeId(typeDefinition.getTypeId().getId());
|
||||
cmisTypeDefinition.setQueryName(typeDefinition.getQueryName());
|
||||
cmisTypeDefinition.setDisplayName(typeDefinition.getDisplayName());
|
||||
cmisTypeDefinition.setBaseType(EnumBaseObjectType.fromValue(typeDefinition.getBaseType().getTypeId().getId()));
|
||||
if (typeDefinition.getParentType() != null)
|
||||
{
|
||||
cmisTypeDefinition.setParentId(typeDefinition.getParentType().getTypeId().getId());
|
||||
}
|
||||
cmisTypeDefinition.setBaseTypeQueryName(typeDefinition.getBaseType().getQueryName());
|
||||
cmisTypeDefinition.setDescription(typeDefinition.getDescription());
|
||||
cmisTypeDefinition.setCreatable(typeDefinition.isCreatable());
|
||||
@@ -384,6 +381,11 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
*/
|
||||
private CmisTypeDefinitionType getCmisTypeDefinition(CMISTypeDefinition typeDef, boolean includeProperties) throws CmisException
|
||||
{
|
||||
if (typeDef.getParentType() == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (typeDef == null)
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("Type not found", EnumServiceException.OBJECT_NOT_FOUND);
|
||||
@@ -416,7 +418,7 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
result = cmisObjectFactory.createRelationshipType(relationshipDefinitionType);
|
||||
break;
|
||||
case UNKNOWN:
|
||||
throw new CmisException("Unknown CMIS Type");
|
||||
throw cmisObjectsUtils.createCmisException("Unknown CMIS Type", EnumServiceException.INVALID_ARGUMENT);
|
||||
}
|
||||
|
||||
return result.getValue();
|
||||
@@ -445,11 +447,6 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
typeDefs = typeDef.getSubTypes(true);
|
||||
}
|
||||
|
||||
if (maxItems != null)
|
||||
{
|
||||
hasMoreItems.value = new Boolean((skipCount.intValue() + maxItems.intValue()) < typeDefs.size());
|
||||
}
|
||||
|
||||
// skip
|
||||
Cursor cursor = createCursor(typeDefs.size(), skipCount, maxItems);
|
||||
Iterator<CMISTypeDefinition> iterTypeDefs = typeDefs.iterator();
|
||||
@@ -486,5 +483,4 @@ public class DMRepositoryServicePort extends DMAbstractServicePort implements Re
|
||||
CMISTypeDefinition typeDef = cmisDictionaryService.findType(typeId);
|
||||
return getCmisTypeDefinition(typeDef, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -24,7 +24,6 @@
|
||||
*/
|
||||
package org.alfresco.repo.cmis.ws;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.ws.Holder;
|
||||
@@ -69,7 +68,7 @@ public class DMVersioningServicePort extends DMAbstractServicePort implements Ve
|
||||
public void cancelCheckOut(String repositoryId, String documentId) throws CmisException
|
||||
{
|
||||
checkRepositoryId(repositoryId);
|
||||
NodeRef workingCopyNodeRef = cmisObjectsUtils.getIdentifierInstance(documentId, AlfrescoObjectType.DOCUMENT_OBJECT).getConvertedIdentifier();
|
||||
NodeRef workingCopyNodeRef = cmisObjectsUtils.getIdentifierInstance(documentId, AlfrescoObjectType.DOCUMENT_OBJECT);
|
||||
assertWorkingCopy(workingCopyNodeRef);
|
||||
checkOutCheckInService.cancelCheckout(workingCopyNodeRef);
|
||||
}
|
||||
@@ -90,7 +89,7 @@ public class DMVersioningServicePort extends DMAbstractServicePort implements Ve
|
||||
throws CmisException
|
||||
{
|
||||
checkRepositoryId(repositoryId);
|
||||
NodeRef workingCopyNodeRef = cmisObjectsUtils.getIdentifierInstance(documentId.value, AlfrescoObjectType.DOCUMENT_OBJECT).getConvertedIdentifier();
|
||||
NodeRef workingCopyNodeRef = cmisObjectsUtils.getIdentifierInstance(documentId.value, AlfrescoObjectType.DOCUMENT_OBJECT);
|
||||
assertWorkingCopy(workingCopyNodeRef);
|
||||
|
||||
if (contentStream != null)
|
||||
@@ -110,11 +109,8 @@ public class DMVersioningServicePort extends DMAbstractServicePort implements Ve
|
||||
NodeRef nodeRef = checkOutCheckInService.checkin(workingCopyNodeRef,
|
||||
createVersionProperties(checkinComment, major != null && major ? VersionType.MAJOR : VersionType.MINOR));
|
||||
|
||||
if (properties != null)
|
||||
{
|
||||
setProperties(nodeRef, properties);
|
||||
}
|
||||
documentId.value = (String) cmisService.getProperty(nodeRef, CMISDictionaryModel.PROP_OBJECT_ID);
|
||||
propertiesUtil.setProperties(nodeRef, properties, createPropertyFilter(propertiesUtil.createStandardNotUpdatablePropertiesFilter()));
|
||||
documentId.value = propertiesUtil.getProperty(nodeRef, CMISDictionaryModel.PROP_OBJECT_ID, documentId.value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,7 +127,7 @@ public class DMVersioningServicePort extends DMAbstractServicePort implements Ve
|
||||
{
|
||||
checkRepositoryId(repositoryId);
|
||||
|
||||
NodeRef documentNodeRef = cmisObjectsUtils.getIdentifierInstance(documentId.value, AlfrescoObjectType.DOCUMENT_OBJECT).getConvertedIdentifier();
|
||||
NodeRef documentNodeRef = cmisObjectsUtils.getIdentifierInstance(documentId.value, AlfrescoObjectType.DOCUMENT_OBJECT);
|
||||
LockStatus lockStatus = lockService.getLockStatus(documentNodeRef);
|
||||
|
||||
if (lockStatus.equals(LockStatus.LOCKED) || lockStatus.equals(LockStatus.LOCK_OWNER) || nodeService.hasAspect(documentNodeRef, ContentModel.ASPECT_WORKING_COPY))
|
||||
@@ -140,7 +136,7 @@ public class DMVersioningServicePort extends DMAbstractServicePort implements Ve
|
||||
}
|
||||
|
||||
NodeRef pwcNodeRef = checkoutNode(documentNodeRef);
|
||||
documentId.value = (String) cmisService.getProperty(pwcNodeRef, CMISDictionaryModel.PROP_OBJECT_ID);
|
||||
documentId.value = propertiesUtil.getProperty(pwcNodeRef, CMISDictionaryModel.PROP_OBJECT_ID, documentId.value);
|
||||
contentCopied.value = true;
|
||||
}
|
||||
|
||||
@@ -154,7 +150,7 @@ public class DMVersioningServicePort extends DMAbstractServicePort implements Ve
|
||||
public void deleteAllVersions(String repositoryId, String versionSeriesId) throws CmisException
|
||||
{
|
||||
checkRepositoryId(repositoryId);
|
||||
NodeRef documentNodeRef = cmisObjectsUtils.getIdentifierInstance(versionSeriesId, AlfrescoObjectType.DOCUMENT_OBJECT).getConvertedIdentifier();
|
||||
NodeRef documentNodeRef = cmisObjectsUtils.getIdentifierInstance(versionSeriesId, AlfrescoObjectType.DOCUMENT_OBJECT);
|
||||
versionService.deleteVersionHistory(documentNodeRef);
|
||||
}
|
||||
|
||||
@@ -169,8 +165,8 @@ public class DMVersioningServicePort extends DMAbstractServicePort implements Ve
|
||||
{
|
||||
checkRepositoryId(parameters.getRepositoryId());
|
||||
|
||||
NodeRef documentNodeRef = cmisObjectsUtils.getIdentifierInstance(parameters.getVersionSeriesId(), AlfrescoObjectType.DOCUMENT_OBJECT).getConvertedIdentifier();
|
||||
documentNodeRef = getLatestNode(documentNodeRef, false);
|
||||
NodeRef documentNodeRef = cmisObjectsUtils.getIdentifierInstance(parameters.getVersionSeriesId(), AlfrescoObjectType.DOCUMENT_OBJECT);
|
||||
documentNodeRef = cmisObjectsUtils.getLatestNode(documentNodeRef, false);
|
||||
PropertyFilter propertyFilter = createPropertyFilter(parameters.getFilter());
|
||||
|
||||
GetAllVersionsResponse response = new GetAllVersionsResponse();
|
||||
@@ -209,23 +205,23 @@ public class DMVersioningServicePort extends DMAbstractServicePort implements Ve
|
||||
checkRepositoryId(parameters.getRepositoryId());
|
||||
PropertyFilter propertyFilter = createPropertyFilter(parameters.getFilter());
|
||||
|
||||
NodeRef documentNodeRef = cmisObjectsUtils.getIdentifierInstance(parameters.getVersionSeriesId(), AlfrescoObjectType.DOCUMENT_OBJECT).getConvertedIdentifier();
|
||||
NodeRef latestVersionNodeRef = getLatestNode(documentNodeRef, parameters.isMajorVersion());
|
||||
NodeRef documentNodeRef = cmisObjectsUtils.getIdentifierInstance(parameters.getVersionSeriesId(), AlfrescoObjectType.DOCUMENT_OBJECT);
|
||||
NodeRef latestVersionNodeRef = cmisObjectsUtils.getLatestNode(documentNodeRef, parameters.isMajorVersion());
|
||||
|
||||
Serializable property = cmisService.getProperty(latestVersionNodeRef, CMISDictionaryModel.PROP_IS_MAJOR_VERSION);
|
||||
if (parameters.isMajorVersion() && ((property == null) || !((Boolean)property)))
|
||||
Boolean majorVersionProperty = propertiesUtil.getProperty(latestVersionNodeRef, CMISDictionaryModel.PROP_IS_MAJOR_VERSION, false);
|
||||
if (parameters.isMajorVersion() && !majorVersionProperty)
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException("Object that was specified has no latest major version", EnumServiceException.OBJECT_NOT_FOUND);
|
||||
}
|
||||
|
||||
GetPropertiesOfLatestVersionResponse response = new GetPropertiesOfLatestVersionResponse();
|
||||
response.setObject(new CmisObjectType());
|
||||
response.getObject().setProperties(getPropertiesType(latestVersionNodeRef.toString(), propertyFilter));
|
||||
response.getObject().setProperties(propertiesUtil.getPropertiesType(latestVersionNodeRef.toString(), propertyFilter));
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
private void searchWorkingCopy(NodeRef documentNodeRef, PropertyFilter propertyFilter, List<CmisObjectType> resultList)
|
||||
private void searchWorkingCopy(NodeRef documentNodeRef, PropertyFilter propertyFilter, List<CmisObjectType> resultList) throws CmisException
|
||||
{
|
||||
NodeRef workingCopyNodeReference = cmisObjectsUtils.isWorkingCopy(documentNodeRef) ? documentNodeRef : checkOutCheckInService.getWorkingCopy(documentNodeRef);
|
||||
if (workingCopyNodeReference != null)
|
||||
|
@@ -1,172 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
*/
|
||||
package org.alfresco.repo.cmis.ws;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.cmis.CMISDictionaryModel;
|
||||
import org.alfresco.util.Pair;
|
||||
|
||||
/**
|
||||
* Class for accessing CMIS properties
|
||||
*
|
||||
* @author Dmitry Lazurkin
|
||||
* @author Dmitry Velichkevich
|
||||
*/
|
||||
public class PropertyUtil
|
||||
{
|
||||
private static Map<String, Pair<String, Boolean>> cmisToRepoPropertiesNamesMapping = new HashMap<String, Pair<String, Boolean>>();
|
||||
private static Map<String, Pair<String, Boolean>> repoToCmisPropertiesNamesMapping = new HashMap<String, Pair<String, Boolean>>();
|
||||
|
||||
static
|
||||
{
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_IS_IMMUTABLE, new Pair<String, Boolean>("IsImmutable", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_IS_LATEST_VERSION, new Pair<String, Boolean>("IsLatestVersion", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_IS_MAJOR_VERSION, new Pair<String, Boolean>("IsMajorVersion", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_IS_LATEST_MAJOR_VERSION, new Pair<String, Boolean>("IsLatestMajorVersion", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT, new Pair<String, Boolean>("IsVersionSeriesCheckedOut", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_CREATION_DATE, new Pair<String, Boolean>("CreationDate", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_LAST_MODIFICATION_DATE, new Pair<String, Boolean>("LastModificationDate", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_OBJECT_ID, new Pair<String, Boolean>("ObjectId", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_VERSION_SERIES_ID, new Pair<String, Boolean>("VersionSeriesId", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_VERSION_SERIES_CHECKED_OUT_ID, new Pair<String, Boolean>("VersionSeriesCheckedOutId", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_CONTENT_STREAM_LENGTH, new Pair<String, Boolean>("ContentStreamLength", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_NAME, new Pair<String, Boolean>("Name", false));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_OBJECT_TYPE_ID, new Pair<String, Boolean>("ObjectTypeId", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_CREATED_BY, new Pair<String, Boolean>("CreatedBy", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_LAST_MODIFIED_BY, new Pair<String, Boolean>("LastModifiedBy", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_CONTENT_STREAM_MIME_TYPE, new Pair<String, Boolean>("ContentStreamMimeType", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_CONTENT_STREAM_FILENAME, new Pair<String, Boolean>("ContentStreamFilename", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_VERSION_LABEL, new Pair<String, Boolean>("VersionLabel", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_CHECKIN_COMMENT, new Pair<String, Boolean>("checkinComment", false));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_CONTENT_STREAM_URI, new Pair<String, Boolean>("contentStreamUri", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_VERSION_SERIES_CHECKED_OUT_BY, new Pair<String, Boolean>("VersionSeriesCheckedOutBy", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_PARENT_ID, new Pair<String, Boolean>("ParentId", true));
|
||||
cmisToRepoPropertiesNamesMapping.put(CMISDictionaryModel.PROP_CONTENT_STREAM_ALLOWED, new Pair<String, Boolean>("ContentStreamAllowed", true));
|
||||
|
||||
for (Map.Entry<String, Pair<String, Boolean>> entry : cmisToRepoPropertiesNamesMapping.entrySet())
|
||||
{
|
||||
repoToCmisPropertiesNamesMapping.put(entry.getValue().getFirst(), new Pair<String, Boolean>(entry.getKey(), entry.getValue().getSecond()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get property name in response
|
||||
*
|
||||
* @param internalName internal property name
|
||||
* @return property name in response
|
||||
*/
|
||||
public static String getCMISPropertyName(String internalName)
|
||||
{
|
||||
return internalName;
|
||||
// TODO: remove the above mapping
|
||||
//return cmisToRepoPropertiesNamesMapping.get(internalName).getFirst();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get property name in repository
|
||||
*
|
||||
* @param cmisName internal property name
|
||||
* @return property name in repository
|
||||
*/
|
||||
public static String getRepositoryPropertyName(String cmisName)
|
||||
{
|
||||
return repoToCmisPropertiesNamesMapping.get(cmisName).getFirst();
|
||||
}
|
||||
|
||||
public static boolean isReadOnlyCmisProperty(String internalPropertyName)
|
||||
{
|
||||
return repoToCmisPropertiesNamesMapping.get(internalPropertyName).getSecond();
|
||||
}
|
||||
|
||||
public static boolean isReadOnlyRepositoryProperty(String cmisPropertyName)
|
||||
{
|
||||
return repoToCmisPropertiesNamesMapping.get(cmisPropertyName).getSecond();
|
||||
}
|
||||
|
||||
public static Serializable getProperty(CmisPropertiesType cmisProperties, String property)
|
||||
{
|
||||
String cmisPropertyName = getCMISPropertyName(property);
|
||||
|
||||
for (CmisProperty cmisProperty : cmisProperties.getProperty())
|
||||
{
|
||||
if (cmisProperty.getName().equals(cmisPropertyName))
|
||||
{
|
||||
return getValue(cmisProperty);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Serializable getValue(CmisProperty cmisProperty)
|
||||
{
|
||||
Serializable value = null;
|
||||
|
||||
if (cmisProperty instanceof CmisPropertyBoolean)
|
||||
{
|
||||
value = ((CmisPropertyBoolean) cmisProperty).getValue() != null && ((CmisPropertyBoolean) cmisProperty).getValue().size() > 0 ? ((CmisPropertyBoolean) cmisProperty)
|
||||
.getValue().get(0) : null;
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyDateTime)
|
||||
{
|
||||
value = ((CmisPropertyDateTime) cmisProperty).getValue() != null && ((CmisPropertyDateTime) cmisProperty).getValue().size() > 0 ? ((CmisPropertyDateTime) cmisProperty)
|
||||
.getValue().get(0).toXMLFormat() : null;
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyDecimal)
|
||||
{
|
||||
value = ((CmisPropertyDecimal) cmisProperty).getValue() != null && ((CmisPropertyDecimal) cmisProperty).getValue().size() > 0 ? ((CmisPropertyDecimal) cmisProperty)
|
||||
.getValue().get(0) : null;
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyHtml)
|
||||
{
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyId)
|
||||
{
|
||||
value = ((CmisPropertyId) cmisProperty).getValue() != null && ((CmisPropertyId) cmisProperty).getValue().size() > 0 ? ((CmisPropertyId) cmisProperty).getValue().get(0)
|
||||
: null;
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyInteger)
|
||||
{
|
||||
value = ((CmisPropertyInteger) cmisProperty).getValue() != null && ((CmisPropertyInteger) cmisProperty).getValue().size() > 0 ? ((CmisPropertyInteger) cmisProperty)
|
||||
.getValue().get(0) : null;
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyString)
|
||||
{
|
||||
value = ((CmisPropertyString) cmisProperty).getValue() != null && ((CmisPropertyString) cmisProperty).getValue().size() > 0 ? ((CmisPropertyString) cmisProperty)
|
||||
.getValue().get(0) : null;
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyUri)
|
||||
{
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyXml)
|
||||
{
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
@@ -29,6 +29,7 @@ import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.alfresco.cmis.CMISDictionaryService;
|
||||
import org.alfresco.cmis.CMISScope;
|
||||
@@ -37,6 +38,7 @@ import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.cmis.ws.CmisException;
|
||||
import org.alfresco.repo.cmis.ws.CmisFaultType;
|
||||
import org.alfresco.repo.cmis.ws.EnumObjectType;
|
||||
import org.alfresco.repo.cmis.ws.EnumRelationshipDirection;
|
||||
import org.alfresco.repo.cmis.ws.EnumServiceException;
|
||||
import org.alfresco.repo.cmis.ws.utils.DescendantsQueueManager.DescendantElement;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
@@ -47,11 +49,19 @@ import org.alfresco.service.cmr.lock.LockStatus;
|
||||
import org.alfresco.service.cmr.model.FileFolderService;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ContentIOException;
|
||||
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.alfresco.service.cmr.version.Version;
|
||||
import org.alfresco.service.cmr.version.VersionHistory;
|
||||
import org.alfresco.service.cmr.version.VersionService;
|
||||
import org.alfresco.service.cmr.version.VersionType;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.namespace.QNamePattern;
|
||||
import org.alfresco.util.Pair;
|
||||
|
||||
/**
|
||||
* @author Dmitry Velichkevich
|
||||
@@ -59,8 +69,10 @@ import org.alfresco.service.namespace.QName;
|
||||
public class CmisObjectsUtils
|
||||
{
|
||||
public static final String NODE_REFERENCE_ID_DELIMETER = "/";
|
||||
private static final int NODE_REFERENCE_WITH_SUFFIX_DELIMETERS_COUNT = 5;
|
||||
private static final String DOUBLE_NODE_REFERENCE_ID_DELIMETER = NODE_REFERENCE_ID_DELIMETER + NODE_REFERENCE_ID_DELIMETER;
|
||||
|
||||
private static final Pattern VERSION_LABEL_MATCHING_COMPILED_PATTERN = Pattern.compile("([\\p{Graph}])+([\\p{Digit}]*)\\.([\\p{Digit}]*)$");
|
||||
|
||||
private static final String INVALID_OBJECT_IDENTIFIER_MESSAGE = "Invalid Object Identifier was specified: Identifier is incorrect or Object with the specified Identifier does not exist";
|
||||
|
||||
private static final List<QName> DOCUMENT_AND_FOLDER_TYPES;
|
||||
static
|
||||
@@ -76,6 +88,9 @@ public class CmisObjectsUtils
|
||||
CLASS_TO_ENUM_EXCEPTION_MAPPING = new HashMap<String, EnumServiceException>();
|
||||
CLASS_TO_ENUM_EXCEPTION_MAPPING.put(AccessDeniedException.class.getName(), EnumServiceException.PERMISSION_DENIED);
|
||||
CLASS_TO_ENUM_EXCEPTION_MAPPING.put(java.lang.RuntimeException.class.getName(), EnumServiceException.RUNTIME);
|
||||
CLASS_TO_ENUM_EXCEPTION_MAPPING.put(UnsupportedOperationException.class.getName(), EnumServiceException.NOT_SUPPORTED);
|
||||
CLASS_TO_ENUM_EXCEPTION_MAPPING.put(InvalidNodeRefException.class.getName(), EnumServiceException.INVALID_ARGUMENT);
|
||||
CLASS_TO_ENUM_EXCEPTION_MAPPING.put(ContentIOException.class.getName(), EnumServiceException.NOT_SUPPORTED);
|
||||
// TODO: insert CLASS_TO_ENUM_EXCEPTION_MAPPING.put(<Concreate_Exception_Type>.class.getName(), EnumServiceException.<Appropriate_Enum_value>);
|
||||
}
|
||||
|
||||
@@ -83,6 +98,7 @@ public class CmisObjectsUtils
|
||||
private CMISDictionaryService cmisDictionaryService;
|
||||
private FileFolderService fileFolderService;
|
||||
private AuthorityService authorityService;
|
||||
private VersionService versionService;
|
||||
private NodeService nodeService;
|
||||
private LockService lockService;
|
||||
|
||||
@@ -118,6 +134,11 @@ public class CmisObjectsUtils
|
||||
this.authorityService = authorityService;
|
||||
}
|
||||
|
||||
public void setVersionService(VersionService versionService)
|
||||
{
|
||||
this.versionService = versionService;
|
||||
}
|
||||
|
||||
public CmisException createCmisException(String message, EnumServiceException exceptionType)
|
||||
{
|
||||
return createCmisException(message, exceptionType, null, 0);
|
||||
@@ -152,34 +173,35 @@ public class CmisObjectsUtils
|
||||
return new CmisException(message, fault, cause);
|
||||
}
|
||||
|
||||
public IdentifierConversionResults getIdentifierInstance(String identifier, AlfrescoObjectType expectedType) throws CmisException
|
||||
@SuppressWarnings("unchecked")
|
||||
public <IdentifierType> IdentifierType getIdentifierInstance(String identifier, AlfrescoObjectType expectedType) throws CmisException
|
||||
{
|
||||
if (!(identifier instanceof String))
|
||||
{
|
||||
throw createCmisException("Invalid Object Identifier was specified", EnumServiceException.INVALID_ARGUMENT);
|
||||
}
|
||||
|
||||
IdentifierConversionResults result;
|
||||
IdentifierType result;
|
||||
AlfrescoObjectType actualObjectType;
|
||||
|
||||
if (isRelationship(identifier))
|
||||
{
|
||||
result = createAssociationIdentifierResult(identifier);
|
||||
result = (IdentifierType) safeGetAssociationRef(identifier);
|
||||
actualObjectType = AlfrescoObjectType.RELATIONSHIP_OBJECT;
|
||||
}
|
||||
else
|
||||
{
|
||||
NodeRef nodeReference = safeGetNodeRef(cutNodeVersionIfNecessary(identifier, identifier.split(NODE_REFERENCE_ID_DELIMETER), 1));
|
||||
result = createNodeReferenceIdentifierResult(nodeReference);
|
||||
NodeRef nodeReference = safeGetNodeRef(identifier);
|
||||
result = (IdentifierType) nodeReference;
|
||||
actualObjectType = determineActualObjectType(expectedType, this.nodeService.getType(nodeReference));
|
||||
}
|
||||
|
||||
if ((expectedType == AlfrescoObjectType.ANY_OBJECT) || (actualObjectType == expectedType))
|
||||
if ((AlfrescoObjectType.ANY_OBJECT == expectedType) || (actualObjectType == expectedType))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
throw createCmisException(("Unexpected object type of the specified Object Identifier " + identifier), EnumServiceException.INVALID_ARGUMENT);
|
||||
throw createCmisException(("Unexpected object type of the specified Object with \"" + identifier + "\" identifier"), EnumServiceException.INVALID_ARGUMENT);
|
||||
}
|
||||
|
||||
public void deleteFolder(NodeRef folderNodeReference, boolean continueOnFailure, boolean totalDeletion, List<String> resultList) throws CmisException
|
||||
@@ -221,6 +243,29 @@ public class CmisObjectsUtils
|
||||
|
||||
public boolean deleteObject(NodeRef objectNodeReference)
|
||||
{
|
||||
if (null == objectNodeReference)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (versionService.getVersionStoreReference().getIdentifier().equals(objectNodeReference.getStoreRef().getIdentifier()))
|
||||
{
|
||||
String versionLabel = (String) nodeService.getProperty(objectNodeReference, ContentModel.PROP_VERSION_LABEL);
|
||||
|
||||
if ((null != versionLabel) && !versionLabel.equals(""))
|
||||
{
|
||||
Version currentVersion = versionService.getCurrentVersion(objectNodeReference);
|
||||
|
||||
if ((null != currentVersion) && nodeService.exists(currentVersion.getVersionedNodeRef()))
|
||||
{
|
||||
versionService.deleteVersion(currentVersion.getVersionedNodeRef(), currentVersion);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return canLock(objectNodeReference) && performNodeDeletion(objectNodeReference);
|
||||
}
|
||||
|
||||
@@ -337,6 +382,66 @@ public class CmisObjectsUtils
|
||||
return nodeService.hasAspect(objectIdentifier, ContentModel.ASPECT_WORKING_COPY);
|
||||
}
|
||||
|
||||
public List<AssociationRef> receiveAssociations(NodeRef objectNodeReference, QNamePattern qnameFilter, EnumRelationshipDirection direction)
|
||||
{
|
||||
List<AssociationRef> result = new LinkedList<AssociationRef>();
|
||||
|
||||
if ((direction == EnumRelationshipDirection.EITHER) || (direction == EnumRelationshipDirection.TARGET))
|
||||
{
|
||||
result.addAll(nodeService.getSourceAssocs(objectNodeReference, qnameFilter));
|
||||
}
|
||||
|
||||
if ((direction == EnumRelationshipDirection.EITHER) || (direction == EnumRelationshipDirection.SOURCE))
|
||||
{
|
||||
result.addAll(nodeService.getTargetAssocs(objectNodeReference, qnameFilter));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns latest minor or major version of document
|
||||
*
|
||||
* @param documentNodeRef document node reference
|
||||
* @param major need latest major version
|
||||
* @return latest version node reference
|
||||
*/
|
||||
public NodeRef getLatestNode(NodeRef documentNodeRef, boolean major)
|
||||
{
|
||||
Version specifiedVersion = versionService.getCurrentVersion(documentNodeRef);
|
||||
NodeRef latestVersionNodeRef = documentNodeRef;
|
||||
|
||||
if ((null != specifiedVersion) && (null != specifiedVersion.getVersionedNodeRef()))
|
||||
{
|
||||
latestVersionNodeRef = specifiedVersion.getVersionedNodeRef();
|
||||
|
||||
if (major)
|
||||
{
|
||||
Version latestVersion = versionService.getCurrentVersion(latestVersionNodeRef);
|
||||
|
||||
if ((null != latestVersion) && (VersionType.MAJOR != latestVersion.getVersionType()))
|
||||
{
|
||||
VersionHistory versionHistory = versionService.getVersionHistory(latestVersion.getFrozenStateNodeRef());
|
||||
|
||||
if (null != versionHistory)
|
||||
{
|
||||
do
|
||||
{
|
||||
latestVersion = versionHistory.getPredecessor(latestVersion);
|
||||
} while ((null != latestVersion) && (VersionType.MAJOR != latestVersion.getVersionType()));
|
||||
}
|
||||
|
||||
if ((null != latestVersion) && (null != latestVersion.getFrozenStateNodeRef()))
|
||||
{
|
||||
latestVersionNodeRef = latestVersion.getFrozenStateNodeRef();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return latestVersionNodeRef;
|
||||
}
|
||||
|
||||
private boolean performNodeDeletion(NodeRef objectNodeReference)
|
||||
{
|
||||
if (nodeService.hasAspect(objectNodeReference, ContentModel.ASPECT_WORKING_COPY))
|
||||
@@ -347,6 +452,23 @@ public class CmisObjectsUtils
|
||||
|
||||
try
|
||||
{
|
||||
List<AssociationRef> associations = receiveAssociations(objectNodeReference, new MatcheAllQNames(), EnumRelationshipDirection.EITHER);
|
||||
for (AssociationRef association : associations)
|
||||
{
|
||||
if ((null != association) && (null != association.getSourceRef()) && (null != association.getTargetRef()) && (null != association.getTypeQName()))
|
||||
{
|
||||
nodeService.removeAssociation(association.getSourceRef(), association.getTargetRef(), association.getTypeQName());
|
||||
}
|
||||
}
|
||||
|
||||
for (ChildAssociationRef parentAssociation : nodeService.getParentAssocs(objectNodeReference))
|
||||
{
|
||||
if (!parentAssociation.isPrimary())
|
||||
{
|
||||
nodeService.removeChildAssociation(parentAssociation);
|
||||
}
|
||||
}
|
||||
|
||||
nodeService.deleteNode(objectNodeReference);
|
||||
}
|
||||
catch (Throwable e)
|
||||
@@ -383,30 +505,80 @@ public class CmisObjectsUtils
|
||||
return new UnlinkOperationStatus(objectUnlinked, new LinkedList<ChildAssociationRef>());
|
||||
}
|
||||
|
||||
private AssociationRef safeGetAssociationRef(String identifier) throws CmisException
|
||||
{
|
||||
AssociationRef result = new AssociationRef(identifier);
|
||||
|
||||
if (!nodeService.exists(result.getSourceRef()) || !nodeService.exists(result.getTargetRef()))
|
||||
{
|
||||
throw createCmisException(INVALID_OBJECT_IDENTIFIER_MESSAGE, EnumServiceException.INVALID_ARGUMENT);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private NodeRef safeGetNodeRef(String nodeIdentifier) throws CmisException
|
||||
{
|
||||
if (NodeRef.isNodeRef(nodeIdentifier))
|
||||
Pair<String, String> nodeRefAndVersionLabel = (null != nodeIdentifier) ? (splitOnNodeRefAndVersionLabel(nodeIdentifier)) : (null);
|
||||
if ((null != nodeRefAndVersionLabel) && (null != nodeRefAndVersionLabel.getFirst()) && NodeRef.isNodeRef(nodeRefAndVersionLabel.getFirst()))
|
||||
{
|
||||
NodeRef result = new NodeRef(nodeIdentifier);
|
||||
NodeRef result = new NodeRef(nodeRefAndVersionLabel.getFirst());
|
||||
if (nodeService.exists(result))
|
||||
{
|
||||
result = getNodeRefFromVersion(result, nodeRefAndVersionLabel.getSecond());
|
||||
|
||||
if ((null != result) || !nodeService.exists(result))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
throw createCmisException("Invalid Object Identifier was specified: Identifier is incorrect or Object with the specified Identifier does not exist",
|
||||
EnumServiceException.OBJECT_NOT_FOUND);
|
||||
}
|
||||
|
||||
private String cutNodeVersionIfNecessary(String identifier, String[] splitNodeIdentifier, int startIndex)
|
||||
{
|
||||
String withoutVersionSuffix = identifier;
|
||||
if (splitNodeIdentifier.length == NODE_REFERENCE_WITH_SUFFIX_DELIMETERS_COUNT)
|
||||
{
|
||||
withoutVersionSuffix = splitNodeIdentifier[startIndex++ - 1] + DOUBLE_NODE_REFERENCE_ID_DELIMETER + splitNodeIdentifier[startIndex++] + NODE_REFERENCE_ID_DELIMETER
|
||||
+ splitNodeIdentifier[startIndex];
|
||||
throw createCmisException(INVALID_OBJECT_IDENTIFIER_MESSAGE, EnumServiceException.OBJECT_NOT_FOUND);
|
||||
}
|
||||
return withoutVersionSuffix;
|
||||
|
||||
private Pair<String, String> splitOnNodeRefAndVersionLabel(String nodeIdentifier)
|
||||
{
|
||||
String versionLabel = null;
|
||||
int versionDelimeterIndex = nodeIdentifier.lastIndexOf(NODE_REFERENCE_ID_DELIMETER);
|
||||
if (versionDelimeterIndex > 0)
|
||||
{
|
||||
versionLabel = nodeIdentifier.substring(versionDelimeterIndex + 1);
|
||||
if ((null != versionLabel) && !versionLabel.equals("") && VERSION_LABEL_MATCHING_COMPILED_PATTERN.matcher(versionLabel).matches())
|
||||
{
|
||||
nodeIdentifier = nodeIdentifier.substring(0, versionDelimeterIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
versionLabel = null;
|
||||
}
|
||||
}
|
||||
|
||||
return new Pair<String, String>(nodeIdentifier, versionLabel);
|
||||
}
|
||||
|
||||
private NodeRef getNodeRefFromVersion(NodeRef nodeRef, String versionLabel) throws CmisException
|
||||
{
|
||||
NodeRef result = nodeRef;
|
||||
|
||||
NodeRef latestNodeRef = ((null != versionLabel) && (null != nodeRef)) ? (getLatestNode(nodeRef, false)) : (null);
|
||||
if ((null != latestNodeRef) && !versionLabel.equals(nodeService.getProperty(latestNodeRef, ContentModel.PROP_VERSION_LABEL)))
|
||||
{
|
||||
VersionHistory versionHistory = versionService.getVersionHistory(latestNodeRef);
|
||||
if (null != versionHistory)
|
||||
{
|
||||
Version version = versionHistory.getVersion(versionLabel);
|
||||
|
||||
if ((null == version) || (null == version.getFrozenStateNodeRef()))
|
||||
{
|
||||
throw createCmisException(("Specified object has no " + versionLabel + " version"), EnumServiceException.INVALID_ARGUMENT);
|
||||
}
|
||||
|
||||
result = version.getFrozenStateNodeRef();
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private AlfrescoObjectType determineActualObjectType(AlfrescoObjectType expectedType, QName objectType)
|
||||
@@ -425,33 +597,12 @@ public class CmisObjectsUtils
|
||||
return AlfrescoObjectType.ANY_OBJECT;
|
||||
}
|
||||
|
||||
private IdentifierConversionResults createAssociationIdentifierResult(final String identifier)
|
||||
private class MatcheAllQNames implements QNamePattern
|
||||
{
|
||||
return new IdentifierConversionResults()
|
||||
public boolean isMatch(QName qname)
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
public AssociationRef getConvertedIdentifier()
|
||||
{
|
||||
return new AssociationRef(identifier);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private IdentifierConversionResults createNodeReferenceIdentifierResult(final NodeRef identifier)
|
||||
{
|
||||
return new IdentifierConversionResults()
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
public NodeRef getConvertedIdentifier()
|
||||
{
|
||||
return identifier;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public interface IdentifierConversionResults
|
||||
{
|
||||
public <I> I getConvertedIdentifier();
|
||||
}
|
||||
|
||||
private class UnlinkOperationStatus
|
||||
|
853
source/java/org/alfresco/repo/cmis/ws/utils/PropertyUtil.java
Executable file
853
source/java/org/alfresco/repo/cmis/ws/utils/PropertyUtil.java
Executable file
@@ -0,0 +1,853 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
*/
|
||||
package org.alfresco.repo.cmis.ws.utils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.datatype.DatatypeConfigurationException;
|
||||
import javax.xml.datatype.DatatypeFactory;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
import org.alfresco.cmis.CMISDataTypeEnum;
|
||||
import org.alfresco.cmis.CMISDictionaryModel;
|
||||
import org.alfresco.cmis.CMISDictionaryService;
|
||||
import org.alfresco.cmis.CMISPropertyDefinition;
|
||||
import org.alfresco.cmis.CMISScope;
|
||||
import org.alfresco.cmis.CMISServices;
|
||||
import org.alfresco.cmis.CMISTypeDefinition;
|
||||
import org.alfresco.cmis.CMISUpdatabilityEnum;
|
||||
import org.alfresco.repo.cmis.PropertyFilter;
|
||||
import org.alfresco.repo.cmis.ws.CmisException;
|
||||
import org.alfresco.repo.cmis.ws.CmisPropertiesType;
|
||||
import org.alfresco.repo.cmis.ws.CmisProperty;
|
||||
import org.alfresco.repo.cmis.ws.CmisPropertyBoolean;
|
||||
import org.alfresco.repo.cmis.ws.CmisPropertyDateTime;
|
||||
import org.alfresco.repo.cmis.ws.CmisPropertyDecimal;
|
||||
import org.alfresco.repo.cmis.ws.CmisPropertyHtml;
|
||||
import org.alfresco.repo.cmis.ws.CmisPropertyId;
|
||||
import org.alfresco.repo.cmis.ws.CmisPropertyInteger;
|
||||
import org.alfresco.repo.cmis.ws.CmisPropertyString;
|
||||
import org.alfresco.repo.cmis.ws.CmisPropertyUri;
|
||||
import org.alfresco.repo.cmis.ws.CmisPropertyXml;
|
||||
import org.alfresco.repo.cmis.ws.EnumServiceException;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.TypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Class for managing access control to CMIS properties
|
||||
*
|
||||
* @author Dmitry Lazurkin
|
||||
* @author Dmitry Velichkevich
|
||||
*/
|
||||
public class PropertyUtil
|
||||
{
|
||||
private static final DatatypeFactory DATATYPE_FACTORY;
|
||||
static
|
||||
{
|
||||
try
|
||||
{
|
||||
DATATYPE_FACTORY = DatatypeFactory.newInstance();
|
||||
}
|
||||
catch (DatatypeConfigurationException e)
|
||||
{
|
||||
throw new RuntimeException(("Data type instance creation failed! Failed message: " + e.toString()), e);
|
||||
}
|
||||
}
|
||||
|
||||
private final static String NAMESPACE_BEGIN = "" + QName.NAMESPACE_BEGIN;
|
||||
|
||||
private static final String BASE_TYPE_PROPERTY_NAME = "BaseType";
|
||||
|
||||
private NodeService nodeService;
|
||||
private DictionaryService dictionaryService;
|
||||
private NamespaceService namespaceService;
|
||||
private CMISServices cmisService;
|
||||
private CMISDictionaryService cmisDictionaryService;
|
||||
private CmisObjectsUtils cmisObjectsUtils;
|
||||
|
||||
public PropertyUtil()
|
||||
{
|
||||
}
|
||||
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
public void setDictionaryService(DictionaryService dictionaryService)
|
||||
{
|
||||
this.dictionaryService = dictionaryService;
|
||||
}
|
||||
|
||||
public void setNamespaceService(NamespaceService namespaceService)
|
||||
{
|
||||
this.namespaceService = namespaceService;
|
||||
}
|
||||
|
||||
public void setCmisService(CMISServices cmisService)
|
||||
{
|
||||
this.cmisService = cmisService;
|
||||
}
|
||||
|
||||
public void setCmisDictionaryService(CMISDictionaryService cmisDictionaryService)
|
||||
{
|
||||
this.cmisDictionaryService = cmisDictionaryService;
|
||||
}
|
||||
|
||||
public void setCmisObjectsUtils(CmisObjectsUtils cmisObjectsUtils)
|
||||
{
|
||||
this.cmisObjectsUtils = cmisObjectsUtils;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return <b>String</b> value that contains standard not updatable properties filter token
|
||||
*/
|
||||
public String createStandardNotUpdatablePropertiesFilter()
|
||||
{
|
||||
StringBuilder filter = new StringBuilder(CMISDictionaryModel.PROP_OBJECT_ID);
|
||||
filter.append(PropertyFilter.PROPERTY_NAME_TOKENS_DELIMETER);
|
||||
filter.append(CMISDictionaryModel.PROP_OBJECT_TYPE_ID);
|
||||
filter.append(PropertyFilter.PROPERTY_NAME_TOKENS_DELIMETER);
|
||||
filter.append(CMISDictionaryModel.PROP_ALLOWED_CHILD_OBJECT_TYPE_IDS);
|
||||
filter.append(PropertyFilter.PROPERTY_NAME_TOKENS_DELIMETER);
|
||||
filter.append(CMISDictionaryModel.PROP_PARENT_ID);
|
||||
filter.append(PropertyFilter.PROPERTY_NAME_TOKENS_DELIMETER);
|
||||
filter.append(CMISDictionaryModel.PROP_VERSION_SERIES_CHECKED_OUT_ID);
|
||||
filter.append(PropertyFilter.PROPERTY_NAME_TOKENS_DELIMETER);
|
||||
filter.append(CMISDictionaryModel.PROP_VERSION_SERIES_ID);
|
||||
|
||||
return filter.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets property value by its name from Node Reference object
|
||||
*
|
||||
* @param objectNodeRef - <b>NodeRef</b> instance that represents Id of the source object
|
||||
* @param propertyName - <b>String</b> instance that represents property name
|
||||
* @param defaultValue - some value of the appropriate for conversion type. Also <b>null</b> may be accepted by this parameter
|
||||
* @return value instance of the appropriate type if specified object has such property and <i>defaultValue</i> if requested property value or <i>objectNodeRef</i> or
|
||||
* <i>propertyName</i> are <b>null</b> or if some exception occurred during property receiving
|
||||
*/
|
||||
public <ResultType> ResultType getProperty(NodeRef objectNodeRef, String propertyName, ResultType defaultValue)
|
||||
{
|
||||
if ((null == objectNodeRef) || (null == propertyName))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return convertPropertyValue(cmisService.getProperty(objectNodeRef, propertyName), defaultValue);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts from <b>CmisPropertiesType</b> instance property by its name and returns casted to appropriate type value of the extracted property
|
||||
*
|
||||
* @param cmisProperties - <b>CmisPropertiesType</b> properties instance
|
||||
* @param property - <b>String</b> instance that represents property name
|
||||
* @param defaultValue - some value of the appropriate for conversion type. Also <b>null</b> may be accepted by this parameter
|
||||
* @return value instance of the appropriate type if specified <i>cmisProperties</i> contains specified properties and <i>defaultValue</i> if requested property value or
|
||||
* <i>cmisProperties</i> or <i>property</i> are <b>null</b> or if some exception occurred during property searching and receiving
|
||||
*/
|
||||
public <ResultType> ResultType getCmisPropertyValue(CmisPropertiesType cmisProperties, String property, ResultType defaultValue)
|
||||
{
|
||||
if ((null == property) || (null == cmisProperties))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
for (CmisProperty cmisProperty : cmisProperties.getProperty())
|
||||
{
|
||||
if ((null != cmisProperty) && property.equals(cmisProperty.getName()))
|
||||
{
|
||||
return convertPropertyValue(getValue(cmisProperty), defaultValue);
|
||||
}
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private <ResultType> ResultType convertPropertyValue(Object propertyValue, ResultType defaultValue)
|
||||
{
|
||||
if (null == propertyValue)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return (ResultType) propertyValue;
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
private Object getValue(CmisProperty cmisProperty)
|
||||
{
|
||||
Object value = null;
|
||||
|
||||
if (cmisProperty instanceof CmisPropertyBoolean)
|
||||
{
|
||||
Collection<Boolean> convertedValue = ((CmisPropertyBoolean) cmisProperty).getValue();
|
||||
|
||||
if (null != convertedValue)
|
||||
{
|
||||
if (1 == convertedValue.size())
|
||||
{
|
||||
value = convertedValue.iterator().next();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (convertedValue.size() > 1)
|
||||
{
|
||||
value = convertedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyDateTime)
|
||||
{
|
||||
Collection<XMLGregorianCalendar> convertedValue = ((CmisPropertyDateTime) cmisProperty).getValue();
|
||||
|
||||
if (null != convertedValue)
|
||||
{
|
||||
if (1 == convertedValue.size())
|
||||
{
|
||||
value = convertedValue.iterator().next();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (convertedValue.size() > 1)
|
||||
{
|
||||
value = convertedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyDecimal)
|
||||
{
|
||||
Collection<BigDecimal> convertedValue = ((CmisPropertyDecimal) cmisProperty).getValue();
|
||||
|
||||
if (null != convertedValue)
|
||||
{
|
||||
if (1 == convertedValue.size())
|
||||
{
|
||||
value = convertedValue.iterator().next();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (convertedValue.size() > 1)
|
||||
{
|
||||
value = convertedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyHtml)
|
||||
{
|
||||
Collection<CmisPropertyHtml.Value> convertedValue = ((CmisPropertyHtml) cmisProperty).getValue();
|
||||
|
||||
if (null != convertedValue)
|
||||
{
|
||||
if (1 == convertedValue.size())
|
||||
{
|
||||
value = convertedValue.iterator().next();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (convertedValue.size() > 1)
|
||||
{
|
||||
value = convertedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyId)
|
||||
{
|
||||
Collection<String> convertedValue = ((CmisPropertyId) cmisProperty).getValue();
|
||||
|
||||
if (null != convertedValue)
|
||||
{
|
||||
if (1 == convertedValue.size())
|
||||
{
|
||||
value = convertedValue.iterator().next();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (convertedValue.size() > 1)
|
||||
{
|
||||
value = convertedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyInteger)
|
||||
{
|
||||
Collection<BigInteger> convertedValue = ((CmisPropertyInteger) cmisProperty).getValue();
|
||||
|
||||
if (null != convertedValue)
|
||||
{
|
||||
if (1 == convertedValue.size())
|
||||
{
|
||||
value = convertedValue.iterator().next();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (convertedValue.size() > 1)
|
||||
{
|
||||
value = convertedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyString)
|
||||
{
|
||||
Collection<String> convertedValue = ((CmisPropertyString) cmisProperty).getValue();
|
||||
|
||||
if (null != convertedValue)
|
||||
{
|
||||
if (1 == convertedValue.size())
|
||||
{
|
||||
value = convertedValue.iterator().next();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (convertedValue.size() > 1)
|
||||
{
|
||||
value = convertedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyUri)
|
||||
{
|
||||
Collection<String> convertedValue = ((CmisPropertyUri) cmisProperty).getValue();
|
||||
|
||||
if (null != convertedValue)
|
||||
{
|
||||
if (1 == convertedValue.size())
|
||||
{
|
||||
value = convertedValue.iterator().next();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (convertedValue.size() > 1)
|
||||
{
|
||||
value = convertedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cmisProperty instanceof CmisPropertyXml)
|
||||
{
|
||||
Collection<CmisPropertyXml.Value> convertedValue = ((CmisPropertyXml) cmisProperty).getValue();
|
||||
|
||||
if (null != convertedValue)
|
||||
{
|
||||
if (1 == convertedValue.size())
|
||||
{
|
||||
value = convertedValue.iterator().next();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (convertedValue.size() > 1)
|
||||
{
|
||||
value = convertedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts <b>CmisPropertiesType</b> properties representation to rapidly accessible form
|
||||
*
|
||||
* @param cmisProperties - <b>CmisPropertiesType</b> properties representation
|
||||
* @return <b>Map</b><<b>String</b>, <b>Serializable</b>> properties representation
|
||||
* @throws <b>CmisException</b>
|
||||
*/
|
||||
public Map<String, Object> getPropertiesMap(CmisPropertiesType cmisProperties) throws CmisException
|
||||
{
|
||||
Map<String, Object> properties = new HashMap<String, Object>();
|
||||
|
||||
if (null == cmisProperties)
|
||||
{
|
||||
return properties;
|
||||
}
|
||||
|
||||
for (CmisProperty cmisProperty : cmisProperties.getProperty())
|
||||
{
|
||||
if (null != cmisProperty)
|
||||
{
|
||||
String name = cmisProperty.getName();
|
||||
properties.put(name, getValue(cmisProperty));
|
||||
}
|
||||
}
|
||||
|
||||
return properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets and checks all properties' fields for specified node
|
||||
*
|
||||
* @param nodeRef - <b>NodeRef</b> for node for those properties must be setted
|
||||
* @param properties - <b>CmisPropertiesType</b> instance that contains all the necessary properties' fields
|
||||
* @param updateOptional - <b>boolean</b> value. If <b>true</b> - optionally updatable properties will be updated and will be ignored in other case
|
||||
*/
|
||||
public void setProperties(NodeRef nodeRef, CmisPropertiesType properties, PropertyFilter notUpdatablePropertiesFilter) throws CmisException
|
||||
{
|
||||
// TODO: WARINING!!! This is WRONG behavior!!! Each CMIS object type and each property MUST be described in appropriate CMIS manner
|
||||
if ((null == nodeRef) || (null == properties) || (null == properties.getProperty()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String typeId = getProperty(nodeRef, CMISDictionaryModel.PROP_OBJECT_TYPE_ID, null);
|
||||
boolean checkedOut = getProperty(nodeRef, CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT, false);
|
||||
CMISTypeDefinition cmisObjectType = cmisDictionaryService.findType(typeId);
|
||||
|
||||
TypeDefinition nativeObjectType = dictionaryService.getType(nodeService.getType(nodeRef));
|
||||
|
||||
if ((null == cmisObjectType) && (null == nativeObjectType))
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException(("Can't find type definition for current object with \"" + typeId + "\" type Id"), EnumServiceException.INVALID_ARGUMENT);
|
||||
}
|
||||
|
||||
for (CmisProperty property : properties.getProperty())
|
||||
{
|
||||
String propertyName = (null != property) ? (property.getName()) : (null);
|
||||
if ((null != propertyName) && !notUpdatablePropertiesFilter.allow(propertyName))
|
||||
{
|
||||
Object value = getValue(property);
|
||||
QName alfrescoPropertyName = null;
|
||||
switch (checkProperty(nativeObjectType, cmisObjectType, propertyName, value, checkedOut))
|
||||
{
|
||||
case PROPERTY_CHECKED:
|
||||
{
|
||||
alfrescoPropertyName = cmisDictionaryService.findProperty(propertyName, cmisObjectType).getPropertyAccessor().getMappedProperty();
|
||||
break;
|
||||
}
|
||||
case PROPERTY_NATIVE:
|
||||
{
|
||||
alfrescoPropertyName = createQName(propertyName);
|
||||
break;
|
||||
}
|
||||
case PROPERTY_NOT_UPDATABLE:
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
nodeService.setProperty(nodeRef, alfrescoPropertyName, (Serializable) value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private QName createQName(String s)
|
||||
{
|
||||
QName qname;
|
||||
if (s.indexOf(NAMESPACE_BEGIN) != -1)
|
||||
{
|
||||
qname = QName.createQName(s);
|
||||
}
|
||||
else
|
||||
{
|
||||
qname = QName.createQName(s, namespaceService);
|
||||
}
|
||||
return qname;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks any CMIS property on constraints conforming
|
||||
*
|
||||
* @param type - <b>CMISTypeDefinition</b> instance. This value must not be <b>null</b>
|
||||
* @param propertyName - <b>String</b> instance that represents name of the property
|
||||
* @param value - instance of a <b>Serializable</b> object that represents value of the property
|
||||
* @return <b>true</b> if property was checked and <b>false</b> if property can't be checked
|
||||
* @throws <b>CmisException</b> if some constraint is not satisfied
|
||||
*/
|
||||
public PropertyCheckingStateEnum checkProperty(TypeDefinition nativeObjectType, CMISTypeDefinition cmisObjectType, String propertyName, Object value, boolean checkedOut)
|
||||
throws CmisException
|
||||
{
|
||||
CMISPropertyDefinition propertyDefinition = cmisDictionaryService.findProperty(propertyName, cmisObjectType);
|
||||
|
||||
if ((null == propertyDefinition) || ((null != propertyDefinition) && (null == propertyDefinition.getPropertyAccessor().getMappedProperty())))
|
||||
{
|
||||
// TODO: WARINING!!! This is WRONG behavior!!! Each CMIS object type and each property MUST be described in appropriate CMIS manner
|
||||
QName qualifiedName = createQName(propertyName);
|
||||
Map<QName, PropertyDefinition> properties = (null != nativeObjectType) ? (nativeObjectType.getProperties()) : (null);
|
||||
if ((null == qualifiedName) || (null == properties) || properties.containsKey(qualifiedName))
|
||||
{
|
||||
return PropertyCheckingStateEnum.PROPERTY_NOT_UPDATABLE;
|
||||
}
|
||||
return PropertyCheckingStateEnum.PROPERTY_NATIVE;
|
||||
}
|
||||
|
||||
boolean updatable = ((checkedOut) ? (CMISUpdatabilityEnum.READ_AND_WRITE_WHEN_CHECKED_OUT == propertyDefinition.getUpdatability())
|
||||
: (CMISUpdatabilityEnum.READ_AND_WRITE == propertyDefinition.getUpdatability()));
|
||||
|
||||
if (updatable && propertyDefinition.isRequired() && (value == null))
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException((propertyName + " property required"), EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
|
||||
switch (propertyDefinition.getDataType())
|
||||
{
|
||||
case STRING:
|
||||
{
|
||||
checkStringProperty(propertyDefinition, propertyName, (String) value);
|
||||
break;
|
||||
}
|
||||
case INTEGER:
|
||||
case DECIMAL:
|
||||
{
|
||||
checkNumberProperty(propertyDefinition, propertyName, (Number) value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return PropertyCheckingStateEnum.PROPERTY_CHECKED;
|
||||
}
|
||||
|
||||
private enum PropertyCheckingStateEnum
|
||||
{
|
||||
PROPERTY_CHECKED, PROPERTY_NATIVE, PROPERTY_NOT_UPDATABLE;
|
||||
}
|
||||
|
||||
private void checkNumberProperty(CMISPropertyDefinition propertyDefinition, String propertyName, Number value)
|
||||
{
|
||||
// TODO: if max and min value properties will be added to CMISPropertyDefinition
|
||||
}
|
||||
|
||||
private void checkStringProperty(CMISPropertyDefinition propertyDefinition, String propertyName, String value) throws CmisException
|
||||
{
|
||||
if (value != null && (propertyDefinition.getMaximumLength() > 0) && (value.length() > propertyDefinition.getMaximumLength()))
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException((propertyName + " property value is too long"), EnumServiceException.CONSTRAINT);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get CMIS properties for object
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param filter property filter
|
||||
* @return properties
|
||||
*/
|
||||
public CmisPropertiesType getPropertiesType(String identifier, PropertyFilter filter) throws CmisException
|
||||
{
|
||||
Map<String, Serializable> properties;
|
||||
if (NodeRef.isNodeRef(identifier))
|
||||
{
|
||||
properties = cmisService.getProperties(new NodeRef(identifier));
|
||||
}
|
||||
else
|
||||
{
|
||||
properties = createBaseRelationshipProperties(new AssociationRef(identifier));
|
||||
}
|
||||
|
||||
CmisPropertiesType result = new CmisPropertiesType();
|
||||
convertToCmisProperties(properties, filter, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
private Map<String, Serializable> createBaseRelationshipProperties(AssociationRef association)
|
||||
{
|
||||
Map<String, Serializable> result = new HashMap<String, Serializable>();
|
||||
result.put(CMISDictionaryModel.PROP_OBJECT_TYPE_ID, cmisDictionaryService.findTypeForClass(association.getTypeQName(), CMISScope.RELATIONSHIP).getTypeId());
|
||||
result.put(CMISDictionaryModel.PROP_OBJECT_ID, association.toString());
|
||||
result.put(BASE_TYPE_PROPERTY_NAME, CMISDictionaryModel.RELATIONSHIP_TYPE_ID.getId());
|
||||
result.put(CMISDictionaryModel.PROP_CREATED_BY, AuthenticationUtil.getFullyAuthenticatedUser());
|
||||
result.put(CMISDictionaryModel.PROP_CREATION_DATE, new Date());
|
||||
result.put(CMISDictionaryModel.PROP_SOURCE_ID, association.getSourceRef());
|
||||
result.put(CMISDictionaryModel.PROP_TARGET_ID, association.getTargetRef());
|
||||
return result;
|
||||
}
|
||||
|
||||
private void convertToCmisProperties(Map<String, Serializable> properties, PropertyFilter filter, CmisPropertiesType cmisProperties) throws CmisException
|
||||
{
|
||||
String typeId = (String) properties.get(CMISDictionaryModel.PROP_OBJECT_TYPE_ID);
|
||||
CMISTypeDefinition type = cmisDictionaryService.findType(typeId);
|
||||
|
||||
if (null == type)
|
||||
{
|
||||
throw cmisObjectsUtils.createCmisException(("Type with " + typeId + " typeId was not found"), EnumServiceException.RUNTIME);
|
||||
}
|
||||
|
||||
for (String propertyName : properties.keySet())
|
||||
{
|
||||
CMISPropertyDefinition propertyTypeDef = cmisDictionaryService.findProperty(propertyName, type);
|
||||
if ((null != propertyTypeDef) && filter.allow(propertyName))
|
||||
{
|
||||
CmisProperty property = createProperty(propertyName, propertyTypeDef.getDataType(), properties.get(propertyName));
|
||||
|
||||
if (null != property)
|
||||
{
|
||||
cmisProperties.getProperty().add(property);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and initializes appropriate <b>CmisProperty</b> instance by name and data type
|
||||
*
|
||||
* @param name - <b>String</b> value that represents CMIS property name
|
||||
* @param dataType - <b>CMISDataTypeEnum</b> value that specifies real type of the property
|
||||
* @param value - some instance of appropriate type or some <b>Collection</b> that contains several values of the type
|
||||
* @return appropriate <b>CmisProperty</b> instance
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public CmisProperty createProperty(String name, CMISDataTypeEnum dataType, Serializable value)
|
||||
{
|
||||
switch (dataType)
|
||||
{
|
||||
case BOOLEAN:
|
||||
{
|
||||
CmisPropertyBoolean property = new CmisPropertyBoolean();
|
||||
property.setName(name);
|
||||
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (Boolean propertyValue : (Collection<Boolean>) value)
|
||||
{
|
||||
property.getValue().add(propertyValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
property.getValue().add((Boolean) value);
|
||||
}
|
||||
|
||||
return property;
|
||||
}
|
||||
case STRING:
|
||||
{
|
||||
CmisPropertyString property = new CmisPropertyString();
|
||||
property.setName(name);
|
||||
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (String propertyValue : (Collection<String>) value)
|
||||
{
|
||||
property.getValue().add(propertyValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
property.getValue().add((String) value);
|
||||
}
|
||||
|
||||
return property;
|
||||
}
|
||||
case INTEGER:
|
||||
{
|
||||
CmisPropertyInteger property = new CmisPropertyInteger();
|
||||
property.setName(name);
|
||||
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (Object propertyValue : (Collection<Object>) value)
|
||||
{
|
||||
property.getValue().add(BigInteger.valueOf((Long) propertyValue));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
property.getValue().add(BigInteger.valueOf((Long) value));
|
||||
}
|
||||
|
||||
return property;
|
||||
}
|
||||
case DATETIME:
|
||||
{
|
||||
CmisPropertyDateTime property = new CmisPropertyDateTime();
|
||||
property.setName(name);
|
||||
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (Date propertyValue : (Collection<Date>) value)
|
||||
{
|
||||
XMLGregorianCalendar convertedValue = convert(propertyValue);
|
||||
if (null != convertedValue)
|
||||
{
|
||||
property.getValue().add(convertedValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
XMLGregorianCalendar convertedValue = convert((Date) value);
|
||||
if (null != convertedValue)
|
||||
{
|
||||
property.getValue().add(convert((Date) value));
|
||||
}
|
||||
}
|
||||
|
||||
return property;
|
||||
}
|
||||
case ID:
|
||||
{
|
||||
CmisPropertyId property = new CmisPropertyId();
|
||||
property.setName(name);
|
||||
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (String propertyValue : (Collection<String>) value)
|
||||
{
|
||||
property.getValue().add(propertyValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
property.getValue().add((String) value);
|
||||
}
|
||||
|
||||
return property;
|
||||
}
|
||||
case URI:
|
||||
{
|
||||
CmisPropertyUri property = new CmisPropertyUri();
|
||||
property.setName(name);
|
||||
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (String propertyValue : (Collection<String>) value)
|
||||
{
|
||||
property.getValue().add(propertyValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
property.getValue().add((String) value);
|
||||
}
|
||||
|
||||
return property;
|
||||
}
|
||||
case DECIMAL:
|
||||
{
|
||||
CmisPropertyDecimal property = new CmisPropertyDecimal();
|
||||
property.setName(name);
|
||||
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (BigDecimal propertyValue : (Collection<BigDecimal>) value)
|
||||
{
|
||||
property.getValue().add(propertyValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
property.getValue().add(BigDecimal.valueOf((Double) value));
|
||||
}
|
||||
|
||||
return property;
|
||||
}
|
||||
case XML:
|
||||
{
|
||||
CmisPropertyXml property = new CmisPropertyXml();
|
||||
property.setName(name);
|
||||
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (CmisPropertyXml.Value propertyValue : (Collection<CmisPropertyXml.Value>) value)
|
||||
{
|
||||
property.getValue().add(propertyValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
property.getValue().add((CmisPropertyXml.Value) value);
|
||||
}
|
||||
|
||||
return property;
|
||||
}
|
||||
case HTML:
|
||||
{
|
||||
CmisPropertyHtml property = new CmisPropertyHtml();
|
||||
property.setName(name);
|
||||
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (CmisPropertyHtml.Value propertyValue : (Collection<CmisPropertyHtml.Value>) value)
|
||||
{
|
||||
property.getValue().add(propertyValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
property.getValue().add((CmisPropertyHtml.Value) value);
|
||||
}
|
||||
|
||||
return property;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts Date object to XMLGregorianCalendar object
|
||||
*
|
||||
* @param date Date object
|
||||
* @return XMLGregorianCalendar object
|
||||
*/
|
||||
public XMLGregorianCalendar convert(Date date)
|
||||
{
|
||||
if (null != date)
|
||||
{
|
||||
GregorianCalendar calendar = new GregorianCalendar();
|
||||
calendar.setTime(date);
|
||||
return DATATYPE_FACTORY.newXMLGregorianCalendar(calendar);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
87
source/test-resources/cmis/cmis-api-context.xml
Executable file
87
source/test-resources/cmis/cmis-api-context.xml
Executable file
@@ -0,0 +1,87 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||
|
||||
<beans>
|
||||
|
||||
<bean id="CMISMapping" class="org.alfresco.cmis.mapping.CMISMapping" >
|
||||
<property name="serviceRegistry">
|
||||
<ref bean="ServiceRegistry" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="CMISService" class="org.alfresco.cmis.mapping.CMISServicesImpl">
|
||||
<property name="CMISSpecVersion"><value>0.61</value></property>
|
||||
<property name="defaultRootPath"><value>workspace/SpacesStore/Company Home</value></property>
|
||||
<property name="dictionaryService" ref="dictionaryService" />
|
||||
<property name="CMISDictionaryService" ref="CMISDictionaryService" />
|
||||
<property name="searchService" ref="SearchService" />
|
||||
<property name="transactionHelper" ref="retryingTransactionHelper" />
|
||||
<property name="tenantAdminService" ref="tenantAdminService" />
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
<property name="repository" ref="repositoryHelper" />
|
||||
</bean>
|
||||
|
||||
<bean id="CMISDictionaryService" class="org.alfresco.cmis.dictionary.CMISStrictDictionaryService" >
|
||||
<property name="dictionaryService">
|
||||
<ref bean="dictionaryService" />
|
||||
</property>
|
||||
<property name="dictionaryDAO">
|
||||
<ref bean="dictionaryDAO" />
|
||||
</property>
|
||||
<property name="CMISMapping">
|
||||
<ref bean="CMISMapping" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="CMIS.DictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
|
||||
<property name="models">
|
||||
<list>
|
||||
<value>alfresco/model/cmisModel.xml</value>
|
||||
<value>alfresco/cmisCustomModel.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="CMISQueryService" class="org.alfresco.cmis.search.CMISQueryServiceImpl" >
|
||||
<property name="CMISDictionaryService">
|
||||
<ref bean="CMISDictionaryService" />
|
||||
</property>
|
||||
<property name="CMISService">
|
||||
<ref bean="CMISService" />
|
||||
</property>
|
||||
<property name="queryEngine">
|
||||
<ref bean="adm.luceneQueryEngine" />
|
||||
</property>
|
||||
<property name="nodeService">
|
||||
<ref bean="nodeService" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="adm.luceneQueryEngine" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
<property name="proxyInterfaces">
|
||||
<value>org.alfresco.repo.search.impl.querymodel.QueryEngine</value>
|
||||
</property>
|
||||
<property name="target">
|
||||
<ref bean="adm.luceneQueryEngineImpl"/>
|
||||
</property>
|
||||
<property name="interceptorNames">
|
||||
<list>
|
||||
<idref bean="adm.luceneQueryEngineSecurity"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="adm.luceneQueryEngineSecurity" class="net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
|
||||
<property name="authenticationManager"><ref bean="authenticationManager"/></property>
|
||||
<property name="accessDecisionManager"><ref bean="accessDecisionManager"/></property>
|
||||
<property name="afterInvocationManager"><ref bean="afterInvocationManager"/></property>
|
||||
<property name="objectDefinitionSource">
|
||||
<value>
|
||||
org.alfresco.repo.search.impl.querymodel.QueryEngine.executeQuery=AFTER_ACL_NODE.sys:base.Read
|
||||
org.alfresco.repo.search.impl.querymodel.QueryEngine.getQueryModelFactory=ACL_ALLOW
|
||||
</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
@@ -29,6 +29,7 @@ import java.util.List;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.alfresco.cmis.CMISDictionaryModel;
|
||||
import org.alfresco.repo.cmis.ws.utils.PropertyUtil;
|
||||
|
||||
/**
|
||||
* @author Michael Shavnev
|
||||
@@ -52,6 +53,7 @@ public abstract class AbstractServiceTest extends TestCase
|
||||
|
||||
protected Object servicePort = null;
|
||||
protected CmisServiceTestHelper helper;
|
||||
protected PropertyUtil propertiesUtil = new PropertyUtil();
|
||||
|
||||
private static boolean testAsUser = false;
|
||||
|
||||
@@ -109,7 +111,7 @@ public abstract class AbstractServiceTest extends TestCase
|
||||
{
|
||||
CmisObjectType object = response.getObject();
|
||||
CmisPropertiesType properties = object.getProperties();
|
||||
property = (String) PropertyUtil.getProperty(properties, CMISDictionaryModel.PROP_NAME);
|
||||
property = (String) propertiesUtil.getCmisPropertyValue(properties, CMISDictionaryModel.PROP_NAME, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -126,9 +128,9 @@ public abstract class AbstractServiceTest extends TestCase
|
||||
{
|
||||
CmisObjectType object = response.getObject();
|
||||
CmisPropertiesType properties = object.getProperties();
|
||||
if (PropertyUtil.getProperty(properties, propertyName) != null)
|
||||
if (propertiesUtil.getCmisPropertyValue(properties, propertyName, null) != null)
|
||||
{
|
||||
property = (String) PropertyUtil.getProperty(properties, propertyName);
|
||||
property = (String) propertiesUtil.getCmisPropertyValue(properties, propertyName, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -146,9 +148,9 @@ public abstract class AbstractServiceTest extends TestCase
|
||||
{
|
||||
CmisObjectType object = response.getObject();
|
||||
CmisPropertiesType properties = object.getProperties();
|
||||
if (PropertyUtil.getProperty(properties, propertyName) != null)
|
||||
if (propertiesUtil.getCmisPropertyValue(properties, propertyName, null) != null)
|
||||
{
|
||||
property = (Boolean) PropertyUtil.getProperty(properties, propertyName);
|
||||
property = (Boolean) propertiesUtil.getCmisPropertyValue(properties, propertyName, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -166,7 +168,7 @@ public abstract class AbstractServiceTest extends TestCase
|
||||
{
|
||||
CmisObjectType object = response.getObject();
|
||||
CmisPropertiesType properties = object.getProperties();
|
||||
property = (String) PropertyUtil.getProperty(properties, CMISDictionaryModel.PROP_OBJECT_ID);
|
||||
property = (String) propertiesUtil.getCmisPropertyValue(properties, CMISDictionaryModel.PROP_OBJECT_ID, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -180,7 +182,7 @@ public abstract class AbstractServiceTest extends TestCase
|
||||
for (CmisObjectType object : objects)
|
||||
{
|
||||
CmisPropertiesType properties = object.getProperties();
|
||||
String name = (String) PropertyUtil.getProperty(properties, CMISDictionaryModel.PROP_NAME);
|
||||
String name = (String) propertiesUtil.getCmisPropertyValue(properties, CMISDictionaryModel.PROP_NAME, null);
|
||||
assertNotNull(name);
|
||||
}
|
||||
|
||||
@@ -192,7 +194,7 @@ public abstract class AbstractServiceTest extends TestCase
|
||||
for (CmisObjectType object : objects)
|
||||
{
|
||||
CmisPropertiesType properties = object.getProperties();
|
||||
String property = (String) PropertyUtil.getProperty(properties, propertyName);
|
||||
String property = (String) propertiesUtil.getCmisPropertyValue(properties, propertyName, null);
|
||||
if (property.equals(propertyValue))
|
||||
{
|
||||
isFound = true;
|
||||
|
341
source/test/java/org/alfresco/repo/cmis/ws/CMISCustomTypeTest.java
Executable file
341
source/test/java/org/alfresco/repo/cmis/ws/CMISCustomTypeTest.java
Executable file
@@ -0,0 +1,341 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
*/
|
||||
package org.alfresco.repo.cmis.ws;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import javax.activation.DataHandler;
|
||||
import javax.xml.ws.Holder;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.security.AuthenticationService;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
public class CMISCustomTypeTest extends TestCase
|
||||
{
|
||||
private static final String USERNAME = "admin";
|
||||
private static final String PASSWORD = "admin";
|
||||
|
||||
private static ApplicationContext applicationContext;
|
||||
private static AuthenticationService authenticationService;
|
||||
|
||||
private static String folderId;
|
||||
private static String repositoryId;
|
||||
private static RepositoryServicePort repositoryServicePort;
|
||||
private static ObjectServicePort objectServicePort;
|
||||
private static DiscoveryServicePort discoveryServicePort;
|
||||
private static NavigationServicePort navigationServicePort;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception
|
||||
{
|
||||
if (null == applicationContext)
|
||||
{
|
||||
applicationContext = new ClassPathXmlApplicationContext(new String[] {"classpath:alfresco/application-context.xml", "classpath:alfresco/cmis-ws-context.xml", "classpath:cmis/cmis-test-context.xml"});
|
||||
ServiceRegistry serviceRegistry = (ServiceRegistry) applicationContext.getBean(ServiceRegistry.SERVICE_REGISTRY);
|
||||
authenticationService = serviceRegistry.getAuthenticationService();
|
||||
}
|
||||
|
||||
authenticationService.authenticate(USERNAME, PASSWORD.toCharArray());
|
||||
|
||||
if (repositoryServicePort == null)
|
||||
{
|
||||
repositoryServicePort = (RepositoryServicePort) applicationContext.getBean("dmRepositoryService");
|
||||
}
|
||||
if (objectServicePort == null)
|
||||
{
|
||||
objectServicePort = (ObjectServicePort) applicationContext.getBean("dmObjectService");
|
||||
}
|
||||
if (navigationServicePort == null)
|
||||
{
|
||||
navigationServicePort = (NavigationServicePort) applicationContext.getBean("dmNavigationService");
|
||||
}
|
||||
if (discoveryServicePort == null)
|
||||
{
|
||||
discoveryServicePort = (DiscoveryServicePort) applicationContext.getBean("dmDiscoveryService");
|
||||
}
|
||||
repositoryId = repositoryId == null ? repositoryServicePort.getRepositories().get(0).getRepositoryId() : repositoryId;
|
||||
if (folderId == null)
|
||||
{
|
||||
String rootFolderId = repositoryServicePort.getRepositoryInfo(repositoryId).getRootFolderId();
|
||||
GetChildren getChildren = new GetChildren();
|
||||
getChildren.setRepositoryId(repositoryId);
|
||||
getChildren.setFolderId(rootFolderId);
|
||||
GetChildrenResponse response = navigationServicePort.getChildren(getChildren);
|
||||
assertNotNull(response);
|
||||
assertNotNull(response.getObject());
|
||||
for (CmisObjectType cmisObjectType : response.getObject())
|
||||
{
|
||||
CmisPropertyString propertyString = (CmisPropertyString) getCmisProperty(cmisObjectType.getProperties(), "Name");
|
||||
if (propertyString != null && propertyString.getValue() != null && propertyString.getValue().size() > 0 && "CMIS Tests".equals(propertyString.getValue().get(0)))
|
||||
{
|
||||
folderId = ((CmisPropertyId) getCmisProperty(cmisObjectType.getProperties(), "ObjectId")).getValue().get(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (folderId == null)
|
||||
{
|
||||
folderId = createTestFolder(repositoryId, "CMIS Tests", rootFolderId, false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception
|
||||
{
|
||||
authenticationService.clearCurrentSecurityContext();
|
||||
}
|
||||
|
||||
public void testCreateFolder() throws Exception
|
||||
{
|
||||
String folderId1 = createTestFolder(repositoryId, "testCreateCustomFolder" + System.currentTimeMillis(), folderId, true);
|
||||
assertNotNull(folderId1);
|
||||
|
||||
GetProperties getProperties = new GetProperties();
|
||||
getProperties.setRepositoryId(repositoryId);
|
||||
getProperties.setObjectId(folderId1);
|
||||
GetPropertiesResponse propertiesResponse = objectServicePort.getProperties(getProperties);
|
||||
assertNotNull(propertiesResponse);
|
||||
CmisPropertyId objectTypeId = (CmisPropertyId) getCmisProperty(propertiesResponse.getObject().getProperties(), "ObjectTypeId");
|
||||
assertTrue(objectTypeId != null && objectTypeId.getValue() != null && objectTypeId.getValue().size() == 1 && "F/cmiscustom_folder".equals(objectTypeId.getValue().get(0)));
|
||||
CmisPropertyString customProp = (CmisPropertyString) getCmisProperty(propertiesResponse.getObject().getProperties(), "cmiscustom_folderprop_string");
|
||||
assertTrue(customProp != null && customProp.getValue() != null && customProp.getValue().size() == 1 && "custom string".equals(customProp.getValue().get(0)));
|
||||
}
|
||||
|
||||
public void testCreateDocument() throws Exception
|
||||
{
|
||||
String documentId = createTestDocument(repositoryId, "testCreateCustomDocument" + System.currentTimeMillis(), folderId, true);
|
||||
assertNotNull(documentId);
|
||||
|
||||
GetProperties getProperties = new GetProperties();
|
||||
getProperties.setRepositoryId(repositoryId);
|
||||
getProperties.setObjectId(documentId);
|
||||
GetPropertiesResponse propertiesResponse = objectServicePort.getProperties(getProperties);
|
||||
assertNotNull(propertiesResponse);
|
||||
|
||||
CmisPropertyId objectTypeId = (CmisPropertyId) getCmisProperty(propertiesResponse.getObject().getProperties(), "ObjectTypeId");
|
||||
assertTrue(objectTypeId != null && objectTypeId.getValue() != null && objectTypeId.getValue().size() == 1 && "D/cmiscustom_document".equals(objectTypeId.getValue().get(0)));
|
||||
CmisPropertyString customProp = (CmisPropertyString) getCmisProperty(propertiesResponse.getObject().getProperties(), "cmiscustom_docprop_string");
|
||||
assertTrue(customProp != null && customProp.getValue() != null && customProp.getValue().size() == 1 && "custom string".equals(customProp.getValue().get(0)));
|
||||
|
||||
CmisPropertyBoolean propertyMulti = (CmisPropertyBoolean) getCmisProperty(propertiesResponse.getObject().getProperties(), "cmiscustom_docprop_boolean_multi");
|
||||
assertTrue(propertyMulti != null && propertyMulti.getValue() != null && propertyMulti.getValue().size() == 2 && propertyMulti.getValue().get(0) && !propertyMulti.getValue().get(1));
|
||||
}
|
||||
|
||||
public void testUpdate() throws Exception
|
||||
{
|
||||
String documentId = createTestDocument(repositoryId, "testUpdateCustomDocument" + System.currentTimeMillis(), folderId, true);
|
||||
assertNotNull(documentId);
|
||||
|
||||
Holder<String> holder = new Holder<String>(documentId);
|
||||
CmisPropertiesType properties = new CmisPropertiesType();
|
||||
String newName = "Updated Title " + System.currentTimeMillis();
|
||||
String customProp = "custom " + System.currentTimeMillis();
|
||||
CmisPropertyString cmisPropertyString = new CmisPropertyString();
|
||||
cmisPropertyString.setName("Name");
|
||||
cmisPropertyString.getValue().add(newName);
|
||||
properties.getProperty().add(cmisPropertyString);
|
||||
cmisPropertyString = new CmisPropertyString();
|
||||
cmisPropertyString.setName("cmiscustom_docprop_string");
|
||||
cmisPropertyString.getValue().add(customProp);
|
||||
properties.getProperty().add(cmisPropertyString);
|
||||
CmisPropertyBoolean cmisPropertymulti = new CmisPropertyBoolean();
|
||||
cmisPropertymulti.setName("cmiscustom_docprop_boolean_multi");
|
||||
cmisPropertymulti.getValue().add(false);
|
||||
cmisPropertymulti.getValue().add(true);
|
||||
properties.getProperty().add(cmisPropertymulti);
|
||||
objectServicePort.updateProperties(repositoryId, holder, null, properties);
|
||||
|
||||
GetProperties getProperties = new GetProperties();
|
||||
getProperties.setRepositoryId(repositoryId);
|
||||
getProperties.setObjectId(documentId);
|
||||
GetPropertiesResponse propertiesResponse = objectServicePort.getProperties(getProperties);
|
||||
assertNotNull(propertiesResponse);
|
||||
|
||||
CmisPropertyId objectTypeId = (CmisPropertyId) getCmisProperty(propertiesResponse.getObject().getProperties(), "ObjectTypeId");
|
||||
assertTrue(objectTypeId != null && objectTypeId.getValue() != null && objectTypeId.getValue().size() == 1 && "D/cmiscustom_document".equals(objectTypeId.getValue().get(0)));
|
||||
CmisPropertyString propertyString = (CmisPropertyString) getCmisProperty(propertiesResponse.getObject().getProperties(), "Name");
|
||||
assertTrue(propertyString != null && propertyString.getValue() != null && propertyString.getValue().size() == 1 && newName.equals(propertyString.getValue().get(0)));
|
||||
propertyString = (CmisPropertyString) getCmisProperty(propertiesResponse.getObject().getProperties(), "cmiscustom_docprop_string");
|
||||
assertTrue(propertyString != null && propertyString.getValue() != null && propertyString.getValue().size() == 1 && customProp.equals(propertyString.getValue().get(0)));
|
||||
CmisPropertyBoolean propertyMulti = (CmisPropertyBoolean) getCmisProperty(propertiesResponse.getObject().getProperties(), "cmiscustom_docprop_boolean_multi");
|
||||
assertTrue(propertyMulti != null && propertyMulti.getValue() != null && propertyMulti.getValue().size() == 2 && !propertyMulti.getValue().get(0) && propertyMulti.getValue().get(1));
|
||||
}
|
||||
|
||||
public void testDelete() throws Exception
|
||||
{
|
||||
String documentId = createTestDocument(repositoryId, "testDeleteCustomDocument" + System.currentTimeMillis(), folderId, true);
|
||||
assertNotNull(documentId);
|
||||
|
||||
assertTrue(isObjectInFolder(repositoryId, documentId, folderId));
|
||||
|
||||
objectServicePort.deleteObject(repositoryId, documentId);
|
||||
|
||||
assertFalse(isObjectInFolder(repositoryId, documentId, folderId));
|
||||
}
|
||||
|
||||
public void testQuery() throws Exception
|
||||
{
|
||||
String folderId1 = createTestFolder(repositoryId, "testQueryCustom" + System.currentTimeMillis(), folderId, false);
|
||||
String documentId1 = createTestDocument(repositoryId, "apple1", folderId1, false);
|
||||
assertNotNull(documentId1);
|
||||
String doc2name = "name" + System.currentTimeMillis();
|
||||
String documentId2 = createTestDocument(repositoryId, doc2name, folderId1, true);
|
||||
assertNotNull(documentId2);
|
||||
String documentId3 = createTestDocument(repositoryId, "banana1", folderId1, true);
|
||||
assertNotNull(documentId3);
|
||||
|
||||
String query = "SELECT ObjectId, Name, ObjectTypeId, cmiscustom_docprop_string, cmiscustom_docprop_boolean_multi FROM cmiscustom_document " +
|
||||
"WHERE IN_FOLDER('" + folderId1 + "') " +
|
||||
"AND cmiscustom_docprop_string = 'custom string' ";
|
||||
CmisQueryType queryType = new CmisQueryType();
|
||||
queryType.setRepositoryId(repositoryId);
|
||||
queryType.setStatement(query);
|
||||
queryType.setSkipCount(BigInteger.valueOf(0));
|
||||
queryType.setPageSize(BigInteger.valueOf(5));
|
||||
|
||||
QueryResponse response = discoveryServicePort.query(queryType);
|
||||
assertNotNull(response);
|
||||
assertEquals(2, response.getObject().size());
|
||||
|
||||
CmisObjectType objectType1 = null;
|
||||
CmisObjectType objectType2 = null;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
CmisPropertyId cmisPropertyId = (CmisPropertyId) getCmisProperty(response.getObject().get(i).getProperties(), "ObjectId");
|
||||
if (documentId2.equals(cmisPropertyId.getValue().get(0)))
|
||||
{
|
||||
objectType1 = response.getObject().get(i);
|
||||
}
|
||||
else if (documentId3.equals(cmisPropertyId.getValue().get(0)))
|
||||
{
|
||||
objectType2 = response.getObject().get(i);
|
||||
}
|
||||
}
|
||||
assertNotNull(objectType1);
|
||||
assertNotNull(objectType2);
|
||||
|
||||
CmisPropertyId objectTypeId = (CmisPropertyId) getCmisProperty(objectType1.getProperties(), "ObjectTypeId");
|
||||
assertTrue(objectTypeId != null && objectTypeId.getValue() != null && objectTypeId.getValue().size() == 1 && "D/cmiscustom_document".equals(objectTypeId.getValue().get(0)));
|
||||
CmisPropertyString propertyString = (CmisPropertyString) getCmisProperty(objectType1.getProperties(), "Name");
|
||||
assertTrue(propertyString != null && propertyString.getValue() != null && propertyString.getValue().size() == 1 && doc2name.equals(propertyString.getValue().get(0)));
|
||||
propertyString = (CmisPropertyString) getCmisProperty(objectType1.getProperties(), "cmiscustom_docprop_string");
|
||||
assertTrue(propertyString != null && propertyString.getValue() != null && propertyString.getValue().size() == 1 && "custom string".equals(propertyString.getValue().get(0)));
|
||||
|
||||
CmisPropertyBoolean propertyBoolean = (CmisPropertyBoolean) getCmisProperty(objectType1.getProperties(), "cmiscustom_docprop_boolean_multi");
|
||||
assertTrue(propertyBoolean != null && propertyBoolean.getValue() != null && propertyBoolean.getValue().size() == 2 && propertyBoolean.getValue().get(0)
|
||||
&& !propertyBoolean.getValue().get(1));
|
||||
|
||||
objectTypeId = (CmisPropertyId) getCmisProperty(objectType2.getProperties(), "ObjectTypeId");
|
||||
assertTrue(objectTypeId != null && objectTypeId.getValue() != null && objectTypeId.getValue().size() == 1 && "D/cmiscustom_document".equals(objectTypeId.getValue().get(0)));
|
||||
propertyString = (CmisPropertyString) getCmisProperty(objectType2.getProperties(), "Name");
|
||||
assertTrue(propertyString != null && propertyString.getValue() != null && propertyString.getValue().size() == 1 && "banana1".equals(propertyString.getValue().get(0)));
|
||||
propertyString = (CmisPropertyString) getCmisProperty(objectType2.getProperties(), "cmiscustom_docprop_string");
|
||||
assertTrue(propertyString != null && propertyString.getValue() != null && propertyString.getValue().size() == 1 && "custom string".equals(propertyString.getValue().get(0)));
|
||||
|
||||
propertyBoolean = (CmisPropertyBoolean) getCmisProperty(objectType2.getProperties(), "cmiscustom_docprop_boolean_multi");
|
||||
assertTrue(propertyBoolean != null && propertyBoolean.getValue() != null && propertyBoolean.getValue().size() == 2 && propertyBoolean.getValue().get(0)
|
||||
&& !propertyBoolean.getValue().get(1));
|
||||
}
|
||||
|
||||
private CmisProperty getCmisProperty(CmisPropertiesType cmisPropertiesType, String propertyName)
|
||||
{
|
||||
for (CmisProperty property : cmisPropertiesType.getProperty())
|
||||
{
|
||||
if (property.getName().equals(propertyName))
|
||||
{
|
||||
return property;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean isObjectInFolder(String repositoryId, String objectId, String folderId) throws CmisException
|
||||
{
|
||||
GetChildren getChildren = new GetChildren();
|
||||
getChildren.setRepositoryId(repositoryId);
|
||||
getChildren.setFolderId(folderId);
|
||||
GetChildrenResponse response = navigationServicePort.getChildren(getChildren);
|
||||
assertNotNull(response);
|
||||
assertNotNull(response.getObject());
|
||||
for (CmisObjectType cmisObjectType : response.getObject())
|
||||
{
|
||||
CmisPropertyId propertyId = (CmisPropertyId) getCmisProperty(cmisObjectType.getProperties(), "ObjectId");
|
||||
if (propertyId != null && propertyId.getValue() != null && propertyId.getValue().size() > 0 && objectId.equals(propertyId.getValue().get(0)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private String createTestDocument(String repositoryId, String name, String folderId, boolean custom) throws CmisException
|
||||
{
|
||||
CmisPropertiesType properties = new CmisPropertiesType();
|
||||
CmisPropertyString cmisPropertyString = new CmisPropertyString();
|
||||
cmisPropertyString.setName("Name");
|
||||
cmisPropertyString.getValue().add(name);
|
||||
properties.getProperty().add(cmisPropertyString);
|
||||
if (custom)
|
||||
{
|
||||
cmisPropertyString = new CmisPropertyString();
|
||||
cmisPropertyString.setName("cmiscustom_docprop_string");
|
||||
cmisPropertyString.getValue().add("custom string");
|
||||
properties.getProperty().add(cmisPropertyString);
|
||||
CmisPropertyBoolean cmisPropertyBoolean = new CmisPropertyBoolean();
|
||||
cmisPropertyBoolean.setName("cmiscustom_docprop_boolean_multi");
|
||||
cmisPropertyBoolean.getValue().add(true);
|
||||
cmisPropertyBoolean.getValue().add(false);
|
||||
properties.getProperty().add(cmisPropertyBoolean);
|
||||
}
|
||||
CmisContentStreamType cmisStream = new CmisContentStreamType();
|
||||
cmisStream.setFilename(name);
|
||||
cmisStream.setMimeType(MimetypeMap.MIMETYPE_TEXT_PLAIN);
|
||||
cmisStream.setStream(new DataHandler(name, MimetypeMap.MIMETYPE_TEXT_PLAIN));
|
||||
return objectServicePort.createDocument(repositoryId, custom ? "D/cmiscustom_document" : "document", properties, folderId, cmisStream, null);
|
||||
}
|
||||
|
||||
private String createTestFolder(String repositoryId, String name, String folderId, boolean custom) throws CmisException
|
||||
{
|
||||
CmisPropertiesType properties = new CmisPropertiesType();
|
||||
CmisPropertyString cmisPropertyString = new CmisPropertyString();
|
||||
cmisPropertyString.setName("Name");
|
||||
cmisPropertyString.getValue().add(name);
|
||||
properties.getProperty().add(cmisPropertyString);
|
||||
if (custom)
|
||||
{
|
||||
cmisPropertyString = new CmisPropertyString();
|
||||
cmisPropertyString.setName("cmiscustom_folderprop_string");
|
||||
cmisPropertyString.getValue().add("custom string");
|
||||
properties.getProperty().add(cmisPropertyString);
|
||||
}
|
||||
return objectServicePort.createFolder(repositoryId, custom ? "F/cmiscustom_folder" : "folder", properties, folderId);
|
||||
}
|
||||
}
|
@@ -46,6 +46,7 @@ import junit.framework.TestCase;
|
||||
|
||||
import org.alfresco.cmis.CMISDictionaryModel;
|
||||
import org.alfresco.cmis.CMISTypeId;
|
||||
import org.alfresco.repo.cmis.ws.utils.PropertyUtil;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
|
||||
import org.apache.cxf.endpoint.Client;
|
||||
@@ -386,14 +387,15 @@ public class CmisServiceTestHelper extends TestCase
|
||||
public String getUserHomeId(String repositoryId, String companyHomeId)
|
||||
{
|
||||
String userHomeFolder = null;
|
||||
PropertyUtil propertiesUtil = new PropertyUtil();
|
||||
try
|
||||
{
|
||||
GetChildrenResponse response = getChildren(companyHomeId, EnumTypesOfFileableObjects.FOLDERS, 0, "*");
|
||||
for (CmisObjectType object : response.getObject())
|
||||
{
|
||||
if (PropertyUtil.getProperty(object.getProperties(), CMISDictionaryModel.PROP_NAME).equals("User Homes"))
|
||||
if (propertiesUtil.getCmisPropertyValue(object.getProperties(), CMISDictionaryModel.PROP_NAME, null).equals("User Homes"))
|
||||
{
|
||||
return (String) PropertyUtil.getProperty(object.getProperties(), CMISDictionaryModel.PROP_OBJECT_ID);
|
||||
return (String) propertiesUtil.getCmisPropertyValue(object.getProperties(), CMISDictionaryModel.PROP_OBJECT_ID, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -81,7 +81,7 @@ public class DMMultiFilingServiceTest extends AbstractServiceTest
|
||||
boolean found = false;
|
||||
for (CmisObjectType cmisObjectType : helper.getChildren(anotherFolderId, EnumTypesOfFileableObjects.DOCUMENTS, 0, CMISDictionaryModel.PROP_OBJECT_ID).getObject())
|
||||
{
|
||||
if ((found = PropertyUtil.getProperty(cmisObjectType.getProperties(), CMISDictionaryModel.PROP_OBJECT_ID).equals(documentId)))
|
||||
if ((found = propertiesUtil.getCmisPropertyValue(cmisObjectType.getProperties(), CMISDictionaryModel.PROP_OBJECT_ID, null).equals(documentId)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@@ -130,16 +130,16 @@ public class DMNavigationServiceTest extends AbstractServiceTest
|
||||
|
||||
response = getChildren(folderId, EnumTypesOfFileableObjects.ANY, 0);
|
||||
assertEquals(2, response.getObject().size());
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName1));
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(1).getProperties(), CMISDictionaryModel.PROP_NAME).equals(documentName1));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(folderName1));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(1).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(documentName1));
|
||||
|
||||
response = getChildren(folderId, EnumTypesOfFileableObjects.FOLDERS, 0);
|
||||
assertTrue(response.getObject().size() == 1);
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName1));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(folderName1));
|
||||
|
||||
response = getChildren(folderId, EnumTypesOfFileableObjects.DOCUMENTS, 0);
|
||||
assertTrue(response.getObject().size() == 1);
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME).equals(documentName1));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(documentName1));
|
||||
|
||||
// FIXME: bug • If maxItems > 0, Bool hasMoreItems
|
||||
// Should return 1 item
|
||||
@@ -158,7 +158,7 @@ public class DMNavigationServiceTest extends AbstractServiceTest
|
||||
|
||||
// filters
|
||||
// response = getChildren(folderId, EnumTypesOfFileableObjects.DOCUMENTS, 0, CMISMapping.PROP_NAME);
|
||||
// assertNotNull(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISMapping.PROP_NAME));
|
||||
// assertNotNull(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISMapping.PROP_NAME));
|
||||
|
||||
response = getChildren(folderId);
|
||||
assertTrue(response.getObject().size() == 2);
|
||||
@@ -187,16 +187,16 @@ public class DMNavigationServiceTest extends AbstractServiceTest
|
||||
|
||||
response = getDescendants(folderId, EnumTypesOfFileableObjects.FOLDERS, 1);
|
||||
assertTrue(response.getObject().size() == 1);
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(folderName));
|
||||
|
||||
response = getDescendants(folderId, EnumTypesOfFileableObjects.DOCUMENTS, 2);
|
||||
assertTrue(response.getObject().size() == 1);
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME).equals(documentName));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(documentName));
|
||||
|
||||
response = getDescendants(folderId, EnumTypesOfFileableObjects.ANY, 2);
|
||||
assertTrue(response.getObject().size() == 2);
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName));
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(1).getProperties(), CMISDictionaryModel.PROP_NAME).equals(documentName));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(folderName));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(1).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(documentName));
|
||||
|
||||
response = getDescendants(folderId, EnumTypesOfFileableObjects.ANY, -1);
|
||||
assertTrue(response.getObject().size() == 2);
|
||||
@@ -213,7 +213,7 @@ public class DMNavigationServiceTest extends AbstractServiceTest
|
||||
// Filter test
|
||||
// response = getDescendants(folderId, EnumTypesOfFileableObjects.DOCUMENTS, 2, CMISMapping.PROP_NAME);
|
||||
// assertTrue(response.getObject().size() == 1);
|
||||
// assertTrue(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISMapping.PROP_NAME).equals(documentName));
|
||||
// assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISMapping.PROP_NAME).equals(documentName));
|
||||
|
||||
helper.deleteFolder(folderId1);
|
||||
|
||||
@@ -239,14 +239,14 @@ public class DMNavigationServiceTest extends AbstractServiceTest
|
||||
folderId1 = helper.createFolder(folderName1, folderId);
|
||||
|
||||
response = getFolderParent(folderId1, false);
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(folderName));
|
||||
|
||||
String folderName2 = "Test Cmis Folder (" + System.currentTimeMillis() + ")";
|
||||
String folderId2 = helper.createFolder(folderName2, folderId1);
|
||||
|
||||
response = getFolderParent(folderId2, true);
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName1));
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(1).getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(folderName1));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(1).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(folderName));
|
||||
assertTrue(response.getObject().size() >= 3);
|
||||
|
||||
}
|
||||
@@ -274,7 +274,7 @@ public class DMNavigationServiceTest extends AbstractServiceTest
|
||||
|
||||
response = helper.getObjectParents(documentId1, "*");
|
||||
assertTrue(response.getObject().size() == 1);
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName1));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(folderName1));
|
||||
|
||||
// TODO: not implemented
|
||||
// assertNotNull(response.getObject().get(0).getAllowableActions());
|
||||
@@ -283,12 +283,12 @@ public class DMNavigationServiceTest extends AbstractServiceTest
|
||||
// filters
|
||||
// response = getObjectParents(documentId1, CMISMapping.PROP_NAME);
|
||||
// assertTrue(response.getObject().size() >= 2);
|
||||
// assertNotNull(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISMapping.PROP_NAME));
|
||||
// assertNotNull(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISMapping.PROP_NAME));
|
||||
|
||||
response = helper.getObjectParents(documentId1);
|
||||
assertTrue(response.getObject().size() == 1);
|
||||
assertTrue(PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName1));
|
||||
// assertTrue(PropertyUtil.getProperty(response.getObject().get(1).getProperties(), CMISMapping.PROP_NAME).equals(folderName));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(folderName1));
|
||||
// assertTrue(propertiesUtil.getCmisPropertyValue(response.getObject().get(1).getProperties(), CMISMapping.PROP_NAME).equals(folderName));
|
||||
|
||||
}
|
||||
|
||||
|
@@ -34,7 +34,6 @@ import org.alfresco.repo.content.MimetypeMap;
|
||||
|
||||
/**
|
||||
* @author Alexander Tsvetkov
|
||||
*
|
||||
*/
|
||||
|
||||
public class DMObjectServiceTest extends AbstractServiceTest
|
||||
@@ -129,7 +128,7 @@ public class DMObjectServiceTest extends AbstractServiceTest
|
||||
helper.checkIn(documentIdHolder, "checkin Comment", true);
|
||||
assertTrue(getPropertyValue(propertiesResponse, CMISDictionaryModel.PROP_VERSION_LABEL).equals("1.0"));
|
||||
|
||||
// documentId = (String) PropertyUtil.getProperty(response.getObject().iterator().next().getProperties(), CMISMapping.PROP_OBJECT_ID);
|
||||
// documentId = (String) propertiesUtil.getCmisPropertyValue(response.getObject().iterator().next().getProperties(), CMISMapping.PROP_OBJECT_ID);
|
||||
// deleteDocument(documentId);
|
||||
}
|
||||
|
||||
@@ -220,16 +219,16 @@ public class DMObjectServiceTest extends AbstractServiceTest
|
||||
|
||||
assertEquals(3, responseVersions.getObject().size());
|
||||
assertTrue("Initial version was not returned", isExistItemWithProperty(responseVersions.getObject(), CMISDictionaryModel.PROP_VERSION_LABEL, "1.0"));
|
||||
assertTrue("Invalid response ordering: First object is not latest version", (Boolean) PropertyUtil.getProperty(responseVersions.getObject().get(0).getProperties(),
|
||||
CMISDictionaryModel.PROP_IS_LATEST_VERSION));
|
||||
assertTrue("Invalid response ordering: Second object is not head version", (Boolean) PropertyUtil.getProperty(responseVersions.getObject().get(1).getProperties(),
|
||||
CMISDictionaryModel.PROP_IS_LATEST_VERSION));
|
||||
assertTrue("Invalid response ordering: First object is not latest version", (Boolean) propertiesUtil.getCmisPropertyValue(responseVersions.getObject().get(0)
|
||||
.getProperties(), CMISDictionaryModel.PROP_IS_LATEST_VERSION, null));
|
||||
assertTrue("Invalid response ordering: Second object is not head version", (Boolean) propertiesUtil.getCmisPropertyValue(responseVersions.getObject().get(1)
|
||||
.getProperties(), CMISDictionaryModel.PROP_IS_LATEST_VERSION, null));
|
||||
}
|
||||
|
||||
// This test don't asserts until CMIS setProperty()/setProperties() logic is unimplemented
|
||||
public void testGetDocumentProperties_Other() throws Exception
|
||||
{
|
||||
// If includeAllowableActions<6E> is TRUE, the repository will return the allowable actions for the current user for the object as part of the output.
|
||||
// If includeAllowableActions<6E> is TRUE, the repository will return the allowable actions for the current user for the object as part of the output.
|
||||
// "IncludeRelationships" indicates whether relationships are also returned for the object. If it is set to "source" or "target", relationships for which the returned
|
||||
// object is a source, or respectively a target, will also be returned. If it is set to "both", relationships for which the returned object is either a source or a target
|
||||
// will be returned. If it is set to "none", relationships are not returned.
|
||||
@@ -329,7 +328,14 @@ public class DMObjectServiceTest extends AbstractServiceTest
|
||||
try
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
CmisContentStreamType result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentId);
|
||||
GetPropertiesOfLatestVersion request = new GetPropertiesOfLatestVersion();
|
||||
request.setRepositoryId(repositoryId);
|
||||
request.setFilter(cmisObjectFactory.createGetPropertiesOfLatestVersionFilter("*"));
|
||||
request.setMajorVersion(Boolean.FALSE);
|
||||
request.setVersionSeriesId(documentId);
|
||||
GetPropertiesOfLatestVersionResponse response = helper.versioningServicePort.getPropertiesOfLatestVersion(request);
|
||||
documentId = (String) propertiesUtil.getCmisPropertyValue(response.getObject().getProperties(), CMISDictionaryModel.PROP_OBJECT_ID, null);
|
||||
((ObjectServicePort) servicePort).getContentStream(repositoryId, documentId);
|
||||
fail("Content stream was not deleted");
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -428,8 +434,8 @@ public class DMObjectServiceTest extends AbstractServiceTest
|
||||
|
||||
/*
|
||||
* // on DELETESINGLEFILED deletes only relationships and folder. Primary parent folder and contend should not be deleted folderName = "Test Cmis Folder (" +
|
||||
* System.currentTimeMillis() + ")"; folderId1 = helper.createFolder(folderName, folderId); folderName = "Test Cmis Folder (" + System.currentTimeMillis() + ")"; folderId2 =
|
||||
* helper.createFolder(folderName, companyHomeId); documentName = "Test cmis document (" + System.currentTimeMillis() + ")"; documentId2 =
|
||||
* System.currentTimeMillis() + ")"; folderId1 = helper.createFolder(folderName, folderId); folderName = "Test Cmis Folder (" + System.currentTimeMillis() + ")"; folderId2
|
||||
* = helper.createFolder(folderName, companyHomeId); documentName = "Test cmis document (" + System.currentTimeMillis() + ")"; documentId2 =
|
||||
* helper.createDocument(documentName, folderId2); String relationshipId = createRelationship("test relashionship", folderId1, documentId2); response = ((ObjectServicePort)
|
||||
* servicePort).deleteTree(repositoryId, folderId1, EnumUnfileNonfolderObjects.DELETESINGLEFILED, true); assertNotNull("DELETESINGLEFILED", response);
|
||||
* assertNull("DELETESINGLEFILED", helper.getObjectProperties(folderId1)); assertNull("DELETESINGLEFILED", helper.getObjectProperties(relationshipId));
|
||||
@@ -485,7 +491,7 @@ public class DMObjectServiceTest extends AbstractServiceTest
|
||||
|
||||
GetObjectParentsResponse parentsResponse = helper.getObjectParents(documentId, "*");
|
||||
assertTrue(parentsResponse.getObject().size() == 1);
|
||||
assertTrue(PropertyUtil.getProperty(parentsResponse.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName));
|
||||
assertTrue(propertiesUtil.getCmisPropertyValue(parentsResponse.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_NAME, null).equals(folderName));
|
||||
|
||||
}
|
||||
|
||||
@@ -528,7 +534,7 @@ public class DMObjectServiceTest extends AbstractServiceTest
|
||||
// public void setContentStream(String repositoryId, Holder<String> documentId, Boolean overwriteFlag, CmisContentStreamType contentStream)
|
||||
((ObjectServicePort) servicePort).setContentStream(repositoryId, documentIdHolder, true, contentStream);
|
||||
|
||||
CmisContentStreamType result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentId);
|
||||
CmisContentStreamType result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentIdHolder.value);
|
||||
if (result.getLength().intValue() == 0)
|
||||
{
|
||||
fail("Content Stream is empty");
|
||||
@@ -558,11 +564,11 @@ public class DMObjectServiceTest extends AbstractServiceTest
|
||||
contentStream.setMimeType(MimetypeMap.MIMETYPE_TEXT_PLAIN);
|
||||
DataHandler dataHandler = new DataHandler(newContent, MimetypeMap.MIMETYPE_TEXT_PLAIN);
|
||||
contentStream.setStream(dataHandler);
|
||||
|
||||
Holder<String> holder = new Holder<String>(documentId);
|
||||
try
|
||||
{
|
||||
// public void setContentStream(String repositoryId, Holder<String> documentId, Boolean overwriteFlag, CmisContentStreamType contentStream)
|
||||
((ObjectServicePort) servicePort).setContentStream(repositoryId, new Holder<String>(documentId), false, contentStream);
|
||||
((ObjectServicePort) servicePort).setContentStream(repositoryId, holder, false, contentStream);
|
||||
fail("ContentAlreadyExists should be thrown");
|
||||
}
|
||||
catch (CmisException e)
|
||||
@@ -570,15 +576,16 @@ public class DMObjectServiceTest extends AbstractServiceTest
|
||||
assertTrue(e.getFaultInfo().getType().equals(EnumServiceException.CONTENT_ALREADY_EXISTS));
|
||||
}
|
||||
|
||||
documentId = holder.value;
|
||||
// now we can not set any property (beside name) when we create new document - so this case not working
|
||||
propertiesResponse = helper.getObjectProperties(documentId);
|
||||
Boolean contentStreamAllowed = getPropertyBooleanValue(propertiesResponse, CMISDictionaryModel.PROP_CONTENT_STREAM_ALLOWED);
|
||||
if (contentStreamAllowed != null && contentStreamAllowed == false)
|
||||
String contentStreamAllowed = propertiesUtil.getCmisPropertyValue(propertiesResponse.getObject().getProperties(), CMISDictionaryModel.PROP_CONTENT_STREAM_ALLOWED, null);
|
||||
if (contentStreamAllowed != null && contentStreamAllowed.equals(EnumContentStreamAllowed.NOTALLOWED.value()))
|
||||
{
|
||||
try
|
||||
{
|
||||
// public void setContentStream(String repositoryId, Holder<String> documentId, Boolean overwriteFlag, CmisContentStreamType contentStream)
|
||||
((ObjectServicePort) servicePort).setContentStream(repositoryId, new Holder<String>(documentId), true, contentStream);
|
||||
((ObjectServicePort) servicePort).setContentStream(repositoryId, holder, true, contentStream);
|
||||
fail("ConstraintViolationException should be thrown");
|
||||
}
|
||||
catch (CmisException e)
|
||||
@@ -622,12 +629,18 @@ public class DMObjectServiceTest extends AbstractServiceTest
|
||||
cmisProperty.setName(CMISDictionaryModel.PROP_OBJECT_ID);
|
||||
cmisProperty.getValue().add("new id value");
|
||||
propertiesList.add(cmisProperty);
|
||||
|
||||
try
|
||||
{
|
||||
Holder<String> holder = new Holder<String>(documentId);
|
||||
// public void updateProperties(String repositoryId, Holder<String> objectId, String changeToken, CmisPropertiesType properties)
|
||||
((ObjectServicePort) servicePort).updateProperties(repositoryId, new Holder<String>(documentId), new String(""), properties);
|
||||
fail("should not update read only propery");
|
||||
((ObjectServicePort) servicePort).updateProperties(repositoryId, holder, new String(""), properties);
|
||||
documentId = holder.value;
|
||||
GetProperties getProperties = new GetProperties();
|
||||
getProperties.setRepositoryId(repositoryId);
|
||||
getProperties.setObjectId(holder.value);
|
||||
GetPropertiesResponse response = ((ObjectServicePort) servicePort).getProperties(getProperties);
|
||||
String documentIdAfterUpdate = propertiesUtil.getCmisPropertyValue(response.getObject().getProperties(), CMISDictionaryModel.PROP_OBJECT_ID, null);
|
||||
assertTrue("should not update read only propery", !"new id value".equals(documentIdAfterUpdate) && documentId.equals(documentIdAfterUpdate));
|
||||
}
|
||||
catch (CmisException e)
|
||||
{
|
||||
|
@@ -81,7 +81,7 @@ public class DMVersioningServiceTest extends AbstractServiceTest
|
||||
String checkinComment = "Test checkin" + System.currentTimeMillis();
|
||||
((VersioningServicePort) servicePort).checkIn(repositoryId, documentIdHolder, Boolean.TRUE, properties, contentStream, checkinComment);
|
||||
|
||||
assertEquals(checkinComment, PropertyUtil.getProperty(helper.getObjectProperties(documentId).getObject().getProperties(), CMISDictionaryModel.PROP_CHECKIN_COMMENT));
|
||||
assertEquals(checkinComment, propertiesUtil.getCmisPropertyValue(helper.getObjectProperties(documentId).getObject().getProperties(), CMISDictionaryModel.PROP_CHECKIN_COMMENT, null));
|
||||
}
|
||||
|
||||
public void testCheckOutCheckInDefault() throws Exception
|
||||
@@ -108,7 +108,7 @@ public class DMVersioningServiceTest extends AbstractServiceTest
|
||||
|
||||
// Cancel check out
|
||||
((VersioningServicePort) servicePort).cancelCheckOut(repositoryId, documentIdHolder.value);
|
||||
assertFalse((Boolean) PropertyUtil.getProperty(helper.getObjectProperties(documentId).getObject().getProperties(), CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT));
|
||||
assertFalse((Boolean) propertiesUtil.getCmisPropertyValue(helper.getObjectProperties(documentId).getObject().getProperties(), CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT, null));
|
||||
}
|
||||
|
||||
public void testCheckinNoExistsCheckOut() throws Exception
|
||||
@@ -159,7 +159,7 @@ public class DMVersioningServiceTest extends AbstractServiceTest
|
||||
assertNotNull(response.getObject());
|
||||
CmisObjectType objectType = response.getObject();
|
||||
assertNotNull(objectType.getProperties());
|
||||
assertTrue((Boolean) PropertyUtil.getProperty(objectType.getProperties(), CMISDictionaryModel.PROP_IS_LATEST_VERSION));
|
||||
assertTrue((Boolean) propertiesUtil.getCmisPropertyValue(objectType.getProperties(), CMISDictionaryModel.PROP_IS_LATEST_VERSION, null));
|
||||
}
|
||||
|
||||
public void testGetPropertiesOfLatestVersionDefault() throws Exception
|
||||
@@ -172,7 +172,7 @@ public class DMVersioningServiceTest extends AbstractServiceTest
|
||||
assertNotNull(response.getObject());
|
||||
CmisObjectType objectType = response.getObject();
|
||||
assertNotNull(objectType.getProperties());
|
||||
assertTrue((Boolean) PropertyUtil.getProperty(objectType.getProperties(), CMISDictionaryModel.PROP_IS_LATEST_VERSION));
|
||||
assertTrue((Boolean) propertiesUtil.getCmisPropertyValue(objectType.getProperties(), CMISDictionaryModel.PROP_IS_LATEST_VERSION, null));
|
||||
}
|
||||
|
||||
public void testGetAllVersionsDefault() throws Exception
|
||||
@@ -192,7 +192,7 @@ public class DMVersioningServiceTest extends AbstractServiceTest
|
||||
GetAllVersionsResponse response = ((VersioningServicePort) servicePort).getAllVersions(request);
|
||||
assertNotNull(response);
|
||||
assertNotNull(response.getObject());
|
||||
assertEquals(checkinComment, PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_CHECKIN_COMMENT));
|
||||
assertEquals(checkinComment, propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_CHECKIN_COMMENT, null));
|
||||
}
|
||||
|
||||
public void testGetAllVersions() throws Exception
|
||||
@@ -215,7 +215,7 @@ public class DMVersioningServiceTest extends AbstractServiceTest
|
||||
GetAllVersionsResponse response = ((VersioningServicePort) servicePort).getAllVersions(request);
|
||||
assertNotNull(response);
|
||||
assertNotNull(response.getObject());
|
||||
assertEquals(checkinComment, PropertyUtil.getProperty(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_CHECKIN_COMMENT));
|
||||
assertEquals(checkinComment, propertiesUtil.getCmisPropertyValue(response.getObject().get(0).getProperties(), CMISDictionaryModel.PROP_CHECKIN_COMMENT, null));
|
||||
}
|
||||
|
||||
public void testGetAllVersionsForNoVersionHistory() throws Exception
|
||||
@@ -256,11 +256,11 @@ public class DMVersioningServiceTest extends AbstractServiceTest
|
||||
{
|
||||
if (!checkedOutfound)
|
||||
{
|
||||
checkedOutfound = (Boolean) PropertyUtil.getProperty(cmisObjectType.getProperties(), CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT);
|
||||
checkedOutfound = (Boolean) propertiesUtil.getCmisPropertyValue(cmisObjectType.getProperties(), CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT, null);
|
||||
}
|
||||
if (!pwcFound)
|
||||
{
|
||||
pwcFound = ((String) PropertyUtil.getProperty(cmisObjectType.getProperties(), CMISDictionaryModel.PROP_OBJECT_ID)).startsWith(documentIdHolder.value);
|
||||
pwcFound = ((String) propertiesUtil.getCmisPropertyValue(cmisObjectType.getProperties(), CMISDictionaryModel.PROP_OBJECT_ID, null)).startsWith(documentIdHolder.value);
|
||||
}
|
||||
}
|
||||
assertTrue("No checked out version found", checkedOutfound);
|
||||
|
1217
source/wsdl/CMIS-Core.xsd
Executable file
1217
source/wsdl/CMIS-Core.xsd
Executable file
File diff suppressed because it is too large
Load Diff
1000
source/wsdl/CMIS-Messaging.xsd
Executable file
1000
source/wsdl/CMIS-Messaging.xsd
Executable file
File diff suppressed because it is too large
Load Diff
959
source/wsdl/CMISWS-Service.wsdl
Executable file
959
source/wsdl/CMISWS-Service.wsdl
Executable file
@@ -0,0 +1,959 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<definitions xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901"
|
||||
xmlns:cmism="http://docs.oasis-open.org/ns/cmis/messaging/200901"
|
||||
xmlns:cmisw="http://docs.oasis-open.org/ns/cmis/ws/200901" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:ns="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://docs.oasis-open.org/ns/cmis/ws/200901"
|
||||
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" name="CMISWebServices">
|
||||
<types>
|
||||
<xsd:schema elementFormDefault="qualified"
|
||||
targetNamespace="http://docs.oasis-open.org/ns/cmis/ws/200901">
|
||||
<xsd:import schemaLocation="CMIS-Core.xsd"
|
||||
namespace="http://docs.oasis-open.org/ns/cmis/core/200901" />
|
||||
<xsd:import schemaLocation="CMIS-Messaging.xsd"
|
||||
namespace="http://docs.oasis-open.org/ns/cmis/messaging/200901" />
|
||||
</xsd:schema>
|
||||
</types>
|
||||
|
||||
<message name="cmisException">
|
||||
<part name="fault" element="cmism:cmisFault" />
|
||||
</message>
|
||||
|
||||
<message name="queryRequest">
|
||||
<part name="parameters" element="cmis:query" />
|
||||
</message>
|
||||
<message name="queryResponse">
|
||||
<part name="parameters" element="cmism:queryResponse" />
|
||||
</message>
|
||||
<message name="getContentChangesRequest">
|
||||
<part name="parameters" element="cmism:getContentChanges" />
|
||||
</message>
|
||||
<message name="getContentChangesResponse">
|
||||
<part name="parameters" element="cmism:getContentChangesResponse" />
|
||||
</message>
|
||||
|
||||
<message name="addObjectToFolderRequest">
|
||||
<part name="parameters" element="cmism:addObjectToFolder" />
|
||||
</message>
|
||||
<message name="addObjectToFolderResponse">
|
||||
<part name="parameters" element="cmism:addObjectToFolderResponse" />
|
||||
</message>
|
||||
<message name="removeObjectFromFolderRequest">
|
||||
<part name="parameters" element="cmism:removeObjectFromFolder" />
|
||||
</message>
|
||||
<message name="removeObjectFromFolderResponse">
|
||||
<part name="parameters" element="cmism:removeObjectFromFolderResponse" />
|
||||
</message>
|
||||
|
||||
<message name="getDescendantsRequest">
|
||||
<part name="parameters" element="cmism:getDescendants" />
|
||||
</message>
|
||||
<message name="getDescendantsResponse">
|
||||
<part name="parameters" element="cmism:getDescendantsResponse" />
|
||||
</message>
|
||||
<message name="getChildrenRequest">
|
||||
<part name="parameters" element="cmism:getChildren" />
|
||||
</message>
|
||||
<message name="getChildrenResponse">
|
||||
<part name="parameters" element="cmism:getChildrenResponse" />
|
||||
</message>
|
||||
<message name="getFolderParentRequest">
|
||||
<part name="parameters" element="cmism:getFolderParent" />
|
||||
</message>
|
||||
<message name="getFolderParentResponse">
|
||||
<part name="parameters" element="cmism:getFolderParentResponse" />
|
||||
</message>
|
||||
<message name="getObjectParentsRequest">
|
||||
<part name="parameters" element="cmism:getObjectParents" />
|
||||
</message>
|
||||
<message name="getObjectParentsResponse">
|
||||
<part name="parameters" element="cmism:getObjectParentsResponse" />
|
||||
</message>
|
||||
<message name="getCheckedoutDocsRequest">
|
||||
<part name="parameters" element="cmism:getCheckedoutDocs" />
|
||||
</message>
|
||||
<message name="getCheckedoutDocsResponse">
|
||||
<part name="parameters" element="cmism:getCheckedoutDocsResponse" />
|
||||
</message>
|
||||
|
||||
<message name="createDocumentRequest">
|
||||
<part name="parameters" element="cmism:createDocument" />
|
||||
</message>
|
||||
<message name="createDocumentResponse">
|
||||
<part name="parameters" element="cmism:createDocumentResponse" />
|
||||
</message>
|
||||
<message name="createFolderRequest">
|
||||
<part name="parameters" element="cmism:createFolder" />
|
||||
</message>
|
||||
<message name="createFolderResponse">
|
||||
<part name="parameters" element="cmism:createFolderResponse" />
|
||||
</message>
|
||||
<message name="createRelationshipRequest">
|
||||
<part name="parameters" element="cmism:createRelationship" />
|
||||
</message>
|
||||
<message name="createRelationshipResponse">
|
||||
<part name="parameters" element="cmism:createRelationshipResponse" />
|
||||
</message>
|
||||
<message name="createPolicyRequest">
|
||||
<part name="parameters" element="cmism:createPolicy" />
|
||||
</message>
|
||||
<message name="createPolicyResponse">
|
||||
<part name="parameters" element="cmism:createPolicyResponse" />
|
||||
</message>
|
||||
<message name="getAllowableActionsRequest">
|
||||
<part name="parameters" element="cmism:getAllowableActions" />
|
||||
</message>
|
||||
<message name="getAllowableActionsResponse">
|
||||
<part name="parameters" element="cmism:getAllowableActionsResponse" />
|
||||
</message>
|
||||
<message name="getPropertiesRequest">
|
||||
<part name="parameters" element="cmism:getProperties" />
|
||||
</message>
|
||||
<message name="getPropertiesResponse">
|
||||
<part name="parameters" element="cmism:getPropertiesResponse" />
|
||||
</message>
|
||||
<message name="getContentStreamRequest">
|
||||
<part name="parameters" element="cmism:getContentStream" />
|
||||
</message>
|
||||
<message name="getContentStreamResponse">
|
||||
<part name="parameters" element="cmism:getContentStreamResponse" />
|
||||
</message>
|
||||
<message name="updatePropertiesRequest">
|
||||
<part name="parameters" element="cmism:updateProperties" />
|
||||
</message>
|
||||
<message name="updatePropertiesResponse">
|
||||
<part name="parameters" element="cmism:updatePropertiesResponse" />
|
||||
</message>
|
||||
<message name="moveObjectRequest">
|
||||
<part name="parameters" element="cmism:moveObject" />
|
||||
</message>
|
||||
<message name="moveObjectResponse">
|
||||
<part name="parameters" element="cmism:moveObjectResponse" />
|
||||
</message>
|
||||
<message name="deleteObjectRequest">
|
||||
<part name="parameters" element="cmism:deleteObject" />
|
||||
</message>
|
||||
<message name="deleteObjectResponse">
|
||||
<part name="parameters" element="cmism:deleteObjectResponse" />
|
||||
</message>
|
||||
<message name="deleteTreeRequest">
|
||||
<part name="parameters" element="cmism:deleteTree" />
|
||||
</message>
|
||||
<message name="deleteTreeResponse">
|
||||
<part name="parameters" element="cmism:deleteTreeResponse" />
|
||||
</message>
|
||||
<message name="setContentStreamRequest">
|
||||
<part name="parameters" element="cmism:setContentStream" />
|
||||
</message>
|
||||
<message name="setContentStreamResponse">
|
||||
<part name="parameters" element="cmism:setContentStreamResponse" />
|
||||
</message>
|
||||
<message name="deleteContentStreamRequest">
|
||||
<part name="parameters" element="cmism:deleteContentStream" />
|
||||
</message>
|
||||
<message name="deleteContentStreamResponse">
|
||||
<part name="parameters" element="cmism:deleteContentStreamResponse" />
|
||||
</message>
|
||||
|
||||
<message name="applyPolicyRequest">
|
||||
<part name="parameters" element="cmism:applyPolicy" />
|
||||
</message>
|
||||
<message name="applyPolicyResponse">
|
||||
<part name="parameters" element="cmism:applyPolicyResponse" />
|
||||
</message>
|
||||
<message name="removePolicyRequest">
|
||||
<part name="parameters" element="cmism:removePolicy" />
|
||||
</message>
|
||||
<message name="removePolicyResponse">
|
||||
<part name="parameters" element="cmism:removePolicyResponse" />
|
||||
</message>
|
||||
<message name="getAppliedPoliciesRequest">
|
||||
<part name="parameters" element="cmism:getAppliedPolicies" />
|
||||
</message>
|
||||
<message name="getAppliedPoliciesResponse">
|
||||
<part name="parameters" element="cmism:getAppliedPoliciesResponse" />
|
||||
</message>
|
||||
|
||||
<message name="getRelationshipsRequest">
|
||||
<part name="parameters" element="cmism:getRelationships" />
|
||||
</message>
|
||||
<message name="getRelationshipsResponse">
|
||||
<part name="parameters" element="cmism:getRelationshipsResponse" />
|
||||
</message>
|
||||
|
||||
<message name="getRepositoriesRequest">
|
||||
<part name="parameters" element="cmism:getRepositories" />
|
||||
</message>
|
||||
<message name="getRepositoriesResponse">
|
||||
<part name="parameters" element="cmism:getRepositoriesResponse" />
|
||||
</message>
|
||||
<message name="getRepositoryInfoRequest">
|
||||
<part name="parameters" element="cmism:getRepositoryInfo" />
|
||||
</message>
|
||||
<message name="getRepositoryInfoResponse">
|
||||
<part name="parameters" element="cmism:getRepositoryInfoResponse" />
|
||||
</message>
|
||||
<message name="getTypesRequest">
|
||||
<part name="parameters" element="cmism:getTypes" />
|
||||
</message>
|
||||
<message name="getTypesResponse">
|
||||
<part name="parameters" element="cmism:getTypesResponse" />
|
||||
</message>
|
||||
<message name="getTypeDefinitionRequest">
|
||||
<part name="parameters" element="cmism:getTypeDefinition" />
|
||||
</message>
|
||||
<message name="getTypeDefinitionResponse">
|
||||
<part name="parameters" element="cmism:getTypeDefinitionResponse" />
|
||||
</message>
|
||||
|
||||
<message name="checkOutRequest">
|
||||
<part name="parameters" element="cmism:checkOut" />
|
||||
</message>
|
||||
<message name="checkOutResponse">
|
||||
<part name="parameters" element="cmism:checkOutResponse" />
|
||||
</message>
|
||||
<message name="cancelCheckOutRequest">
|
||||
<part name="parameters" element="cmism:cancelCheckOut" />
|
||||
</message>
|
||||
<message name="cancelCheckOutResponse">
|
||||
<part name="parameters" element="cmism:cancelCheckOutResponse" />
|
||||
</message>
|
||||
<message name="checkInRequest">
|
||||
<part name="parameters" element="cmism:checkIn" />
|
||||
</message>
|
||||
<message name="checkInResponse">
|
||||
<part name="parameters" element="cmism:checkInResponse" />
|
||||
</message>
|
||||
<message name="getPropertiesOfLatestVersionRequest">
|
||||
<part name="parameters" element="cmism:getPropertiesOfLatestVersion" />
|
||||
</message>
|
||||
<message name="getPropertiesOfLatestVersionResponse">
|
||||
<part name="parameters" element="cmism:getPropertiesOfLatestVersionResponse" />
|
||||
</message>
|
||||
<message name="getAllVersionsRequest">
|
||||
<part name="parameters" element="cmism:getAllVersions" />
|
||||
</message>
|
||||
<message name="getAllVersionsResponse">
|
||||
<part name="parameters" element="cmism:getAllVersionsResponse" />
|
||||
</message>
|
||||
<message name="deleteAllVersionsRequest">
|
||||
<part name="parameters" element="cmism:deleteAllVersions" />
|
||||
</message>
|
||||
<message name="deleteAllVersionsResponse">
|
||||
<part name="parameters" element="cmism:deleteAllVersionsResponse" />
|
||||
</message>
|
||||
|
||||
<portType name="DiscoveryServicePort">
|
||||
<operation name="query">
|
||||
<input message="cmisw:queryRequest" />
|
||||
<output message="cmisw:queryResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getContentChanges">
|
||||
<input message="cmisw:getContentChangesRequest" />
|
||||
<output message="cmisw:getContentChangesResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<portType name="MultiFilingServicePort">
|
||||
<operation name="addObjectToFolder">
|
||||
<input message="cmisw:addObjectToFolderRequest" />
|
||||
<output message="cmisw:addObjectToFolderResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="removeObjectFromFolder">
|
||||
<input message="cmisw:removeObjectFromFolderRequest" />
|
||||
<output message="cmisw:removeObjectFromFolderResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="NavigationServicePort">
|
||||
<operation name="getDescendants">
|
||||
<input message="cmisw:getDescendantsRequest" />
|
||||
<output message="cmisw:getDescendantsResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getChildren">
|
||||
<input message="cmisw:getChildrenRequest" />
|
||||
<output message="cmisw:getChildrenResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getFolderParent">
|
||||
<input message="cmisw:getFolderParentRequest" />
|
||||
<output message="cmisw:getFolderParentResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getObjectParents">
|
||||
<input message="cmisw:getObjectParentsRequest" />
|
||||
<output message="cmisw:getObjectParentsResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getCheckedoutDocs">
|
||||
<input message="cmisw:getCheckedoutDocsRequest" />
|
||||
<output message="cmisw:getCheckedoutDocsResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="ObjectServicePort">
|
||||
<operation name="createDocument">
|
||||
<input message="cmisw:createDocumentRequest" />
|
||||
<output message="cmisw:createDocumentResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="createFolder">
|
||||
<input message="cmisw:createFolderRequest" />
|
||||
<output message="cmisw:createFolderResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="createRelationship">
|
||||
<input message="cmisw:createRelationshipRequest" />
|
||||
<output message="cmisw:createRelationshipResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="createPolicy">
|
||||
<input message="cmisw:createPolicyRequest" />
|
||||
<output message="cmisw:createPolicyResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getAllowableActions">
|
||||
<input message="cmisw:getAllowableActionsRequest" />
|
||||
<output message="cmisw:getAllowableActionsResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getProperties">
|
||||
<input message="cmisw:getPropertiesRequest" />
|
||||
<output message="cmisw:getPropertiesResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getContentStream">
|
||||
<input message="cmisw:getContentStreamRequest" />
|
||||
<output message="cmisw:getContentStreamResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="updateProperties">
|
||||
<input message="cmisw:updatePropertiesRequest" />
|
||||
<output message="cmisw:updatePropertiesResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="moveObject">
|
||||
<input message="cmisw:moveObjectRequest" />
|
||||
<output message="cmisw:moveObjectResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="deleteObject">
|
||||
<input message="cmisw:deleteObjectRequest" />
|
||||
<output message="cmisw:deleteObjectResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="deleteTree">
|
||||
<input message="cmisw:deleteTreeRequest" />
|
||||
<output message="cmisw:deleteTreeResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="setContentStream">
|
||||
<input message="cmisw:setContentStreamRequest" />
|
||||
<output message="cmisw:setContentStreamResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="deleteContentStream">
|
||||
<input message="cmisw:deleteContentStreamRequest" />
|
||||
<output message="cmisw:deleteContentStreamResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="PolicyServicePort">
|
||||
<operation name="applyPolicy">
|
||||
<input message="cmisw:applyPolicyRequest" />
|
||||
<output message="cmisw:applyPolicyResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="removePolicy">
|
||||
<input message="cmisw:removePolicyRequest" />
|
||||
<output message="cmisw:removePolicyResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getAppliedPolicies">
|
||||
<input message="cmisw:getAppliedPoliciesRequest" />
|
||||
<output message="cmisw:getAppliedPoliciesResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<portType name="RelationshipServicePort">
|
||||
<operation name="getRelationships">
|
||||
<input message="cmisw:getRelationshipsRequest" />
|
||||
<output message="cmisw:getRelationshipsResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="RepositoryServicePort">
|
||||
<operation name="getRepositories">
|
||||
<input message="cmisw:getRepositoriesRequest" />
|
||||
<output message="cmisw:getRepositoriesResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getRepositoryInfo">
|
||||
<input message="cmisw:getRepositoryInfoRequest" />
|
||||
<output message="cmisw:getRepositoryInfoResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getTypes">
|
||||
<input message="cmisw:getTypesRequest" />
|
||||
<output message="cmisw:getTypesResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getTypeDefinition">
|
||||
<input message="cmisw:getTypeDefinitionRequest" />
|
||||
<output message="cmisw:getTypeDefinitionResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
</portType>
|
||||
<portType name="VersioningServicePort">
|
||||
<operation name="checkOut">
|
||||
<input message="cmisw:checkOutRequest" />
|
||||
<output message="cmisw:checkOutResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="cancelCheckOut">
|
||||
<input message="cmisw:cancelCheckOutRequest" />
|
||||
<output message="cmisw:cancelCheckOutResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="checkIn">
|
||||
<input message="cmisw:checkInRequest" />
|
||||
<output message="cmisw:checkInResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getPropertiesOfLatestVersion">
|
||||
<input message="cmisw:getPropertiesOfLatestVersionRequest" />
|
||||
<output message="cmisw:getPropertiesOfLatestVersionResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="getAllVersions">
|
||||
<input message="cmisw:getAllVersionsRequest" />
|
||||
<output message="cmisw:getAllVersionsResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
<operation name="deleteAllVersions">
|
||||
<input message="cmisw:deleteAllVersionsRequest" />
|
||||
<output message="cmisw:deleteAllVersionsResponse" />
|
||||
<fault message="cmisw:cmisException" name="cmisException" />
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
|
||||
<binding name="DiscoveryServicePortBinding" type="cmisw:DiscoveryServicePort">
|
||||
<soap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="query">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getContentChanges">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding name="MultiFilingServicePortBinding" type="cmisw:MultiFilingServicePort">
|
||||
<soap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="addObjectToFolder">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="removeObjectFromFolder">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding name="NavigationServicePortBinding" type="cmisw:NavigationServicePort">
|
||||
<soap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="getDescendants">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getChildren">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getFolderParent">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getObjectParents">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getCheckedoutDocs">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding name="ObjectServicePortBinding" type="cmisw:ObjectServicePort">
|
||||
<soap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="createDocument">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="createFolder">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="createRelationship">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="createPolicy">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getAllowableActions">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getProperties">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getContentStream">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="updateProperties">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="moveObject">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="deleteObject">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="deleteTree">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="setContentStream">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="deleteContentStream">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding name="PolicyServicePortBinding" type="cmisw:PolicyServicePort">
|
||||
<soap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="applyPolicy">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="removePolicy">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getAppliedPolicies">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding name="RelationshipServicePortBinding" type="cmisw:RelationshipServicePort">
|
||||
<soap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="getRelationships">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding name="RepositoryServicePortBinding" type="cmisw:RepositoryServicePort">
|
||||
<soap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="getRepositories">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getRepositoryInfo">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getTypes">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getTypeDefinition">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
</binding>
|
||||
<binding name="VersioningServicePortBinding" type="cmisw:VersioningServicePort">
|
||||
<soap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<operation name="checkOut">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="cancelCheckOut">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="checkIn">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getPropertiesOfLatestVersion">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="getAllVersions">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
<operation name="deleteAllVersions">
|
||||
<soap:operation soapAction="" />
|
||||
<input>
|
||||
<soap:body use="literal" />
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="literal" />
|
||||
</output>
|
||||
<fault name="cmisException">
|
||||
<soap:fault name="cmisException" use="literal" />
|
||||
</fault>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
|
||||
<service name="DiscoveryService">
|
||||
<port name="DiscoveryServicePort" binding="cmisw:DiscoveryServicePortBinding">
|
||||
<soap:address
|
||||
location="http://cmis/services/DiscoveryService.DiscoveryServicePort" />
|
||||
</port>
|
||||
</service>
|
||||
<service name="MultiFilingService">
|
||||
<port name="MultiFilingServicePort" binding="cmisw:MultiFilingServicePortBinding">
|
||||
<soap:address
|
||||
location="http://cmis/services/MultiFilingService.MultiFilingServicePort" />
|
||||
</port>
|
||||
</service>
|
||||
<service name="NavigationService">
|
||||
<port name="NavigationServicePort" binding="cmisw:NavigationServicePortBinding">
|
||||
<soap:address
|
||||
location="http://cmis/services/NavigationService.NavigationServicePort" />
|
||||
</port>
|
||||
</service>
|
||||
<service name="ObjectService">
|
||||
<port name="ObjectServicePort" binding="cmisw:ObjectServicePortBinding">
|
||||
<soap:address location="http://cmis/services/ObjectService.ObjectServicePort" />
|
||||
</port>
|
||||
</service>
|
||||
<service name="PolicyService">
|
||||
<port name="PolicyServicePort" binding="cmisw:PolicyServicePortBinding">
|
||||
<soap:address location="http://cmis/services/PolicyService.PolicyServicePort" />
|
||||
</port>
|
||||
</service>
|
||||
<service name="RelationshipService">
|
||||
<port name="RelationshipServicePort" binding="cmisw:RelationshipServicePortBinding">
|
||||
<soap:address
|
||||
location="http://cmis/services/RelationshipService.RelationshipServicePort" />
|
||||
</port>
|
||||
</service>
|
||||
<service name="RepositoryService">
|
||||
<port name="RepositoryServicePort" binding="cmisw:RepositoryServicePortBinding">
|
||||
<soap:address
|
||||
location="http://cmis/services/RepositoryService.RepositoryServicePort" />
|
||||
</port>
|
||||
</service>
|
||||
<service name="VersioningService">
|
||||
<port name="VersioningServicePort" binding="cmisw:VersioningServicePortBinding">
|
||||
<soap:address
|
||||
location="http://cmis/services/VersioningService.VersioningServicePort" />
|
||||
</port>
|
||||
</service>
|
||||
|
||||
</definitions>
|
Reference in New Issue
Block a user