diff --git a/config/alfresco/templates/webscripts/org/alfresco/cmis/atomentry.lib.atom.ftl b/config/alfresco/templates/webscripts/org/alfresco/cmis/atomentry.lib.atom.ftl index 4e047175b9..991e7ba123 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/cmis/atomentry.lib.atom.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/cmis/atomentry.lib.atom.ftl @@ -15,7 +15,7 @@ [#assign typedef = cmistype(object)] [#list typedef.propertyDefinitions?values as propdef] - [@filter propfilter propdef.propertyId.id][@prop propdef.propertyId.id object propdef.dataType.label/][/@filter] + [@filter propfilter propdef.queryName][@prop propdef.propertyId.id object propdef.dataType.label/][/@filter] [/#list] [/#macro] @@ -45,6 +45,7 @@ [@objectCMISProps node propfilter/] [#if includeallowableactions][@allowableactions node/][/#if] +${node.name} [/@entry] [/#macro] @@ -108,6 +109,7 @@ [@objectCMISProps node propfilter/] [#if includeallowableactions][@allowableactions node/][/#if] +${node.name} [/@entry] [/#macro] @@ -117,10 +119,10 @@ [#-- --] [#macro foldertree node propfilter="*" includeallowableactions=false includerelationships="none" ns="" maxdepth=-1] -[@folder node propfilter "folders" includeallowableactions includerelationships ns 1 maxdepth "tree"/] +[@folder node propfilter "folders" includeallowableactions includerelationships ns 1 maxdepth "" "tree"/] [/#macro] -[#macro folder node propfilter="*" typesfilter="any" includeallowableactions=false includerelationships="none" ns="" depth=1 maxdepth=1 nestedkind=""] +[#macro folder node propfilter="*" typesfilter="any" includeallowableactions=false includerelationships="none" ns="" depth=1 maxdepth=1 relativePathSegment="" nestedkind=""] [@entry ns] ${node.properties.creator} ${node.id} [#-- TODO --] @@ -138,6 +140,10 @@ [@objectCMISProps node propfilter/] [#if includeallowableactions][@allowableactions node/][/#if] +${node.name} +[#if relativePathSegment != ""] +${relativePathSegment} +[/#if] [#-- recurse for depth greater than 1 --] [#if maxdepth == -1 || depth < maxdepth] [#assign nested = cmischildren(node, typesfilter)/] @@ -150,7 +156,7 @@ [#if child.isDocument] [@document child propfilter includeallowableactions includerelationships/] [#else] - [@folder child propfilter typesfilter includeallowableactions includerelationships ns depth+1 maxdepth nestedkind/] + [@folder child propfilter typesfilter includeallowableactions includerelationships ns depth+1 maxdepth "" nestedkind/] [/#if] [/#list] diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/repository.get.atomsvc.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/repository.get.atomsvc.ftl index 0518d2a80b..294d696d36 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/repository.get.atomsvc.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/repository.get.atomsvc.ftl @@ -70,13 +70,23 @@ - ${absurl(url.serviceContext)}/api/node/{id}?filter={filter}&includeAllowableActions={includeAllowableActions}&includeRelationships={includeRelationships} - entrybyid + ${absurl(url.serviceContext)}/api/node/{id}?filter={filter}&includeAllowableActions={includeAllowableActions}&includePolicyIds={includePolicyIds}&includeRelationships={includeRelationships}&includeACL={includeACL}&renditionFilter={renditionFilter} + ${cmisconstants.URI_OBJECT_BY_ID} + ${cmisconstants.MIMETYPE_ENTRY} + + + ${absurl(url.serviceContext)}/api/path/{path}?filter={filter}&includeAllowableActions={includeAllowableActions}&includePolicyIds={includePolicyIds}&includeRelationships={includeRelationships}&includeACL={includeACL}&renditionFilter={renditionFilter} + ${cmisconstants.URI_OBJECT_BY_PATH} + ${cmisconstants.MIMETYPE_ENTRY} + + + ${absurl(url.serviceContext)}/api/type/{id} + ${cmisconstants.URI_TYPE_BY_ID} ${cmisconstants.MIMETYPE_ENTRY} ${absurl(url.serviceContext)}/api/query?q={q}&includeAllowableActions={includeAllowableActions?}&searchAllVersions={searchAllVersions?}&skipCount={skipCount?}&maxItems={maxItems?} - query + ${cmisconstants.URI_QUERY} ${cmisconstants.MIMETYPE_FEED} diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/store/parents.get.atomfeed.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/store/parents.get.atomfeed.ftl index 9eef0c8a44..f46e457f13 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/store/parents.get.atomfeed.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/store/parents.get.atomfeed.ftl @@ -17,7 +17,7 @@ [/@feedLib.node] [#if parent?? && parent.isContainer] - [@entryLib.folder node=parent propfilter=filter includeallowableactions=includeAllowableActions includerelationships="none"/] + [@entryLib.folder node=parent propfilter=filter includeallowableactions=includeAllowableActions includerelationships="none" relativePathSegment=node.name/] [/#if] diff --git a/source/generated/org/alfresco/repo/cmis/ws/CmisACLType.java b/source/generated/org/alfresco/repo/cmis/ws/CmisACLType.java new file mode 100644 index 0000000000..0710ada15a --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/CmisACLType.java @@ -0,0 +1,152 @@ + +package org.alfresco.repo.cmis.ws; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.namespace.QName; +import org.w3c.dom.Element; + + +/** + *

Java class for cmisACLType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="cmisACLType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ACL" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisAccessControlListType"/>
+ *         <element name="exact" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *       <attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "cmisACLType", propOrder = { + "acl", + "exact", + "any" +}) +public class CmisACLType { + + @XmlElement(name = "ACL", required = true) + protected CmisAccessControlListType acl; + protected Boolean exact; + @XmlAnyElement(lax = true) + protected List any; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the acl property. + * + * @return + * possible object is + * {@link CmisAccessControlListType } + * + */ + public CmisAccessControlListType getACL() { + return acl; + } + + /** + * Sets the value of the acl property. + * + * @param value + * allowed object is + * {@link CmisAccessControlListType } + * + */ + public void setACL(CmisAccessControlListType value) { + this.acl = value; + } + + /** + * Gets the value of the exact property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isExact() { + return exact; + } + + /** + * Sets the value of the exact property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setExact(Boolean value) { + this.exact = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/CmisExtensionType.java b/source/generated/org/alfresco/repo/cmis/ws/CmisExtensionType.java new file mode 100644 index 0000000000..34c9edd5b6 --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/CmisExtensionType.java @@ -0,0 +1,69 @@ + +package org.alfresco.repo.cmis.ws; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for cmisExtensionType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="cmisExtensionType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <any/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "cmisExtensionType", propOrder = { + "any" +}) +public class CmisExtensionType { + + @XmlAnyElement(lax = true) + protected List any; + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/CmisListOfIdsType.java b/source/generated/org/alfresco/repo/cmis/ws/CmisListOfIdsType.java new file mode 100644 index 0000000000..6f165886df --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/CmisListOfIdsType.java @@ -0,0 +1,130 @@ + +package org.alfresco.repo.cmis.ws; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.namespace.QName; +import org.w3c.dom.Element; + + +/** + *

Java class for cmisListOfIdsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="cmisListOfIdsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="id" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *         <any/>
+ *       </sequence>
+ *       <attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "cmisListOfIdsType", namespace = "http://docs.oasis-open.org/ns/cmis/core/200908/", propOrder = { + "id", + "any" +}) +public class CmisListOfIdsType { + + @XmlElement(required = true) + protected List id; + @XmlAnyElement(lax = true) + protected List any; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the id property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the id property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getId().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getId() { + if (id == null) { + id = new ArrayList(); + } + return this.id; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/CmisObjectInFolderContainerType.java b/source/generated/org/alfresco/repo/cmis/ws/CmisObjectInFolderContainerType.java new file mode 100644 index 0000000000..e0f52e6a36 --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/CmisObjectInFolderContainerType.java @@ -0,0 +1,157 @@ + +package org.alfresco.repo.cmis.ws; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.namespace.QName; +import org.w3c.dom.Element; + + +/** + *

Java class for cmisObjectInFolderContainerType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="cmisObjectInFolderContainerType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="objectInFolder" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisObjectInFolderType"/>
+ *         <element name="children" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisObjectInFolderContainerType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *       <attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "cmisObjectInFolderContainerType", propOrder = { + "objectInFolder", + "children", + "any" +}) +public class CmisObjectInFolderContainerType { + + @XmlElement(required = true) + protected CmisObjectInFolderType objectInFolder; + protected List children; + @XmlAnyElement(lax = true) + protected List any; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the objectInFolder property. + * + * @return + * possible object is + * {@link CmisObjectInFolderType } + * + */ + public CmisObjectInFolderType getObjectInFolder() { + return objectInFolder; + } + + /** + * Sets the value of the objectInFolder property. + * + * @param value + * allowed object is + * {@link CmisObjectInFolderType } + * + */ + public void setObjectInFolder(CmisObjectInFolderType value) { + this.objectInFolder = value; + } + + /** + * Gets the value of the children property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the children property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getChildren().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CmisObjectInFolderContainerType } + * + * + */ + public List getChildren() { + if (children == null) { + children = new ArrayList(); + } + return this.children; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/CmisObjectInFolderListType.java b/source/generated/org/alfresco/repo/cmis/ws/CmisObjectInFolderListType.java new file mode 100644 index 0000000000..54b09d5b28 --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/CmisObjectInFolderListType.java @@ -0,0 +1,175 @@ + +package org.alfresco.repo.cmis.ws; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.namespace.QName; +import org.w3c.dom.Element; + + +/** + *

Java class for cmisObjectInFolderListType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="cmisObjectInFolderListType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="objects" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisObjectInFolderType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="hasMoreItems" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         <element name="numItems" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *       <attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "cmisObjectInFolderListType", propOrder = { + "objects", + "hasMoreItems", + "numItems", + "any" +}) +public class CmisObjectInFolderListType { + + protected List objects; + protected boolean hasMoreItems; + protected BigInteger numItems; + @XmlAnyElement(lax = true) + protected List any; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the objects property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the objects property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getObjects().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CmisObjectInFolderType } + * + * + */ + public List getObjects() { + if (objects == null) { + objects = new ArrayList(); + } + return this.objects; + } + + /** + * Gets the value of the hasMoreItems property. + * + */ + public boolean isHasMoreItems() { + return hasMoreItems; + } + + /** + * Sets the value of the hasMoreItems property. + * + */ + public void setHasMoreItems(boolean value) { + this.hasMoreItems = value; + } + + /** + * Gets the value of the numItems property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getNumItems() { + return numItems; + } + + /** + * Sets the value of the numItems property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setNumItems(BigInteger value) { + this.numItems = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/CmisObjectInFolderType.java b/source/generated/org/alfresco/repo/cmis/ws/CmisObjectInFolderType.java new file mode 100644 index 0000000000..b76401986a --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/CmisObjectInFolderType.java @@ -0,0 +1,152 @@ + +package org.alfresco.repo.cmis.ws; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.namespace.QName; +import org.w3c.dom.Element; + + +/** + *

Java class for cmisObjectInFolderType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="cmisObjectInFolderType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="object" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisObjectType"/>
+ *         <element name="pathSegment" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *       <attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "cmisObjectInFolderType", propOrder = { + "object", + "pathSegment", + "any" +}) +public class CmisObjectInFolderType { + + @XmlElement(required = true) + protected CmisObjectType object; + protected String pathSegment; + @XmlAnyElement(lax = true) + protected List any; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the object property. + * + * @return + * possible object is + * {@link CmisObjectType } + * + */ + public CmisObjectType getObject() { + return object; + } + + /** + * Sets the value of the object property. + * + * @param value + * allowed object is + * {@link CmisObjectType } + * + */ + public void setObject(CmisObjectType value) { + this.object = value; + } + + /** + * Gets the value of the pathSegment property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPathSegment() { + return pathSegment; + } + + /** + * Sets the value of the pathSegment property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPathSegment(String value) { + this.pathSegment = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/CmisObjectListType.java b/source/generated/org/alfresco/repo/cmis/ws/CmisObjectListType.java new file mode 100644 index 0000000000..90e371cc7d --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/CmisObjectListType.java @@ -0,0 +1,175 @@ + +package org.alfresco.repo.cmis.ws; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.namespace.QName; +import org.w3c.dom.Element; + + +/** + *

Java class for cmisObjectListType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="cmisObjectListType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="objects" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisObjectType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="hasMoreItems" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         <element name="numItems" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *       <attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "cmisObjectListType", propOrder = { + "objects", + "hasMoreItems", + "numItems", + "any" +}) +public class CmisObjectListType { + + protected List objects; + protected boolean hasMoreItems; + protected BigInteger numItems; + @XmlAnyElement(lax = true) + protected List any; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the objects property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the objects property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getObjects().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CmisObjectType } + * + * + */ + public List getObjects() { + if (objects == null) { + objects = new ArrayList(); + } + return this.objects; + } + + /** + * Gets the value of the hasMoreItems property. + * + */ + public boolean isHasMoreItems() { + return hasMoreItems; + } + + /** + * Sets the value of the hasMoreItems property. + * + */ + public void setHasMoreItems(boolean value) { + this.hasMoreItems = value; + } + + /** + * Gets the value of the numItems property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getNumItems() { + return numItems; + } + + /** + * Sets the value of the numItems property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setNumItems(BigInteger value) { + this.numItems = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/CmisObjectParentsType.java b/source/generated/org/alfresco/repo/cmis/ws/CmisObjectParentsType.java new file mode 100644 index 0000000000..26eeef30dd --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/CmisObjectParentsType.java @@ -0,0 +1,152 @@ + +package org.alfresco.repo.cmis.ws; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.namespace.QName; +import org.w3c.dom.Element; + + +/** + *

Java class for cmisObjectParentsType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="cmisObjectParentsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="object" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisObjectType"/>
+ *         <element name="relativePathSegment" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *       <attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "cmisObjectParentsType", propOrder = { + "object", + "relativePathSegment", + "any" +}) +public class CmisObjectParentsType { + + @XmlElement(required = true) + protected CmisObjectType object; + protected String relativePathSegment; + @XmlAnyElement(lax = true) + protected List any; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the object property. + * + * @return + * possible object is + * {@link CmisObjectType } + * + */ + public CmisObjectType getObject() { + return object; + } + + /** + * Sets the value of the object property. + * + * @param value + * allowed object is + * {@link CmisObjectType } + * + */ + public void setObject(CmisObjectType value) { + this.object = value; + } + + /** + * Gets the value of the relativePathSegment property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRelativePathSegment() { + return relativePathSegment; + } + + /** + * Sets the value of the relativePathSegment property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRelativePathSegment(String value) { + this.relativePathSegment = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/CmisTypeDefinitionListType.java b/source/generated/org/alfresco/repo/cmis/ws/CmisTypeDefinitionListType.java new file mode 100644 index 0000000000..3a9fb31aa6 --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/CmisTypeDefinitionListType.java @@ -0,0 +1,175 @@ + +package org.alfresco.repo.cmis.ws; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.namespace.QName; +import org.w3c.dom.Element; + + +/** + *

Java class for cmisTypeDefinitionListType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="cmisTypeDefinitionListType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="types" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisTypeDefinitionType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="hasMoreItems" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         <element name="numItems" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
+ *         <any/>
+ *       </sequence>
+ *       <attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "cmisTypeDefinitionListType", propOrder = { + "types", + "hasMoreItems", + "numItems", + "any" +}) +public class CmisTypeDefinitionListType { + + protected List types; + protected boolean hasMoreItems; + protected BigInteger numItems; + @XmlAnyElement(lax = true) + protected List any; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the types property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the types property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getTypes().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CmisTypeDefinitionType } + * + * + */ + public List getTypes() { + if (types == null) { + types = new ArrayList(); + } + return this.types; + } + + /** + * Gets the value of the hasMoreItems property. + * + */ + public boolean isHasMoreItems() { + return hasMoreItems; + } + + /** + * Sets the value of the hasMoreItems property. + * + */ + public void setHasMoreItems(boolean value) { + this.hasMoreItems = value; + } + + /** + * Gets the value of the numItems property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getNumItems() { + return numItems; + } + + /** + * Sets the value of the numItems property. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setNumItems(BigInteger value) { + this.numItems = value; + } + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAny().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/CreateDocumentFromSource.java b/source/generated/org/alfresco/repo/cmis/ws/CreateDocumentFromSource.java new file mode 100644 index 0000000000..d1afb442a9 --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/CreateDocumentFromSource.java @@ -0,0 +1,297 @@ + +package org.alfresco.repo.cmis.ws; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="repositoryId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="sourceId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="properties" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisPropertiesType"/>
+ *         <element name="folderId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="versioningState" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}enumVersioningState" minOccurs="0"/>
+ *         <element name="policies" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="addACEs" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisAccessControlListType" minOccurs="0"/>
+ *         <element name="removeACEs" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisAccessControlListType" minOccurs="0"/>
+ *         <element name="extension" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "repositoryId", + "sourceId", + "properties", + "folderId", + "versioningState", + "policies", + "addACEs", + "removeACEs", + "extension" +}) +@XmlRootElement(name = "createDocumentFromSource") +public class CreateDocumentFromSource { + + @XmlElement(required = true) + protected String repositoryId; + @XmlElement(required = true) + protected String sourceId; + @XmlElement(required = true) + protected CmisPropertiesType properties; + @XmlElementRef(name = "folderId", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement folderId; + @XmlElementRef(name = "versioningState", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement versioningState; + @XmlElement(nillable = true) + protected List policies; + @XmlElementRef(name = "addACEs", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement addACEs; + @XmlElementRef(name = "removeACEs", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement removeACEs; + @XmlElementRef(name = "extension", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement extension; + + /** + * Gets the value of the repositoryId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRepositoryId() { + return repositoryId; + } + + /** + * Sets the value of the repositoryId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRepositoryId(String value) { + this.repositoryId = value; + } + + /** + * Gets the value of the sourceId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSourceId() { + return sourceId; + } + + /** + * Sets the value of the sourceId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSourceId(String value) { + this.sourceId = value; + } + + /** + * Gets the value of the properties property. + * + * @return + * possible object is + * {@link CmisPropertiesType } + * + */ + public CmisPropertiesType getProperties() { + return properties; + } + + /** + * Sets the value of the properties property. + * + * @param value + * allowed object is + * {@link CmisPropertiesType } + * + */ + public void setProperties(CmisPropertiesType value) { + this.properties = value; + } + + /** + * Gets the value of the folderId property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public JAXBElement getFolderId() { + return folderId; + } + + /** + * Sets the value of the folderId property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public void setFolderId(JAXBElement value) { + this.folderId = ((JAXBElement ) value); + } + + /** + * Gets the value of the versioningState property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link EnumVersioningState }{@code >} + * + */ + public JAXBElement getVersioningState() { + return versioningState; + } + + /** + * Sets the value of the versioningState property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link EnumVersioningState }{@code >} + * + */ + public void setVersioningState(JAXBElement value) { + this.versioningState = ((JAXBElement ) value); + } + + /** + * Gets the value of the policies property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the policies property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getPolicies().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getPolicies() { + if (policies == null) { + policies = new ArrayList(); + } + return this.policies; + } + + /** + * Gets the value of the addACEs property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link CmisAccessControlListType }{@code >} + * + */ + public JAXBElement getAddACEs() { + return addACEs; + } + + /** + * Sets the value of the addACEs property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link CmisAccessControlListType }{@code >} + * + */ + public void setAddACEs(JAXBElement value) { + this.addACEs = ((JAXBElement ) value); + } + + /** + * Gets the value of the removeACEs property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link CmisAccessControlListType }{@code >} + * + */ + public JAXBElement getRemoveACEs() { + return removeACEs; + } + + /** + * Sets the value of the removeACEs property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link CmisAccessControlListType }{@code >} + * + */ + public void setRemoveACEs(JAXBElement value) { + this.removeACEs = ((JAXBElement ) value); + } + + /** + * Gets the value of the extension property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} + * + */ + public JAXBElement getExtension() { + return extension; + } + + /** + * Sets the value of the extension property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} + * + */ + public void setExtension(JAXBElement value) { + this.extension = ((JAXBElement ) value); + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/CreateDocumentFromSourceResponse.java b/source/generated/org/alfresco/repo/cmis/ws/CreateDocumentFromSourceResponse.java new file mode 100644 index 0000000000..5fd656fec8 --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/CreateDocumentFromSourceResponse.java @@ -0,0 +1,94 @@ + +package org.alfresco.repo.cmis.ws; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="objectId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="extension" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "objectId", + "extension" +}) +@XmlRootElement(name = "createDocumentFromSourceResponse") +public class CreateDocumentFromSourceResponse { + + @XmlElement(required = true) + protected String objectId; + @XmlElementRef(name = "extension", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement extension; + + /** + * Gets the value of the objectId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getObjectId() { + return objectId; + } + + /** + * Sets the value of the objectId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setObjectId(String value) { + this.objectId = value; + } + + /** + * Gets the value of the extension property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} + * + */ + public JAXBElement getExtension() { + return extension; + } + + /** + * Sets the value of the extension property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} + * + */ + public void setExtension(JAXBElement value) { + this.extension = ((JAXBElement ) value); + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/EnumUsers.java b/source/generated/org/alfresco/repo/cmis/ws/EnumUsers.java new file mode 100644 index 0000000000..4ae624f5cd --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/EnumUsers.java @@ -0,0 +1,57 @@ + +package org.alfresco.repo.cmis.ws; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for enumUsers. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="enumUsers">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="cmis:user"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "enumUsers", namespace = "http://docs.oasis-open.org/ns/cmis/core/200908/") +@XmlEnum +public enum EnumUsers { + + + /** + * + * This user can be used on setting ACLs to specify + * the permission this + * user context should have. + * + * + */ + @XmlEnumValue("cmis:user") + CMIS_USER("cmis:user"); + private final String value; + + EnumUsers(String v) { + value = v; + } + + public String value() { + return value; + } + + public static EnumUsers fromValue(String v) { + for (EnumUsers c: EnumUsers.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/GetObject.java b/source/generated/org/alfresco/repo/cmis/ws/GetObject.java new file mode 100644 index 0000000000..d58f38ac9f --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/GetObject.java @@ -0,0 +1,290 @@ + +package org.alfresco.repo.cmis.ws; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="repositoryId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="objectId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="filter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="includeAllowableActions" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <element name="includeRelationships" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}enumIncludeRelationships" minOccurs="0"/>
+ *         <element name="renditionFilter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="includePolicyIds" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <element name="includeACL" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <element name="extension" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "repositoryId", + "objectId", + "filter", + "includeAllowableActions", + "includeRelationships", + "renditionFilter", + "includePolicyIds", + "includeACL", + "extension" +}) +@XmlRootElement(name = "getObject") +public class GetObject { + + @XmlElement(required = true) + protected String repositoryId; + @XmlElement(required = true) + protected String objectId; + @XmlElementRef(name = "filter", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement filter; + @XmlElementRef(name = "includeAllowableActions", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includeAllowableActions; + @XmlElementRef(name = "includeRelationships", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includeRelationships; + @XmlElementRef(name = "renditionFilter", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement renditionFilter; + @XmlElementRef(name = "includePolicyIds", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includePolicyIds; + @XmlElementRef(name = "includeACL", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includeACL; + @XmlElementRef(name = "extension", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement extension; + + /** + * Gets the value of the repositoryId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRepositoryId() { + return repositoryId; + } + + /** + * Sets the value of the repositoryId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRepositoryId(String value) { + this.repositoryId = value; + } + + /** + * Gets the value of the objectId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getObjectId() { + return objectId; + } + + /** + * Sets the value of the objectId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setObjectId(String value) { + this.objectId = value; + } + + /** + * Gets the value of the filter property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public JAXBElement getFilter() { + return filter; + } + + /** + * Sets the value of the filter property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public void setFilter(JAXBElement value) { + this.filter = ((JAXBElement ) value); + } + + /** + * Gets the value of the includeAllowableActions property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public JAXBElement getIncludeAllowableActions() { + return includeAllowableActions; + } + + /** + * Sets the value of the includeAllowableActions property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public void setIncludeAllowableActions(JAXBElement value) { + this.includeAllowableActions = ((JAXBElement ) value); + } + + /** + * Gets the value of the includeRelationships property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link EnumIncludeRelationships }{@code >} + * + */ + public JAXBElement getIncludeRelationships() { + return includeRelationships; + } + + /** + * Sets the value of the includeRelationships property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link EnumIncludeRelationships }{@code >} + * + */ + public void setIncludeRelationships(JAXBElement value) { + this.includeRelationships = ((JAXBElement ) value); + } + + /** + * Gets the value of the renditionFilter property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public JAXBElement getRenditionFilter() { + return renditionFilter; + } + + /** + * Sets the value of the renditionFilter property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public void setRenditionFilter(JAXBElement value) { + this.renditionFilter = ((JAXBElement ) value); + } + + /** + * Gets the value of the includePolicyIds property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public JAXBElement getIncludePolicyIds() { + return includePolicyIds; + } + + /** + * Sets the value of the includePolicyIds property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public void setIncludePolicyIds(JAXBElement value) { + this.includePolicyIds = ((JAXBElement ) value); + } + + /** + * Gets the value of the includeACL property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public JAXBElement getIncludeACL() { + return includeACL; + } + + /** + * Sets the value of the includeACL property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public void setIncludeACL(JAXBElement value) { + this.includeACL = ((JAXBElement ) value); + } + + /** + * Gets the value of the extension property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} + * + */ + public JAXBElement getExtension() { + return extension; + } + + /** + * Sets the value of the extension property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} + * + */ + public void setExtension(JAXBElement value) { + this.extension = ((JAXBElement ) value); + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/GetObjectByPath.java b/source/generated/org/alfresco/repo/cmis/ws/GetObjectByPath.java new file mode 100644 index 0000000000..06c6e61057 --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/GetObjectByPath.java @@ -0,0 +1,290 @@ + +package org.alfresco.repo.cmis.ws; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="repositoryId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="path" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="filter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="includeAllowableActions" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <element name="includeRelationships" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}enumIncludeRelationships" minOccurs="0"/>
+ *         <element name="renditionFilter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="includePolicyIds" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <element name="includeACL" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <element name="extension" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "repositoryId", + "path", + "filter", + "includeAllowableActions", + "includeRelationships", + "renditionFilter", + "includePolicyIds", + "includeACL", + "extension" +}) +@XmlRootElement(name = "getObjectByPath") +public class GetObjectByPath { + + @XmlElement(required = true) + protected String repositoryId; + @XmlElement(required = true) + protected String path; + @XmlElementRef(name = "filter", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement filter; + @XmlElementRef(name = "includeAllowableActions", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includeAllowableActions; + @XmlElementRef(name = "includeRelationships", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includeRelationships; + @XmlElementRef(name = "renditionFilter", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement renditionFilter; + @XmlElementRef(name = "includePolicyIds", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includePolicyIds; + @XmlElementRef(name = "includeACL", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includeACL; + @XmlElementRef(name = "extension", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement extension; + + /** + * Gets the value of the repositoryId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRepositoryId() { + return repositoryId; + } + + /** + * Sets the value of the repositoryId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRepositoryId(String value) { + this.repositoryId = value; + } + + /** + * Gets the value of the path property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPath() { + return path; + } + + /** + * Sets the value of the path property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPath(String value) { + this.path = value; + } + + /** + * Gets the value of the filter property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public JAXBElement getFilter() { + return filter; + } + + /** + * Sets the value of the filter property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public void setFilter(JAXBElement value) { + this.filter = ((JAXBElement ) value); + } + + /** + * Gets the value of the includeAllowableActions property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public JAXBElement getIncludeAllowableActions() { + return includeAllowableActions; + } + + /** + * Sets the value of the includeAllowableActions property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public void setIncludeAllowableActions(JAXBElement value) { + this.includeAllowableActions = ((JAXBElement ) value); + } + + /** + * Gets the value of the includeRelationships property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link EnumIncludeRelationships }{@code >} + * + */ + public JAXBElement getIncludeRelationships() { + return includeRelationships; + } + + /** + * Sets the value of the includeRelationships property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link EnumIncludeRelationships }{@code >} + * + */ + public void setIncludeRelationships(JAXBElement value) { + this.includeRelationships = ((JAXBElement ) value); + } + + /** + * Gets the value of the renditionFilter property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public JAXBElement getRenditionFilter() { + return renditionFilter; + } + + /** + * Sets the value of the renditionFilter property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public void setRenditionFilter(JAXBElement value) { + this.renditionFilter = ((JAXBElement ) value); + } + + /** + * Gets the value of the includePolicyIds property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public JAXBElement getIncludePolicyIds() { + return includePolicyIds; + } + + /** + * Sets the value of the includePolicyIds property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public void setIncludePolicyIds(JAXBElement value) { + this.includePolicyIds = ((JAXBElement ) value); + } + + /** + * Gets the value of the includeACL property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public JAXBElement getIncludeACL() { + return includeACL; + } + + /** + * Sets the value of the includeACL property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public void setIncludeACL(JAXBElement value) { + this.includeACL = ((JAXBElement ) value); + } + + /** + * Gets the value of the extension property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} + * + */ + public JAXBElement getExtension() { + return extension; + } + + /** + * Sets the value of the extension property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} + * + */ + public void setExtension(JAXBElement value) { + this.extension = ((JAXBElement ) value); + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/GetObjectByPathResponse.java b/source/generated/org/alfresco/repo/cmis/ws/GetObjectByPathResponse.java new file mode 100644 index 0000000000..1fb46c7889 --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/GetObjectByPathResponse.java @@ -0,0 +1,64 @@ + +package org.alfresco.repo.cmis.ws; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="object" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisObjectType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "object" +}) +@XmlRootElement(name = "getObjectByPathResponse") +public class GetObjectByPathResponse { + + @XmlElement(required = true) + protected CmisObjectType object; + + /** + * Gets the value of the object property. + * + * @return + * possible object is + * {@link CmisObjectType } + * + */ + public CmisObjectType getObject() { + return object; + } + + /** + * Sets the value of the object property. + * + * @param value + * allowed object is + * {@link CmisObjectType } + * + */ + public void setObject(CmisObjectType value) { + this.object = value; + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/GetObjectOfLatestVersion.java b/source/generated/org/alfresco/repo/cmis/ws/GetObjectOfLatestVersion.java new file mode 100644 index 0000000000..ccb5deafda --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/GetObjectOfLatestVersion.java @@ -0,0 +1,317 @@ + +package org.alfresco.repo.cmis.ws; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="repositoryId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="objectId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="major" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <element name="filter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="includeAllowableActions" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <element name="includeRelationships" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}enumIncludeRelationships" minOccurs="0"/>
+ *         <element name="renditionFilter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="includePolicyIds" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <element name="includeACL" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <element name="extension" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "repositoryId", + "objectId", + "major", + "filter", + "includeAllowableActions", + "includeRelationships", + "renditionFilter", + "includePolicyIds", + "includeACL", + "extension" +}) +@XmlRootElement(name = "getObjectOfLatestVersion") +public class GetObjectOfLatestVersion { + + @XmlElement(required = true) + protected String repositoryId; + @XmlElement(required = true) + protected String objectId; + protected Boolean major; + @XmlElementRef(name = "filter", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement filter; + @XmlElementRef(name = "includeAllowableActions", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includeAllowableActions; + @XmlElementRef(name = "includeRelationships", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includeRelationships; + @XmlElementRef(name = "renditionFilter", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement renditionFilter; + @XmlElementRef(name = "includePolicyIds", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includePolicyIds; + @XmlElementRef(name = "includeACL", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includeACL; + @XmlElementRef(name = "extension", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement extension; + + /** + * Gets the value of the repositoryId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRepositoryId() { + return repositoryId; + } + + /** + * Sets the value of the repositoryId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRepositoryId(String value) { + this.repositoryId = value; + } + + /** + * Gets the value of the objectId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getObjectId() { + return objectId; + } + + /** + * Sets the value of the objectId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setObjectId(String value) { + this.objectId = value; + } + + /** + * Gets the value of the major property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isMajor() { + return major; + } + + /** + * Sets the value of the major property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setMajor(Boolean value) { + this.major = value; + } + + /** + * Gets the value of the filter property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public JAXBElement getFilter() { + return filter; + } + + /** + * Sets the value of the filter property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public void setFilter(JAXBElement value) { + this.filter = ((JAXBElement ) value); + } + + /** + * Gets the value of the includeAllowableActions property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public JAXBElement getIncludeAllowableActions() { + return includeAllowableActions; + } + + /** + * Sets the value of the includeAllowableActions property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public void setIncludeAllowableActions(JAXBElement value) { + this.includeAllowableActions = ((JAXBElement ) value); + } + + /** + * Gets the value of the includeRelationships property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link EnumIncludeRelationships }{@code >} + * + */ + public JAXBElement getIncludeRelationships() { + return includeRelationships; + } + + /** + * Sets the value of the includeRelationships property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link EnumIncludeRelationships }{@code >} + * + */ + public void setIncludeRelationships(JAXBElement value) { + this.includeRelationships = ((JAXBElement ) value); + } + + /** + * Gets the value of the renditionFilter property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public JAXBElement getRenditionFilter() { + return renditionFilter; + } + + /** + * Sets the value of the renditionFilter property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public void setRenditionFilter(JAXBElement value) { + this.renditionFilter = ((JAXBElement ) value); + } + + /** + * Gets the value of the includePolicyIds property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public JAXBElement getIncludePolicyIds() { + return includePolicyIds; + } + + /** + * Sets the value of the includePolicyIds property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public void setIncludePolicyIds(JAXBElement value) { + this.includePolicyIds = ((JAXBElement ) value); + } + + /** + * Gets the value of the includeACL property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public JAXBElement getIncludeACL() { + return includeACL; + } + + /** + * Sets the value of the includeACL property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public void setIncludeACL(JAXBElement value) { + this.includeACL = ((JAXBElement ) value); + } + + /** + * Gets the value of the extension property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} + * + */ + public JAXBElement getExtension() { + return extension; + } + + /** + * Sets the value of the extension property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} + * + */ + public void setExtension(JAXBElement value) { + this.extension = ((JAXBElement ) value); + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/GetObjectOfLatestVersionResponse.java b/source/generated/org/alfresco/repo/cmis/ws/GetObjectOfLatestVersionResponse.java new file mode 100644 index 0000000000..0a8ef73578 --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/GetObjectOfLatestVersionResponse.java @@ -0,0 +1,64 @@ + +package org.alfresco.repo.cmis.ws; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="object" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisObjectType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "object" +}) +@XmlRootElement(name = "getObjectOfLatestVersionResponse") +public class GetObjectOfLatestVersionResponse { + + @XmlElement(required = true) + protected CmisObjectType object; + + /** + * Gets the value of the object property. + * + * @return + * possible object is + * {@link CmisObjectType } + * + */ + public CmisObjectType getObject() { + return object; + } + + /** + * Sets the value of the object property. + * + * @param value + * allowed object is + * {@link CmisObjectType } + * + */ + public void setObject(CmisObjectType value) { + this.object = value; + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/GetObjectRelationships.java b/source/generated/org/alfresco/repo/cmis/ws/GetObjectRelationships.java new file mode 100644 index 0000000000..b34f299269 --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/GetObjectRelationships.java @@ -0,0 +1,318 @@ + +package org.alfresco.repo.cmis.ws; + +import java.math.BigInteger; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="repositoryId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="objectId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="includeSubRelationshipTypes" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <element name="relationshipDirection" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}enumRelationshipDirection" minOccurs="0"/>
+ *         <element name="typeId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="filter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="includeAllowableActions" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         <element name="maxItems" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
+ *         <element name="skipCount" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
+ *         <element name="extension" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "repositoryId", + "objectId", + "includeSubRelationshipTypes", + "relationshipDirection", + "typeId", + "filter", + "includeAllowableActions", + "maxItems", + "skipCount", + "extension" +}) +@XmlRootElement(name = "getObjectRelationships") +public class GetObjectRelationships { + + @XmlElement(required = true) + protected String repositoryId; + @XmlElement(required = true) + protected String objectId; + protected Boolean includeSubRelationshipTypes; + @XmlElementRef(name = "relationshipDirection", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement relationshipDirection; + @XmlElementRef(name = "typeId", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement typeId; + @XmlElementRef(name = "filter", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement filter; + @XmlElementRef(name = "includeAllowableActions", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement includeAllowableActions; + @XmlElementRef(name = "maxItems", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement maxItems; + @XmlElementRef(name = "skipCount", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement skipCount; + @XmlElementRef(name = "extension", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class) + protected JAXBElement extension; + + /** + * Gets the value of the repositoryId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRepositoryId() { + return repositoryId; + } + + /** + * Sets the value of the repositoryId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRepositoryId(String value) { + this.repositoryId = value; + } + + /** + * Gets the value of the objectId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getObjectId() { + return objectId; + } + + /** + * Sets the value of the objectId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setObjectId(String value) { + this.objectId = value; + } + + /** + * Gets the value of the includeSubRelationshipTypes property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isIncludeSubRelationshipTypes() { + return includeSubRelationshipTypes; + } + + /** + * Sets the value of the includeSubRelationshipTypes property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setIncludeSubRelationshipTypes(Boolean value) { + this.includeSubRelationshipTypes = value; + } + + /** + * Gets the value of the relationshipDirection property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link EnumRelationshipDirection }{@code >} + * + */ + public JAXBElement getRelationshipDirection() { + return relationshipDirection; + } + + /** + * Sets the value of the relationshipDirection property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link EnumRelationshipDirection }{@code >} + * + */ + public void setRelationshipDirection(JAXBElement value) { + this.relationshipDirection = ((JAXBElement ) value); + } + + /** + * Gets the value of the typeId property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public JAXBElement getTypeId() { + return typeId; + } + + /** + * Sets the value of the typeId property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public void setTypeId(JAXBElement value) { + this.typeId = ((JAXBElement ) value); + } + + /** + * Gets the value of the filter property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public JAXBElement getFilter() { + return filter; + } + + /** + * Sets the value of the filter property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link String }{@code >} + * + */ + public void setFilter(JAXBElement value) { + this.filter = ((JAXBElement ) value); + } + + /** + * Gets the value of the includeAllowableActions property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public JAXBElement getIncludeAllowableActions() { + return includeAllowableActions; + } + + /** + * Sets the value of the includeAllowableActions property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link Boolean }{@code >} + * + */ + public void setIncludeAllowableActions(JAXBElement value) { + this.includeAllowableActions = ((JAXBElement ) value); + } + + /** + * Gets the value of the maxItems property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} + * + */ + public JAXBElement getMaxItems() { + return maxItems; + } + + /** + * Sets the value of the maxItems property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} + * + */ + public void setMaxItems(JAXBElement value) { + this.maxItems = ((JAXBElement ) value); + } + + /** + * Gets the value of the skipCount property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} + * + */ + public JAXBElement getSkipCount() { + return skipCount; + } + + /** + * Sets the value of the skipCount property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link BigInteger }{@code >} + * + */ + public void setSkipCount(JAXBElement value) { + this.skipCount = ((JAXBElement ) value); + } + + /** + * Gets the value of the extension property. + * + * @return + * possible object is + * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} + * + */ + public JAXBElement getExtension() { + return extension; + } + + /** + * Sets the value of the extension property. + * + * @param value + * allowed object is + * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} + * + */ + public void setExtension(JAXBElement value) { + this.extension = ((JAXBElement ) value); + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/GetObjectRelationshipsResponse.java b/source/generated/org/alfresco/repo/cmis/ws/GetObjectRelationshipsResponse.java new file mode 100644 index 0000000000..866dbe4d28 --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/GetObjectRelationshipsResponse.java @@ -0,0 +1,64 @@ + +package org.alfresco.repo.cmis.ws; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="objects" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisObjectListType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "objects" +}) +@XmlRootElement(name = "getObjectRelationshipsResponse") +public class GetObjectRelationshipsResponse { + + @XmlElement(required = true) + protected CmisObjectListType objects; + + /** + * Gets the value of the objects property. + * + * @return + * possible object is + * {@link CmisObjectListType } + * + */ + public CmisObjectListType getObjects() { + return objects; + } + + /** + * Sets the value of the objects property. + * + * @param value + * allowed object is + * {@link CmisObjectListType } + * + */ + public void setObjects(CmisObjectListType value) { + this.objects = value; + } + +} diff --git a/source/generated/org/alfresco/repo/cmis/ws/GetObjectResponse.java b/source/generated/org/alfresco/repo/cmis/ws/GetObjectResponse.java new file mode 100644 index 0000000000..1d0b691d87 --- /dev/null +++ b/source/generated/org/alfresco/repo/cmis/ws/GetObjectResponse.java @@ -0,0 +1,64 @@ + +package org.alfresco.repo.cmis.ws; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="object" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisObjectType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "object" +}) +@XmlRootElement(name = "getObjectResponse") +public class GetObjectResponse { + + @XmlElement(required = true) + protected CmisObjectType object; + + /** + * Gets the value of the object property. + * + * @return + * possible object is + * {@link CmisObjectType } + * + */ + public CmisObjectType getObject() { + return object; + } + + /** + * Sets the value of the object property. + * + * @param value + * allowed object is + * {@link CmisObjectType } + * + */ + public void setObject(CmisObjectType value) { + this.object = value; + } + +} diff --git a/source/java/org/alfresco/repo/cmis/ws/DMAbstractServicePort.java b/source/java/org/alfresco/repo/cmis/ws/DMAbstractServicePort.java index 1916061083..98c96eb754 100644 --- a/source/java/org/alfresco/repo/cmis/ws/DMAbstractServicePort.java +++ b/source/java/org/alfresco/repo/cmis/ws/DMAbstractServicePort.java @@ -38,6 +38,7 @@ 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.AlfrescoObjectType; import org.alfresco.repo.cmis.ws.utils.CmisObjectsUtils; import org.alfresco.repo.cmis.ws.utils.PropertyUtil; import org.alfresco.repo.version.VersionModel; @@ -262,6 +263,10 @@ public class DMAbstractServicePort protected CmisAllowableActionsType determineObjectAllowableActions(Object objectIdentifier) throws CmisException { + if (objectIdentifier instanceof String) + { + objectIdentifier = cmisObjectsUtils.getIdentifierInstance(objectIdentifier.toString(), AlfrescoObjectType.ANY_OBJECT); + } if (objectIdentifier instanceof AssociationRef) { return determineRelationshipAllowableActions((AssociationRef) objectIdentifier); diff --git a/source/java/org/alfresco/repo/cmis/ws/DMMultiFilingServicePort.java b/source/java/org/alfresco/repo/cmis/ws/DMMultiFilingServicePort.java index 940e7231bd..1a8fc53920 100755 --- a/source/java/org/alfresco/repo/cmis/ws/DMMultiFilingServicePort.java +++ b/source/java/org/alfresco/repo/cmis/ws/DMMultiFilingServicePort.java @@ -91,8 +91,15 @@ public class DMMultiFilingServicePort extends DMAbstractServicePort implements M if (!cmisObjectsUtils.removeObject(objectNodeReference, folderNodeReference)) { Throwable exception = cmisObjectsUtils.getLastOperationException(); - throw cmisObjectsUtils.createCmisException(("Can't remove specified Object from specified Folder. Cause exception message: " + exception.toString()), - EnumServiceException.STORAGE, exception); + if (null != exception) + { + throw cmisObjectsUtils.createCmisException(("Can't remove specified Object from specified Folder. Cause exception message: " + exception.toString()), + EnumServiceException.STORAGE, exception); + } + else + { + throw cmisObjectsUtils.createCmisException("Can't remove specified Object from specified Folder", EnumServiceException.STORAGE, exception); + } } } diff --git a/source/java/org/alfresco/repo/cmis/ws/DMNavigationServicePort.java b/source/java/org/alfresco/repo/cmis/ws/DMNavigationServicePort.java index 0725423b7c..00bb16e0f8 100644 --- a/source/java/org/alfresco/repo/cmis/ws/DMNavigationServicePort.java +++ b/source/java/org/alfresco/repo/cmis/ws/DMNavigationServicePort.java @@ -277,7 +277,7 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na while (!descedantsStack.isEmpty()) { RecursiveElement element = descedantsStack.pop(); - CmisObjectInFolderContainerType currentContainer = createObjectInFolderContainer(folderNodeRef, propertyFilter, includeAllowableActions, includeRelationships, + CmisObjectInFolderContainerType currentContainer = createObjectInFolderContainer(element.getCurrentNodeRef(), propertyFilter, includeAllowableActions, includeRelationships, renditionFilter, includePathSegments); element.getParentContainerType().getChildren().add(currentContainer); if (element.getDepth() <= maxDepth) diff --git a/source/java/org/alfresco/repo/cmis/ws/DMObjectServicePort.java b/source/java/org/alfresco/repo/cmis/ws/DMObjectServicePort.java index f96abad625..d072e3145d 100644 --- a/source/java/org/alfresco/repo/cmis/ws/DMObjectServicePort.java +++ b/source/java/org/alfresco/repo/cmis/ws/DMObjectServicePort.java @@ -131,7 +131,8 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object } writer.putContent(inputstream); } - appendDataToDocument(newDocumentNodeRef, properties, versioningState, policies, addACEs, removeACEs, objectId); + PropertyFilter propertyFilter = createPropertyFilter(createIgnoringFilter(new String[] { CMISDictionaryModel.PROP_NAME, CMISDictionaryModel.PROP_OBJECT_TYPE_ID })); + appendDataToDocument(newDocumentNodeRef, properties, versioningState, policies, addACEs, removeACEs, objectId, propertyFilter); } /** @@ -167,7 +168,8 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object { throw cmisObjectsUtils.createCmisException("Source document not found", EnumServiceException.INVALID_ARGUMENT); } - appendDataToDocument(newDocumentNodeRef, properties, versioningState, policies, addACEs, removeACEs, objectId); + PropertyFilter propertyFilter = createPropertyFilter(createIgnoringFilter(new String[] { CMISDictionaryModel.PROP_OBJECT_TYPE_ID })); + appendDataToDocument(newDocumentNodeRef, properties, versioningState, policies, addACEs, removeACEs, objectId, propertyFilter); } /** @@ -673,13 +675,12 @@ public class DMObjectServicePort extends DMAbstractServicePort implements Object } private void appendDataToDocument(NodeRef targetDocumentNodeRef, CmisPropertiesType properties, EnumVersioningState versioningState, - List policies, CmisAccessControlListType addACEs, CmisAccessControlListType removeACEs, Holder objectId) + List policies, CmisAccessControlListType addACEs, CmisAccessControlListType removeACEs, Holder objectId, PropertyFilter propertyFilter) throws CmisException { // TODO: process Policies and ACE - propertiesUtil.setProperties(targetDocumentNodeRef, properties, createPropertyFilter(createIgnoringFilter(new String[] { CMISDictionaryModel.PROP_NAME, - CMISDictionaryModel.PROP_OBJECT_TYPE_ID }))); + propertiesUtil.setProperties(targetDocumentNodeRef, properties, propertyFilter); String versionLabel = null; diff --git a/source/java/org/alfresco/repo/cmis/ws/utils/CmisObjectsUtils.java b/source/java/org/alfresco/repo/cmis/ws/utils/CmisObjectsUtils.java index 9858d499de..2c69bf1e45 100755 --- a/source/java/org/alfresco/repo/cmis/ws/utils/CmisObjectsUtils.java +++ b/source/java/org/alfresco/repo/cmis/ws/utils/CmisObjectsUtils.java @@ -206,16 +206,18 @@ public class CmisObjectsUtils public List deleteFolder(NodeRef folderNodeReference, boolean continueOnFailure, EnumUnfileObject unfillingStrategy, boolean deleteAllVersions) throws CmisException { - CmisObjectIterator iterator = new CmisObjectIterator(folderNodeReference, unfillingStrategy, continueOnFailure, deleteAllVersions, nodeService, fileFolderService, - versionService, checkOutCheckInService, this); - if (iterator.hasNext()) - { - for (; iterator.hasNext(); iterator.next()) - { - iterator.remove(); - } - } - return iterator.getFailToDelete(); +// TODO: DC 16Oct09 - commented out due to missing CmisObjectIterator +// CmisObjectIterator iterator = new CmisObjectIterator(folderNodeReference, unfillingStrategy, continueOnFailure, deleteAllVersions, nodeService, fileFolderService, +// versionService, checkOutCheckInService, this); +// if (iterator.hasNext()) +// { +// for (; iterator.hasNext(); iterator.next()) +// { +// iterator.remove(); +// } +// } +// return iterator.getFailToDelete(); + return null; } public boolean deleteObject(NodeRef objectNodeReference) diff --git a/source/test/java/org/alfresco/repo/cmis/ws/CmisServiceTestHelper.java b/source/test/java/org/alfresco/repo/cmis/ws/CmisServiceTestHelper.java index 722b131c26..1e5e3131dd 100755 --- a/source/test/java/org/alfresco/repo/cmis/ws/CmisServiceTestHelper.java +++ b/source/test/java/org/alfresco/repo/cmis/ws/CmisServiceTestHelper.java @@ -339,7 +339,7 @@ public class CmisServiceTestHelper extends TestCase public void deleteDocument(String documentId) throws Exception { - objectServicePort.deleteObject(repositoryId, documentId, true, null); + objectServicePort.deleteObject(repositoryId, documentId, true, new Holder()); assertNull("Document has not been deleted", getObjectProperties(documentId)); } @@ -356,16 +356,17 @@ public class CmisServiceTestHelper extends TestCase public CmisObjectType getObjectProperties(String objectId, String filter) { CmisPropertiesType response = null; + CmisObjectType result = null; try { response = objectServicePort.getProperties(repositoryId, objectId, filter, null); + result = new CmisObjectType(); + result.setProperties(response); } catch (Exception e) { } - CmisObjectType result = new CmisObjectType(); - result.setProperties(response); return result; } @@ -540,7 +541,7 @@ public class CmisServiceTestHelper extends TestCase contentStream.setMimeType(MimetypeMap.MIMETYPE_TEXT_PLAIN); DataHandler dataHandler = new DataHandler("Test content string :" + System.currentTimeMillis(), MimetypeMap.MIMETYPE_TEXT_PLAIN); contentStream.setStream(dataHandler); - versioningServicePort.checkIn(repositoryId, documentId, isMajor, properties, contentStream, checkinComment, null, null, null, null); + versioningServicePort.checkIn(repositoryId, documentId, isMajor, properties, contentStream, checkinComment, null, null, null, new Holder()); } catch (Throwable e) { @@ -553,7 +554,7 @@ public class CmisServiceTestHelper extends TestCase { try { - versioningServicePort.checkOut(repositoryId, documentId, null, contentCopied); + versioningServicePort.checkOut(repositoryId, documentId, new Holder(), contentCopied); } catch (Throwable e) { @@ -639,7 +640,7 @@ public class CmisServiceTestHelper extends TestCase { try { - multiFilingServicePort.addObjectToFolder(repositoryId, documentId, anotherFolderId, false, null); + multiFilingServicePort.addObjectToFolder(repositoryId, documentId, anotherFolderId, false, new Holder()); } catch (Throwable e) { @@ -651,7 +652,7 @@ public class CmisServiceTestHelper extends TestCase { try { - multiFilingServicePort.removeObjectFromFolder(repositoryId, documentId, folderId, null); + multiFilingServicePort.removeObjectFromFolder(repositoryId, documentId, folderId, new Holder()); } catch (Exception e) { diff --git a/source/test/java/org/alfresco/repo/cmis/ws/DMDiscoveryServiceTest.java b/source/test/java/org/alfresco/repo/cmis/ws/DMDiscoveryServiceTest.java index 3c93d38673..f329e5cf1f 100755 --- a/source/test/java/org/alfresco/repo/cmis/ws/DMDiscoveryServiceTest.java +++ b/source/test/java/org/alfresco/repo/cmis/ws/DMDiscoveryServiceTest.java @@ -35,7 +35,7 @@ import javax.xml.ws.Service; public class DMDiscoveryServiceTest extends AbstractServiceTest { public final static String SERVICE_WSDL_LOCATION = CmisServiceTestHelper.ALFRESCO_URL + "/cmis/DiscoveryService?wsdl"; - public final static QName SERVICE_NAME = new QName("http://docs.oasis-open.org/ns/cmis/ws/200901", "DiscoveryService"); + public final static QName SERVICE_NAME = new QName("http://docs.oasis-open.org/ns/cmis/ws/200908/", "DiscoveryService"); public final static String STATEMENT = "SELECT * FROM cmis:document"; public DMDiscoveryServiceTest() diff --git a/source/test/java/org/alfresco/repo/cmis/ws/DMMultiFilingServiceTest.java b/source/test/java/org/alfresco/repo/cmis/ws/DMMultiFilingServiceTest.java index 1fdb23bd17..082680fbb7 100755 --- a/source/test/java/org/alfresco/repo/cmis/ws/DMMultiFilingServiceTest.java +++ b/source/test/java/org/alfresco/repo/cmis/ws/DMMultiFilingServiceTest.java @@ -25,6 +25,7 @@ package org.alfresco.repo.cmis.ws; import javax.xml.namespace.QName; +import javax.xml.ws.Holder; import org.alfresco.cmis.CMISDictionaryModel; @@ -77,7 +78,10 @@ public class DMMultiFilingServiceTest extends AbstractServiceTest public void testAddObjectToFolder() throws Exception { - ((MultiFilingServicePort) servicePort).addObjectToFolder(repositoryId, documentId, anotherFolderId, false, null); + MultiFilingServicePort multiFilingServicePort = helper.getMultiFilingServicePort(); + helper.authenticateServicePort(multiFilingServicePort, CmisServiceTestHelper.USERNAME_ADMIN, CmisServiceTestHelper.PASSWORD_ADMIN); + Holder holder = new Holder(); + multiFilingServicePort.addObjectToFolder(repositoryId, documentId, anotherFolderId, false, holder); boolean found = false; for (CmisObjectInFolderType cmisObjectType : helper.getChildren(anotherFolderId, 0, CMISDictionaryModel.PROP_OBJECT_ID)) { @@ -94,13 +98,12 @@ public class DMMultiFilingServiceTest extends AbstractServiceTest public void testRemoveObjectFromFolder() throws Exception { - helper.addObjectToFolder(documentId, anotherFolderId); try { // remove object from all folders expects Exception - ((MultiFilingServicePort) servicePort).removeObjectFromFolder(repositoryId, documentId, null, null); + ((MultiFilingServicePort) servicePort).removeObjectFromFolder(repositoryId, documentId, null, new Holder()); fail("Expects exception"); } catch (CmisException e) @@ -113,18 +116,18 @@ public class DMMultiFilingServiceTest extends AbstractServiceTest try { // remove object from folder where it is not situated expects Exception - ((MultiFilingServicePort) servicePort).removeObjectFromFolder(repositoryId, documentId, folderId, null); + ((MultiFilingServicePort) servicePort).removeObjectFromFolder(repositoryId, documentId, folderId, new Holder()); fail("Expected exception"); } catch (CmisException e) { - assertTrue(e.getFaultInfo().getType().equals(EnumServiceException.INVALID_ARGUMENT)); + assertTrue(e.toString(), e.getFaultInfo().getType().equals(EnumServiceException.STORAGE)); } try { // remove object from last folder expects Exception - ((MultiFilingServicePort) servicePort).removeObjectFromFolder(repositoryId, documentId, companyHomeId, null); + ((MultiFilingServicePort) servicePort).removeObjectFromFolder(repositoryId, documentId, companyHomeId, new Holder()); fail("Expected exception"); } catch (CmisException e) diff --git a/source/test/java/org/alfresco/repo/cmis/ws/DMNavigationServiceTest.java b/source/test/java/org/alfresco/repo/cmis/ws/DMNavigationServiceTest.java index 66f16df437..07c327c7d0 100755 --- a/source/test/java/org/alfresco/repo/cmis/ws/DMNavigationServiceTest.java +++ b/source/test/java/org/alfresco/repo/cmis/ws/DMNavigationServiceTest.java @@ -72,14 +72,14 @@ public class DMNavigationServiceTest extends AbstractServiceTest // check out Holder documentIdHolder = new Holder(documentId); Holder contentCopied = new Holder(); - helper.versioningServicePort.checkOut(repositoryId, documentIdHolder, null, contentCopied); + helper.versioningServicePort.checkOut(repositoryId, documentIdHolder, new Holder(), contentCopied); assertTrue(contentCopied.value); String documentName1 = "Test cmis document (" + System.currentTimeMillis() + ")"; String documentId1 = helper.createDocument(documentName1, folderId); Holder documentIdHolder1 = new Holder(documentId1); contentCopied = new Holder(); - helper.versioningServicePort.checkOut(repositoryId, documentIdHolder1, null, contentCopied); + helper.versioningServicePort.checkOut(repositoryId, documentIdHolder1, new Holder(), contentCopied); assertTrue(contentCopied.value); List result = getCheckedoutDocs(null, 0, 0); @@ -87,7 +87,7 @@ public class DMNavigationServiceTest extends AbstractServiceTest if (result == null || result.size() < 2) { // check in - helper.versioningServicePort.checkIn(repositoryId, documentIdHolder, false, null, null, null, null, null, null, null); + helper.versioningServicePort.checkIn(repositoryId, documentIdHolder, false, null, null, null, null, null, null, new Holder()); fail("Not all checkout docs have been found"); } validateResponse(result); @@ -97,7 +97,7 @@ public class DMNavigationServiceTest extends AbstractServiceTest assertTrue(result.size() == 1); // check in - helper.versioningServicePort.checkIn(repositoryId, documentIdHolder, false, null, null, null, null, null, null, null); + helper.versioningServicePort.checkIn(repositoryId, documentIdHolder, false, null, null, null, null, null, null, new Holder()); result = getCheckedoutDocs(companyHomeId, 0, 0); assertFalse("Wrong results", isExistItemWithProperty(result, CMISDictionaryModel.PROP_NAME, documentName)); @@ -106,11 +106,21 @@ public class DMNavigationServiceTest extends AbstractServiceTest public void testGetChildren() throws Exception { - List response = getChildren(companyHomeId, 100); + List response = getChildren(companyHomeId, 100, true); - if ((response != null)) + if (null != response) { - validateResponse(response); + for (CmisObjectInFolderType object : response) + { + assertNotNull(object); + assertNotNull(object.getObject()); + assertNotNull(object.getObject().getProperties()); + assertNotNull(object.getObject().getProperties().getProperty()); + String name = getStringProperty(object.getObject().getProperties(), CMISDictionaryModel.PROP_NAME); + assertNotNull("Name property is undefined", name); + assertNotNull(object.getPathSegment()); + assertTrue(object.getPathSegment().endsWith(name)); + } } else { @@ -124,10 +134,10 @@ public class DMNavigationServiceTest extends AbstractServiceTest @SuppressWarnings("unused") String documentId1 = helper.createDocument(documentName1, folderId, CMISDictionaryModel.DOCUMENT_TYPE_ID, EnumVersioningState.MAJOR); - response = getChildren(folderId, 2); + response = getChildren(folderId, 2, false); assertEquals(2, response.size()); - assertTrue(getStringProperty(response.get(0).getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName1)); - assertTrue(getStringProperty(response.get(1).getProperties(), CMISDictionaryModel.PROP_NAME).equals(documentName1)); + assertTrue(getStringProperty(response.get(0).getObject().getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName1)); + assertTrue(getStringProperty(response.get(1).getObject().getProperties(), CMISDictionaryModel.PROP_NAME).equals(documentName1)); // TODO: not implemented // assertNotNull(response.getObject().get(0).getAllowableActions()); @@ -178,7 +188,7 @@ public class DMNavigationServiceTest extends AbstractServiceTest { List response = getFolderTree(companyHomeId, BigInteger.valueOf(5)); - if ((response != null)) + if (null != response) { validateResponse(response, false); } @@ -187,15 +197,16 @@ public class DMNavigationServiceTest extends AbstractServiceTest fail("response is null"); } - folderName = "Test Cmis Folder (" + System.currentTimeMillis() + ")"; - String folderId1 = helper.createFolder(folderName, folderId); + String internalFolderName = "Test Cmis Folder (" + System.currentTimeMillis() + ")"; + String folderId1 = helper.createFolder(internalFolderName, folderId); documentName = "Test cmis document (" + System.currentTimeMillis() + ")"; @SuppressWarnings("unused") String documentId1 = helper.createDocument(documentName, folderId1, CMISDictionaryModel.DOCUMENT_TYPE_ID, EnumVersioningState.MAJOR); response = getFolderTree(folderId, null); assertTrue(response.size() == 1); - assertTrue(getStringProperty(response.get(0).getObjectInFolder().getObject().getProperties(), CMISDictionaryModel.PROP_NAME).equals(folderName)); + String name = getStringProperty(response.get(0).getObjectInFolder().getObject().getProperties(), CMISDictionaryModel.PROP_NAME); + assertEquals(internalFolderName, name); // TODO: not implemented // assertNotNull(response.getObject().get(0).getAllowableActions()); @@ -279,11 +290,12 @@ public class DMNavigationServiceTest extends AbstractServiceTest return result; } - private List getChildren(String folderId, int maxItems) throws Exception + private List getChildren(String folderId, int maxItems, boolean includePathSegments) throws Exception { - Holder> resultHolder = new Holder>(); - ((NavigationServicePort) servicePort).getChildren(repositoryId, folderId, "*", "", false, null, "", false, BigInteger.valueOf(maxItems), BigInteger.valueOf(0), null); - return resultHolder.value; + CmisObjectInFolderListType result = ((NavigationServicePort) servicePort).getChildren(repositoryId, folderId, "*", "", false, null, "", includePathSegments, BigInteger + .valueOf(maxItems), BigInteger.valueOf(0), null); + assertNotNull("Get Children response is undefined", result); + return result.getObjects(); } public CmisObjectType getFolderParent(String folderId, String filter) throws Exception diff --git a/source/test/java/org/alfresco/repo/cmis/ws/DMObjectServiceTest.java b/source/test/java/org/alfresco/repo/cmis/ws/DMObjectServiceTest.java index 635cd0b74b..3f7c4f3516 100644 --- a/source/test/java/org/alfresco/repo/cmis/ws/DMObjectServiceTest.java +++ b/source/test/java/org/alfresco/repo/cmis/ws/DMObjectServiceTest.java @@ -24,6 +24,7 @@ */ package org.alfresco.repo.cmis.ws; +import java.io.StringWriter; import java.math.BigInteger; import java.util.List; @@ -32,6 +33,7 @@ import javax.xml.ws.Holder; import org.alfresco.cmis.CMISDictionaryModel; import org.alfresco.repo.content.MimetypeMap; +import org.apache.commons.io.IOUtils; /** * @author Alexander Tsvetkov @@ -39,7 +41,7 @@ import org.alfresco.repo.content.MimetypeMap; public class DMObjectServiceTest extends AbstractServiceTest { - private CmisObjectType propertiesObject; + private CmisObjectType resultObject; public DMObjectServiceTest() { @@ -91,50 +93,61 @@ public class DMObjectServiceTest extends AbstractServiceTest DataHandler dataHandler = new DataHandler(content, MimetypeMap.MIMETYPE_TEXT_PLAIN); cmisStream.setStream(dataHandler); - // public String helper.createDocument(String repositoryId, String typeId, CmisPropertiesType properties, String folderId, CmisContentStreamType contentStream, - // EnumVersioningState versioningState) - String documentId; // MAJOR documentName = "Test cmis document (" + System.currentTimeMillis() + ")"; documentId = helper.createDocument(documentName, folderId, CMISDictionaryModel.DOCUMENT_TYPE_ID, EnumVersioningState.MAJOR); - propertiesObject = helper.getObjectProperties(documentId); - assertObjectPropertiesNotNull(propertiesObject); + resultObject = helper.getObjectProperties(documentId); + assertObjectPropertiesNotNull(resultObject); // assertTrue(getPropertyBooleanValue(propertiesObject, CMISMapping.PROP_IS_MAJOR_VERSION)); - assertFalse(getBooleanProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT)); + assertFalse(getBooleanProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT)); helper.deleteDocument(documentId); // MINOR documentName = "Test cmis document (" + System.currentTimeMillis() + ")"; documentId = helper.createDocument(documentName, folderId, CMISDictionaryModel.DOCUMENT_TYPE_ID, EnumVersioningState.MINOR); - propertiesObject = helper.getObjectProperties(documentId); - assertObjectPropertiesNotNull(propertiesObject); - assertFalse(getBooleanProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT)); - // assertTrue(getPropertyBooleanValue(propertiesObject, CMISMapping.PROP_IS_MAJOR_VERSION)); + resultObject = helper.getObjectProperties(documentId); + assertObjectPropertiesNotNull(resultObject); + assertFalse(getBooleanProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT)); helper.deleteDocument(documentId); } + + public void testCreateDocumentFromSource() throws Exception + { + String folderForCopyId = helper.createFolder("FolderForCopy" + System.currentTimeMillis(), folderId); + String newName = "CopyName" + System.currentTimeMillis(); + CmisPropertiesType properties = new CmisPropertiesType(); + List propertiesList = properties.getProperty(); + CmisPropertyString cmisProperty = new CmisPropertyString(); + cmisProperty.setLocalName(CMISDictionaryModel.PROP_NAME); + cmisProperty.getValue().add(newName); + propertiesList.add(cmisProperty); + Holder objectId = new Holder(); + ((ObjectServicePort) servicePort).createDocumentFromSource(repositoryId, documentId, properties, folderForCopyId, EnumVersioningState.NONE, null, null, null, new Holder(), objectId); + assertNotNull(objectId.value); + resultObject = helper.getObjectProperties(objectId.value); + assertTrue(newName.equals(getStringProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_NAME))); + } public void testCreateDocument_Versioning() throws Exception { // CHECKEDOUT documentName = "Test cmis document (" + System.currentTimeMillis() + ")"; String documentId = helper.createDocument(documentName, folderId, CMISDictionaryModel.DOCUMENT_TYPE_ID, EnumVersioningState.CHECKEDOUT); - propertiesObject = helper.getObjectProperties(documentId); + resultObject = helper.getObjectProperties(documentId); - assertObjectPropertiesNotNull(propertiesObject); + assertObjectPropertiesNotNull(resultObject); - assertNotNull(getIdProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_VERSION_SERIES_ID)); + assertNotNull(getIdProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_VERSION_SERIES_ID)); // Bug - assertTrue(getBooleanProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT)); - assertNotNull(getStringProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_VERSION_SERIES_CHECKED_OUT_BY)); + assertTrue(getBooleanProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT)); + assertNotNull(getStringProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_VERSION_SERIES_CHECKED_OUT_BY)); Holder documentIdHolder = new Holder(documentId); helper.checkIn(documentIdHolder, "checkin Comment", true); - assertTrue(getStringProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_VERSION_LABEL).equals("1.0")); - - // documentId = (String) propertiesUtil.getCmisPropertyValue(response.getObject().iterator().next().getProperties(), CMISMapping.PROP_OBJECT_ID); - // deleteDocument(documentId); + assertTrue(getStringProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_VERSION_LABEL).equals("1.0")); + } public void testCreateDocument_Exceptions() throws Exception @@ -163,12 +176,12 @@ public class DMObjectServiceTest extends AbstractServiceTest folderName = "Test Cmis Folder (" + System.currentTimeMillis() + ")" + "testCreateFolder"; folderId1 = helper.createFolder(folderName, folderId, CMISDictionaryModel.FOLDER_TYPE_ID); - propertiesObject = helper.getObjectProperties(folderId1); + resultObject = helper.getObjectProperties(folderId1); - assertObjectPropertiesNotNull(propertiesObject); + assertObjectPropertiesNotNull(resultObject); - assertNotNull(getStringProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_NAME)); - assertNotNull(getIdProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_PARENT_ID)); + assertNotNull(getStringProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_NAME)); + assertNotNull(getIdProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_PARENT_ID)); helper.deleteFolder(folderId1); } @@ -177,22 +190,27 @@ public class DMObjectServiceTest extends AbstractServiceTest { String filter; filter = "*"; - propertiesObject = helper.getObjectProperties(documentId, filter); + resultObject = helper.getObjectProperties(documentId, filter); - assertObjectPropertiesNotNull(propertiesObject); + assertObjectPropertiesNotNull(resultObject); - assertNotNull(getStringProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_NAME)); - assertNotNull(getStringProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_CONTENT_STREAM_FILENAME)); - assertNotNull(getStringProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_CONTENT_STREAM_MIME_TYPE)); - assertTrue(getBooleanProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_IS_LATEST_VERSION)); + assertNotNull(getStringProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_NAME)); + assertNotNull(getStringProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_CONTENT_STREAM_FILENAME)); + assertNotNull(getStringProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_CONTENT_STREAM_MIME_TYPE)); + assertTrue(getBooleanProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_IS_LATEST_VERSION)); - // A property filter is a string that contains either (to return all properties) or a comma-separated list of property names (to return selected properties). An - // arbitrary number of spaces are allowed before or after each comma. - - // filter = "*Stream*"; - // propertiesObject = helper.getObjectProperties(documentId, filter); - // assertNotNull("filter test", getPropertyValue(propertiesObject, CMISMapping.PROP_NAME)); - // assertNotNull("filter test", getPropertyValue(propertiesObject, CMISMapping.PROP_CONTENT_STREAM_LENGTH)); + } + + public void testGetObject() throws Exception + { + CmisObjectType resultObject = ((ObjectServicePort) servicePort).getObject(repositoryId, documentId, "*", false, EnumIncludeRelationships.NONE, null, null, null, null); + + assertObjectPropertiesNotNull(resultObject); + + assertNotNull(getStringProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_NAME)); + assertNotNull(getStringProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_CONTENT_STREAM_FILENAME)); + assertNotNull(getStringProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_CONTENT_STREAM_MIME_TYPE)); + assertTrue(getBooleanProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_IS_LATEST_VERSION)); } @@ -276,7 +294,7 @@ public class DMObjectServiceTest extends AbstractServiceTest contStream.setObjectId(documentId); contStream.setRepositoryId(repositoryId); - CmisContentStreamType result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentId, null, BigInteger.ZERO, BigInteger.ZERO, null); + CmisContentStreamType result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentId, null, null, null, null); if (result.getLength().intValue() == 0) { fail(); @@ -285,7 +303,7 @@ public class DMObjectServiceTest extends AbstractServiceTest { contStream.setObjectId(documentId + "s"); { - result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentId, null, BigInteger.ZERO, BigInteger.ZERO, null); + result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentId, null, null, null, null); } } catch (Throwable e) @@ -301,7 +319,7 @@ public class DMObjectServiceTest extends AbstractServiceTest helper.checkOut(documentIdHolder, contentCopied); - result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentIdHolder.value, null, BigInteger.ZERO, BigInteger.ZERO, null); + result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentIdHolder.value, null, null, null, null); if (result.getLength().intValue() == 0) { fail(); @@ -310,6 +328,42 @@ public class DMObjectServiceTest extends AbstractServiceTest helper.checkIn(documentIdHolder, checkinComment, true); } + + public void testGetContentStreamPortioning() throws Exception + { + String newDocumentId = helper.createDocument("TestFile" + System.currentTimeMillis(), folderId, CMISDictionaryModel.DOCUMENT_TYPE_ID, EnumVersioningState.NONE); + String newFileName = "New file name (" + System.currentTimeMillis() + ")"; + String newContent = "123456789"; + CmisContentStreamType contentStream = new CmisContentStreamType(); + contentStream.setFilename(newFileName); + contentStream.setMimeType(MimetypeMap.MIMETYPE_TEXT_PLAIN); + DataHandler dataHandler = new DataHandler(newContent, MimetypeMap.MIMETYPE_TEXT_PLAIN); + contentStream.setStream(dataHandler); + Holder documentIdHolder = new Holder(newDocumentId); + ((ObjectServicePort) servicePort).setContentStream(repositoryId, documentIdHolder, true, new Holder(), contentStream, new Holder()); + + // Test length + CmisContentStreamType result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentIdHolder.value, null, null, BigInteger.valueOf(5), null); + if (result.getLength().intValue() == 0) + { + fail("Content Stream is empty"); + } + StringWriter writer = new StringWriter(); + IOUtils.copy(result.stream.getInputStream(), writer); + String content = writer.toString(); + assertEquals("12345", content); + + // Test offset+length + result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentIdHolder.value, null, BigInteger.valueOf(4), BigInteger.valueOf(3), null); + if (result.getLength().intValue() == 0) + { + fail("Content Stream is empty"); + } + writer = new StringWriter(); + IOUtils.copy(result.stream.getInputStream(), writer); + content = writer.toString(); + assertEquals("567", content); + } public void testCreateRelationship() throws Exception { @@ -337,7 +391,7 @@ public class DMObjectServiceTest extends AbstractServiceTest public void testDeleteContentStream() throws Exception { // public void deleteContentStream(String repositoryId, String documentId) - ((ObjectServicePort) servicePort).deleteContentStream(repositoryId, new Holder(documentId), null, null); + ((ObjectServicePort) servicePort).deleteContentStream(repositoryId, new Holder(documentId), new Holder(), new Holder()); try { @@ -362,14 +416,14 @@ public class DMObjectServiceTest extends AbstractServiceTest public void testDeleteObject() throws Exception { // public void deleteObject(String repositoryId, String objectId) - ((ObjectServicePort) servicePort).deleteObject(repositoryId, documentId, true, null); + ((ObjectServicePort) servicePort).deleteObject(repositoryId, documentId, true, new Holder()); assertNull(helper.getObjectProperties(documentId)); } public void testDeleteObject_Exceptions() throws Exception { - // • If the object is a Folder with at least one child, throw ConstraintViolationException. - // • If the object is the Root Folder, throw OperationNotSupportedException. + // If the object is a Folder with at least one child, throw ConstraintViolationException. + // If the object is the Root Folder, throw OperationNotSupportedException. documentName = "Test cmis document (" + System.currentTimeMillis() + ")"; @SuppressWarnings("unused") @@ -378,7 +432,7 @@ public class DMObjectServiceTest extends AbstractServiceTest // Try to delete folder with child try { - ((ObjectServicePort) servicePort).deleteObject(repositoryId, folderId, true, null); + ((ObjectServicePort) servicePort).deleteObject(repositoryId, folderId, true, new Holder()); fail("Try to delere folder with child"); } catch (CmisException e) @@ -389,7 +443,7 @@ public class DMObjectServiceTest extends AbstractServiceTest // Try to delete root folder try { - ((ObjectServicePort) servicePort).deleteObject(repositoryId, helper.getCompanyHomeId(repositoryId), true, null); + ((ObjectServicePort) servicePort).deleteObject(repositoryId, helper.getCompanyHomeId(repositoryId), true, new Holder()); fail("Try to delere root folder"); } catch (CmisException e) @@ -422,37 +476,6 @@ public class DMObjectServiceTest extends AbstractServiceTest assertNull("DELETE", helper.getObjectProperties(folderId1)); assertNull("DELETE", helper.getObjectProperties(folderId2)); assertNull("DELETE", helper.getObjectProperties(documentId2)); - - // Check DELETESINGLEFILED - folderName = "Test Cmis Folder (" + System.currentTimeMillis() + ")"; - folderId1 = helper.createFolder(folderName, folderId); - - folderName = "Test Cmis Folder (" + System.currentTimeMillis() + ")"; - folderId2 = helper.createFolder(folderName, folderId1); - - documentName = "Test cmis document (" + System.currentTimeMillis() + ")"; - documentId2 = helper.createDocument(documentName, folderId2); - - response = ((ObjectServicePort) servicePort).deleteTree(repositoryId, folderId1, true, EnumUnfileObject.DELETESINGLEFILED, true, null); - // assertNotNull("DELETESINGLEFILED", response); - assertTrue("All objects should not be deleted", response.getObjectIds().size() != 0); - assertNotNull("DELETESINGLEFILED", helper.getObjectProperties(folderId1)); - assertNotNull("DELETESINGLEFILED", helper.getObjectProperties(folderId2)); - assertNotNull("DELETESINGLEFILED", helper.getObjectProperties(documentId2)); - - helper.deleteFolder(folderId1); - - /* - * // 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 = - * 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)); - * assertNotNull("DELETESINGLEFILED", helper.getObjectProperties(folderId2)); assertNotNull("DELETESINGLEFILED", helper.getObjectProperties(documentId2)); - * deleteFolder(folderId2); // response = ((ObjectServicePort) servicePort).deleteTree(repositoryId, folderId, EnumUnfileNonfolderObjects.UNFILE, true); // - * assertNotNull("UNFILE", response); // // assertNull(getObjectProperties(folderId)); // deleteFolder(folderId); - */ } public void testDeleteTree_Exceptions() throws Exception @@ -489,8 +512,8 @@ public class DMObjectServiceTest extends AbstractServiceTest public void testMoveObject() throws Exception { - // public void moveObject(String repositoryId, String objectId, String targetFolderId, String sourceFolderId) - ((ObjectServicePort) servicePort).moveObject(repositoryId, new Holder(documentId), folderId, companyHomeId, null); + //test should be passed after transaction problem is fixed + ((ObjectServicePort) servicePort).moveObject(repositoryId, new Holder(documentId), folderId, companyHomeId, new Holder()); CmisObjectType response = helper.getObjectProperties(documentId); assertObjectPropertiesNotNull(response); @@ -512,13 +535,13 @@ public class DMObjectServiceTest extends AbstractServiceTest public void testMoveObject_Exceptions() throws Exception { // sourceFolderId is not specified - throw InvalidArgumentException - // • If Object is multi-filed and source folder is not specified, throw InvalidArgumentException. + // If Object is multi-filed and source folder is not specified, throw InvalidArgumentException. helper.addObjectToFolder(documentId, folderId); try { - ((ObjectServicePort) servicePort).moveObject(repositoryId, new Holder(documentId), folderId, null, null); + ((ObjectServicePort) servicePort).moveObject(repositoryId, new Holder(documentId), folderId, null, new Holder()); fail("sourceFolderId is not specified - should throw InvalidArgumentException"); } catch (CmisException e) @@ -527,7 +550,7 @@ public class DMObjectServiceTest extends AbstractServiceTest } } - + public void testSetContentStream() throws Exception { String newFileName = "New file name (" + System.currentTimeMillis() + ")"; @@ -544,9 +567,9 @@ public class DMObjectServiceTest extends AbstractServiceTest Holder documentIdHolder = new Holder(documentId); // public void setContentStream(String repositoryId, Holder documentId, Boolean overwriteFlag, CmisContentStreamType contentStream) - ((ObjectServicePort) servicePort).setContentStream(repositoryId, documentIdHolder, true, null, contentStream, null); + ((ObjectServicePort) servicePort).setContentStream(repositoryId, documentIdHolder, true, new Holder(), contentStream, new Holder()); - CmisContentStreamType result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentIdHolder.value, null, BigInteger.ZERO, BigInteger.ZERO, null); + CmisContentStreamType result = ((ObjectServicePort) servicePort).getContentStream(repositoryId, documentIdHolder.value, null, null, null, null); if (result.getLength().intValue() == 0) { fail("Content Stream is empty"); @@ -555,18 +578,12 @@ public class DMObjectServiceTest extends AbstractServiceTest // assertEquals(newContent, result.getStream().getContent()); // Alfresco create new version of document - propertiesObject = helper.getObjectProperties(documentIdHolder.value); - assertObjectPropertiesNotNull(propertiesObject); - assertFalse("new version of document should be created", getIdProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_OBJECT_ID).equals(documentId)); + resultObject = helper.getObjectProperties(documentIdHolder.value); + assertObjectPropertiesNotNull(resultObject); + assertFalse("new version of document should be created", getIdProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_OBJECT_ID).equals(documentId)); List responseVersions = helper.getAllVersions(documentId); assertNotNull(responseVersions); assertTrue("new version of document should be created", responseVersions.size() > 1); - - // assertEquals(newFileName, result.getFilename()); - - // GetPropertiesResponse response = helper.getObjectProperties(documentId); - // assertNotNull(getObjectName(response)); - // assertEquals(newFileName, getContentStreamFilename(response)); } public void testSetContentStream_Exceptions() throws Exception @@ -593,7 +610,7 @@ public class DMObjectServiceTest extends AbstractServiceTest documentId = holder.value; // now we can not set any property (beside name) when we create new document - so this case not working - propertiesObject = helper.getObjectProperties(documentId); + resultObject = helper.getObjectProperties(documentId); try { // public void setContentStream(String repositoryId, Holder documentId, Boolean overwriteFlag, CmisContentStreamType contentStream) @@ -642,7 +659,7 @@ public class DMObjectServiceTest extends AbstractServiceTest // public void updateProperties(String repositoryId, Holder objectId, String changeToken, CmisPropertiesType properties) Holder changeToken = new Holder(); - ((ObjectServicePort) servicePort).updateProperties(repositoryId, new Holder(documentId), changeToken, properties, null); + ((ObjectServicePort) servicePort).updateProperties(repositoryId, new Holder(documentId), changeToken, properties, new Holder()); @SuppressWarnings("unused") CmisObjectType response = helper.getObjectProperties(documentId); diff --git a/source/test/java/org/alfresco/repo/cmis/ws/DMPolicyServiceTest.java b/source/test/java/org/alfresco/repo/cmis/ws/DMPolicyServiceTest.java index 47f3f6f7ad..f3914feb1d 100755 --- a/source/test/java/org/alfresco/repo/cmis/ws/DMPolicyServiceTest.java +++ b/source/test/java/org/alfresco/repo/cmis/ws/DMPolicyServiceTest.java @@ -35,7 +35,7 @@ public class DMPolicyServiceTest extends AbstractServiceTest { public final static String SERVICE_WSDL_LOCATION = CmisServiceTestHelper.ALFRESCO_URL + "/cmis/PolicyService?wsdl"; - public final static QName SERVICE_NAME = new QName("http://docs.oasis-open.org/ns/cmis/ws/200901", "PolicyServicePort"); + public final static QName SERVICE_NAME = new QName("http://docs.oasis-open.org/ns/cmis/ws/200908/", "PolicyServicePort"); public DMPolicyServiceTest() { diff --git a/source/test/java/org/alfresco/repo/cmis/ws/DMRelationshipServiceTest.java b/source/test/java/org/alfresco/repo/cmis/ws/DMRelationshipServiceTest.java index f657a0680e..24f336434c 100755 --- a/source/test/java/org/alfresco/repo/cmis/ws/DMRelationshipServiceTest.java +++ b/source/test/java/org/alfresco/repo/cmis/ws/DMRelationshipServiceTest.java @@ -34,7 +34,7 @@ public class DMRelationshipServiceTest extends AbstractServiceTest { public final static String SERVICE_WSDL_LOCATION = CmisServiceTestHelper.ALFRESCO_URL + "/cmis/RelationshipService?wsdl"; - public final static QName SERVICE_NAME = new QName("http://docs.oasis-open.org/ns/cmis/ws/200901", "RelationshipService"); + public final static QName SERVICE_NAME = new QName("http://docs.oasis-open.org/ns/cmis/ws/200908/", "RelationshipService"); @SuppressWarnings("unused") private String relationshipId; @@ -83,20 +83,18 @@ public class DMRelationshipServiceTest extends AbstractServiceTest protected Object getServicePort() { + URL serviceWsdlURL; + try { - URL serviceWsdlURL; - try - { - serviceWsdlURL = new URL(SERVICE_WSDL_LOCATION); - } - catch (MalformedURLException e) - { - throw new java.lang.RuntimeException("Cannot get service Wsdl URL", e); - } - - Service service = Service.create(serviceWsdlURL, SERVICE_NAME); - return service.getPort(RelationshipServicePort.class); + serviceWsdlURL = new URL(SERVICE_WSDL_LOCATION); } + catch (MalformedURLException e) + { + throw new java.lang.RuntimeException("Cannot get service Wsdl URL", e); + } + + Service service = Service.create(serviceWsdlURL, SERVICE_NAME); + return service.getPort(RelationshipServicePort.class); } public void testGetRelationships() throws Exception diff --git a/source/test/java/org/alfresco/repo/cmis/ws/DMVersioningServiceTest.java b/source/test/java/org/alfresco/repo/cmis/ws/DMVersioningServiceTest.java index 8e00f126aa..200a91f44b 100755 --- a/source/test/java/org/alfresco/repo/cmis/ws/DMVersioningServiceTest.java +++ b/source/test/java/org/alfresco/repo/cmis/ws/DMVersioningServiceTest.java @@ -70,7 +70,7 @@ public class DMVersioningServiceTest extends AbstractServiceTest // check out Holder documentIdHolder = new Holder(documentId); Holder contentCopied = new Holder(); - ((VersioningServicePort) servicePort).checkOut(repositoryId, documentIdHolder, null, contentCopied); + ((VersioningServicePort) servicePort).checkOut(repositoryId, documentIdHolder, new Holder(), contentCopied); assertTrue(contentCopied.value); assertFalse(documentId.equals(documentIdHolder.value)); @@ -84,7 +84,8 @@ public class DMVersioningServiceTest extends AbstractServiceTest // TODO: policies // TODO: addACEs // TODO: removeACEs - ((VersioningServicePort) servicePort).checkIn(repositoryId, documentIdHolder, true, properties, contentStream, checkinComment, null, null, null, null); + ((VersioningServicePort) servicePort).checkIn(repositoryId, documentIdHolder, true, properties, contentStream, checkinComment, null, null, null, new Holder()); + documentId = documentIdHolder.value; assertEquals(checkinComment, getStringProperty(helper.getObjectProperties(documentIdHolder.value).getProperties(), CMISDictionaryModel.PROP_CHECKIN_COMMENT)); } @@ -94,12 +95,13 @@ public class DMVersioningServiceTest extends AbstractServiceTest // check out Holder documentIdHolder = new Holder(documentId); Holder contentCopied = new Holder(); - ((VersioningServicePort) servicePort).checkOut(repositoryId, documentIdHolder, null, contentCopied); + ((VersioningServicePort) servicePort).checkOut(repositoryId, documentIdHolder, new Holder(), contentCopied); assertTrue(contentCopied.value); assertFalse(documentId.equals(documentIdHolder.value)); // check in - ((VersioningServicePort) servicePort).checkIn(repositoryId, documentIdHolder, false, null, null, null, null, null, null, null); + ((VersioningServicePort) servicePort).checkIn(repositoryId, documentIdHolder, false, null, null, null, null, null, null, new Holder()); + documentId = documentIdHolder.value; } public void testCheckOutCancelCheckOut() throws Exception @@ -107,12 +109,12 @@ public class DMVersioningServiceTest extends AbstractServiceTest // check out Holder documentIdHolder = new Holder(documentId); Holder contentCopied = new Holder(); - ((VersioningServicePort) servicePort).checkOut(repositoryId, documentIdHolder, null, contentCopied); + ((VersioningServicePort) servicePort).checkOut(repositoryId, documentIdHolder, new Holder(), contentCopied); assertTrue(contentCopied.value); assertFalse(documentId.equals(documentIdHolder.value)); // Cancel check out - ((VersioningServicePort) servicePort).cancelCheckOut(repositoryId, documentIdHolder.value, null); + ((VersioningServicePort) servicePort).cancelCheckOut(repositoryId, documentIdHolder.value, new Holder()); assertFalse(getBooleanProperty(helper.getObjectProperties(documentId).getProperties(), CMISDictionaryModel.PROP_IS_VERSION_SERIES_CHECKED_OUT)); } @@ -177,6 +179,7 @@ public class DMVersioningServiceTest extends AbstractServiceTest helper.checkOut(documentIdHolder, contentCopied); helper.checkIn(documentIdHolder, checkinComment, true); + documentId = documentIdHolder.value; List response = ((VersioningServicePort) servicePort).getAllVersions(repositoryId, documentId, "", null, null); assertNotNull(response); @@ -194,6 +197,7 @@ public class DMVersioningServiceTest extends AbstractServiceTest helper.checkOut(documentIdHolder, contentCopied); helper.checkIn(documentIdHolder, checkinComment, true); + documentId = documentIdHolder.value; List response = ((VersioningServicePort) servicePort).getAllVersions(repositoryId, documentId, "*", false, null); assertNotNull(response); @@ -238,6 +242,7 @@ public class DMVersioningServiceTest extends AbstractServiceTest finally { helper.checkIn(documentIdHolder, "Test Check In Comment", true); + documentId = documentIdHolder.value; } } @@ -246,7 +251,9 @@ public class DMVersioningServiceTest extends AbstractServiceTest CmisObjectType result = null; try { - result = helper.getVersioningServicePort().getObjectOfLatestVersion(repositoryId, documentId, false, null, false, null, null, false, false, null); + VersioningServicePort versioningServicePort = helper.getVersioningServicePort(); + helper.authenticateServicePort(versioningServicePort, CmisServiceTestHelper.USERNAME_ADMIN, CmisServiceTestHelper.PASSWORD_ADMIN); + result = versioningServicePort.getObjectOfLatestVersion(repositoryId, documentId, false, null, false, null, null, false, false, null); } catch (Exception e) { @@ -263,7 +270,9 @@ public class DMVersioningServiceTest extends AbstractServiceTest CmisObjectType result = null; try { - result = helper.getVersioningServicePort().getObjectOfLatestVersion(repositoryId, documentId, true, null, false, null, null, false, false, null); + VersioningServicePort versioningServicePort = helper.getVersioningServicePort(); + helper.authenticateServicePort(versioningServicePort, CmisServiceTestHelper.USERNAME_ADMIN, CmisServiceTestHelper.PASSWORD_ADMIN); + result = versioningServicePort.getObjectOfLatestVersion(repositoryId, documentId, true, null, false, null, null, false, false, null); } catch (Exception e) { @@ -281,7 +290,9 @@ public class DMVersioningServiceTest extends AbstractServiceTest CmisObjectType result = null; try { - result = helper.getVersioningServicePort().getObjectOfLatestVersion(repositoryId, documentId, false, null, true, null, null, false, false, null); + VersioningServicePort versioningServicePort = helper.getVersioningServicePort(); + helper.authenticateServicePort(versioningServicePort, CmisServiceTestHelper.USERNAME_ADMIN, CmisServiceTestHelper.PASSWORD_ADMIN); + result = versioningServicePort.getObjectOfLatestVersion(repositoryId, documentId, false, null, true, null, null, false, false, null); } catch (Exception e) {