public class VirtualStoreImpl extends Object implements VirtualStore, VirtualFolderDefinitionResolver
FILING_OR_MATERIAL_ADHERENCE, MATERIAL_ADHERENCE
Constructor and Description |
---|
VirtualStoreImpl() |
Modifier and Type | Method and Description |
---|---|
org.alfresco.service.cmr.repository.NodeRef |
adhere(Reference reference,
int mode) |
boolean |
canMaterialize(Reference reference) |
boolean |
canVirtualize(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
FilingData |
createFilingData(Reference parentReference,
org.alfresco.service.namespace.QName assocTypeQName,
org.alfresco.service.namespace.QName assocQName,
org.alfresco.service.namespace.QName nodeTypeQName,
Map<org.alfresco.service.namespace.QName,Serializable> properties) |
Set<org.alfresco.service.cmr.security.AccessPermission> |
getAllSetPermissions(Reference reference) |
List<org.alfresco.service.cmr.repository.ChildAssociationRef> |
getChildAssocs(Reference parentReference,
org.alfresco.service.namespace.QNamePattern typeQNamePattern,
org.alfresco.service.namespace.QNamePattern qnamePattern,
int maxResults,
boolean preload)
Gets all child references associations where the pattern of the
association qualified name is an exact match.
|
List<org.alfresco.service.cmr.repository.ChildAssociationRef> |
getChildAssocs(Reference parentReference,
Set<org.alfresco.service.namespace.QName> childNodeTypeQNames)
Retrieve immediate children references of a given reference where the
child nodes are in the given inclusive list.
|
List<org.alfresco.service.cmr.repository.ChildAssociationRef> |
getChildAssocsByPropertyValue(Reference parentReference,
org.alfresco.service.namespace.QName propertyQName,
Serializable value)
Retrieve the immediate children of a given node based on the value of a
property of those children.
|
Collection<org.alfresco.service.cmr.repository.ChildAssociationRef> |
getChildAssocsWithoutParentAssocsOfType(Reference parentReference,
org.alfresco.service.namespace.QName assocTypeQName)
Gets the set of child associations of a certain parent node without
parent associations of a certain type to other nodes with the same
parent! In effect the 'orphans' with respect to a certain association
type.
|
Reference |
getChildByName(Reference reference,
org.alfresco.service.namespace.QName assocTypeQName,
String childName)
Get the reference of the virtualized artefact with the given name within
the virtual context (only) of the parent reference.
The name is case-insensitive as Alfresco has to support case-insensitive clients as standard. |
org.alfresco.service.cmr.repository.Path |
getPath(Reference reference) |
Map<org.alfresco.service.namespace.QName,Serializable> |
getProperties(Reference reference) |
NodePermissionEntry |
getSetPermissions(Reference reference) |
org.alfresco.service.namespace.QName |
getType(Reference ref) |
VirtualUserPermissions |
getUserPermissions() |
org.alfresco.service.cmr.security.AccessStatus |
hasPermission(Reference reference,
PermissionReference perm)
Check that the given authentication has a particular permission for the
given virtualized artefact.
|
org.alfresco.service.cmr.security.AccessStatus |
hasPermission(Reference reference,
String perm)
Check that the given authentication has a particular permission for the
given virtualized artefact.
|
boolean |
isVirtual(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
List<Reference> |
list(Reference reference)
Lists all immediate children of the referred virtualized artefact.
Note: this could be a long list (and will be trimmed at a pre-configured maximum). |
org.alfresco.query.PagingResults<Reference> |
list(Reference ref,
boolean actual,
boolean virtual,
boolean files,
boolean folders,
String pattern,
Set<org.alfresco.service.namespace.QName> ignoreTypeQNames,
Set<org.alfresco.service.namespace.QName> ignoreAspectQNames,
List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,Boolean>> sortProps,
org.alfresco.query.PagingRequest pagingRequest)
Lists page of immediate children of the referred virtualized artefact
with optional filtering (exclusion of certain child file/folder subtypes,
actual-virtual filtering) and sorting.
|
org.alfresco.query.PagingResults<Reference> |
list(Reference ref,
boolean actual,
boolean virtual,
boolean files,
boolean folders,
String pattern,
Set<org.alfresco.service.namespace.QName> searchTypeQNames,
Set<org.alfresco.service.namespace.QName> ignoreTypeQNames,
Set<org.alfresco.service.namespace.QName> ignoreAspectQNames,
List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,Boolean>> sortProps,
org.alfresco.query.PagingRequest pagingRequest)
Lists page of immediate children of the referred virtualized artefact
with optional filtering (exclusion of certain child file/folder subtypes,
actual-virtual filtering) and sorting.
Pattern uses '*' as a wildcard |
org.alfresco.query.PagingResults<Reference> |
list(Reference ref,
boolean actual,
boolean virtual,
Set<org.alfresco.service.namespace.QName> searchTypeQNames,
Set<org.alfresco.service.namespace.QName> ignoreTypeQNames,
Set<org.alfresco.service.namespace.QName> ignoreAspectQNames,
List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,Boolean>> sortProps,
org.alfresco.query.PagingRequest pagingRequest)
Lists page of immediate children of the referred virtualized artefact
with optional filtering (exclusion of certain child file/folder subtypes,
actual-virtual filtering) and sorting.
|
org.alfresco.service.cmr.repository.NodeRef |
materialize(Reference reference) |
Collection<org.alfresco.service.cmr.repository.NodeRef> |
materializeIfPossible(Collection<org.alfresco.service.cmr.repository.NodeRef> nodeRefs) |
org.alfresco.service.cmr.repository.NodeRef |
materializeIfPossible(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
VirtualFolderDefinition |
resolveVirtualFolderDefinition(Reference reference) |
List<Reference> |
search(Reference reference,
String namePattern,
boolean fileSearch,
boolean folderSearch,
boolean includeSubFolders)
Perform a search against the name of the files or folders within a
virtualized artefact
Reference hierarchy. |
void |
setEnvironment(ActualEnvironment environment) |
void |
setUserPermissions(VirtualUserPermissions userPermissions) |
void |
setVirtualizationMethods(List<VirtualizationMethod> methdods) |
Reference |
virtualize(org.alfresco.service.cmr.repository.NodeRef nodeRef) |
public void setVirtualizationMethods(List<VirtualizationMethod> methdods)
public void setEnvironment(ActualEnvironment environment)
public boolean isVirtual(org.alfresco.service.cmr.repository.NodeRef nodeRef) throws VirtualizationException
isVirtual
in interface VirtualStore
VirtualizationException
public boolean canVirtualize(org.alfresco.service.cmr.repository.NodeRef nodeRef) throws VirtualizationException
canVirtualize
in interface VirtualStore
VirtualizationException
public boolean canMaterialize(Reference reference) throws VirtualizationException
canMaterialize
in interface VirtualStore
VirtualizationException
public Reference virtualize(org.alfresco.service.cmr.repository.NodeRef nodeRef) throws VirtualizationException
virtualize
in interface VirtualStore
VirtualizationException
public org.alfresco.service.cmr.repository.NodeRef materialize(Reference reference) throws VirtualizationException
materialize
in interface VirtualStore
VirtualizationException
public Collection<org.alfresco.service.cmr.repository.NodeRef> materializeIfPossible(Collection<org.alfresco.service.cmr.repository.NodeRef> nodeRefs) throws VirtualizationException
materializeIfPossible
in interface VirtualStore
VirtualizationException
public org.alfresco.service.cmr.repository.NodeRef materializeIfPossible(org.alfresco.service.cmr.repository.NodeRef nodeRef) throws VirtualizationException
materializeIfPossible
in interface VirtualStore
VirtualizationException
public List<org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssocs(Reference parentReference, org.alfresco.service.namespace.QNamePattern typeQNamePattern, org.alfresco.service.namespace.QNamePattern qnamePattern, int maxResults, boolean preload) throws org.alfresco.service.cmr.repository.InvalidNodeRefException
VirtualStore
getChildAssocs
in interface VirtualStore
parentReference
- the parent node - usually a containertypeQNamePattern
- the qualified name of the association (
null to ignore)qnamePattern
- the path qualified name (null to ignore)maxResults
- the number of results to getpreload
- true if the nodes must be preloaded into the
cacheChildAssociationRef
instancesorg.alfresco.service.cmr.repository.InvalidNodeRefException
- if the node could not be foundQName
public List<org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssocs(Reference parentReference, Set<org.alfresco.service.namespace.QName> childNodeTypeQNames)
VirtualStore
getChildAssocs
in interface VirtualStore
parentReference
- the parent node - usually a containerchildNodeTypeQNames
- the types that the children may be. Subtypes
are not automatically calculated and the list must therefore
be exhaustive.ChildAssociationRef
instances.public Collection<org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssocsWithoutParentAssocsOfType(Reference parentReference, org.alfresco.service.namespace.QName assocTypeQName)
VirtualStore
getChildAssocsWithoutParentAssocsOfType
in interface VirtualStore
assocTypeQName
- the association type QNameCollection
of child associationspublic List<org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssocsByPropertyValue(Reference parentReference, org.alfresco.service.namespace.QName propertyQName, Serializable value)
VirtualStore
If the property to be searched is multi-valued then will match on any one values.
Please note, the following system maintained properties that cannot be used with this method.
getChildAssocsByPropertyValue
in interface VirtualStore
parentReference
- the parent reference - usually a containerpropertyQName
- the fully qualified name of the propertyvalue
- the value to search for. Must be a simple type such as
String, Number, Date or Boolean, it cannot be a collection, a
content property, MLText or a float.ChildAssociationRef
instances.public Reference getChildByName(Reference reference, org.alfresco.service.namespace.QName assocTypeQName, String childName) throws VirtualizationException
VirtualStore
getChildByName
in interface VirtualStore
reference
- parent Reference
VirtualizationException
NodeService.getChildByName(org.alfresco.service.cmr.repository.NodeRef,
QName, String)
public VirtualFolderDefinition resolveVirtualFolderDefinition(Reference reference) throws VirtualizationException
resolveVirtualFolderDefinition
in interface VirtualFolderDefinitionResolver
VirtualFolderDefinition
of the given
Reference
considering inner pathsVirtualizationException
public org.alfresco.query.PagingResults<Reference> list(Reference ref, boolean actual, boolean virtual, boolean files, boolean folders, String pattern, Set<org.alfresco.service.namespace.QName> searchTypeQNames, Set<org.alfresco.service.namespace.QName> ignoreTypeQNames, Set<org.alfresco.service.namespace.QName> ignoreAspectQNames, List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest) throws VirtualizationException
VirtualStore
list
in interface VirtualStore
VirtualizationException
public org.alfresco.query.PagingResults<Reference> list(Reference ref, boolean actual, boolean virtual, boolean files, boolean folders, String pattern, Set<org.alfresco.service.namespace.QName> ignoreTypeQNames, Set<org.alfresco.service.namespace.QName> ignoreAspectQNames, List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest) throws VirtualizationException
VirtualStore
list
in interface VirtualStore
VirtualizationException
public org.alfresco.query.PagingResults<Reference> list(Reference ref, boolean actual, boolean virtual, Set<org.alfresco.service.namespace.QName> searchTypeQNames, Set<org.alfresco.service.namespace.QName> ignoreTypeQNames, Set<org.alfresco.service.namespace.QName> ignoreAspectQNames, List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest) throws VirtualizationException
VirtualStore
list
in interface VirtualStore
VirtualizationException
public List<Reference> list(Reference reference) throws VirtualizationException
VirtualStore
list
in interface VirtualStore
VirtualizationException
public List<Reference> search(Reference reference, String namePattern, boolean fileSearch, boolean folderSearch, boolean includeSubFolders) throws VirtualizationException
VirtualStore
Reference
hierarchy. search
in interface VirtualStore
VirtualizationException
public Map<org.alfresco.service.namespace.QName,Serializable> getProperties(Reference reference) throws VirtualizationException
getProperties
in interface VirtualStore
VirtualizationException
public org.alfresco.service.namespace.QName getType(Reference ref) throws VirtualizationException
getType
in interface VirtualStore
VirtualizationException
public FilingData createFilingData(Reference parentReference, org.alfresco.service.namespace.QName assocTypeQName, org.alfresco.service.namespace.QName assocQName, org.alfresco.service.namespace.QName nodeTypeQName, Map<org.alfresco.service.namespace.QName,Serializable> properties) throws VirtualizationException
createFilingData
in interface VirtualStore
FilingData
of the given parent locationVirtualizationException
public org.alfresco.service.cmr.security.AccessStatus hasPermission(Reference reference, String perm) throws VirtualizationException
VirtualStore
hasPermission
in interface VirtualStore
AccessStatus
VirtualizationException
public org.alfresco.service.cmr.security.AccessStatus hasPermission(Reference reference, PermissionReference perm) throws VirtualizationException
VirtualStore
hasPermission
in interface VirtualStore
AccessStatus
VirtualizationException
public void setUserPermissions(VirtualUserPermissions userPermissions)
userPermissions
- user permissionspublic VirtualUserPermissions getUserPermissions()
VirtualUserPermissions
clonepublic NodePermissionEntry getSetPermissions(Reference reference) throws VirtualizationException
getSetPermissions
in interface VirtualStore
VirtualizationException
public Set<org.alfresco.service.cmr.security.AccessPermission> getAllSetPermissions(Reference reference)
getAllSetPermissions
in interface VirtualStore
public org.alfresco.service.cmr.repository.Path getPath(Reference reference) throws VirtualizationException
getPath
in interface VirtualStore
VirtualizationException
public org.alfresco.service.cmr.repository.NodeRef adhere(Reference reference, int mode) throws VirtualizationException
adhere
in interface VirtualStore
VirtualizationException
Copyright © 2005–2017 Alfresco Software. All rights reserved.