org.alfresco.cmis.client.impl
Class AlfrescoUtils

java.lang.Object
  extended by org.alfresco.cmis.client.impl.AlfrescoUtils

public class AlfrescoUtils
extends Object


Field Summary
static String ALFRESCO_NAMESPACE
           
static String APPLIED_ASPECTS
           
static String ASPECTS_TO_ADD
           
static String ASPECTS_TO_REMOVE
           
static String CMIS_NAMESPACE
           
static String MANDATORY_ASPECT
           
static String MANDATORY_ASPECTS
           
static String PROPERTIES
           
static String SET_ASPECTS
           
 
Method Summary
static
<T> List<T>
checkProperty(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<T> propertyDefinition, Object value)
          Checks a property value.
static org.apache.chemistry.opencmis.commons.data.CmisExtensionElement createAspectPropertiesExtension(List<org.apache.chemistry.opencmis.commons.data.CmisExtensionElement> propertiesChildren)
          Creates an aspectsToAdd extension element.
static org.apache.chemistry.opencmis.commons.data.CmisExtensionElement createAspectPropertyExtension(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> propertyDefintion, Object value)
          Creates a property extension element.
static org.apache.chemistry.opencmis.commons.data.CmisExtensionElement createAspectsToAddExtension(org.apache.chemistry.opencmis.client.api.ObjectType aspectType)
          Creates an aspectsToAdd extension element.
static org.apache.chemistry.opencmis.commons.data.CmisExtensionElement createAspectsToRemoveExtension(org.apache.chemistry.opencmis.client.api.ObjectType aspectType)
          Creates an aspectsToRemove extension element.
static String createObjectTypeIdValue(org.apache.chemistry.opencmis.client.api.ObjectType type, Collection<org.apache.chemistry.opencmis.client.api.ObjectType> aspectTypes)
           
static org.apache.chemistry.opencmis.commons.data.CmisExtensionElement createSetAspectsExtension(List<org.apache.chemistry.opencmis.commons.data.CmisExtensionElement> setAspectsChildren)
          Creates a setAspects extension element.
static List<org.apache.chemistry.opencmis.commons.data.CmisExtensionElement> findAlfrescoExtensions(List<org.apache.chemistry.opencmis.commons.data.CmisExtensionElement> extensions)
          Finds the Alfresco extensions within the given extensions.
static org.apache.chemistry.opencmis.client.api.ObjectType findAspect(Collection<org.apache.chemistry.opencmis.client.api.ObjectType> aspectTypes, String propertyId)
          Finds the aspect type that contains the given property id.
static Collection<org.apache.chemistry.opencmis.client.api.ObjectType> getAspectTypes(org.apache.chemistry.opencmis.client.api.Session session, List<org.apache.chemistry.opencmis.commons.data.CmisExtensionElement> alfrescoExtensions)
          Returns the aspect types from the Alfresco extensions.
static List<String> getMandatoryAspects(org.apache.chemistry.opencmis.commons.data.ExtensionsData object)
           
static Map<String,?> preparePropertiesForUpdate(Map<String,?> properties, org.apache.chemistry.opencmis.client.api.ObjectType type, Collection<org.apache.chemistry.opencmis.client.api.ObjectType> aspectTypes)
          Adds object type and aspect types to properties.
static String updateAspects(org.apache.chemistry.opencmis.client.api.Session session, org.apache.chemistry.opencmis.client.api.CmisObject object, org.apache.chemistry.opencmis.client.api.ObjectType[] addAspectIds, org.apache.chemistry.opencmis.client.api.ObjectType[] removeAspectIds, Map<String,?> properties)
          Adds and removes aspects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALFRESCO_NAMESPACE

public static final String ALFRESCO_NAMESPACE
See Also:
Constant Field Values

CMIS_NAMESPACE

public static final String CMIS_NAMESPACE
See Also:
Constant Field Values

APPLIED_ASPECTS

public static final String APPLIED_ASPECTS
See Also:
Constant Field Values

SET_ASPECTS

public static final String SET_ASPECTS
See Also:
Constant Field Values

