|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.webservice.Utils
public class Utils
Helper class used by the web services
Field Summary | |
---|---|
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
|
Method Summary | |
---|---|
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. Use Utils.getRetryingTransactionHelper(MessageContext) |
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 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.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.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.PropertyDefinition ddPropDef)
Creates a PropertyDefinition web service type object for the given repository PropertyDefinition |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Method Detail |
---|
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 string
public 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 value
public static org.alfresco.service.cmr.repository.StoreRef convertToStoreRef(org.alfresco.repo.webservice.types.Store store)
store
- The Store to convert
public static org.alfresco.repo.webservice.types.Store convertToStore(org.alfresco.service.cmr.repository.StoreRef ref)
ref
- the store reference
public 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 convert
public 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 convert
public 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 for
public 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 use
public 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 use
public static org.springframework.web.context.WebApplicationContext getSpringContext(org.apache.axis.MessageContext msgContext)
msgContext
- SOAP message context
public static javax.transaction.UserTransaction getUserTransaction(org.apache.axis.MessageContext msgContext)
Utils.getRetryingTransactionHelper(MessageContext)
msgContext
- SOAP message context
public static org.alfresco.repo.transaction.RetryingTransactionHelper getRetryingTransactionHelper(org.apache.axis.MessageContext msgContext)
msgContext
- SOAP message context
public static java.lang.String getSessionId()
public static int getBatchSize(org.apache.axis.MessageContext msgContext)
fetchSize
from the
QueryConfiguration SOAP header (if present)
msgContext
- The SOAP MessageContext
public 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 object
public static org.alfresco.repo.webservice.types.ClassDefinition setupClassDefObject(org.alfresco.service.cmr.dictionary.ClassDefinition ddClassDef)
ddClassDef
- The repository ClassDefinition to generate
public static org.alfresco.repo.webservice.types.PropertyDefinition setupPropertyDefObject(org.alfresco.service.cmr.dictionary.PropertyDefinition ddPropDef)
ddPropertyDef
- The repository PropertyDefinition to generate
public static org.alfresco.repo.webservice.types.AssociationDefinition setupAssociationDefObject(org.alfresco.service.cmr.dictionary.AssociationDefinition ddAssocDef)
ddAssociationDef
- The repository AssociationDefinition to generate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |