public class AlfrescoEnviroment extends Object implements ActualEnvironment
Constructor and Description |
---|
AlfrescoEnviroment() |
Modifier and Type | Method and Description |
---|---|
void |
addAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName aspectTypeQName,
Map<org.alfresco.service.namespace.QName,Serializable> aspectProperties) |
FileInfo |
create(org.alfresco.service.cmr.repository.NodeRef parentNodeRef,
String name,
org.alfresco.service.namespace.QName typeQName) |
Object |
createScriptVirtualContext(VirtualContext context) |
void |
delete(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
Object |
executeScript(org.alfresco.service.cmr.repository.NodeRef templateNodeRef,
Map<String,Object> model) |
Object |
executeScript(String classpath,
Map<String,Object> model) |
boolean |
exists(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
boolean |
exists(String classpath) |
org.alfresco.service.cmr.repository.NodeRef |
findNodeRef(String referenceType,
String[] reference) |
org.alfresco.service.cmr.repository.NodeRef |
findQNamePath(String[] patheElements) |
Set<org.alfresco.service.namespace.QName> |
getAspects(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
List<org.alfresco.service.cmr.repository.ChildAssociationRef> |
getChildAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QNamePattern typeQNamePattern,
org.alfresco.service.namespace.QNamePattern qnamePattern,
int maxResults,
boolean preload) |
org.alfresco.service.cmr.repository.NodeRef |
getChildByName(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName assocTypeQName,
String childName) |
String |
getCurrentUser() |
org.alfresco.service.namespace.NamespacePrefixResolver |
getNamespacePrefixResolver() |
org.alfresco.service.cmr.repository.Path |
getPath(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
org.alfresco.service.cmr.repository.ChildAssociationRef |
getPrimaryParent(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
Map<org.alfresco.service.namespace.QName,Serializable> |
getProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
Serializable |
getProperty(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName qname) |
ServiceRegistry |
getServiceRegistry() |
org.alfresco.service.cmr.repository.NodeRef |
getTargetAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName associationQName) |
org.alfresco.service.namespace.QName |
getType(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
org.alfresco.service.cmr.repository.ContentWriter |
getWriter(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName propertyQName,
boolean update) |
boolean |
hasAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName aspectTypeQName) |
boolean |
hasPermission(org.alfresco.service.cmr.repository.NodeRef nodeRef,
String perm) |
boolean |
isSubClass(org.alfresco.service.namespace.QName className,
org.alfresco.service.namespace.QName ofClassName) |
InputStream |
openContentStream(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
InputStream |
openContentStream(String classpath) |
org.alfresco.service.cmr.search.ResultSet |
query(org.alfresco.service.cmr.search.SearchParameters searchParameters) |
void |
setAlfrescoAPIFacet(AlfrescoAPIFacet apiFacet) |
void |
setNamespacePrefixResolver(org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver) |
void |
setNodeRefResolver(NodeRefResolver nodeRefResolver) |
void |
setRepositoryHelper(Repository repository) |
void |
setServiceRegistry(ServiceRegistry serviceRegistry) |
public void setNodeRefResolver(NodeRefResolver nodeRefResolver)
public void setAlfrescoAPIFacet(AlfrescoAPIFacet apiFacet)
public void setServiceRegistry(ServiceRegistry serviceRegistry)
public ServiceRegistry getServiceRegistry()
public void setRepositoryHelper(Repository repository)
public Object executeScript(String classpath, Map<String,Object> model)
executeScript
in interface ActualEnvironment
public Object executeScript(org.alfresco.service.cmr.repository.NodeRef templateNodeRef, Map<String,Object> model)
executeScript
in interface ActualEnvironment
public boolean hasAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName aspectTypeQName)
hasAspect
in interface ActualEnvironment
public Set<org.alfresco.service.namespace.QName> getAspects(org.alfresco.service.cmr.repository.NodeRef nodeRef)
getAspects
in interface ActualEnvironment
public org.alfresco.service.cmr.repository.NodeRef getTargetAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName associationQName)
getTargetAssocs
in interface ActualEnvironment
public Serializable getProperty(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName qname)
getProperty
in interface ActualEnvironment
public Map<org.alfresco.service.namespace.QName,Serializable> getProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef)
getProperties
in interface ActualEnvironment
public InputStream openContentStream(org.alfresco.service.cmr.repository.NodeRef nodeRef) throws ActualEnvironmentException
openContentStream
in interface ActualEnvironment
ActualEnvironmentException
public InputStream openContentStream(String classpath) throws ActualEnvironmentException
openContentStream
in interface ActualEnvironment
ActualEnvironmentException
public org.alfresco.service.cmr.search.ResultSet query(org.alfresco.service.cmr.search.SearchParameters searchParameters)
query
in interface ActualEnvironment
public Object createScriptVirtualContext(VirtualContext context) throws ActualEnvironmentException
createScriptVirtualContext
in interface ActualEnvironment
ActualEnvironmentException
public org.alfresco.service.namespace.QName getType(org.alfresco.service.cmr.repository.NodeRef nodeRef)
getType
in interface ActualEnvironment
public boolean isSubClass(org.alfresco.service.namespace.QName className, org.alfresco.service.namespace.QName ofClassName)
isSubClass
in interface ActualEnvironment
public void setNamespacePrefixResolver(org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver)
public org.alfresco.service.namespace.NamespacePrefixResolver getNamespacePrefixResolver()
getNamespacePrefixResolver
in interface ActualEnvironment
public String getCurrentUser()
getCurrentUser
in interface ActualEnvironment
public org.alfresco.service.cmr.repository.Path getPath(org.alfresco.service.cmr.repository.NodeRef nodeRef)
getPath
in interface ActualEnvironment
public org.alfresco.service.cmr.repository.ChildAssociationRef getPrimaryParent(org.alfresco.service.cmr.repository.NodeRef nodeRef)
getPrimaryParent
in interface ActualEnvironment
public List<org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssocs(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QNamePattern typeQNamePattern, org.alfresco.service.namespace.QNamePattern qnamePattern, int maxResults, boolean preload) throws org.alfresco.service.cmr.repository.InvalidNodeRefException
getChildAssocs
in interface ActualEnvironment
org.alfresco.service.cmr.repository.InvalidNodeRefException
public org.alfresco.service.cmr.repository.NodeRef findNodeRef(String referenceType, String[] reference)
findNodeRef
in interface ActualEnvironment
public boolean exists(org.alfresco.service.cmr.repository.NodeRef nodeRef)
exists
in interface ActualEnvironment
public org.alfresco.service.cmr.repository.NodeRef getChildByName(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName assocTypeQName, String childName)
getChildByName
in interface ActualEnvironment
public void delete(org.alfresco.service.cmr.repository.NodeRef nodeRef)
delete
in interface ActualEnvironment
public FileInfo create(org.alfresco.service.cmr.repository.NodeRef parentNodeRef, String name, org.alfresco.service.namespace.QName typeQName) throws FileExistsException
create
in interface ActualEnvironment
FileExistsException
public org.alfresco.service.cmr.repository.ContentWriter getWriter(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName propertyQName, boolean update) throws org.alfresco.service.cmr.repository.InvalidNodeRefException, org.alfresco.service.cmr.dictionary.InvalidTypeException
getWriter
in interface ActualEnvironment
org.alfresco.service.cmr.repository.InvalidNodeRefException
org.alfresco.service.cmr.dictionary.InvalidTypeException
public void addAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName aspectTypeQName, Map<org.alfresco.service.namespace.QName,Serializable> aspectProperties) throws org.alfresco.service.cmr.repository.InvalidNodeRefException, org.alfresco.service.cmr.dictionary.InvalidAspectException
addAspect
in interface ActualEnvironment
org.alfresco.service.cmr.repository.InvalidNodeRefException
org.alfresco.service.cmr.dictionary.InvalidAspectException
public org.alfresco.service.cmr.repository.NodeRef findQNamePath(String[] patheElements)
findQNamePath
in interface ActualEnvironment
public boolean exists(String classpath)
exists
in interface ActualEnvironment
public boolean hasPermission(org.alfresco.service.cmr.repository.NodeRef nodeRef, String perm)
hasPermission
in interface ActualEnvironment
Copyright © 2005–2017 Alfresco Software. All rights reserved.