org.apache.chemistry.opencmis.client.runtime
Class OperationContextImpl

java.lang.Object
  extended by org.apache.chemistry.opencmis.client.runtime.OperationContextImpl
All Implemented Interfaces:
Serializable, OperationContext
Direct Known Subclasses:
ClientOperationContext

public class OperationContextImpl
extends Object
implements OperationContext, Serializable

OperationContext implementation.

See Also:
Serialized Form

Field Summary
static String PROPERTIES_STAR
           
static String RENDITION_NONE
           
 
Constructor Summary
OperationContextImpl()
          Default constructor.
OperationContextImpl(OperationContext source)
          Copy constructor.
OperationContextImpl(Set<String> propertyFilter, boolean includeAcls, boolean includeAllowableActions, boolean includePolicies, IncludeRelationships includeRelationships, Set<String> renditionFilter, boolean includePathSegments, String orderBy, boolean cacheEnabled, int maxItemsPerPage)
          Constructor with parameters.
 
Method Summary
protected  void generateCacheKey()
          Generates a new cache key from all parameters that are relevant for caching.
 String getCacheKey()
          Returns a key for this OperationContext object that is used for caching.
 Set<String> getFilter()
          Returns the current filter.
 String getFilterString()
          Returns the filter extended by cmis:objectId, cmis:objectTypeId and cmis:baseTypeId.
 IncludeRelationships getIncludeRelationships()
          Returns which relationships should be returned.
 int getMaxItemsPerPage()
          Returns the current max number of items per page.
 String getOrderBy()
          Returns the order by rule for operations that return lists.
 Set<String> getRenditionFilter()
          Returns the current rendition filter.
 String getRenditionFilterString()
          Returns the current rendition filter.
 boolean isCacheEnabled()
          Return if caching is enabled.
 boolean isIncludeAcls()
          Returns if ACLs should returned.
 boolean isIncludeAllowableActions()
          Returns if allowable actions should returned.
 boolean isIncludePathSegments()
          Returns if path segments should returned.
 boolean isIncludePolicies()
          Returns if policies should returned.
 void setCacheEnabled(boolean cacheEnabled)
          Enables or disables the cache.
 void setFilter(Set<String> propertyFilter)
          Sets the current filter.
 void setFilterString(String propertyFilter)
          Sets the current filter.
 void setIncludeAcls(boolean include)
          Sets if ACLs should returned.
 void setIncludeAllowableActions(boolean include)
          Sets if allowable actions should returned.
 void setIncludePathSegments(boolean include)
          Sets if path segments should returned.
 void setIncludePolicies(boolean include)
          Sets if policies should returned.
 void setIncludeRelationships(IncludeRelationships include)
          Sets which relationships should be returned.
 void setMaxItemsPerPage(int maxItemsPerPage)
          Set the max number of items per page for operations that return lists.
 void setOrderBy(String orderBy)
          Sets the order by rule for operations that return lists.
 void setRenditionFilter(Set<String> renditionFilter)
          Sets the current rendition filter.
 void setRenditionFilterString(String renditionFilter)
          Sets the current rendition filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTIES_STAR

public static final String PROPERTIES_STAR
See Also:
Constant Field Values

RENDITION_NONE

public static final String RENDITION_NONE
See Also:
Constant Field Values
Constructor Detail

OperationContextImpl

public OperationContextImpl()
Default constructor.


OperationContextImpl

public OperationContextImpl(OperationContext source)
Copy constructor.


OperationContextImpl

public OperationContextImpl(Set<String> propertyFilter,
                            boolean includeAcls,
                            boolean includeAllowableActions,
                            boolean includePolicies,
                            IncludeRelationships includeRelationships,
                            Set<String> renditionFilter,
                            boolean includePathSegments,
                            String orderBy,
                            boolean cacheEnabled,
                            int maxItemsPerPage)
Constructor with parameters.

Method Detail

getFilter

public Set<String> getFilter()
Description copied from interface: OperationContext
Returns the current filter.

Specified by:
getFilter in interface OperationContext
Returns:
a set of query names

setFilter

public void setFilter(Set<String> propertyFilter)
Description copied from interface: OperationContext
Sets the current filter.

Specified by:
setFilter in interface OperationContext
Parameters:
propertyFilter - a set of query names

setFilterString

public void setFilterString(String propertyFilter)
Description copied from interface: OperationContext
Sets the current filter.

Specified by:
setFilterString in interface OperationContext
Parameters:
propertyFilter - a comma separated list of query names

getFilterString

public String getFilterString()
Description copied from interface: OperationContext
Returns the filter extended by cmis:objectId, cmis:objectTypeId and cmis:baseTypeId.

Specified by:
getFilterString in interface OperationContext

isIncludeAcls

public boolean isIncludeAcls()
Description copied from interface: OperationContext
Returns if ACLs should returned.

Specified by:
isIncludeAcls in interface OperationContext

