Merged CMIS063 to HEAD

16940: CMIS Query: MOB-566: Tightened up antlr parse (stopped any auto recovery)
  16967: MOB-1330: Upgrade Web Services Repository to 0.7
  16969: CMIS Query exception reporting improvements and tighter lexingr16974: CMIS Query: Tidy ups for score
  16984: CMIS 0.7 upgrade - checkpoint.
  16995: CMIS 0.7 upgrade - checkpoint:
  16996: Rename changes list to reflect update to 0.7

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17244 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2009-10-29 18:49:42 +00:00
parent d6b8ce91a5
commit a28c382733
36 changed files with 3505 additions and 176 deletions

View File

@@ -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]
</cmis:properties>
[/#macro]
@@ -45,6 +45,7 @@
[@objectCMISProps node propfilter/]
[#if includeallowableactions][@allowableactions node/][/#if]
</cmisra:object>
<cmisra:pathSegment>${node.name}</cmisra:pathSegment>
[/@entry]
[/#macro]
@@ -108,6 +109,7 @@
[@objectCMISProps node propfilter/]
[#if includeallowableactions][@allowableactions node/][/#if]
</cmisra:object>
<cmisra:pathSegment>${node.name}</cmisra:pathSegment>
[/@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]
<author><name>${node.properties.creator}</name></author>
<content>${node.id}</content> [#-- TODO --]
@@ -138,6 +140,10 @@
[@objectCMISProps node propfilter/]
[#if includeallowableactions][@allowableactions node/][/#if]
</cmisra:object>
<cmisra:pathSegment>${node.name}</cmisra:pathSegment>
[#if relativePathSegment != ""]
<cmisra:relativePathSegment>${relativePathSegment}</cmisra:relativePathSegment>
[/#if]
[#-- recurse for depth greater than 1 --]
[#if maxdepth == -1 || depth &lt; 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]
</cmisra:children>

View File

@@ -70,13 +70,23 @@
</cmisra:repositoryInfo>
<cmisra:uritemplate>
<cmisra:template>${absurl(url.serviceContext)}/api/node/{id}?filter={filter}&amp;includeAllowableActions={includeAllowableActions}&amp;includeRelationships={includeRelationships}</cmisra:template>
<cmisra:type>entrybyid</cmisra:type>
<cmisra:template>${absurl(url.serviceContext)}/api/node/{id}?filter={filter}&amp;includeAllowableActions={includeAllowableActions}&amp;includePolicyIds={includePolicyIds}&amp;includeRelationships={includeRelationships}&amp;includeACL={includeACL}&amp;renditionFilter={renditionFilter}</cmisra:template>
<cmisra:type>${cmisconstants.URI_OBJECT_BY_ID}</cmisra:type>
<cmisra:mediatype>${cmisconstants.MIMETYPE_ENTRY}</cmisra:mediatype>
</cmisra:uritemplate>
<cmisra:uritemplate>
<cmisra:template>${absurl(url.serviceContext)}/api/path/{path}?filter={filter}&amp;includeAllowableActions={includeAllowableActions}&amp;includePolicyIds={includePolicyIds}&amp;includeRelationships={includeRelationships}&amp;includeACL={includeACL}&amp;renditionFilter={renditionFilter}</cmisra:template>
<cmisra:type>${cmisconstants.URI_OBJECT_BY_PATH}</cmisra:type>
<cmisra:mediatype>${cmisconstants.MIMETYPE_ENTRY}</cmisra:mediatype>
</cmisra:uritemplate>
<cmisra:uritemplate>
<cmisra:template>${absurl(url.serviceContext)}/api/type/{id}</cmisra:template>
<cmisra:type>${cmisconstants.URI_TYPE_BY_ID}</cmisra:type>
<cmisra:mediatype>${cmisconstants.MIMETYPE_ENTRY}</cmisra:mediatype>
</cmisra:uritemplate>
<cmisra:uritemplate>
<cmisra:template>${absurl(url.serviceContext)}/api/query?q={q}&amp;includeAllowableActions={includeAllowableActions?}&amp;searchAllVersions={searchAllVersions?}&amp;skipCount={skipCount?}&amp;maxItems={maxItems?}</cmisra:template>
<cmisra:type>query</cmisra:type>
<cmisra:type>${cmisconstants.URI_QUERY}</cmisra:type>
<cmisra:mediatype>${cmisconstants.MIMETYPE_FEED}</cmisra:mediatype>
</cmisra:uritemplate>

View File

@@ -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]
</feed>

View File

@@ -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;
/**
* <p>Java class for cmisACLType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="cmisACLType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="ACL" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisAccessControlListType"/>
* &lt;element name="exact" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;any/>
* &lt;/sequence>
* &lt;attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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<Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* 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.
*
* <p>
* 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 <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* 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<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@@ -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;
/**
* <p>Java class for cmisExtensionType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="cmisExtensionType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;any/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "cmisExtensionType", propOrder = {
"any"
})
public class CmisExtensionType {
@XmlAnyElement(lax = true)
protected List<Object> any;
/**
* Gets the value of the any property.
*
* <p>
* 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 <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
}

View File

@@ -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;
/**
* <p>Java class for cmisListOfIdsType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="cmisListOfIdsType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
* &lt;any/>
* &lt;/sequence>
* &lt;attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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<String> id;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the id property.
*
* <p>
* 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 <CODE>set</CODE> method for the id property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getId().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getId() {
if (id == null) {
id = new ArrayList<String>();
}
return this.id;
}
/**
* Gets the value of the any property.
*
* <p>
* 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 <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* 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<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@@ -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;
/**
* <p>Java class for cmisObjectInFolderContainerType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="cmisObjectInFolderContainerType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="objectInFolder" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisObjectInFolderType"/>
* &lt;element name="children" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisObjectInFolderContainerType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;any/>
* &lt;/sequence>
* &lt;attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "cmisObjectInFolderContainerType", propOrder = {
"objectInFolder",
"children",
"any"
})
public class CmisObjectInFolderContainerType {
@XmlElement(required = true)
protected CmisObjectInFolderType objectInFolder;
protected List<CmisObjectInFolderContainerType> children;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* 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.
*
* <p>
* 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 <CODE>set</CODE> method for the children property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getChildren().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link CmisObjectInFolderContainerType }
*
*
*/
public List<CmisObjectInFolderContainerType> getChildren() {
if (children == null) {
children = new ArrayList<CmisObjectInFolderContainerType>();
}
return this.children;
}
/**
* Gets the value of the any property.
*
* <p>
* 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 <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* 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<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@@ -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;
/**
* <p>Java class for cmisObjectInFolderListType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="cmisObjectInFolderListType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="objects" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisObjectInFolderType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="hasMoreItems" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* &lt;element name="numItems" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
* &lt;any/>
* &lt;/sequence>
* &lt;attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "cmisObjectInFolderListType", propOrder = {
"objects",
"hasMoreItems",
"numItems",
"any"
})
public class CmisObjectInFolderListType {
protected List<CmisObjectInFolderType> objects;
protected boolean hasMoreItems;
protected BigInteger numItems;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the objects property.
*
* <p>
* 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 <CODE>set</CODE> method for the objects property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getObjects().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link CmisObjectInFolderType }
*
*
*/
public List<CmisObjectInFolderType> getObjects() {
if (objects == null) {
objects = new ArrayList<CmisObjectInFolderType>();
}
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.
*
* <p>
* 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 <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* 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<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@@ -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;
/**
* <p>Java class for cmisObjectInFolderType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="cmisObjectInFolderType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="object" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisObjectType"/>
* &lt;element name="pathSegment" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;any/>
* &lt;/sequence>
* &lt;attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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<Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* 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.
*
* <p>
* 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 <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* 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<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@@ -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;
/**
* <p>Java class for cmisObjectListType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="cmisObjectListType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="objects" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisObjectType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="hasMoreItems" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* &lt;element name="numItems" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
* &lt;any/>
* &lt;/sequence>
* &lt;attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "cmisObjectListType", propOrder = {
"objects",
"hasMoreItems",
"numItems",
"any"
})
public class CmisObjectListType {
protected List<CmisObjectType> objects;
protected boolean hasMoreItems;
protected BigInteger numItems;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the objects property.
*
* <p>
* 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 <CODE>set</CODE> method for the objects property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getObjects().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link CmisObjectType }
*
*
*/
public List<CmisObjectType> getObjects() {
if (objects == null) {
objects = new ArrayList<CmisObjectType>();
}
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.
*
* <p>
* 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 <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* 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<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@@ -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;
/**
* <p>Java class for cmisObjectParentsType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="cmisObjectParentsType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="object" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisObjectType"/>
* &lt;element name="relativePathSegment" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;any/>
* &lt;/sequence>
* &lt;attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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<Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* 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.
*
* <p>
* 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 <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* 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<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@@ -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;
/**
* <p>Java class for cmisTypeDefinitionListType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="cmisTypeDefinitionListType">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="types" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisTypeDefinitionType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="hasMoreItems" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* &lt;element name="numItems" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
* &lt;any/>
* &lt;/sequence>
* &lt;attGroup ref="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisUndefinedAttribute"/>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "cmisTypeDefinitionListType", propOrder = {
"types",
"hasMoreItems",
"numItems",
"any"
})
public class CmisTypeDefinitionListType {
protected List<CmisTypeDefinitionType> types;
protected boolean hasMoreItems;
protected BigInteger numItems;
@XmlAnyElement(lax = true)
protected List<Object> any;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the types property.
*
* <p>
* 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 <CODE>set</CODE> method for the types property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getTypes().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link CmisTypeDefinitionType }
*
*
*/
public List<CmisTypeDefinitionType> getTypes() {
if (types == null) {
types = new ArrayList<CmisTypeDefinitionType>();
}
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.
*
* <p>
* 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 <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Element }
* {@link Object }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* 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<QName, String> getOtherAttributes() {
return otherAttributes;
}
}

View File

@@ -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;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="repositoryId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="sourceId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="properties" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisPropertiesType"/>
* &lt;element name="folderId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="versioningState" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}enumVersioningState" minOccurs="0"/>
* &lt;element name="policies" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="addACEs" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisAccessControlListType" minOccurs="0"/>
* &lt;element name="removeACEs" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisAccessControlListType" minOccurs="0"/>
* &lt;element name="extension" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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<String> folderId;
@XmlElementRef(name = "versioningState", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<EnumVersioningState> versioningState;
@XmlElement(nillable = true)
protected List<String> policies;
@XmlElementRef(name = "addACEs", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<CmisAccessControlListType> addACEs;
@XmlElementRef(name = "removeACEs", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<CmisAccessControlListType> removeACEs;
@XmlElementRef(name = "extension", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<CmisExtensionType> 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<String> 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<String> value) {
this.folderId = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the versioningState property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link EnumVersioningState }{@code >}
*
*/
public JAXBElement<EnumVersioningState> 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<EnumVersioningState> value) {
this.versioningState = ((JAXBElement<EnumVersioningState> ) value);
}
/**
* Gets the value of the policies property.
*
* <p>
* 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 <CODE>set</CODE> method for the policies property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getPolicies().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getPolicies() {
if (policies == null) {
policies = new ArrayList<String>();
}
return this.policies;
}
/**
* Gets the value of the addACEs property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link CmisAccessControlListType }{@code >}
*
*/
public JAXBElement<CmisAccessControlListType> 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<CmisAccessControlListType> value) {
this.addACEs = ((JAXBElement<CmisAccessControlListType> ) value);
}
/**
* Gets the value of the removeACEs property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link CmisAccessControlListType }{@code >}
*
*/
public JAXBElement<CmisAccessControlListType> 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<CmisAccessControlListType> value) {
this.removeACEs = ((JAXBElement<CmisAccessControlListType> ) value);
}
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >}
*
*/
public JAXBElement<CmisExtensionType> 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<CmisExtensionType> value) {
this.extension = ((JAXBElement<CmisExtensionType> ) value);
}
}

View File

@@ -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;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="objectId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="extension" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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<CmisExtensionType> 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<CmisExtensionType> 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<CmisExtensionType> value) {
this.extension = ((JAXBElement<CmisExtensionType> ) value);
}
}

View File

@@ -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;
/**
* <p>Java class for enumUsers.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* &lt;simpleType name="enumUsers">
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;enumeration value="cmis:user"/>
* &lt;/restriction>
* &lt;/simpleType>
* </pre>
*
*/
@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);
}
}

View File

@@ -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;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="repositoryId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="objectId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="filter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="includeAllowableActions" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;element name="includeRelationships" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}enumIncludeRelationships" minOccurs="0"/>
* &lt;element name="renditionFilter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="includePolicyIds" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;element name="includeACL" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;element name="extension" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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<String> filter;
@XmlElementRef(name = "includeAllowableActions", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<Boolean> includeAllowableActions;
@XmlElementRef(name = "includeRelationships", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<EnumIncludeRelationships> includeRelationships;
@XmlElementRef(name = "renditionFilter", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<String> renditionFilter;
@XmlElementRef(name = "includePolicyIds", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<Boolean> includePolicyIds;
@XmlElementRef(name = "includeACL", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<Boolean> includeACL;
@XmlElementRef(name = "extension", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<CmisExtensionType> 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<String> 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<String> value) {
this.filter = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the includeAllowableActions property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Boolean }{@code >}
*
*/
public JAXBElement<Boolean> 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<Boolean> value) {
this.includeAllowableActions = ((JAXBElement<Boolean> ) value);
}
/**
* Gets the value of the includeRelationships property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link EnumIncludeRelationships }{@code >}
*
*/
public JAXBElement<EnumIncludeRelationships> 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<EnumIncludeRelationships> value) {
this.includeRelationships = ((JAXBElement<EnumIncludeRelationships> ) value);
}
/**
* Gets the value of the renditionFilter property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> 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<String> value) {
this.renditionFilter = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the includePolicyIds property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Boolean }{@code >}
*
*/
public JAXBElement<Boolean> 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<Boolean> value) {
this.includePolicyIds = ((JAXBElement<Boolean> ) value);
}
/**
* Gets the value of the includeACL property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Boolean }{@code >}
*
*/
public JAXBElement<Boolean> 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<Boolean> value) {
this.includeACL = ((JAXBElement<Boolean> ) value);
}
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >}
*
*/
public JAXBElement<CmisExtensionType> 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<CmisExtensionType> value) {
this.extension = ((JAXBElement<CmisExtensionType> ) value);
}
}