ASPECTS_TO_ADD

public static final String ASPECTS_TO_ADD
See Also:
Constant Field Values

ASPECTS_TO_REMOVE

public static final String ASPECTS_TO_REMOVE
See Also:
Constant Field Values

PROPERTIES

public static final String PROPERTIES
See Also:
Constant Field Values

MANDATORY_ASPECTS

public static final String MANDATORY_ASPECTS
See Also:
Constant Field Values

MANDATORY_ASPECT

public static final String MANDATORY_ASPECT
See Also:
Constant Field Values
Method Detail

findAlfrescoExtensions

public static List<org.apache.chemistry.opencmis.commons.data.CmisExtensionElement> findAlfrescoExtensions(List<org.apache.chemistry.opencmis.commons.data.CmisExtensionElement> extensions)
Finds the Alfresco extensions within the given extensions.


getAspectTypes

public static Collection<org.apache.chemistry.opencmis.client.api.ObjectType> getAspectTypes(org.apache.chemistry.opencmis.client.api.Session session,
                                                                                             List<org.apache.chemistry.opencmis.commons.data.CmisExtensionElement> alfrescoExtensions)
Returns the aspect types from the Alfresco extensions.


findAspect

public static org.apache.chemistry.opencmis.client.api.ObjectType findAspect(Collection<org.apache.chemistry.opencmis.client.api.ObjectType> aspectTypes,
                                                                             String propertyId)
Finds the aspect type that contains the given property id.


createSetAspectsExtension

public static org.apache.chemistry.opencmis.commons.data.CmisExtensionElement createSetAspectsExtension(List<org.apache.chemistry.opencmis.commons.data.CmisExtensionElement> setAspectsChildren)
Creates a setAspects extension element.


createAspectsToAddExtension

public static org.apache.chemistry.opencmis.commons.data.CmisExtensionElement createAspectsToAddExtension(org.apache.chemistry.opencmis.client.api.ObjectType aspectType)
Creates an aspectsToAdd extension element.


createAspectsToRemoveExtension

public static org.apache.chemistry.opencmis.commons.data.CmisExtensionElement createAspectsToRemoveExtension(org.apache.chemistry.opencmis.client.api.ObjectType aspectType)
Creates an aspectsToRemove extension element.


createAspectPropertiesExtension

public static org.apache.chemistry.opencmis.commons.data.CmisExtensionElement createAspectPropertiesExtension(List<org.apache.chemistry.opencmis.commons.data.CmisExtensionElement> propertiesChildren)
Creates an aspectsToAdd extension element.


createAspectPropertyExtension

public static org.apache.chemistry.opencmis.commons.data.CmisExtensionElement createAspectPropertyExtension(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?> propertyDefintion,
                                                                                                            Object value)
Creates a property extension element.


checkProperty

public static <T> List<T> checkProperty(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<T> propertyDefinition,
                                        Object value)
Checks a property value.


preparePropertiesForUpdate

public static Map<String,?> preparePropertiesForUpdate(Map<String,?> properties,
                                                       org.apache.chemistry.opencmis.client.api.ObjectType type,
                                                       Collection<org.apache.chemistry.opencmis.client.api.ObjectType> aspectTypes)
Adds object type and aspect types to properties.


createObjectTypeIdValue

public static String createObjectTypeIdValue(org.apache.chemistry.opencmis.client.api.ObjectType type,
                                             Collection<org.apache.chemistry.opencmis.client.api.ObjectType> aspectTypes)

updateAspects

public static String updateAspects(org.apache.chemistry.opencmis.client.api.Session session,
                                   org.apache.chemistry.opencmis.client.api.CmisObject object,
                                   org.apache.chemistry.opencmis.client.api.ObjectType[] addAspectIds,
                                   org.apache.chemistry.opencmis.client.api.ObjectType[] removeAspectIds,
                                   Map<String,?> properties)
Adds and removes aspects.


getMandatoryAspects

public static List<String> getMandatoryAspects(org.apache.chemistry.opencmis.commons.data.ExtensionsData object)


Copyright © 2011–2014 Alfresco. All rights reserved.