Package org.alfresco.repo.virtual
Class AlfrescoEnviroment
- java.lang.Object
-
- org.alfresco.repo.virtual.AlfrescoEnviroment
-
- All Implemented Interfaces:
ActualEnvironment
public class AlfrescoEnviroment extends Object implements ActualEnvironment
-
-
Constructor Summary
Constructors Constructor Description AlfrescoEnviroment()
-
Method Summary
-
-
-
Method Detail
-
setNodeRefResolver
public void setNodeRefResolver(NodeRefResolver nodeRefResolver)
-
setAlfrescoAPIFacet
public void setAlfrescoAPIFacet(AlfrescoAPIFacet apiFacet)
-
setServiceRegistry
public void setServiceRegistry(ServiceRegistry serviceRegistry)
-
getServiceRegistry
public ServiceRegistry getServiceRegistry()
-
setRepositoryHelper
public void setRepositoryHelper(Repository repository)
-
executeScript
public Object executeScript(String classpath, Map<String,Object> model)
- Specified by:
executeScriptin interfaceActualEnvironment
-
executeScript
public Object executeScript(NodeRef templateNodeRef, Map<String,Object> model)
- Specified by:
executeScriptin interfaceActualEnvironment
-
hasAspect
public boolean hasAspect(NodeRef nodeRef, QName aspectTypeQName)
- Specified by:
hasAspectin interfaceActualEnvironment
-
getAspects
public Set<QName> getAspects(NodeRef nodeRef)
- Specified by:
getAspectsin interfaceActualEnvironment
-
getTargetAssocs
public NodeRef getTargetAssocs(NodeRef nodeRef, QName associationQName)
- Specified by:
getTargetAssocsin interfaceActualEnvironment
-
getProperty
public Serializable getProperty(NodeRef nodeRef, QName qname)
- Specified by:
getPropertyin interfaceActualEnvironment
-
getProperties
public Map<QName,Serializable> getProperties(NodeRef nodeRef)
- Specified by:
getPropertiesin interfaceActualEnvironment
-
openContentStream
public InputStream openContentStream(NodeRef nodeRef) throws ActualEnvironmentException
- Specified by:
openContentStreamin interfaceActualEnvironment- Throws:
ActualEnvironmentException
-
openContentStream
public InputStream openContentStream(String classpath) throws ActualEnvironmentException
- Specified by:
openContentStreamin interfaceActualEnvironment- Throws:
ActualEnvironmentException
-
query
public ResultSet query(SearchParameters searchParameters)
- Specified by:
queryin interfaceActualEnvironment
-
createScriptVirtualContext
public Object createScriptVirtualContext(VirtualContext context) throws ActualEnvironmentException
- Specified by:
createScriptVirtualContextin interfaceActualEnvironment- Throws:
ActualEnvironmentException
-
getType
public QName getType(NodeRef nodeRef)
- Specified by:
getTypein interfaceActualEnvironment
-
isSubClass
public boolean isSubClass(QName className, QName ofClassName)
- Specified by:
isSubClassin interfaceActualEnvironment
-
setNamespacePrefixResolver
public void setNamespacePrefixResolver(NamespacePrefixResolver namespacePrefixResolver)
-
getNamespacePrefixResolver
public NamespacePrefixResolver getNamespacePrefixResolver()
- Specified by:
getNamespacePrefixResolverin interfaceActualEnvironment
-
getCurrentUser
public String getCurrentUser()
- Specified by:
getCurrentUserin interfaceActualEnvironment
-
getPath
public Path getPath(NodeRef nodeRef)
- Specified by:
getPathin interfaceActualEnvironment
-
getPrimaryParent
public ChildAssociationRef getPrimaryParent(NodeRef nodeRef)
- Specified by:
getPrimaryParentin interfaceActualEnvironment
-
getChildAssocs
public List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern, int maxResults, boolean preload) throws InvalidNodeRefException
- Specified by:
getChildAssocsin interfaceActualEnvironment- Throws:
InvalidNodeRefException
-
findNodeRef
public NodeRef findNodeRef(String referenceType, String[] reference)
- Specified by:
findNodeRefin interfaceActualEnvironment
-
exists
public boolean exists(NodeRef nodeRef)
- Specified by:
existsin interfaceActualEnvironment
-
getChildByName
public NodeRef getChildByName(NodeRef nodeRef, QName assocTypeQName, String childName)
- Specified by:
getChildByNamein interfaceActualEnvironment
-
delete
public void delete(NodeRef nodeRef)
- Specified by:
deletein interfaceActualEnvironment
-
create
public FileInfo create(NodeRef parentNodeRef, String name, QName typeQName) throws FileExistsException
- Specified by:
createin interfaceActualEnvironment- Throws:
FileExistsException
-
getWriter
public ContentWriter getWriter(NodeRef nodeRef, QName propertyQName, boolean update) throws InvalidNodeRefException, InvalidTypeException
- Specified by:
getWriterin interfaceActualEnvironment- Throws:
InvalidNodeRefExceptionInvalidTypeException
-
addAspect
public void addAspect(NodeRef nodeRef, QName aspectTypeQName, Map<QName,Serializable> aspectProperties) throws InvalidNodeRefException, InvalidAspectException
- Specified by:
addAspectin interfaceActualEnvironment- Throws:
InvalidNodeRefExceptionInvalidAspectException
-
findQNamePath
public NodeRef findQNamePath(String[] patheElements)
- Specified by:
findQNamePathin interfaceActualEnvironment
-
exists
public boolean exists(String classpath)
- Specified by:
existsin interfaceActualEnvironment
-
hasPermission
public boolean hasPermission(NodeRef nodeRef, String perm)
- Specified by:
hasPermissionin interfaceActualEnvironment
-
-