View File

@@ -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;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="repositoryId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="path" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="filter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="includeAllowableActions" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;element name="includeRelationships" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}enumIncludeRelationships" minOccurs="0"/>
* &lt;element name="renditionFilter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="includePolicyIds" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;element name="includeACL" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;element name="extension" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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<String> filter;
@XmlElementRef(name = "includeAllowableActions", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<Boolean> includeAllowableActions;
@XmlElementRef(name = "includeRelationships", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<EnumIncludeRelationships> includeRelationships;
@XmlElementRef(name = "renditionFilter", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<String> renditionFilter;
@XmlElementRef(name = "includePolicyIds", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<Boolean> includePolicyIds;
@XmlElementRef(name = "includeACL", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<Boolean> includeACL;
@XmlElementRef(name = "extension", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<CmisExtensionType> 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<String> 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<String> value) {
this.filter = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the includeAllowableActions property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Boolean }{@code >}
*
*/
public JAXBElement<Boolean> 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<Boolean> value) {
this.includeAllowableActions = ((JAXBElement<Boolean> ) value);
}
/**
* Gets the value of the includeRelationships property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link EnumIncludeRelationships }{@code >}
*
*/
public JAXBElement<EnumIncludeRelationships> 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<EnumIncludeRelationships> value) {
this.includeRelationships = ((JAXBElement<EnumIncludeRelationships> ) value);
}
/**
* Gets the value of the renditionFilter property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> 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<String> value) {
this.renditionFilter = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the includePolicyIds property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Boolean }{@code >}
*
*/
public JAXBElement<Boolean> 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<Boolean> value) {
this.includePolicyIds = ((JAXBElement<Boolean> ) value);
}
/**
* Gets the value of the includeACL property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Boolean }{@code >}
*
*/
public JAXBElement<Boolean> 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<Boolean> value) {
this.includeACL = ((JAXBElement<Boolean> ) value);
}
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >}
*
*/
public JAXBElement<CmisExtensionType> 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<CmisExtensionType> value) {
this.extension = ((JAXBElement<CmisExtensionType> ) value);
}
}

