public class Utils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BATCH_SIZE
Default batch size for query results - 1000
|
static java.lang.String |
QUERY_LANG_CQL |
static java.lang.String |
QUERY_LANG_LUCENE
Query language names
|
static java.lang.String |
QUERY_LANG_XPATH |
static java.lang.String |
REPOSITORY_SERVICE_NAMESPACE |
Modifier and Type | Method and Description |
---|---|
static org.alfresco.service.cmr.repository.NodeRef |
convertToNodeRef(org.alfresco.repo.webservice.types.ParentReference parentRef,
org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.search.SearchService searchService,
org.alfresco.service.namespace.NamespaceService namespaceService)
Converts the given ParentReference web service type into a repository
NodeRef
|
static org.alfresco.service.cmr.repository.NodeRef |
convertToNodeRef(org.alfresco.repo.webservice.types.Reference ref,
org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.search.SearchService searchService,
org.alfresco.service.namespace.NamespaceService namespaceService)
Converts the given Reference web service type into a repository NodeRef
|
static org.alfresco.repo.webservice.types.Reference |
convertToReference(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.namespace.NamespaceService namespaceService,
org.alfresco.service.cmr.repository.NodeRef node)
Converts the given repository NodeRef object into a web service Reference
type
|
static org.alfresco.repo.webservice.types.Store |
convertToStore(org.alfresco.service.cmr.repository.StoreRef ref)
Converts a store reference ot a Store type
|
static org.alfresco.service.cmr.repository.StoreRef |
convertToStoreRef(org.alfresco.repo.webservice.types.Store store)
Converts the web service Store type to a StoreRef used by the repository
|
static org.alfresco.repo.webservice.types.Version |
convertToVersion(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.namespace.NamespaceService namespaceService,
org.alfresco.service.cmr.version.Version version)
Converts a repository version object into a web service version object.
|
static org.alfresco.repo.webservice.types.NamedValue |
createNamedValue(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
org.alfresco.service.namespace.QName propertyName,
java.io.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 org.alfresco.repo.transaction.RetryingTransactionHelper |
getRetryingTransactionHelper(org.apache.axis.MessageContext msgContext)
Get the executer to wrap transactional callbacks in for better transaction behaviour.
|
static java.lang.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 javax.transaction.UserTransaction |
getUserTransaction(org.apache.axis.MessageContext msgContext)
Deprecated.
|
static java.io.Serializable |
getValueFromNamedValue(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
org.alfresco.service.namespace.QName propertyName,
org.alfresco.repo.webservice.types.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 java.util.List |
resolvePredicate(org.alfresco.repo.webservice.types.Predicate predicate,
org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.search.SearchService searchService,
org.alfresco.service.namespace.NamespaceService namespaceService)
Resolves the given predicate into a list of NodeRefs that can be acted
upon
|
static org.alfresco.service.cmr.repository.NodeRef |
resolveToNodeRef(org.alfresco.repo.webservice.types.Store store,
java.lang.String uuid,
java.lang.String path,
org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.search.SearchService searchService,
org.alfresco.service.namespace.NamespaceService namespaceService)
Resolves the given parameters to a repository NodeRef
|
static org.alfresco.repo.webservice.types.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 org.alfresco.repo.webservice.types.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 org.alfresco.repo.webservice.types.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 java.lang.String REPOSITORY_SERVICE_NAMESPACE
public static final java.lang.String QUERY_LANG_LUCENE
public static final java.lang.String QUERY_LANG_XPATH
public static final java.lang.String QUERY_LANG_CQL
public static java.io.Serializable getValueFromNamedValue(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.namespace.QName propertyName, org.alfresco.repo.webservice.types.NamedValue namedValue)
dictionaryService
- the dictionary servicepropertyName
- the qname of the property in questionpropertyValue
- the property vlaue as a stringpublic static org.alfresco.repo.webservice.types.NamedValue createNamedValue(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.namespace.QName propertyName, java.io.Serializable propertyValue)
dictionaryService
- the dictionary servicepropertyName
- the property qnamepropertyValue
- the property valuepublic static org.alfresco.service.cmr.repository.StoreRef convertToStoreRef(org.alfresco.repo.webservice.types.Store store)
store
- The Store to convertpublic static org.alfresco.repo.webservice.types.Store convertToStore(org.alfresco.service.cmr.repository.StoreRef ref)
ref
- the store referencepublic static org.alfresco.service.cmr.repository.NodeRef convertToNodeRef(org.alfresco.repo.webservice.types.Reference ref, org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.search.SearchService searchService, org.alfresco.service.namespace.NamespaceService namespaceService)
ref
- The Reference to convertpublic static org.alfresco.service.cmr.repository.NodeRef convertToNodeRef(org.alfresco.repo.webservice.types.ParentReference parentRef, org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.search.SearchService searchService, org.alfresco.service.namespace.NamespaceService namespaceService)
parentRef
- The ParentReference to convertpublic static org.alfresco.repo.webservice.types.Reference convertToReference(org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.repository.NodeRef node)
node
- The node to create a Reference forpublic static org.alfresco.service.cmr.repository.NodeRef resolveToNodeRef(org.alfresco.repo.webservice.types.Store store, java.lang.String uuid, java.lang.String path, org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.search.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 java.util.List resolvePredicate(org.alfresco.repo.webservice.types.Predicate predicate, org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.search.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 javax.transaction.UserTransaction getUserTransaction(org.apache.axis.MessageContext msgContext)
Utils.getRetryingTransactionHelper(MessageContext)
msgContext
- SOAP message contextpublic static org.alfresco.repo.transaction.RetryingTransactionHelper getRetryingTransactionHelper(org.apache.axis.MessageContext msgContext)
msgContext
- SOAP message contextpublic static java.lang.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 org.alfresco.repo.webservice.types.Version convertToVersion(org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.version.Version version)
version
- the repository version objectpublic static org.alfresco.repo.webservice.types.ClassDefinition setupClassDefObject(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.cmr.dictionary.ClassDefinition ddClassDef)
ddClassDef
- The repository ClassDefinition to generatepublic static org.alfresco.repo.webservice.types.PropertyDefinition setupPropertyDefObject(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.cmr.dictionary.PropertyDefinition ddPropDef)
ddPropertyDef
- The repository PropertyDefinition to generatepublic static org.alfresco.repo.webservice.types.AssociationDefinition setupAssociationDefObject(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, org.alfresco.service.cmr.dictionary.AssociationDefinition ddAssocDef)
ddAssociationDef
- The repository AssociationDefinition to generateCopyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.