% !TEX root = CMIS-v1.1-errata-01.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Services
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section{Services}
\label{dm:services}

The Services section of the CMIS specification defines a set of services that are described in a protocol/binding-agnostic fashion. 

Every protocol binding of the CMIS specification MUST implement all of the methods described in this section or explain why the service is not implemented. 

However, the details of how each service and operation is implemented will be described in those protocol binding specifications. 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Common Service Elements
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Common Service Elements}

The following elements are common across many of the CMIS services.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Paging
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Paging}
\label{dm:paging}

All of the methods that allow for the retrieval of a collection of CMIS objects support paging of their result sets except where explicitly stated otherwise. The following pattern is used:\\

\begin{cmisdescription}{Input Parameters}
\begin{description}
	\item[Integer \texttt{maxItems}] (optional) This is the maximum number of items to return in a response.  The repository MUST NOT exceed this maximum. Default is repository-specific.
	\item[Integer \texttt{skipCount}] (optional) This is the number of potential results that the repository MUST skip/page over before returning any results. Defaults to 0.
\end{description}
\end{cmisdescription}

\begin{cmisdescription}{Output Parameters}
\begin{description}
	\item[Boolean \texttt{hasMoreItems}] TRUE if the Repository contains additional items after those contained in the response.  FALSE otherwise.  If TRUE, a request with a larger skipCount or larger maxItems is expected to return additional results (unless the contents of the repository has changed). 
	\item[Integer \texttt{numItems}] If the repository knows the total number of items in a result set, the repository SHOULD include the number here.  If the repository does not know the number of items in a result set, this parameter SHOULD not be set. The value in the parameter MAY NOT be accurate the next time the client retrieves the result set or the next page in the result set.
\end{description}
\end{cmisdescription}

If the caller of a method does not specify a value for \texttt{maxItems}, then the repository MAY select an appropriate number of items to return, and MUST use the \texttt{hasMoreItems} output parameter to indicate if any additional results were not returned.

Repositories MAY return a smaller number of items than the specified value for \texttt{maxItems}. A repository SHOULD NOT throw an exception if \texttt{maxItems} exceeds the internally supported page size. It SHOULD return a smaller number of items instead.

Each binding will express the above in context and may have different mechanisms for communicating \texttt{hasMoreItems} and \texttt{numItems}.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Additional information
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Retrieving additional information on objects in CMIS service calls}

Several CMIS services that return object information have the ability to return dependent object information as part of their response, such as the allowable actions for an object, rendition information, etc.

The CMIS service operations that support returning a result set of objects will include the ability to return the following object information:

\begin{itemize*}
	\item Properties (retrieves a subset instead of additional information)
	\item Relationships
	\item Renditions
	\item ACLs
	\item AllowableActions
\end{itemize*}

This section describes the input parameter and output pattern for those services. All these input parameters are optional. 


\paragraph{Properties}
\label{dm:services:properties}

\begin{cmisdescription}{Description}
All services that allow for the retrieval of properties for CMIS objects have a "property filter" as an optional parameter, which allows the caller to specify a subset of properties for objects that MUST be returned by the repository in the output of the operation.
\end{cmisdescription}

\begin{cmisdescription}{Optional Input Parameter}
\begin{description}
	\item[String \texttt{filter}] Value indicating which properties for objects MUST be returned. This filter is a list of property query names and NOT a list of property ids. The query names of secondary type properties MUST follow the pattern \texttt{<secondaryTypeQueryName>.<propertyQueryName>}.\newline Example: \texttt{cmis:name,amount,\erratareplace{worflow.stage}{workflow.stage}}\newline\newline Valid values are:
	\begin{description}
		\item[Not set] The set of properties to be returned MUST be determined by the repository.
		\item[A comma-delimited list of property definition queryNames] The properties listed MUST be returned.
		\item[*] All properties MUST be returned for all objects.
	\end{description}
\end{description}
\end{cmisdescription}

If a property is requested by a filter, a property element MUST be returned for that property. A repository MAY return additional properties. If a property filter specifies a property which value is "not set", it MUST be represented as a property element without a value element.

\begin{sloppypar}
Unknown query names or query names that are not defined for the object-type SHOULD be ignored. For example, if \cmisservicelink{getChildren} is called with a filter that contains the property \texttt{cmis:contentStreamMimeType}, it SHOULD return all non-document objects without this property and SHOULD NOT return an error.
\end{sloppypar}

\newpage
\paragraph{Relationships}
\label{dm:services:relationships}

\begin{cmisdescription}{Description}
Used to retrieve the relationships in which the object(s) are participating. 
\end{cmisdescription}

\begin{cmisdescription}{Optional Input Parameter}
\begin{description}
	\item[Enum \texttt{includeRelationships}] Value indicating what relationships in which the objects returned participate MUST be returned, if any. Values are:
	\begin{description} 
		\item[none] No relationships MUST be returned. (Default)
		\item[source] Only relationships in which the objects returned are the source MUST be returned.
		\item[target] Only relationships in which the objects returned are the target MUST be returned.
		\item[both] Relationships in which the objects returned are the source or the target MUST be returned.
	\end{description}
\end{description}
\end{cmisdescription}

\begin{cmisdescription}{Output Parameter for each object}
\begin{description}
	\item[<Array> Relationships] A collection of the relationship objects.
\end{description}
\end{cmisdescription}


\paragraph{Policies}
\label{dm:services:policies}

\begin{cmisdescription}{Description}
Used to retrieve the policies currently applied to the object(s).
\end{cmisdescription}

\begin{cmisdescription}{Optional Input Parameter}
\begin{description}
	\item[Boolean \texttt{includePolicyIds}] If TRUE, then the Repository MUST return the Ids of the policies applied to the object.  Defaults to FALSE.
\end{description}
\end{cmisdescription}

\begin{cmisdescription}{Output Parameter for each object}
\begin{description}
	\item[<Array> Policies] A collection of the policy objects.
\end{description}
\end{cmisdescription}


\paragraph{Renditions}
\label{dm:services:renditions}

\begin{cmisdescription}{Description}
Used to retrieve the renditions of the object(s).
\end{cmisdescription}

\begin{cmisdescription}{Optional Input Parameter}
\begin{description}
	\item[String \texttt{renditionFilter}] The Repository MUST return the set of renditions whose kind matches this filter. See section below for the filter grammar. Defaults to "cmis:none". 
\end{description}
\end{cmisdescription}

\begin{cmisdescription}{Output Parameter for each object}
\begin{description}
	\item[<Array> Renditions] The set of renditions.
\end{description}
\end{cmisdescription}


\subparagraph{Rendition Filter Grammar}

The Rendition Filter grammar is defined as follows:

\begin{lstlisting}
<renditionInclusion> ::= <none> | <wildcard> | <termlist>
<termlist> ::= <term> | <term> ',' <termlist>
<term> ::= <kind> | <mimetype>
<kind> ::= <text>
<mimetype> ::= <type> '/' <subtype>
<type> ::= <text>
<subtype> ::= <text> | <wildcard>
<text> ::= !! any char except whitespace
<wildcard> ::= '*'
<none> ::= 'cmis:none'
\end{lstlisting}

\begin{cmisdescription}{An inclusion pattern allows}
\begin{description}
	\item[*] Include all associated renditions.
	\item[Comma-separated list of Rendition kinds or mimetypes] Include only those renditions that match one of the specified kinds or mimetypes.
	\item[cmis:none] Exclude all associated renditions. (Default)
\end{description}
\end{cmisdescription}