View File

@@ -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;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="object" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisObjectType"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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;
}
}

View File

@@ -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;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="repositoryId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="objectId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="major" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;element name="filter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="includeAllowableActions" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;element name="includeRelationships" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}enumIncludeRelationships" minOccurs="0"/>
* &lt;element name="renditionFilter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="includePolicyIds" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;element name="includeACL" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;element name="extension" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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<String> filter;
@XmlElementRef(name = "includeAllowableActions", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<Boolean> includeAllowableActions;
@XmlElementRef(name = "includeRelationships", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<EnumIncludeRelationships> includeRelationships;
@XmlElementRef(name = "renditionFilter", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<String> renditionFilter;
@XmlElementRef(name = "includePolicyIds", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<Boolean> includePolicyIds;
@XmlElementRef(name = "includeACL", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<Boolean> includeACL;
@XmlElementRef(name = "extension", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<CmisExtensionType> 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<String> 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<String> value) {
this.filter = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the includeAllowableActions property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Boolean }{@code >}
*
*/
public JAXBElement<Boolean> 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<Boolean> value) {
this.includeAllowableActions = ((JAXBElement<Boolean> ) value);
}
/**
* Gets the value of the includeRelationships property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link EnumIncludeRelationships }{@code >}
*
*/
public JAXBElement<EnumIncludeRelationships> 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<EnumIncludeRelationships> value) {
this.includeRelationships = ((JAXBElement<EnumIncludeRelationships> ) value);
}
/**
* Gets the value of the renditionFilter property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> 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<String> value) {
this.renditionFilter = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the includePolicyIds property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Boolean }{@code >}
*
*/
public JAXBElement<Boolean> 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<Boolean> value) {
this.includePolicyIds = ((JAXBElement<Boolean> ) value);
}
/**
* Gets the value of the includeACL property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Boolean }{@code >}
*
*/
public JAXBElement<Boolean> 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<Boolean> value) {
this.includeACL = ((JAXBElement<Boolean> ) value);
}
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >}
*
*/
public JAXBElement<CmisExtensionType> 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<CmisExtensionType> value) {
this.extension = ((JAXBElement<CmisExtensionType> ) value);
}
}