setIncludeAcls

public void setIncludeAcls(boolean include)
Description copied from interface: OperationContext
Sets if ACLs should returned.

Specified by:
setIncludeAcls in interface OperationContext

isIncludeAllowableActions

public boolean isIncludeAllowableActions()
Description copied from interface: OperationContext
Returns if allowable actions should returned.

Specified by:
isIncludeAllowableActions in interface OperationContext

setIncludeAllowableActions

public void setIncludeAllowableActions(boolean include)
Description copied from interface: OperationContext
Sets if allowable actions should returned.

Specified by:
setIncludeAllowableActions in interface OperationContext

isIncludePolicies

public boolean isIncludePolicies()
Description copied from interface: OperationContext
Returns if policies should returned.

Specified by:
isIncludePolicies in interface OperationContext

setIncludePolicies

public void setIncludePolicies(boolean include)
Description copied from interface: OperationContext
Sets if policies should returned.

Specified by:
setIncludePolicies in interface OperationContext

getIncludeRelationships

public IncludeRelationships getIncludeRelationships()
Description copied from interface: OperationContext
Returns which relationships should be returned.

Specified by:
getIncludeRelationships in interface OperationContext

setIncludeRelationships

public void setIncludeRelationships(IncludeRelationships include)
Description copied from interface: OperationContext
Sets which relationships should be returned.

Specified by:
setIncludeRelationships in interface OperationContext

getRenditionFilter

public Set<String> getRenditionFilter()
Description copied from interface: OperationContext
Returns the current rendition filter. (See CMIS spec "2.2.1.2.4.1 Rendition Filter Grammar")

Specified by:
getRenditionFilter in interface OperationContext
Returns:
a set of rendition filter terms

setRenditionFilter

public void setRenditionFilter(Set<String> renditionFilter)
Description copied from interface: OperationContext
Sets the current rendition filter. (See CMIS spec "2.2.1.2.4.1 Rendition Filter Grammar")

Specified by:
setRenditionFilter in interface OperationContext
Parameters:
renditionFilter - a set of rendition filter terms

setRenditionFilterString

public void setRenditionFilterString(String renditionFilter)
Description copied from interface: OperationContext
Sets the current rendition filter. (See CMIS spec "2.2.1.2.4.1 Rendition Filter Grammar")

Specified by:
setRenditionFilterString in interface OperationContext
Parameters:
renditionFilter - a comma separated list of rendition filter terms

getRenditionFilterString

public String getRenditionFilterString()
Description copied from interface: OperationContext
Returns the current rendition filter. (See CMIS spec "2.2.1.2.4.1 Rendition Filter Grammar")

Specified by:
getRenditionFilterString in interface OperationContext
Returns:
a comma separated list of rendition filter terms

isIncludePathSegments

public boolean isIncludePathSegments()
Description copied from interface: OperationContext
Returns if path segments should returned.

Specified by:
isIncludePathSegments in interface OperationContext

setIncludePathSegments

public void setIncludePathSegments(boolean include)
Description copied from interface: OperationContext
Sets if path segments should returned.

Specified by:
setIncludePathSegments in interface OperationContext

getOrderBy

public String getOrderBy()
Description copied from interface: OperationContext
Returns the order by rule for operations that return lists.

Specified by:
getOrderBy in interface OperationContext
Returns:
a comma-separated list of query names and the ascending modifier "ASC" or the descending modifier "DESC" for each query name

setOrderBy

public void setOrderBy(String orderBy)
Description copied from interface: OperationContext
Sets the order by rule for operations that return lists.

Specified by:
setOrderBy in interface OperationContext
Parameters:
orderBy - a comma-separated list of query names and the ascending modifier "ASC" or the descending modifier "DESC" for each query name

isCacheEnabled

public boolean isCacheEnabled()
Description copied from interface: OperationContext
Return if caching is enabled.

Specified by:
isCacheEnabled in interface OperationContext

setCacheEnabled

public void setCacheEnabled(boolean cacheEnabled)
Description copied from interface: OperationContext
Enables or disables the cache.

Specified by:
setCacheEnabled in interface OperationContext

getCacheKey

public String getCacheKey()
Description copied from interface: OperationContext
Returns a key for this OperationContext object that is used for caching.

Specified by:
getCacheKey in interface OperationContext

generateCacheKey

protected void generateCacheKey()
Generates a new cache key from all parameters that are relevant for caching.


getMaxItemsPerPage

public int getMaxItemsPerPage()
Description copied from interface: OperationContext
Returns the current max number of items per page.

Specified by:
getMaxItemsPerPage in interface OperationContext

setMaxItemsPerPage

public void setMaxItemsPerPage(int maxItemsPerPage)
Description copied from interface: OperationContext
Set the max number of items per page for operations that return lists.

Specified by:
setMaxItemsPerPage in interface OperationContext
Parameters:
maxItemsPerPage - max number of items (must be >0)


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.