\begin{cmisdescription}{Examples}
\begin{itemize*}
	\item \texttt{*} (include all renditions)
	\item \texttt{cmis:thumbnail} (include only thumbnails)
	\item \texttt{image/*} (include all image renditions)
	\item \texttt{application/pdf,application/x-shockwave-flash} (include web ready renditions)
	\item \texttt{cmis:none}  (exclude all renditions)
\end{itemize*}
\end{cmisdescription}


\paragraph{ACLs}
\label{dm:services:acls}

\begin{cmisdescription}{Description}
Used to retrieve the ACLs for the object(s) described in the service response. 
\end{cmisdescription}

\begin{cmisdescription}{Optional Input Parameter}
\begin{description}
	\item[Boolean \texttt{includeACL}] If TRUE, then the repository MUST return the ACLs for each object in the result set. Defaults to FALSE.
\end{description}
\end{cmisdescription}

\begin{cmisdescription}{Output Parameter for each object}
\begin{description}
	\item[<Array> ACEs] The list of access control entries of the ACL for the object.
\end{description}
\end{cmisdescription}

If the repository does not support ACLs, it should not return an error if \texttt{includeACL} is set to TRUE but ignore this parameter.



\paragraph{Allowable Actions}
\label{dm:services:allowableactions}

\begin{cmisdescription}{Description}
Used to retrieve the allowable actions for the object(s) described in the service response.
\end{cmisdescription}

\begin{cmisdescription}{Optional Input Parameter}
\begin{description}
	\item[Boolean \texttt{includeAllowableActions}] If TRUE, then the Repository MUST return the available actions for each object in the result set.  Defaults to FALSE.
\end{description}
\end{cmisdescription}

\begin{cmisdescription}{Output Parameter for each object}
\begin{description}
	\item[<Array> AllowableActions] The list of allowable actions for the object. 
\end{description}
\end{cmisdescription}


\paragraph{Object Order}
\label{dm:services:orderby}

\begin{cmisdescription}{Description}
Used to define the order of the list of objects returned by \cmisservicelink{getChildren} and \cmisservicelink{getCheckedOutDocs}.

If the optional capability \texttt{capabilityOrderBy} is "none" and this parameter is set, the repository SHOULD return an \cmisexceptionlink{invalidArgument} error.

If the optional capability \texttt{capabilityOrderBy} is "common" and this parameter contains a query name that is not in the set of common properties (see below), the repository SHOULD return an \cmisexceptionlink{invalidArgument} error.

If a repository only supports a certain number of \texttt{orderBy} properties, it SHOULD ignore all additional properties.

If this parameter contains a query name that is unknown or a query name that belongs to a property that is not queryable, the repository SHOULD ignore it.

 The query names of secondary type properties MUST follow this pattern: \texttt{<secondaryTypeQueryName>.<propertyQueryName>}
 
\errataadd{When mixed-type objects are returned (e.g. getChildren), an "orderBy" property may be orderable for one type but not orderable for another type. The order is then repository specific.}
\end{cmisdescription}

\begin{cmisdescription}{Common CMIS properties}
The following set of properties SHOULD be supported by the repository if the optional capability \texttt{capabilityOrderBy} is \texttt{common} or \texttt{custom}. 
	\begin{itemize*}
		\item \texttt{cmis:name}
		\item \texttt{cmis:objectId}
		\item \texttt{cmis:objectTypeId}
		\item \texttt{cmis:baseTypeId}
		\item \texttt{cmis:createdBy}
		\item \texttt{cmis:creationDate}
		\item \texttt{cmis:lastModifiedBy}
		\item \texttt{cmis:lastModificationDate}
		\item \texttt{cmis:isImmutable}
		\item \texttt{cmis:isPrivateWorkingCopy}
		\item \texttt{cmis:isLatestVersion}
		\item \texttt{cmis:isMajorVersion}
		\item \texttt{cmis:isLatestMajorVersion}
		\item \texttt{cmis:versionLabel}
		\item \texttt{cmis:versionSeriesId}
		\item \texttt{cmis:isVersionSeriesCheckedOut}
		\item \texttt{cmis:versionSeriesCheckedOutBy}
		\item \texttt{cmis:versionSeriesCheckedOutId}
		\item \texttt{cmis:checkinComment}
		\item \texttt{cmis:contentStreamLength}
		\item \texttt{cmis:contentStreamMimeType}
		\item \texttt{cmis:contentStreamFileName}
		\item \texttt{cmis:contentStreamId}
		\item \texttt{cmis:parentId}
		\item \texttt{\errataremove{cmis:allowedChildObjectTypeIds}}
		\item \texttt{cmis:path}
	\end{itemize*}
\end{cmisdescription}

\begin{cmisdescription}{Optional Input Parameter}
\begin{description}
	\item[String \texttt{orderBy}] A comma-separated list of query names and an optional ascending modifier "ASC" or descending modifier "DESC" for each query name. If the modifier is not stated, "ASC" is assumed.
\end{description}
\end{cmisdescription}

\begin{cmisdescription}{Example}
	\texttt{cmis:baseTypeId,cmis:contentStreamLength DESC,cmis:name}
\end{cmisdescription}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Change Tokens
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Change Tokens}
\label{dm:changetokens}

The CMIS base object-type definitions include an opaque string \texttt{cmis:changeToken} property that a repository MAY use for optimistic locking and/or concurrency checking to ensure that user updates do not conflict. 

If a repository provides a value for the \texttt{cmis:changeToken} property for an object, then all invocations of the "update" methods on that object (\cmisservicelink{updateProperties}, \cmisservicelink{bulkUpdateProperties}, \cmisservicelink{setContentStream}, \cmisservicelink{appendContentStream}, \cmisservicelink{deleteContentStream}, etc.) MUST provide the value of the \texttt{cmis:changeToken} property as an input parameter, and the repository MUST throw an \texttt{updateConflictException} if the value specified for the change token does NOT match the change token value for the object being updated. 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Exceptions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Exceptions}
\label{dm:exceptions}

The following sections list the complete set of exceptions that MAY be returned by a repository in response to a CMIS service method call. 


\paragraph{General Exceptions}
\label{dm:generalexceptions}

The following exceptions MAY be returned by a repository in response to ANY CMIS service method call.

The "Cause" field indicates the circumstances under which a repository SHOULD return a particular exception. 

\begin{description}
	\item[invalidArgument]\phantomsection\label{dm:exception:invalidArgument}\hfill\\
		Cause: One or more of the input parameters to the service method is missing or invalid.
	\item[notSupported]\phantomsection\label{dm:exception:notSupported}\hfill\\
		Cause: The service method invoked requires an optional capability not supported by the repository.
	\item[objectNotFound]\phantomsection\label{dm:exception:objectNotFound}\hfill\\
		Cause: The service call has specified an object, an object-type or a repository that does not exist.
	\item[permissionDenied]\phantomsection\label{dm:exception:permissionDenied}\hfill\\
		Cause: The caller of the service method does not have sufficient permissions to perform the operation.
	\item[runtime]\phantomsection\label{dm:exception:runtime}\hfill\\
		Cause: Any other cause not expressible by another CMIS exception.
\end{description}


\paragraph{Specific Exceptions}
\label{dm:specificexceptions}

The following exceptions MAY be returned by a repositiory in response to one or more CMIS service methods calls. 

For each exception, the general intent is listed. 

\begin{description}
	\item[constraint]\phantomsection\label{dm:exception:constraint}\hfill\\
		Intent: The operation violates a repository- or object-level constraint defined in the CMIS domain model.
	\item[contentAlreadyExists]\phantomsection\label{dm:exception:contentAlreadyExists}\hfill\\
		Intent: The operation attempts to set the content stream for a document that already has a content stream without explicitly specifying the "overwriteFlag" parameter.
	\item[filterNotValid]\phantomsection\label{dm:exception:filterNotValid}\hfill\\
		Intent: The property filter or rendition filter input to the operation is not valid. The repository SHOULD NOT throw this expection if the filter syntax is correct but one or more elements in the filter is unknown. Unknown elements SHOULD be ignored.
	\item[nameConstraintViolation]\phantomsection\label{dm:exception:nameConstraintViolation}\hfill\\
		Intent: The repository is not able to store the object that the user is creating/updating due to a name constraint violation.
	\item[storage]\phantomsection\label{dm:exception:storage}\hfill\\
		Intent: The repository is not able to store the object that the user is creating/updating due to an internal storage problem.
	\item[streamNotSupported]\phantomsection\label{dm:exception:streamNotSupported}\hfill\\
		Intent: The operation is attempting to get or set a content stream for a document whose object-type specifies that a content stream is not allowed for document's of that type.
	\item[updateConflict]\phantomsection\label{dm:exception:updateConflict}\hfill\\
		Intent: The operation is attempting to update an object that is no longer current (as determined by the repository). See also section 
\ref{dm:changetokens}~\nameref{dm:changetokens}.
	\item[versioning]\phantomsection\label{dm:exception:versioning}\hfill\\
		Intent: The operation is attempting to perform an action on a non-current version of a document that cannot be performed on a non-current version.
\end{description}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ACLs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{ACLs}

Those services which allow for the setting of ACLs MAY take the optional macro \texttt{cmis:user} which allows the caller to indicate the operation applies to the current authenticated user.

If the repository info provides a value for \texttt{principalAnonymous}, this value can be used to in an ACE to specify permissions for anonymous users.

If the repository info provides a value for \texttt{principalAnyone}, this value can be used to in an ACE to specify permissions for any authenticated user.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Repository Services
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagebreak[4]
\subsection{Repository Services}

The Repository Services are used to discover information about the repository, including information about the repository and the object-types defined for the repository. Furthermore, it provides operations to create, modify and delete object-type definitions if that is supported by the repository.


%%% getRepositories
\begin{cmisservice}{getRepositories}

	\begin{cmisservicedescription}{Description}
		Returns a list of CMIS repositories available from this CMIS service endpoint.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}
		None.
	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{repositoryId}
			The identifier for the repository.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{repositoryName}
			A display name for the repository.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getRepositoryInfo
\begin{cmisservice}{getRepositoryInfo}

	\begin{cmisservicedescription}{Description}
		Returns information about the CMIS repository, the optional capabilities it supports and its access control information if applicable.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{repositoryId}
			The identifier for the repository.\\
			Note: This MUST be the same identifier as the input to the method.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{repositoryName}
			A display name for the repository.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{repositoryDescription}
			A display description for the repository.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{vendorName}
			A display name for the vendor of the repository's underlying application.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{productName}
			A display name for the repository's underlying application.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{productVersion}
			A display name for the version number of the repository's underlying application.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Id}{rootFolderId}
			The id of the root folder object for the repository.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{List<Capabilities>}{capabilities}
			The set of values for the repository-optional capabilities specified in section \ref{dm:optionalcapabilities}~\nameref{dm:optionalcapabilities}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{latestChangeLogToken}
			The change log token corresponding to the most recent change event for any object in the repository. See section \ref{dm:changelog}~\nameref{dm:changelog}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{cmisVersionSupported}
			A Decimal as String that indicates what version of the CMIS specification this repository supports as specified in section \ref{dm:implementationinformation}~\nameref{dm:implementationinformation}. This value MUST be "1.1".
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{URI}{thinClientURI}
			A optional repository-specific URI pointing to the repository's web interface. MAY be not set.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Boolean}{changesIncomplete}
			Indicates whether or not the repository's change log can return all changes ever made to any object in the repository or only changes made after a particular point in time.  Applicable when the repository's optional capability \texttt{capabilityChanges} is not \texttt{none}.
			\begin{itemize}
				\item If FALSE, then the change log can return all changes ever made to every object.
				\item If TRUE, then the change log includes all changes made since a particular point in time, but not all changes ever made.
			\end{itemize}
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> Enum}{changesOnType}
Indicates whether changes are available for base types in the repository.  Valid values are from enumBaseObjectTypeIds.  See section \ref{dm:changelog}~\nameref{dm:changelog}.
			\begin{itemize*}
				\item \texttt{cmis:document}
				\item \texttt{cmis:folder}
				\item \texttt{cmis:policy}
				\item \texttt{cmis:relationship}
				\item \texttt{cmis:item}
			\end{itemize*}
			Note: The base type \texttt{cmis:secondary} MUST NOT be used here. Only primary base types can be in this list.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Enum}{supportedPermissions}
			Specifies which types of permissions are supported.
			\begin{description}
				\item[basic] Indicates that the CMIS basic permissions are supported.
				\item[repository] Indicates that repository specific permissions are supported.
				\item[both] Indicates that both CMIS basic permissions and repository specific permissions are supported.
			\end{description}
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Enum}{propagation}
			The allowed value(s) for \cmisservicelink{applyACL}, which control how non-direct ACEs are handled by the repository. See section \ref{dm:aclcapabilities}~\nameref{dm:aclcapabilities}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> Permission}{permissions}
			The list of repository-specific permissions the repository supports for managing ACEs. See section \ref{dm:accesscontrol}~\nameref{dm:accesscontrol}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> PermissionMapping}{mapping}
			The list of mappings for the CMIS basic permissions to allowable actions. See section \ref{dm:accesscontrol}~\nameref{dm:accesscontrol}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{principalAnonymous}
			If set, this field holds the principal who is used for anonymous access.  This principal can then be passed to the ACL services to specify what permissions anonymous users should have.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{principalAnyone}
			If set, this field holds the principal who is used to indicate any authenticated user. This principal can then be passed to the ACL services to specify what permissions any authenticated user should have.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> RepositoryFeatures}{extendedFeatures}
			Optional list of additional repository features. See section \ref{dm:repositoryfeatures}~\nameref{dm:repositoryfeatures}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getTypeChildren
\begin{cmisservice}{getTypeChildren}

	\begin{cmisservicedescription}{Description}
		Returns the list of object-types defined for the repository that are children of the specified type.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Id}{typeId}
				The typeId of an object-type specified in the repository.
				\begin{itemize}
					\item If specified, then the repository MUST return all of child types of the specified type.
					\item If not specified, then the repository MUST return all base object-types.
				\end{itemize}
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includePropertyDefinitions}
				If TRUE, then the repository MUST return the property definitions for each object-type.
				If FALSE (default), the repository MUST return only the attributes for each object-type. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{maxItems}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{skipCount}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> Object-Type}{types}
			The list of child object-types defined for the given typeId.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Boolean}{hasMoreItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Integer}{numItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getTypeDescendants
\begin{cmisservice}{getTypeDescendants}

	\begin{cmisservicedescription}{Description}
		Returns the set of the descendant object-types defined for the Repository under the specified type.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		\begin{itemize}
			\item This method does NOT support paging as defined in the \ref{dm:paging}~\nameref{dm:paging} section.
			\item The order in which results are returned is respository-specific.
		\end{itemize}
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Id}{typeId}
				The typeId of an object-type specified in the repository.
				\begin{itemize}
					\item If specified, then the repository MUST return all of descendant types of the specified type.
					\item If not specified, then the Repository MUST return all types and MUST ignore the value of the depth parameter.
				\end{itemize}
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{depth}
				The number of levels of depth in the type hierarchy from which to return results. Valid values are:
				\begin{description}
					\item[1] Return only types that are children of the type. See also \cmisservicelink{getTypeChildren}.
					\item[<Integer value greater than 1>] Return only types that are children of the type and descendants up to <value> levels deep.
					\item[-1] Return ALL descendant types at all depth levels in the CMIS hierarchy.
				\end{description}
				The default value is repository specific and SHOULD be at least 2 or -1.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includePropertyDefinitions}
				If TRUE, then the repository MUST return the property definitions for each object-type.
				If FALSE (default), the repository MUST return only the attributes for each object-type. 
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> Object-Type}{types}
			The hierarchy of object-types defined for the repository.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{invalidArgument} If the service is invoked with "depth = 0" or "depth < -1".
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getTypeDefinition
\begin{cmisservice}{getTypeDefinition}

	\begin{cmisservicedescription}{Description}
		Gets the definition of the specified object-type.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{typeId}
				The typeId of an object-type specified in the repository.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Object-Type}{type}
			Object-type including all property definitions. See section \ref{dm:objecttypes}~\nameref{dm:objecttypes} for further details.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
	\end{cmisserviceexpections}

\end{cmisservice}


%%% createType
\begin{cmisservice}{createType}

	\begin{cmisservicedescription}{Description}
		Creates a new type definition that is a subtype of an existing specified parent type. 
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		Only properties that are new to this type (not inherited) are passed to this service. 

		See section \ref{dm:typemutability}~\nameref{dm:typemutability} for further details.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Object-Type}{type}
				A fully populated type definition including all new property definitions.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Object-Type}{type}
			The newly created object-type including all property definitions. See sections \ref{dm:objecttypes}~\nameref{dm:objecttypes} and \ref{dm:typemutability}~\nameref{dm:typemutability} for further details.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{invalidArgument} If the specified parent type does not exist or the specified parent type cannot be used as the parent type.
			\item \cmisexceptionlink{constraint} If the type definition violates repository specifc rules.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% updateType
\begin{cmisservice}{updateType}

	\begin{cmisservicedescription}{Description}
		Updates a type definition.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		If you add an optional property to a type in error. There is no way to remove it/correct it - without deleting the type.
		See section \ref{dm:typemutability}~\nameref{dm:typemutability} for further details.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Object-Type}{type}
				A type definition object with the property definitions that are to change. Repositories MUST ignore all fields in the type definition except for the type id and the list of properties.

				Properties that are not changing MUST NOT be included, including any inherited property definitions. 

				For the properties that are being included, an entire copy of the property definition should be present (with the exception of the choice values – see special note), even values that are not changing. 

				Special note about choice values. There are only two types of changes permitted.
				\begin{itemize}
					\item New choice added to the list. 
					\item Changing the displayname for an existing choice.
				\end{itemize}

				For any choice that is being added or having its display name changed, both the displayName and value MUST be present.

			\end{cmisserviceinout}

		\end{cmisservicerequired}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Object-Type}{type}
			The updated object-type including all property definitions. See sections \ref{dm:objecttypes}~\nameref{dm:objecttypes} and \ref{dm:typemutability}~\nameref{dm:typemutability} for further details.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint} If the rules listed in section \ref{dm:typemutability}~\nameref{dm:typemutability} are not obeyed.
			\item \cmisexceptionlink{constraint} If the property definitions violate repository specifc rules.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% deleteType
\begin{cmisservice}{deleteType}

	\begin{cmisservicedescription}{Description}
		Deletes a type definition.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		If there are object instances present of the type being deleted then this operation MUST fail. 

		See sections \ref{dm:typemutability}~\nameref{dm:typemutability} for further details.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{typeId}
				The typeId of an object-type specified in the repository.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}
		\cmisserviceinoutnone
	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint} If objects of this object-type exist in the repository.
			\item \cmisexceptionlink{constraint} If the object-type has a sub-type.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Navigation Services
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagebreak[4]
\subsection{Navigation Services}

The Navigation Services are used to traverse the folder hierarchy in a CMIS repository, and to locate documents that are checked out.


%%% getChildren
\begin{cmisservice}{getChildren}

	\begin{cmisservicedescription}{Description}
		Gets the list of child objects contained in the specified folder.  
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		If the repository supports the optional capability \texttt{capabilityVersionSpecificFiling}, then the repository MUST return the document versions filed in the specified folder. Otherwise, the latest version or the latest major version of the documents MUST be returned.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{folderId}
				The identifier for the folder.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Integer}{maxItems}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{skipCount}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{orderBy}
				See section \ref{dm:services:orderby}~\nameref{dm:services:orderby}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{includeRelationships}
				See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{renditionFilter}
				See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeAllowableActions}
				See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includePathSegment}
				 If TRUE, returns a PathSegment for each child object for use in constructing that object's path. Defaults to FALSE. See section \ref{dm:paths}~\nameref{dm:paths}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> objects}{objects}
			A list of the child objects for the specified folder. Each object result MUST include the following elements if they are requested:
			\begin{description}
				\item[Properties] See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
				\item[Relationships] See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
				\item[Renditions] See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
				\item[AllowableActions] See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
				\item[PathSegment] If \texttt{includePathSegment} was TRUE.  See section \ref{dm:paths}~\nameref{dm:paths}.
			\end{description}
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Boolean}{hasMoreItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Integer}{numItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property or rendition filter input parameter is not valid.
			\item \cmisexceptionlink{invalidArgument}  If the specified folder is not a folder.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getDescendants
\begin{cmisservice}{getDescendants}

	\begin{cmisservicedescription}{Description}
		Gets the set of descendant objects contained in the specified folder or any of its child-folders.  
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		\begin{itemize}
			\item This operation does NOT support paging as defined in the  \ref{dm:paging}~\nameref{dm:paging} section.
			\item The order in which results are returned is respository-specific.
			\item If the repository supports the optional capability \texttt{capabilityVersionSpecificFiling}, then the repository MUST return the document versions filed in the specified folder or its descendant folders.  Otherwise, the latest version or latest major version of the documents MUST be returned.
			\item If the repository supports the optional capability \texttt{capabilityMultifiling} and the same document is encountered multiple times in the hierarchy, then the repository MUST return that document each time it is encountered.
		\end{itemize}
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{folderId}
				The identifier for the folder.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Integer}{depth}
				The number of levels of depth in the folder hierarchy from which to return results. Valid values are:
				\begin{description}
					\item[1] Return only objects that are children of the folder. See also \cmisservicelink{getChildren}.
					\item[<Integer value greater than 1>] Return only objects that are children of the folder and descendants up to <value> levels deep.
					\item[-1] Return ALL descendant objects at all depth levels in the CMIS hierarchy.
				\end{description}
				The default value is repository specific and SHOULD be at least 2 or -1.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{includeRelationships}
				See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{renditionFilter}
				See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeAllowableActions}
				See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includePathSegment}
				 If TRUE, returns a PathSegment for each child object for use in constructing that object's path. Defaults to FALSE. See section \ref{dm:paths}~\nameref{dm:paths}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> objects}{objects}
			A tree of the child objects for the specified folder. Each object result MUST include the following elements if they are requested:
			\begin{description}
				\item[Properties] See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
				\item[Relationships] See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
				\item[Renditions] See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
				\item[AllowableActions] See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
				\item[PathSegment] If \texttt{includePathSegment} was TRUE.  See section \ref{dm:paths}~\nameref{dm:paths}.
			\end{description}
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property or rendition filter input parameter is not valid.
			\item \cmisexceptionlink{invalidArgument} If the specified folder is not a folder.
			\item \cmisexceptionlink{invalidArgument} If the service is invoked with "depth = 0" or "depth < -1".
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getFolderTree
\begin{cmisservice}{getFolderTree}

	\begin{cmisservicedescription}{Description}
		Gets the set of descendant folder objects contained in the specified folder. 
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		\begin{itemize}
			\item This operation does NOT support paging as defined in the  \ref{dm:paging}~\nameref{dm:paging} section.
			\item The order in which results are returned is respository-specific.
		\end{itemize}
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{folderId}
				The identifier for the folder.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Integer}{depth}
				The number of levels of depth in the folder hierarchy from which to return results. Valid values are:
				\begin{description}
					\item[1] Return only objects that are children of the folder.
					\item[<Integer value greater than 1>] Return only objects that are children of the folder and descendants up to <value> levels deep.
					\item[-1] Return ALL descendant objects at all depth levels in the CMIS hierarchy.
				\end{description}
				The default value is repository specific and SHOULD be at least 2 or -1.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{includeRelationships}
				See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{renditionFilter}
				See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeAllowableActions}
				See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includePathSegment}
				 If TRUE, returns a PathSegment for each child object for use in constructing that object's path. Defaults to FALSE. See section \ref{dm:paths}~\nameref{dm:paths}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> objects}{objects}
			A tree of the child objects for the specified folder. Each object result MUST include the following elements if they are requested:
			\begin{description}
				\item[Properties] See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
				\item[Relationships] See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
				\item[Renditions] See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
				\item[AllowableActions] See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
				\item[PathSegment] If \texttt{includePathSegment} was TRUE.  See section \ref{dm:paths}~\nameref{dm:paths}.
			\end{description}
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property or rendition filter input parameter is not valid.
			\item \cmisexceptionlink{invalidArgument} If the specified folder is not a folder.
			\item \cmisexceptionlink{invalidArgument} If the service is invoked with "depth = 0" or "depth < -1".
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getFolderTree
\begin{cmisservice}{getFolderParent}

	\begin{cmisservicedescription}{Description}
		Gets the parent folder object for the specified folder object.  
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{folderId}
				The identifier for the folder.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Object}{object}
			The parent folder object of the specified folder. 

			The repository SHOULD return an object that is equal to the object returned by \texttt{getObject} with default parameters.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property filter input parameter is not valid.
			\item \cmisexceptionlink{invalidArgument} If the specified folder is not a folder.
			\item \cmisexceptionlink{invalidArgument} If the specified folder is the root folder.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getObjectParents
\begin{cmisservice}{getObjectParents}

	\begin{cmisservicedescription}{Description}
		Gets the parent folder(s) for the specified fileable object. 
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{includeRelationships}
				See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{renditionFilter}
				See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeAllowableActions}
				See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeRelativePathSegment}
				 \errataadd{If TRUE, returns a relativePathSegment for each parent object for use in constructing that object's paths. The default is repository specific.}
				 See section \ref{dm:paths}~\nameref{dm:paths}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> objects}{objects}
			A list of the parent folder(s) of the specified objects. Empty for the root folder and unfiled objects. Each object result MUST include the following elements if they are requested:
			\begin{description}
				\item[Properties] See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
				\item[Relationships] See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
				\item[Renditions] See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
				\item[AllowableActions] See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
				\item[RelativePathSegment] If \texttt{includeRelativePathSegment} was TRUE.  See section \ref{dm:paths}~\nameref{dm:paths}.
			\end{description}
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Boolean}{hasMoreItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Integer}{numItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property or rendition filter input parameter is not valid.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getCheckedOutDocs
\begin{cmisservice}{getCheckedOutDocs}

	\begin{cmisservicedescription}{Description}
		Gets the list of documents that are checked out that the user has access to.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Id}{folderId}
				The identifier for the folder.

				If specified, the repository MUST only return checked out documents that are child-objects of the specified folder.

				If not specified, the repository MUST return checked out documents from anywhere in the repository hierarchy.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{maxItems}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{skipCount}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{orderBy}
				See section \ref{dm:services:orderby}~\nameref{dm:services:orderby}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{includeRelationships}
				See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{renditionFilter}
				See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeAllowableActions}
				See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> objects}{objects}
			A list of checked out documents. Each object result MUST include the following elements if they are requested:
			\begin{description}
				\item[Properties] See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
				\item[Relationships] See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
				\item[Renditions] See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
				\item[AllowableActions] See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{description}
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Boolean}{hasMoreItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Integer}{numItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property or rendition filter input parameter is not valid.
			\item \cmisexceptionlink{invalidArgument}  If a folder is specified but the folder is not a folder.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Object Services
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagebreak[4]
\subsection{Object Services}

CMIS provides id-based CRUD (Create, Retrieve, Update, Delete) operations on objects in a repository. 


%%% createDocument
\begin{cmisservice}{createDocument}

	\begin{cmisservicedescription}{Description}
		Creates a document object of the specified type (given by the \texttt{cmis:objectTypeId} property) in the (optionally) specified location. 
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Property}{properties}
				The property values that MUST be applied to the newly-created document object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Id}{folderId}
				If specified, the identifier for the folder that MUST be the parent folder for the newly-created document object. This parameter MUST be specified if the repository does NOT support the optional "unfiling" capability.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<contentStream>}{contentStream}
				The content stream that MUST be stored for the newly-created document object. The method of passing the contentStream to the server and the encoding mechanism will be specified by each specific binding.  MUST be required if the type requires it.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{versioningState}
				An enumeration specifying what the versioning state of the newly-created object MUST be. Valid values are:
				\begin{description}
					\item[none] (default, if the object-type is not versionable) The document MUST be created as a non-versionable document.
					\item[checkedout] The document MUST be created in the checked-out state. The checked-out document MAY be visible to other users.
					\item[major] (default, if the object-type is versionable) The document MUST be created as a major version.
					\item[minor] The document MUST be created as a minor version.
				\end{description}
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Id}{policies}
				A list of policy ids that MUST be applied to the newly-created document object. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{addACEs}
				A list of ACEs that MUST be added to the newly-created document object, either using the ACL from folderId if specified, or being applied if no folderId is specified. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{removeACEs}
				A list of ACEs that MUST be removed from the newly-created document object, either using the ACL from folderId if specified, or being ignored if no folderId is specified.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The id of the newly-created document.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint}  If the \texttt{cmis:objectTypeId} property value is not an object-type whose base type is \texttt{cmis:document}.
			\item \cmisexceptionlink{constraint}  If the \texttt{cmis:objectTypeId} property value is NOT in the list of \texttt{AllowedChildObjectTypeIds} of the parent-folder specified by folderId. 
			\item \cmisexceptionlink{constraint}  If the value of any of the properties violates the constraints (min/max/required/length etc.) specified in the property definition in the object-type.
			\item \cmisexceptionlink{constraint}  If the \texttt{contentStreamAllowed} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to "required" and no contentStream input parameter is provided.
			\item \cmisexceptionlink{constraint}  If the \texttt{versionable} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and the value for the versioningState input parameter is provided that is something other than \texttt{none} or "not set".
			\item \cmisexceptionlink{constraint}If the \texttt{versionable} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to TRUE and the value for the versioningState input parameter provided is \texttt{none}.
			\item \cmisexceptionlink{constraint}  If the \texttt{controllablePolicy} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and at least one policy is provided.
			\item \cmisexceptionlink{constraint} If the \texttt{controllableACL} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and at least one ACE is provided.
			\item \cmisexceptionlink{constraint}  If any permission referenced in a provided ACE is not supported by the repository.
(see also \cmisservicelink{applyACL}).
			\item \cmisexceptionlink{nameConstraintViolation} If the repository detects a violation with the given \texttt{cmis:name} property value, the repository MAY throw this exception or chose a name which does not conflict.
			\item \cmisexceptionlink{storage}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{streamNotSupported} See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% createDocumentFromSource
\begin{cmisservice}{createDocumentFromSource}

	\begin{cmisservicedescription}{Description}
		Creates a document object as a copy of the given source document in the (optionally) specified location. 
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{sourceId}
				The identifier for the source document.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{<Array> Property}{properties}
				The property values that MUST be applied to the object.  This list of properties SHOULD only contain properties whose values differ from the source document.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{folderId}
				If specified, the identifier for the folder that MUST be the parent folder for the newly-created document object. This parameter MUST be specified if the repository does NOT support the optional "unfiling" capability.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{versioningState}
				An enumeration specifying what the versioning state of the newly-created object MUST be. Valid values are:
				\begin{description}
					\item[none] (default, if the object-type is not versionable) The document MUST be created as a non-versionable document.
					\item[checkedout] The document MUST be created in the checked-out state. The checked-out document MAY be visible to other users.
					\item[major] (default, if the object-type is versionable) The document MUST be created as a major version.
					\item[minor] The document MUST be created as a minor version.
				\end{description}
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Id}{policies}
				A list of policy ids that MUST be applied to the newly-created document object. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{addACEs}
				A list of ACEs that MUST be added to the newly-created document object, either using the ACL from folderId if specified, or being applied if no folderId is specified. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{removeACEs}
				A list of ACEs that MUST be removed from the newly-created document object, either using the ACL from folderId if specified, or being ignored if no folderId is specified.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The id of the newly-created document.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint} If the sourceId is not an object whose baseType is \texttt{cmis:document}.
			\item \cmisexceptionlink{constraint}  If the \texttt{cmis:objectTypeId} property value is NOT in the list of \texttt{AllowedChildObjectTypeIds} of the parent-folder specified by folderId. 
			\item \cmisexceptionlink{constraint}  If the value of any of the properties violates the constraints (min/max/required/length etc.) specified in the property definition in the object-type.
			\item \cmisexceptionlink{constraint}  If the \texttt{versionable} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and the value for the versioningState input parameter is provided that is something other than \texttt{none} or "not set".
			\item \cmisexceptionlink{constraint}If the \texttt{versionable} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to TRUE and the value for the versioningState input parameter provided is \texttt{none}.
			\item \cmisexceptionlink{constraint}  If the \texttt{controllablePolicy} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and at least one policy is provided.
			\item \cmisexceptionlink{constraint}  If the \texttt{controllableACL} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and at least one ACE is provided.
			\item \cmisexceptionlink{constraint}  If any permission referenced in a provided ACE is not supported by the repository.
(see also \cmisservicelink{applyACL}).
			\item \cmisexceptionlink{nameConstraintViolation} If the repository detects a violation with the given \texttt{cmis:name} property value, the repository MAY throw this exception or chose a name which does not conflict.
			\item \cmisexceptionlink{storage}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{streamNotSupported} See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% createFolder
\begin{cmisservice}{createFolder}

	\begin{cmisservicedescription}{Description}
		Creates a folder object of the specified type in the specified location.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Property}{properties}
				The property values that MUST be applied to the newly-created folder object.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{folderId}
				The identifier for the folder that MUST be the parent folder for the newly-created folder object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{<Array> Id}{policies}
				A list of policy ids that MUST be applied to the newly-created folder object. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{addACEs}
				A list of ACEs that MUST be added to the newly-created folder object, either using the ACL from folderId if specified, or being applied if no folderId is specified. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{removeACEs}
				A list of ACEs that MUST be removed from the newly-created folder object, either using the ACL from folderId if specified, or being ignored if no folderId is specified.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The id of the newly-created folder.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint}  If the \texttt{cmis:objectTypeId} property value is not an object-type whose base type is \texttt{cmis:folder}.
			\item \cmisexceptionlink{constraint}  If the \texttt{cmis:objectTypeId} property value is NOT in the list of \texttt{AllowedChildObjectTypeIds} of the parent-folder specified by folderId. 
			\item \cmisexceptionlink{constraint}  If the value of any of the properties violates the constraints (min/max/required/length etc.) specified in the property definition in the object-type.
			\item \cmisexceptionlink{constraint}  If the \texttt{controllablePolicy} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and at least one policy is provided.
			\item \cmisexceptionlink{constraint}  If the \texttt{controllableACL} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and at least one ACE is provided.
			\item \cmisexceptionlink{constraint} If at least one of the specified values for permission in ANY of the ACEs does not match ANY of the permission names returned by the ACL Capabilities in the Repository Info (see section \ref{dm:aclsupportedpermissions}~\nameref{dm:aclsupportedpermissions}) and is not a CMIS basic permission.
			\item \cmisexceptionlink{nameConstraintViolation} If the repository detects a violation with the given \texttt{cmis:name} property value, the repository MAY throw this exception or chose a name which does not conflict.
			\item \cmisexceptionlink{storage}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% createRelationship
\begin{cmisservice}{createRelationship}

	\begin{cmisservicedescription}{Description}
		Creates a relationship object of the specified type.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Property}{properties}
				The property values that MUST be applied to the newly-created relationship object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{<Array> Id}{policies}
				A list of policy ids that MUST be applied to the newly-created relationship object. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{addACEs}
				A list of ACEs that MUST be added to the newly-created relationship object, either using the ACL from folderId if specified, or being applied if no folderId is specified. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{removeACEs}
				A list of ACEs that MUST be removed from the newly-created relationship object, either using the ACL from folderId if specified, or being ignored if no folderId is specified.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The id of the newly-created relationship.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint}  If the \texttt{cmis:objectTypeId} property value is not an object-type whose base type is \texttt{cmis:relationship}.
			\item \cmisexceptionlink{constraint}  If the value of any of the properties violates the constraints (min/max/required/length etc.) specified in the property definition in the object-type.
			\item \cmisexceptionlink{constraint}  If the source object's object-type is not in the list of "allowedSourceTypes" specified by the object-type definition specified by \texttt{cmis:objectTypeId} property value.
			\item \cmisexceptionlink{constraint}  If the target object's object-type is not in the list of "allowedTargetTypes" specified by the object-type definition specified by \texttt{cmis:objectTypeId} property value.
			\item \cmisexceptionlink{constraint}  If the \texttt{controllablePolicy} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and at least one policy is provided.
			\item \cmisexceptionlink{constraint}  If the \texttt{controllableACL} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and at least one ACE is provided.
			\item \cmisexceptionlink{constraint} If at least one of the specified values for permission in ANY of the ACEs does not match ANY of the permission names returned by the ACL Capabilities in the Repository Info (see section \ref{dm:aclsupportedpermissions}~\nameref{dm:aclsupportedpermissions}) and is not a CMIS basic permission.
			\item \cmisexceptionlink{nameConstraintViolation} If the repository detects a violation with the given \texttt{cmis:name} property value, the repository MAY throw this exception or chose a name which does not conflict.
			\item \cmisexceptionlink{storage}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% createPolicy
\begin{cmisservice}{createPolicy}

	\begin{cmisservicedescription}{Description}
		Creates a policy object of the specified type.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Property}{properties}
				The property values that MUST be applied to the newly-created policy object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Id}{folderId}
				If specified, the identifier for the folder that MUST be the parent folder for the newly-created policy object. This parameter MUST be specified if the repository does NOT support the optional "unfiling" capability.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Id}{policies}
				A list of policy ids that MUST be applied to the newly-created policy object. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{addACEs}
				A list of ACEs that MUST be added to the newly-created policy object, either using the ACL from folderId if specified, or being applied if no folderId is specified. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{removeACEs}
				A list of ACEs that MUST be removed from the newly-created policy object, either using the ACL from folderId if specified, or being ignored if no folderId is specified.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The id of the newly-created policy.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint}  If the \texttt{cmis:objectTypeId} property value is not an object-type whose base type is \texttt{cmis:policy}.
			\item \cmisexceptionlink{constraint}  If the value of any of the properties violates the constraints (min/max/required/length etc.) specified in the property definition in the object-type.
			\item \cmisexceptionlink{constraint}  If the \texttt{cmis:objectTypeId} property value is NOT in the list of \texttt{AllowedChildObjectTypeIds} of the parent-folder specified by folderId. 
			\item \cmisexceptionlink{constraint}  If the \texttt{controllablePolicy} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and at least one policy is provided.
			\item \cmisexceptionlink{constraint}  If the \texttt{controllableACL} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and at least one ACE is provided.
			\item \cmisexceptionlink{constraint} If at least one of the specified values for permission in ANY of the ACEs does not match ANY of the permission names returned by the ACL Capabilities in the Repository Info (see section \ref{dm:aclsupportedpermissions}~\nameref{dm:aclsupportedpermissions}) and is not a CMIS basic permission.
			\item \cmisexceptionlink{nameConstraintViolation} If the repository detects a violation with the given \texttt{cmis:name} property value, the repository MAY throw this exception or chose a name which does not conflict.
			\item \cmisexceptionlink{storage}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% createItem
\begin{cmisservice}{createItem}

	\begin{cmisservicedescription}{Description}
		Creates an item object of the specified type.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Property}{properties}
				The property values that MUST be applied to the newly-created item object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Id}{folderId}
				If specified, the identifier for the folder that MUST be the parent folder for the newly-created item object. This parameter MUST be specified if the repository does NOT support the optional "unfiling" capability.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Id}{policies}
				A list of policy ids that MUST be applied to the newly-created item object. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{addACEs}
				A list of ACEs that MUST be added to the newly-created item object, either using the ACL from folderId if specified, or being applied if no folderId is specified. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{removeACEs}
				A list of ACEs that MUST be removed from the newly-created item object, either using the ACL from folderId if specified, or being ignored if no folderId is specified.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The id of the newly-created item.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint}  If the \texttt{cmis:objectTypeId} property value is not an object-type whose base type is \texttt{cmis:item}.
			\item \cmisexceptionlink{constraint}  If the value of any of the properties violates the constraints (min/max/required/length etc.) specified in the property definition in the object-type.
			\item \cmisexceptionlink{constraint}  If the \texttt{cmis:objectTypeId} property value is NOT in the list of \texttt{AllowedChildObjectTypeIds} of the parent-folder specified by folderId. 
			\item \cmisexceptionlink{constraint}  If the \texttt{controllablePolicy} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and at least one policy is provided.
			\item \cmisexceptionlink{constraint}  If the \texttt{controllableACL} attribute of the object-type definition specified by the \texttt{cmis:objectTypeId} property value is set to FALSE and at least one ACE is provided.
			\item \cmisexceptionlink{constraint} If at least one of the specified values for permission in ANY of the ACEs does not match ANY of the permission names returned by the ACL Capabilities in the Repository Info (see section \ref{dm:aclsupportedpermissions}~\nameref{dm:aclsupportedpermissions}) and is not a CMIS basic permission.
			\item \cmisexceptionlink{nameConstraintViolation} If the repository detects a violation with the given \texttt{cmis:name} property value, the repository MAY throw this exception or chose a name which does not conflict.
			\item \cmisexceptionlink{storage}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getAllowableActions
\begin{cmisservice}{getAllowableActions}

	\begin{cmisservicedescription}{Description}
		Gets the list of allowable actions for an object (see section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}).
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> AllowableActions}{AllowableActions}
			See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getObject
\begin{cmisservice}{getObject}

	\begin{cmisservicedescription}{Description}
		Gets the specified information for the object.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{includeRelationships}
				See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includePolicyIds}
				See section \ref{dm:services:policies}~\nameref{dm:services:policies}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{renditionFilter}
				See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeACL}
				See section \ref{dm:services:acls}~\nameref{dm:services:acls}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeAllowableActions}
				See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> Properties}{properties}
			See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> Relationships}{relationships}
			See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> PolicyId}{policies}
			See section \ref{dm:services:policies}~\nameref{dm:services:policies}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> Renditions}{renditions}
			See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{ACL}{acl}
			See section \ref{dm:services:acls}~\nameref{dm:services:acls}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{AllowableActions}{allowableActions}
			See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property or rendition filter input parameter is not valid.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getProperties
\begin{cmisservice}{getProperties}

	\begin{cmisservicedescription}{Description}
		Gets the list of properties for the object.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> Properties}{properties}
			See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property filter input parameter is not valid.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getObjectByPath
\begin{cmisservice}{getObjectByPath}

	\begin{cmisservicedescription}{Description}
		Gets the specified information for the object.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{path}
				The path to the object.  See section \ref{dm:paths}~\nameref{dm:paths}.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{includeRelationships}
				See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includePolicyIds}
				See section \ref{dm:services:policies}~\nameref{dm:services:policies}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{renditionFilter}
				See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeACL}
				See section \ref{dm:services:acls}~\nameref{dm:services:acls}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeAllowableActions}
				See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> Properties}{properties}
			See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> Relationships}{relationships}
			See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> PolicyId}{policies}
			See section \ref{dm:services:policies}~\nameref{dm:services:policies}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> Renditions}{renditions}
			See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{ACL}{acl}
			See section \ref{dm:services:acls}~\nameref{dm:services:acls}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{AllowableActions}{allowableActions}
			See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property or rendition filter input parameter is not valid.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getContentStream
\begin{cmisservice}{getContentStream}

	\begin{cmisservicedescription}{Description}
		Gets the content stream for the specified document object, or gets a rendition stream for a specified rendition of a document or folder object.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		Each CMIS protocol binding MAY provide a way for fetching a sub-range within a content stream, in a manner appropriate to that protocol.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Id}{streamId}
				The identifier for the rendition stream, when used to get a rendition stream. For documents, if not provided then this method returns the content stream. For folders, it MUST be provided.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Stream> ContentStream}{contentStream}
			The specified content stream or rendition stream for the object.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint} If the object specified by objectId does NOT have a content stream or rendition stream.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getRenditions
\begin{cmisservice}{getRenditions}

	\begin{cmisservicedescription}{Description}
		Gets the list of associated renditions for the specified object. Only rendition attributes are returned, not rendition stream.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{String}{renditionFilter}
				See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{maxItems}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{skipCount}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> Renditions}{rendition}
			The set of renditions available on this object.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
	\end{cmisserviceexpections}

\end{cmisservice}


%%% updateProperties
\begin{cmisservice}{updateProperties}

	\begin{cmisservicedescription}{Description}
		Updates properties and secondary types of the specified object. 
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		\begin{itemize}
			\item A repository MAY automatically create new document versions as part of an update properties operation. Therefore, the objectId output NEED NOT be identical to the objectId input.
			\item Only properties whose values are different than the original value of the object SHOULD be provided.
		\end{itemize}
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the object.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Properties}{properties}
				The updated property values that MUST be applied to the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{String}{changeToken}
				See section \ref{dm:changetokens}~\nameref{dm:changetokens}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The identifier for the object.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{changeToken}
			See section \ref{dm:changetokens}~\nameref{dm:changetokens}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint}  If the value of any of the properties violates the constraints (min/max/required/length etc.) specified in the property definition in the object-type.
			\item \cmisexceptionlink{nameConstraintViolation} If the repository detects a violation with the given \texttt{cmis:name} property value, the repository MAY throw this exception or chose a name which does not conflict.
			\item \cmisexceptionlink{storage}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{updateConflict}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{versioning}  If the object is not checked out and ANY of the properties being updated are defined in their object-type definition to have an attribute value of Updatability whencheckedout.
			\item \cmisexceptionlink{versioning}  The repository MAY throw this exception if the object is a non-current document version.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% bulkUpdateProperties
\begin{cmisservice}{bulkUpdateProperties}

	\begin{cmisservicedescription}{Description}
		Updates properties and secondary types of one or more objects.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		\begin{itemize}
			\item A repository MAY automatically create new document versions as part of an update properties operation. Therefore, the objectId output NEED NOT be identical to the objectId input.
			\item Only properties whose values are different than the original value of the object SHOULD be provided.
			\item This service is not atomic. If the update fails, some objects might have been updated and others might not have been updated.
			\item This service MUST NOT throw an exception if the update of an object fails. If an update fails, the object id of this particular object MUST be omitted from the result.
		\end{itemize}
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> <Id, String>}{objectIdAndChangeToken}
				The identifiers of the objects to be updated and their change tokens. Invalid object ids, for example ids of objects that don't exist, MUST be ignored.

				 Change tokens are optional. See section \ref{dm:changetokens}~\nameref{dm:changetokens}.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{<Array> Properties}{properties}
				The updated property values that MUST be applied to the objects.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Id}{addSecondaryTypeIds}
				A list of secondary type ids that SHOULD be added to the objects.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Id}{removeSecondaryTypeIds}
				A list of secondary type ids that SHOULD be removed from the objects. Secondary type ids in this list that are not attached to an object SHOULD be ignored.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> <Id, Id, String>}{objectIdAndChangeToken}
			A triple for each updated object composed of:
			\begin{enumerate*}
				\item The original object id. MUST always be set.
				\item The new object id if the update triggered a new version. MUST NOT be set if no new version has been created.
				\item The new change token of the object. MUST be set if the repository supports change tokens.
			\end{enumerate*}

			Objects that have not been updated MUST NOT be returned. This service does not disclose why updates failed. Clients may call \cmisservicelink{updateProperties} for each failed object to retrieve individual exceptions.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{invalidArgument} If the input list of object ids is empty.
			\item \cmisexceptionlink{invalidArgument} If secondary type ids are provided that don't exist in the repository.
			\item \cmisexceptionlink{constraint} If the number of objects is too high for the repository.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% moveObject
\begin{cmisservice}{moveObject}

	\begin{cmisservicedescription}{Description}
		Moves the specified file-able object from one folder to another. 
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the object.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{targetFolderId}
				The folder into which the object is to be moved.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{sourceFolderId}
				The folder from which the object is to be moved. 
			\end{cmisserviceinout}

		\end{cmisservicerequired}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The identifier for the object. The identifier SHOULD NOT change. If the repository has to change the id, this is the new identifier for the object.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{invalidArgument}  If the service is invoked with a missing sourceFolderId or the sourceFolderId doesn't match the specified object's parent folder (or one of the parent folders if the repository supports multifiling.).
			\item \cmisexceptionlink{constraint}  If the \texttt{cmis:objectTypeId} property value of the given object is NOT in the list of AllowedChildObjectTypeIds of the parent-folder specified by targetFolderId.
			\item \cmisexceptionlink{nameConstraintViolation} If the repository detects a violation with the \texttt{cmis:name} property value, the repository MAY throw this exception or chose a name which does not conflict.
			\item \cmisexceptionlink{storage}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{updateConflict}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% deleteObject
\begin{cmisservice}{deleteObject}

	\begin{cmisservicedescription}{Description}
		Deletes the specified object. 
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		If the object is a PWC the checkout is discarded. See section \ref{dm:discardingcheckout}~\nameref{dm:discardingcheckout}.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Boolean}{allVersions}
				 If TRUE (default), then delete all versions of the document. If FALSE, delete only the document object specified. The repository MUST ignore the value of this parameter when this service is invoke on a non-document object or non-versionable document object. 
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}
		\cmisserviceinoutnone
	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint} If the method is invoked on a folder object that contains one or more objects. 
			\item \cmisexceptionlink{updateConflict}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% deleteTree
\begin{cmisservice}{deleteTree}

	\begin{cmisservicedescription}{Description}
		Deletes the specified folder object and all of its child- and descendant-objects.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		\begin{itemize}
			\item A repository MAY attempt to delete child- and descendant-objects of the specified folder in any order. 
			\item Any child- or descendant-object that the repository cannot delete MUST persist in a valid state in the CMIS domain model. 
			\item This service is not atomic.
			\item However, if \texttt{deletesinglefiled} is chosen and some objects fail to delete, then single-filed objects are either deleted or kept, never just unfiled. This is so that a user can call this command again to recover from the error by using the same tree.
		\end{itemize}
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{folderId}
				The identifier of the folder to be deleted.  
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Boolean}{allVersions}
				 If TRUE (default), then delete all versions of all documents. If FALSE, delete only the document versions referenced in the tree. The repository MUST ignore the value of this parameter when this service is invoked on any non-document objects or non-versionable document objects.  
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{unfileObjects}
				An enumeration specifying how the repository MUST process file-able child- or descendant-objects. Valid values are:
				\begin{description}
					\item[unfile] Unfile all fileable objects.
					\item[deletesinglefiled] Delete all fileable non-folder objects whose only parent-folders are in the current folder tree. Unfile all other fileable non-folder objects from the current folder tree.
					\item[delete] (default) Delete all fileable objects. 
				\end{description}  
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{continueOnFailure}
				If TRUE, then the repository SHOULD continue attempting to perform this operation even if deletion of a child- or descendant-object in the specified folder cannot be deleted.

				If FALSE (default), then the repository SHOULD abort this method when it fails to delete a single child object or descendant object.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}
		
		\begin{cmisserviceinout}{<Array> Id}{failedToDelete}
			A list of identifiers of objects in the folder tree that were not deleted.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint} If the method is invoked on a non-folder object.
			\item \cmisexceptionlink{updateConflict}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% setContentStream
\begin{cmisservice}{setContentStream}

	\begin{cmisservicedescription}{Description}
		Sets the content stream for the specified document object.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		A repository MAY automatically create new document versions as part of this service \erratareplace{operations}{method}. Therefore, the objectId output NEED NOT be identical to the objectId input.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the document object. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{ContentStream}{contentStream}
				The content stream.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Boolean}{overwriteFlag}
				If TRUE (default), then the repository MUST replace the existing content stream for the object (if any) with the input contentStream. 

				If FALSE, then the repository MUST only set the input contentStream for the object if the object currently does not have a content stream. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{changeToken}
				See section \ref{dm:changetokens}~\nameref{dm:changetokens}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The identifier for the object.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{changeToken}
			See section \ref{dm:changetokens}~\nameref{dm:changetokens}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{contentAlreadyExists} If the input parameter overwriteFlag is FALSE and the object already has a content stream. 
			\item \cmisexceptionlink{storage}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{streamNotSupported}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{updateConflict}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{versioning}  The repository MAY throw this exception if the object is a non-current document version.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% appendContentStream 
\begin{cmisservice}{appendContentStream}

	\begin{cmisservicedescription}{Description}
		Appends to the content stream for the specified document object.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		\begin{itemize}
			\item A repository MAY automatically create new document versions as part of this service method. Therefore, the objectId output NEED NOT be identical to the objectId input.
			\item The document may or may not have a content stream prior to calling this service. If there is no content stream, this service has the effect of setting the content stream with the value of the input \texttt{contentStream}.
			\item This service is intended to be used by a single client. It should support the upload of very huge content streams. The behavior is repository specific if multiple clients call this service in succession or in parallel for the same document.
			\item \errataadd{Repositories that do not support this service MUST throw a  \cmisexceptionlink{notSupported} exception.}
		\end{itemize}
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the document object. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{ContentStream}{contentStream}
				The content stream that should be appended to the existing content.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Boolean}{isLastChunk}
				If TRUE, then this is the last chunk of the content and the client does not intend to send another chunk. If FALSE (default), then the repository should except another chunk from the client.

				Clients SHOULD always set this parameter but repositories SHOULD be prepared that clients don't provide it.

				Repositories may use this flag to trigger some sort of content processing. For example, only if \texttt{isLastChunk} is TRUE the repsoitory could generate renditions of the content.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{changeToken}
				See section \ref{dm:changetokens}~\nameref{dm:changetokens}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The identifier for the object.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{changeToken}
			See section \ref{dm:changetokens}~\nameref{dm:changetokens}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint}  If the client sends more then one "last chunk". If a repository can accept multiple chunks that are marked as "last chunk", it MAY not throw this exception.
			\item \cmisexceptionlink{storage} See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{streamNotSupported} See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{updateConflict}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{versioning}  The repository MAY throw this exception if the object is a non-current document version.
		\end{itemize}
	\end{cmisserviceexpections}


\end{cmisservice}


%%% deleteContentStream
\begin{cmisservice}{deleteContentStream}

	\begin{cmisservicedescription}{Description}
		Deletes the content stream for the specified document object.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		A repository MAY automatically create new document versions as part of this service method. Therefore, the obejctId output NEED NOT be identical to the objectId input.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the document object. 
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{String}{changeToken}
				See section \ref{dm:changetokens}~\nameref{dm:changetokens}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The identifier for the object.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{changeToken}
			See section \ref{dm:changetokens}~\nameref{dm:changetokens}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint}  If the object's object-type definition "contentStreamAllowed" attribute is set to "required". 
			\item \cmisexceptionlink{storage}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{updateConflict}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{versioning}  The repository MAY throw this exception if the object is a non-current document version.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Multi-filing Services
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagebreak[4]
\subsection{Multi-filing Services}

The Multi-filing services are supported only if the repository supports the multifiling or unfiling optional capabilities (\texttt{capabilityMultifiling}). The Multi-filing Services are used to file/un-file objects into/from folders.

This service is NOT used to create or delete objects in the repository.


%%% addObjectToFolder
\begin{cmisservice}{addObjectToFolder}

	\begin{cmisservicedescription}{Description}
		Adds an existing fileable non-folder object to a folder.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the object. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{folderId}
				The folder into which the object is to be filed.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Boolean}{allVersions}
				 Add all versions of the object to the folder if the repository supports version-specific filing.  Defaults to TRUE.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}
		\cmisserviceinoutnone
	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint} If the \texttt{cmis:objectTypeId} property value of the given object is NOT in the list of AllowedChildObjectTypeIds of the parent-folder specified by folderId.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% removeObjectFromFolder
\begin{cmisservice}{removeObjectFromFolder}

	\begin{cmisservicedescription}{Description}
		Removes an existing fileable non-folder object from a folder.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the object. 
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Id}{folderId}
				The folder from which the object is to be removed. 

				If no value is specified, then the repository MUST remove the object from all folders in which it is currently filed.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}
		\cmisserviceinoutnone
	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint} If the repository does not support unfiled objects (\texttt{capabilityUnfiling} = false) and this operation would unfile the object from the last folder.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Discovery Services
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagebreak[4]
\subsection{Discovery Services}

The Discovery Services are used to search for query-able objects within the repository.


%%% query
\begin{cmisservice}{query}

	\begin{cmisservicedescription}{Description}
		Executes a CMIS query statement against the contents of the repository.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{statement}
				CMIS query to be executed. See section \ref{dm:query}~\nameref{dm:query}.\newline Note: The AtomPub and the Browser Binding also use the name \texttt{q}.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Boolean}{searchAllVersions}
				If TRUE, then the repository MUST include latest and non-latest versions of document objects in the query search scope. 

				If FALSE (default), then the repository MUST only include latest versions of documents in the query search scope.

				If the repository does not support the optional \texttt{capabilityAllVersionsSearchable} capability, then this parameter value MUST be set to FALSE.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{includeRelationships}
				See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.

				For query statements where the SELECT clause contains properties from only one virtual table reference (i.e. referenced object-type), any value for this enum may be used. If the SELECT clause contains properties from more than one table, then the value of this parameter MUST be \texttt{none}. Defaults to \texttt{none}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{renditionFilter}
				See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.

				If the SELECT clause contains properties from more than one table, then the value of this parameter MUST not be set.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeAllowableActions}
				See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.

				For query statements where the SELECT clause contains properties from only one virtual table reference (i.e. referenced object-type), any value for this parameter may be used. If the SELECT clause contains properties from more than one table, then the value of this parameter MUST be "FALSE".  Defaults to FALSE.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{maxItems}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{skipCount}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> Object}{queryResults}
			The set of results for the query. (See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.)

			Each object result MUST include the following elements if they are requested:
			\begin{description}
				\item[Relationships] See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
				\item[Renditions] See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
				\item[AllowableActions] See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{description}
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Boolean}{hasMoreItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Integer}{numItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{invalidArgument} If the select clause includes properties from more than a single type reference and if \texttt{includeRelationships} is something other than "none" or \texttt{includeAllowableActions} is specified as TRUE.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getContentChanges
\begin{cmisservice}{getContentChanges}

	\begin{cmisservicedescription}{Description}
		Gets a list of content changes. This service is intended to be used by search crawlers or other applications that need to efficiently understand what has changed in the repository. See section \ref{dm:changelog}~\nameref{dm:changelog}.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		\begin{itemize}
			\item The content stream is NOT returned for any change event. 
			\item The definition of the authority needed to call this service is repository specific. 
			\item The latest change log token for a repository can be acquired via the \cmisservicelink{getRepositoryInfo} service.
			\item \errataadd{If a change log token is specified and the repository knows the corresponding change event, then the repository MUST return this change event as the first entry in the result set. A client can then compare the first change event of the call with the last change event of the previous call. If they match, the client knows that it didn’t miss a change event. If they don’t match, the repository truncated the change log between this call and previous call. That is, the client missed one or more change events and may have to re-crawl the repository.}
		\end{itemize}
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{String}{changeLogToken}
				If specified, then the repository MUST return the change event corresponding to the value of the specified change log token as the first result in the output.

				If not specified, then the repository MUST return the first change event recorded in the change log.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeProperties}
				If TRUE, then the repository MUST include the updated property values for "updated" change events if the repository supports returning property values as specified by \texttt{capbilityChanges}. 
				
				If FALSE (default), then the repository MUST NOT include the updated property values for "updated" change events.  The single exception to this is that the property \texttt{cmis:objectId} MUST always be included.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includePolicyIds}
				If TRUE, then the repository MUST include the ids of the policies applied to the object referenced in each change event, if the change event modified the set of policies applied to the object.

				If FALSE (default), then the repository MUST not include policy information.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeACL}
				See section \ref{dm:services:acls}~\nameref{dm:services:acls}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{maxItems}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> ChangeEvents}{changeEvents}
			A collection of CMIS objects that MUST include the information as specified in \ref{dm:changeevent}~\nameref{dm:changeevent}. Each result MUST include the following elements if they are requested:
			\begin{description}
				\item[policyIds] The ids of policies applied to the object referenced in the change event.
				\item[ACL] The ACL applied to the object reference in the change event.
			\end{description}
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{String}{\erratareplace{latestChangeLogToken}{changeLogToken}}
			The change log token corresponding to the last change event in changeEvents.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Boolean}{hasMoreItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Integer}{numItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{invalidArgument} if the event corresponding to the change log token provided as an input parameter is no longer available in the change log. (E.g.\ because the change log was truncated).
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Versioning Services
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagebreak[4]
\subsection{Versioning Services}

The Versioning services are used to navigate or update a document version series. See section \ref{dm:versioning}~\nameref{dm:versioning}.


%%% checkOut
\begin{cmisservice}{checkOut}

	\begin{cmisservicedescription}{Description}
		Create a private working copy (PWC) of the document. See section \ref{dm:checkout}~\nameref{dm:checkout}.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the document version object that should be checked out. 
			\end{cmisserviceinout}

		\end{cmisservicerequired}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The identifier for the "Private Working Copy" document.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Boolean}{contentCopied}
			TRUE if the content stream of the Private Working Copy is a copy of the contentStream of the document that was checked out.
 
			FALSE if the content stream of the Private Working Copy is "not set".
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint} if the document's object-type definition's \texttt{versionable} attribute is FALSE. 
			\item \cmisexceptionlink{storage}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{updateConflict}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{versioning}  The repository MAY throw this exception if the object is a non-current document version.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% cancelCheckOut
\begin{cmisservice}{cancelCheckOut}

	\begin{cmisservicedescription}{Description}
		Reverses the effect of a check-out (\cmisservicelink{checkOut}). Removes the Private Working Copy of the checked-out document, allowing other documents in the version series to be checked out again. If the private working copy has been created by \cmisservicelink{createDocument}, \cmisservicelink{cancelCheckOut} MUST delete the created document. See section \ref{dm:discardingcheckout}~\nameref{dm:discardingcheckout}.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier of the Private Working Copy. 
			\end{cmisserviceinout}

		\end{cmisservicerequired}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}
		\cmisserviceinoutnone
	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint} if the document's object-type definition's \texttt{versionable} attribute is FALSE. 
			\item \cmisexceptionlink{updateConflict}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{versioning}  The repository MAY throw this exception if the object is a non-current document version.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% checkIn
\begin{cmisservice}{checkIn}

	\begin{cmisservicedescription}{Description}
		Checks-in the Private Working Copy document. See section \ref{dm:checkin}~\nameref{dm:checkin}.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		\begin{itemize}
			\item For repositories that do NOT support the optional \texttt{capabilityPWCUpdatable} capability, the properties and contentStream input parameters MUST be provided on the \cmisservicelink{checkIn} service for updates to happen as part of checkIn.
			\item Each CMIS protocol binding MUST specify whether the checkin service MUST always include all updatable properties, or only those properties whose values are different than the original value of the object.
		\end{itemize}
	\end{cmisservicedescription}


	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier for the Private Working Copy.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Boolean}{major}
				TRUE (default) if the checked-in document object MUST be a major version.

				FALSE if the checked-in document object MUST NOT be a major version but a minor version. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Property}{properties}
				The property values that MUST be applied to the checked-in document object.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<contentStream>}{contentStream}
				The content stream that MUST be stored for the checked-in document object. The method of passing the contentStream to the server and the encoding mechanism will be specified by each specific binding.  MUST be required if the type requires it.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{checkinComment}
				See section \ref{dm:versioningproperties}~\nameref{dm:versioningproperties}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> Id}{policies}
				A list of policy ids that MUST be applied to the newly-created document object. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{addACEs}
				A list of ACEs that MUST be added to the newly-created document object. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> ACE}{removeACEs}
				A list of ACEs that MUST be removed from the newly-created document object.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{Id}{objectId}
			The id of the checked-in document.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint} if the object is not a Private Working Copy.
			\item \cmisexceptionlink{storage}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{updateConflict}  See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
			\item \cmisexceptionlink{streamNotSupported} See section \ref{dm:specificexceptions}~\nameref{dm:specificexceptions}.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getObjectOfLatestVersion
\begin{cmisservice}{getObjectOfLatestVersion}

	\begin{cmisservicedescription}{Description}
		Get the latest document object in the version series.  
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{versionSeriesId}
				The identifier for the version series.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Boolean}{major}
				If TRUE, then the repository MUST return the properties for the latest major version object in the version series.

				If FALSE (default), the repository MUST return the properties for the latest (major or non-major) version object in the version series.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{includeRelationships}
				See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includePolicyIds}
				See section \ref{dm:services:policies}~\nameref{dm:services:policies}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{renditionFilter}
				See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeACL}
				See section \ref{dm:services:acls}~\nameref{dm:services:acls}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeAllowableActions}
				See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> Properties}{properties}
			See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> Relationships}{relationships}
			See section \ref{dm:services:relationships}~\nameref{dm:services:relationships}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> PolicyId}{policies}
			See section \ref{dm:services:policies}~\nameref{dm:services:policies}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{<Array> Renditions}{renditions}
			See section \ref{dm:services:renditions}~\nameref{dm:services:renditions}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{ACL}{acl}
			See section \ref{dm:services:acls}~\nameref{dm:services:acls}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{AllowableActions}{allowableActions}
			See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property or rendition filter input parameter is not valid.
			\item \cmisexceptionlink{objectNotFound} If the input parameter major is TRUE and the version series contains no major versions.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getPropertiesOfLatestVersion
\begin{cmisservice}{getPropertiesOfLatestVersion}

	\begin{cmisservicedescription}{Description}
		Get a subset of the properties for the latest document object in the version series.  
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{versionSeriesId}
				The identifier for the version series.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Boolean}{major}
				If TRUE, then the repository MUST return the properties for the latest major version object in the version series.

				If FALSE (default), the repository MUST return the properties for the latest (major or non-major) version object in the version series.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> Properties}{properties}
			See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property filter input parameter is not valid.
			\item \cmisexceptionlink{objectNotFound} If the input parameter major is TRUE and the version series contains no major versions.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getAllVersions
\begin{cmisservice}{getAllVersions}

	\begin{cmisservicedescription}{Description}
		Returns the list of all document objects in the specified version series, sorted by \texttt{cmis:creationDate} descending.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		If a Private Working Copy exists for the version series and the caller has permissions to access it, then it MUST be returned as the first object in the result list.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{versionSeriesId}
				The identifier for the version series.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeAllowableActions}
				See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> ObjectResults}{objects}
			A list of document objects in the specified version series. Each object result MUST include the following elements if they are requested:
	\begin{description}
				\item[Properties] See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
				\item[AllowableActions] See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{description}
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property filter input parameter is not valid.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Relationship Services
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagebreak[4]
\subsection{Relationship Services}

The Relationship Services are used to retrieve the dependent relationship objects associated with an independent object.


%%% getObjectRelationships
\begin{cmisservice}{getObjectRelationships}

	\begin{cmisservicedescription}{Description}
		Gets all or a subset of relationships associated with an independent object.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier of the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Boolean}{includeSubRelationshipTypes}
 				If TRUE, then the repository MUST return all relationships whose object-types are descendant-types of the object-type specified by the \texttt{typeId} parameter value as well as relationships of the specified type. 

				If FALSE (default), then the repository MUST only return relationships whose object-types is equivalent to the object-type specified by the \texttt{typeId} parameter value.

				If the \texttt{typeId} input is not specified, then this input MUST be ignored.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{relationshipDirection}
 				An enumeration specifying whether the repository MUST return relationships where the specified object is the source of the relationship, the target of the relationship, or both. Valid values are:
				\begin{description}
					\item[source] (default) The repository MUST return only relationship objects where the specified object is the source object. 
					\item[target] The repository MUST return only relationship objects where the specified object is the target object. 
					\item[either] The repository MUST return relationship objects where the specified object is either the source or the target object. 
				\end{description}
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{typeId}
				If specified, then the repository MUST return only relationships whose object-type is of the type specified. See also parameter \texttt{includeSubRelationshipTypes}. 

				If not specified, then the repository MUST return relationship objects of all types.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{maxItems}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Integer}{skipCount}
				See section \ref{dm:paging}~\nameref{dm:paging}.
			\end{cmisserviceinout}


			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Boolean}{includeAllowableActions}
				See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> Object}{objects}
			 A list of the relationship objects. Each object result MUST include the following elements if they are requested:
			\begin{description}
				\item[Properties] See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
				\item[AllowableActions] See section \ref{dm:services:allowableactions}~\nameref{dm:services:allowableactions}.
			\end{description}
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Boolean}{hasMoreItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Integer}{numItems}
			See section \ref{dm:paging}~\nameref{dm:paging}.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property or rendition filter input parameter is not valid.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}
 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Policy Services
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagebreak[4]
\subsection{Policy Services}

The Policy Services are used to apply or remove a policy object to a \texttt{controllablePolicy} object. 


%%% applyPolicy
\begin{cmisservice}{applyPolicy}

	\begin{cmisservicedescription}{Description}
		Applies a specified policy to an object.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{policyId}
				The identifier for the policy to be applied. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier of the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}
		\cmisserviceinoutnone
	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint}  The repository MUST throw this exception if the specified object's object-type definition's attribute for \texttt{controllablePolicy} is FALSE.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% removePolicy
\begin{cmisservice}{removePolicy}

	\begin{cmisservicedescription}{Description}
		Removes a specified policy from an object.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{policyId}
				The identifier for the policy to be removed. 
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier of the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}
		\cmisserviceinoutnone
	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getAppliedPolicies
\begin{cmisservice}{getAppliedPolicies}

	\begin{cmisservicedescription}{Description}
		Gets the list of policies currently applied to the specified object.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier of the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{String}{filter}
				See section \ref{dm:services:properties}~\nameref{dm:services:properties}.
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> Object}{objects}
			 A list of the policy objects.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{filterNotValid} If the property filter input parameter is not valid.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ACL Services
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagebreak[4]
\subsection{ACL Services}

The ACL Services are used to discover and manage Access Control Lists.


%%% applyACL
\begin{cmisservice}{applyACL}

	\begin{cmisservicedescription}{Description}
		Adds or removes the given ACEs to or from the ACL of an object .
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		This service MUST be supported by the repository, if the optional capability \texttt{capabilityACL} is \texttt{manage}.
		
		How ACEs are added or removed to or from the object is repository specific – with respect to the \texttt{ACLPropagation} parameter. 

		Some ACEs that make up an object's ACL may not be set directly on the object, but determined in other ways, 
such as inheritance. A repository MAY merge the ACEs provided with the ACEs of the ACL already applied to the object (i.e. the ACEs provided MAY not be completely added or removed from the effective ACL for the object).
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier of the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{<Array> AccessControlEntryType}{addACEs}
				The ACEs to be added.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{<Array> AccessControlEntryType}{removeACEs}
				The ACEs to be removed.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Enum}{ACLPropagation}
				Specifies how ACEs should be handled. Valid values are:
				\begin{description}
					\item[objectonly] ACEs must be applied without changing the ACLs of other objects.
					\item[propagate] ACEs must be applied by propagate the changes to all "inheriting" objects.
					\item[repositorydetermined]  (default)  Indicates that the client leaves the behavior to the repository. 
				\end{description}
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> AccessControlEntryType}{acl}
			The list of access control entries of the ACL for the object after the new ACEs have been applied. The repository MAY return an empty list if the user has no permissions to access the ACL of this object anymore after calling this service.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Boolean}{exact}
			An indicator that the ACL returned fully describes the permission for this object. That is, there are no other security constraints applied to this object. Not provided defaults to FALSE.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		\begin{itemize}
			\item See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
			\item \cmisexceptionlink{constraint} If the specified object's object-type definition's attribute for \texttt{controllableACL} is FALSE.
			\item \cmisexceptionlink{constraint} If the value for \texttt{ACLPropagation} does not match the values as returned by the ACL Capabilities in the Repository Info. (See section \ref{dm:aclcapabilities}~\nameref{dm:aclcapabilities}.)
			\item \cmisexceptionlink{constraint} If at least one of the specified values for permission in ANY of the ACEs does not match ANY of the permission names returned by the ACL Capabilities in the Repository Info (see section \ref{dm:aclsupportedpermissions}~\nameref{dm:aclsupportedpermissions}) and is not a CMIS basic permission.
		\end{itemize}
	\end{cmisserviceexpections}

\end{cmisservice}


%%% getACL
\begin{cmisservice}{getACL}

	\begin{cmisservicedescription}{Description}
		Get the ACL currently applied to the specified object.
	\end{cmisservicedescription}

	\begin{cmisservicedescription}{Notes}
		This service MUST be supported by the repository, if the optional capability \texttt{capabilityACL} is \texttt{discover} or \texttt{manage}.
		A client MUST NOT assume that the returned ACEs can be applied via \cmisservicelink{applyACL}.
	\end{cmisservicedescription}

	%%% input
	\begin{cmisserviceinputs}

		\begin{cmisservicerequired}

			\begin{cmisserviceinout}{Id}{repositoryId}
				The identifier for the repository.
			\end{cmisserviceinout}

			\begin{cmisserviceinout}{Id}{objectId}
				The identifier of the object.
			\end{cmisserviceinout}

		\end{cmisservicerequired}

		\begin{cmisserviceoptional}

			\begin{cmisserviceinout}{Boolean}{onlyBasicPermissions}
				See section \ref{dm:accesscontrol}~\nameref{dm:accesscontrol}. The repository SHOULD make a best effort to fully express the native security applied to the object.
				\begin{itemize}
					\item TRUE (default) indicates that the client requests that the returned ACL be expressed using only the CMIS basic permissions.
					\item FALSE indicates that the server may respond using either solely CMIS basic permissions, or repository specific permissions or some combination of both.
				\end{itemize}
			\end{cmisserviceinout}

		\end{cmisserviceoptional}

	\end{cmisserviceinputs}

	%%% output
	\begin{cmisserviceoutputs}

		\begin{cmisserviceinout}{<Array> AccessControlEntryType}{acl}
			The list of access control entries of the ACL for the object. The repository MAY return an empty list if the user has no permissions to access the ACL of this object.
		\end{cmisserviceinout}

		\begin{cmisserviceinout}{Boolean}{exact}
			An indicator that the ACL returned fully describes the permission for this object. That is, there are no other security constraints applied to this object. Not provided defaults to FALSE.
		\end{cmisserviceinout}

	\end{cmisserviceoutputs}

	%%% exception
	\begin{cmisserviceexpections}
		See section \ref{dm:generalexceptions}~\nameref{dm:generalexceptions}.
	\end{cmisserviceexpections}

\end{cmisservice}