View File

@@ -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;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="object" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisObjectType"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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;
}
}

View File

@@ -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;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="repositoryId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="objectId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="includeSubRelationshipTypes" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;element name="relationshipDirection" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}enumRelationshipDirection" minOccurs="0"/>
* &lt;element name="typeId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="filter" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="includeAllowableActions" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;element name="maxItems" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
* &lt;element name="skipCount" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
* &lt;element name="extension" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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<EnumRelationshipDirection> relationshipDirection;
@XmlElementRef(name = "typeId", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<String> typeId;
@XmlElementRef(name = "filter", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<String> filter;
@XmlElementRef(name = "includeAllowableActions", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<Boolean> includeAllowableActions;
@XmlElementRef(name = "maxItems", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<BigInteger> maxItems;
@XmlElementRef(name = "skipCount", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<BigInteger> skipCount;
@XmlElementRef(name = "extension", namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", type = JAXBElement.class)
protected JAXBElement<CmisExtensionType> 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<EnumRelationshipDirection> 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<EnumRelationshipDirection> value) {
this.relationshipDirection = ((JAXBElement<EnumRelationshipDirection> ) value);
}
/**
* Gets the value of the typeId property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> 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<String> value) {
this.typeId = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the filter property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> 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<String> value) {
this.filter = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the includeAllowableActions property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link Boolean }{@code >}
*
*/
public JAXBElement<Boolean> 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<Boolean> value) {
this.includeAllowableActions = ((JAXBElement<Boolean> ) value);
}
/**
* Gets the value of the maxItems property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link BigInteger }{@code >}
*
*/
public JAXBElement<BigInteger> 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<BigInteger> value) {
this.maxItems = ((JAXBElement<BigInteger> ) value);
}
/**
* Gets the value of the skipCount property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link BigInteger }{@code >}
*
*/
public JAXBElement<BigInteger> 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<BigInteger> value) {
this.skipCount = ((JAXBElement<BigInteger> ) value);
}
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >}
*
*/
public JAXBElement<CmisExtensionType> 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<CmisExtensionType> value) {
this.extension = ((JAXBElement<CmisExtensionType> ) value);
}
}

