public class Utils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BATCH_SIZE
Default batch size for query results - 1000
|
static String |
QUERY_LANG_CQL |
static String |
QUERY_LANG_LUCENE
Query language names
|
static String |
QUERY_LANG_XPATH |
static String |
REPOSITORY_SERVICE_NAMESPACE |
| Modifier and Type | Method and Description |
|---|---|
static NodeRef |
convertToNodeRef(ParentReference parentRef,
NodeService nodeService,
SearchService searchService,
org.alfresco.service.namespace.NamespaceService namespaceService)
Converts the given ParentReference web service type into a repository
NodeRef
|
static NodeRef |
convertToNodeRef(Reference ref,
NodeService nodeService,
SearchService searchService,
org.alfresco.service.namespace.NamespaceService namespaceService)
Converts the given Reference web service type into a repository NodeRef
|
static Reference |
convertToReference(NodeService nodeService,
org.alfresco.service.namespace.NamespaceService namespaceService,
NodeRef node)
Converts the given repository NodeRef object into a web service Reference
type
|
static Store |
convertToStore(StoreRef ref)
Converts a store reference ot a Store type
|
static StoreRef |
convertToStoreRef(Store store)
Converts the web service Store type to a StoreRef used by the repository
|
static Version |
convertToVersion(NodeService nodeService,
org.alfresco.service.namespace.NamespaceService namespaceService,
Version version)
Converts a repository version object into a web service version object.
|
static NamedValue |
createNamedValue(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
org.alfresco.service.namespace.QName propertyName,
Serializable propertyValue)
Create a named value object from the property name and value informaiton
|
static int |
getBatchSize(org.apache.axis.MessageContext msgContext)
Returns the value of the
fetchSize from the
QueryConfiguration SOAP header (if present) |
static RetryingTransactionHelper |
getRetryingTransactionHelper(org.apache.axis.MessageContext msgContext)
Get the executer to wrap transactional callbacks in for better transaction behaviour.
|
static String |
getSessionId()
Gets the current http session id
|
static org.springframework.web.context.WebApplicationContext |
getSpringContext(org.apache.axis.MessageContext msgContext)
Returns the current Spring WebApplicationContext object
|
static UserTransaction |
getUserTransaction(org.apache.axis.MessageContext msgContext)
Deprecated.
|
static Serializable |
getValueFromNamedValue(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
org.alfresco.service.namespace.QName propertyName,
NamedValue namedValue)
Utility method to convert from a string representation of a property value into the correct object representation.
|
static void |
invalidateSession()
Invalidates the current http session
|
static List<NodeRef> |
resolvePredicate(Predicate predicate,
NodeService nodeService,
SearchService searchService,
org.alfresco.service.namespace.NamespaceService namespaceService)
Resolves the given predicate into a list of NodeRefs that can be acted
upon
|
static NodeRef |
resolveToNodeRef(Store store,
String uuid,
String path,
NodeService nodeService,
SearchService searchService,
org.alfresco.service.namespace.NamespaceService namespaceService)
Resolves the given parameters to a repository NodeRef
|
static AssociationDefinition |
setupAssociationDefObject(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
org.alfresco.service.cmr.dictionary.AssociationDefinition ddAssocDef)
Creates an AssociationDefinition web service type object for the given
repository AssociationDefinition
|
static ClassDefinition |
setupClassDefObject(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
org.alfresco.service.cmr.dictionary.ClassDefinition ddClassDef)
Creates a ClassDefinition web service type object for the given
repository ClassDefinition
|
static PropertyDefinition |
setupPropertyDefObject(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
org.alfresco.service.cmr.dictionary.PropertyDefinition ddPropDef)
Creates a PropertyDefinition web service type object for the given
repository PropertyDefinition
|
public static final int DEFAULT_BATCH_SIZE
public static final String REPOSITORY_SERVICE_NAMESPACE
public static final String QUERY_LANG_LUCENE
public static final String QUERY_LANG_XPATH
public static final String QUERY_LANG_CQL
public static Serializable getValueFromNamedValue(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.namespace.QName propertyName, NamedValue namedValue)
dictionaryService - the dictionary servicepropertyName - the qname of the property in questionpropertyValue - the property vlaue as a stringpublic static NamedValue createNamedValue(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.namespace.QName propertyName, Serializable propertyValue)
dictionaryService - the dictionary servicepropertyName - the property qnamepropertyValue - the property valuepublic static StoreRef convertToStoreRef(Store store)
store - The Store to convertpublic static Store convertToStore(StoreRef ref)
ref - the store referencepublic static NodeRef convertToNodeRef(Reference ref, NodeService nodeService, SearchService searchService, org.alfresco.service.namespace.NamespaceService namespaceService)
ref - The Reference to convertpublic static NodeRef convertToNodeRef(ParentReference parentRef, NodeService nodeService, SearchService searchService, org.alfresco.service.namespace.NamespaceService namespaceService)
parentRef - The ParentReference to convertpublic static Reference convertToReference(NodeService nodeService, org.alfresco.service.namespace.NamespaceService namespaceService, NodeRef node)
node - The node to create a Reference forpublic static NodeRef resolveToNodeRef(Store store, String uuid, String path, NodeService nodeService, SearchService searchService, org.alfresco.service.namespace.NamespaceService namespaceService)
store - The Store to search withinuuid - The id of the required node.cpath - The path to the required node. If a uuid is given the uuid is used
+ * to find the node. Otherwise, the path is used.nodeService - NodeService to usesearchService - SearchService to usenamespaceService - NamespaceService to usepublic static List<NodeRef> resolvePredicate(Predicate predicate, NodeService nodeService, SearchService searchService, org.alfresco.service.namespace.NamespaceService namespaceService)
predicate - The predicate passed from the clientnodeService - NodeService to usesearchService - SearchService to usenamespaceService - NamespaceService to usepublic static org.springframework.web.context.WebApplicationContext getSpringContext(org.apache.axis.MessageContext msgContext)
msgContext - SOAP message contextpublic static UserTransaction getUserTransaction(org.apache.axis.MessageContext msgContext)
getRetryingTransactionHelper(MessageContext)msgContext - SOAP message contextpublic static RetryingTransactionHelper getRetryingTransactionHelper(org.apache.axis.MessageContext msgContext)
msgContext - SOAP message contextpublic static String getSessionId()
public static void invalidateSession()
public static int getBatchSize(org.apache.axis.MessageContext msgContext)
fetchSize from the
QueryConfiguration SOAP header (if present)msgContext - The SOAP MessageContextpublic static Version convertToVersion(NodeService nodeService, org.alfresco.service.namespace.NamespaceService namespaceService, Version version)
version - the repository version objectpublic static ClassDefinition setupClassDefObject(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.cmr.dictionary.ClassDefinition ddClassDef)
ddClassDef - The repository ClassDefinition to generatepublic static PropertyDefinition setupPropertyDefObject(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.cmr.dictionary.PropertyDefinition ddPropDef)
ddPropertyDef - The repository PropertyDefinition to generatepublic static AssociationDefinition setupAssociationDefObject(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.cmr.dictionary.AssociationDefinition ddAssocDef)
ddAssociationDef - The repository AssociationDefinition to generateCopyright © 2005–2014 Alfresco Software. All rights reserved.