View File

@@ -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;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="objects" type="{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisObjectListType"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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;
}
}

View File

@@ -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;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="object" type="{http://docs.oasis-open.org/ns/cmis/core/200908/}cmisObjectType"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@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;
}
}

View File

@@ -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);

View File

@@ -91,9 +91,16 @@ public class DMMultiFilingServicePort extends DMAbstractServicePort implements M
if (!cmisObjectsUtils.removeObject(objectNodeReference, folderNodeReference))
{
Throwable exception = cmisObjectsUtils.getLastOperationException();
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);
}
}
}
private NodeRef checkAndReceiveFolderIdentifier(String folderIdentifier) throws CmisException

View File

@@ -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)

View File

@@ -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<String> policies, CmisAccessControlListType addACEs, CmisAccessControlListType removeACEs, Holder<String> objectId)
List<String> policies, CmisAccessControlListType addACEs, CmisAccessControlListType removeACEs, Holder<String> 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;

View File

@@ -206,16 +206,18 @@ public class CmisObjectsUtils
public List<String> 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)

View File

@@ -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<CmisExtensionType>());
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<CmisExtensionType>());
}
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<CmisExtensionType>(), 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<CmisExtensionType>());
}
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<CmisExtensionType>());
}
catch (Exception e)
{

View File

@@ -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()

View File

@@ -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<CmisExtensionType> holder = new Holder<CmisExtensionType>();
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<CmisExtensionType>());
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<CmisExtensionType>());
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<CmisExtensionType>());
fail("Expected exception");
}
catch (CmisException e)

View File

@@ -72,14 +72,14 @@ public class DMNavigationServiceTest extends AbstractServiceTest
// check out
Holder<String> documentIdHolder = new Holder<String>(documentId);
Holder<Boolean> contentCopied = new Holder<Boolean>();
helper.versioningServicePort.checkOut(repositoryId, documentIdHolder, null, contentCopied);
helper.versioningServicePort.checkOut(repositoryId, documentIdHolder, new Holder<CmisExtensionType>(), contentCopied);
assertTrue(contentCopied.value);
String documentName1 = "Test cmis document (" + System.currentTimeMillis() + ")";
String documentId1 = helper.createDocument(documentName1, folderId);
Holder<String> documentIdHolder1 = new Holder<String>(documentId1);
contentCopied = new Holder<Boolean>();
helper.versioningServicePort.checkOut(repositoryId, documentIdHolder1, null, contentCopied);
helper.versioningServicePort.checkOut(repositoryId, documentIdHolder1, new Holder<CmisExtensionType>(), contentCopied);
assertTrue(contentCopied.value);
List<CmisObjectType> 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<CmisExtensionType>());
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<CmisExtensionType>());
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<CmisObjectType> response = getChildren(companyHomeId, 100);
List<CmisObjectInFolderType> 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<CmisObjectInFolderContainerType> 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<CmisObjectType> getChildren(String folderId, int maxItems) throws Exception
private List<CmisObjectInFolderType> getChildren(String folderId, int maxItems, boolean includePathSegments) throws Exception
{
Holder<List<CmisObjectType>> resultHolder = new Holder<List<CmisObjectType>>();
((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

View File

@@ -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<CmisProperty> propertiesList = properties.getProperty();
CmisPropertyString cmisProperty = new CmisPropertyString();
cmisProperty.setLocalName(CMISDictionaryModel.PROP_NAME);
cmisProperty.getValue().add(newName);
propertiesList.add(cmisProperty);
Holder<String> objectId = new Holder<String>();
((ObjectServicePort) servicePort).createDocumentFromSource(repositoryId, documentId, properties, folderForCopyId, EnumVersioningState.NONE, null, null, null, new Holder<CmisExtensionType>(), 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<String> documentIdHolder = new Holder<String>(documentId);
helper.checkIn(documentIdHolder, "checkin Comment", true);
assertTrue(getStringProperty(propertiesObject.getProperties(), CMISDictionaryModel.PROP_VERSION_LABEL).equals("1.0"));
assertTrue(getStringProperty(resultObject.getProperties(), CMISDictionaryModel.PROP_VERSION_LABEL).equals("1.0"));
// documentId = (String) propertiesUtil.getCmisPropertyValue(response.getObject().iterator().next().getProperties(), CMISMapping.PROP_OBJECT_ID);
// deleteDocument(documentId);
}
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();
@@ -311,6 +329,42 @@ public class DMObjectServiceTest extends AbstractServiceTest
}
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<String> documentIdHolder = new Holder<String>(newDocumentId);
((ObjectServicePort) servicePort).setContentStream(repositoryId, documentIdHolder, true, new Holder<String>(), contentStream, new Holder<CmisExtensionType>());
// 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
{
// TODO: uncomment
@@ -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<String>(documentId), null, null);
((ObjectServicePort) servicePort).deleteContentStream(repositoryId, new Holder<String>(documentId), new Holder<String>(), new Holder<CmisExtensionType>());
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<CmisExtensionType>());
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<CmisExtensionType>());
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<CmisExtensionType>());
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<String>(documentId), folderId, companyHomeId, null);
//test should be passed after transaction problem is fixed
((ObjectServicePort) servicePort).moveObject(repositoryId, new Holder<String>(documentId), folderId, companyHomeId, new Holder<CmisExtensionType>());
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<String>(documentId), folderId, null, null);
((ObjectServicePort) servicePort).moveObject(repositoryId, new Holder<String>(documentId), folderId, null, new Holder<CmisExtensionType>());
fail("sourceFolderId is not specified - should throw InvalidArgumentException");
}
catch (CmisException e)
@@ -544,9 +567,9 @@ public class DMObjectServiceTest extends AbstractServiceTest
Holder<String> documentIdHolder = new Holder<String>(documentId);
// public void setContentStream(String repositoryId, Holder<String> documentId, Boolean overwriteFlag, CmisContentStreamType contentStream)
((ObjectServicePort) servicePort).setContentStream(repositoryId, documentIdHolder, true, null, contentStream, null);
((ObjectServicePort) servicePort).setContentStream(repositoryId, documentIdHolder, true, new Holder<String>(), contentStream, new Holder<CmisExtensionType>());
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<CmisObjectType> 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<String> documentId, Boolean overwriteFlag, CmisContentStreamType contentStream)
@@ -642,7 +659,7 @@ public class DMObjectServiceTest extends AbstractServiceTest
// public void updateProperties(String repositoryId, Holder<String> objectId, String changeToken, CmisPropertiesType properties)
Holder<String> changeToken = new Holder<String>();
((ObjectServicePort) servicePort).updateProperties(repositoryId, new Holder<String>(documentId), changeToken, properties, null);
((ObjectServicePort) servicePort).updateProperties(repositoryId, new Holder<String>(documentId), changeToken, properties, new Holder<CmisExtensionType>());
@SuppressWarnings("unused")
CmisObjectType response = helper.getObjectProperties(documentId);

View File

@@ -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()
{

View File

@@ -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;
@@ -82,7 +82,6 @@ public class DMRelationshipServiceTest extends AbstractServiceTest
}
protected Object getServicePort()
{
{
URL serviceWsdlURL;
try
@@ -97,7 +96,6 @@ public class DMRelationshipServiceTest extends AbstractServiceTest
Service service = Service.create(serviceWsdlURL, SERVICE_NAME);
return service.getPort(RelationshipServicePort.class);
}
}
public void testGetRelationships() throws Exception
{

View File

@@ -70,7 +70,7 @@ public class DMVersioningServiceTest extends AbstractServiceTest
// check out
Holder<String> documentIdHolder = new Holder<String>(documentId);
Holder<Boolean> contentCopied = new Holder<Boolean>();
((VersioningServicePort) servicePort).checkOut(repositoryId, documentIdHolder, null, contentCopied);
((VersioningServicePort) servicePort).checkOut(repositoryId, documentIdHolder, new Holder<CmisExtensionType>(), 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<CmisExtensionType>());
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<String> documentIdHolder = new Holder<String>(documentId);
Holder<Boolean> contentCopied = new Holder<Boolean>();
((VersioningServicePort) servicePort).checkOut(repositoryId, documentIdHolder, null, contentCopied);
((VersioningServicePort) servicePort).checkOut(repositoryId, documentIdHolder, new Holder<CmisExtensionType>(), 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<CmisExtensionType>());
documentId = documentIdHolder.value;
}
public void testCheckOutCancelCheckOut() throws Exception
@@ -107,12 +109,12 @@ public class DMVersioningServiceTest extends AbstractServiceTest
// check out
Holder<String> documentIdHolder = new Holder<String>(documentId);
Holder<Boolean> contentCopied = new Holder<Boolean>();
((VersioningServicePort) servicePort).checkOut(repositoryId, documentIdHolder, null, contentCopied);
((VersioningServicePort) servicePort).checkOut(repositoryId, documentIdHolder, new Holder<CmisExtensionType>(), 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<CmisExtensionType>());
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<CmisObjectType> 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<CmisObjectType> 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)
{