Package org.alfresco.repo.virtual.store
Interface VirtualStore
- All Known Implementing Classes:
VirtualStoreImpl
public interface VirtualStore
Interface for public and internal reference operations.
Handles most virtualized Reference meta-data interactions analogous
to actual Alfresco public Repository Services.
- Author:
- Bogdan Horje
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionbooleancanMaterialize(Reference reference) booleancanVirtualize(NodeRef nodeRef) createFilingData(Reference reference, QName assocTypeQName, QName assocQName, QName nodeTypeQName, Map<QName, Serializable> properties) getAllSetPermissions(Reference reference) getChildAssocs(Reference parentReference, Set<QName> childNodeTypeQNames) Retrieve immediate children references of a given reference where the child nodes are in the given inclusive list.getChildAssocs(Reference parentReference, QNamePattern typeQNamePattern, QNamePattern qnamePattern, int maxResults, boolean preload) Gets all child references associations where the pattern of the association qualified name is an exact match.getChildAssocsByPropertyValue(Reference parentReference, QName propertyQName, Serializable value) Retrieve the immediate children of a given node based on the value of a property of those children.getChildAssocsWithoutParentAssocsOfType(Reference parentReference, 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!getChildByName(Reference parentReference, 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.getProperties(Reference reference) getSetPermissions(Reference reference) hasPermission(Reference reference, String perm) Check that the given authentication has a particular permission for the given virtualized artefact.hasPermission(Reference reference, PermissionReference perm) Check that the given authentication has a particular permission for the given virtualized artefact.booleanLists 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<QName> ignoreTypeQNames, Set<QName> ignoreAspectQNames, List<Pair<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<QName> searchTypeQNames, Set<QName> ignoreTypeQNames, Set<QName> ignoreAspectQNames, List<Pair<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 wildcardorg.alfresco.query.PagingResults<Reference>list(Reference ref, boolean actual, boolean virtual, Set<QName> searchTypeQNames, Set<QName> ignoreTypeQNames, Set<QName> ignoreAspectQNames, List<Pair<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.materialize(Reference reference) materializeIfPossible(Collection<NodeRef> nodeRefs) materializeIfPossible(NodeRef nodeRef) search(Reference reference, String namePattern, boolean fileSearch, boolean folderSearch, boolean includeSubFolders) Deprecated.virtualize(NodeRef nodeRef)
-
Field Details
-
MATERIAL_ADHERENCE
static final int MATERIAL_ADHERENCE- See Also:
-
FILING_OR_MATERIAL_ADHERENCE
static final int FILING_OR_MATERIAL_ADHERENCE- See Also:
-
-
Method Details
-
materializeIfPossible
Collection<NodeRef> materializeIfPossible(Collection<NodeRef> nodeRefs) throws VirtualizationException - Throws:
VirtualizationException
-
materializeIfPossible
- Throws:
VirtualizationException
-
isVirtual
- Throws:
VirtualizationException
-
canVirtualize
- Throws:
VirtualizationException
-
virtualize
- Throws:
VirtualizationException
-
materialize
- Throws:
VirtualizationException
-
adhere
- Throws:
VirtualizationException
-
canMaterialize
- Throws:
VirtualizationException
-
getPath
- Throws:
VirtualizationException
-
getProperties
- Parameters:
reference-- Returns:
- all virtual properties of the referred virtualized artefact keyed by their qualified name
- Throws:
VirtualizationException
-
getChildByName
Reference getChildByName(Reference parentReference, QName assocTypeQName, String childName) throws VirtualizationException 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.- Parameters:
parentReference- parentReferenceassocTypeQName-childName-- Returns:
- the virtual child reference for the given name in the context of the given parent reference
- Throws:
VirtualizationException- See Also:
-
getChildAssocs
Retrieve immediate children references of a given reference where the child nodes are in the given inclusive list.- Parameters:
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.- Returns:
- Returns a list of
ChildAssociationRefinstances.
-
getChildAssocs
List<ChildAssociationRef> getChildAssocs(Reference parentReference, QNamePattern typeQNamePattern, QNamePattern qnamePattern, int maxResults, boolean preload) throws InvalidNodeRefException Gets all child references associations where the pattern of the association qualified name is an exact match.- Parameters:
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 cache- Returns:
- Returns a list of
ChildAssociationRefinstances - Throws:
InvalidNodeRefException- if the node could not be found- See Also:
-
getChildAssocsByPropertyValue
List<ChildAssociationRef> getChildAssocsByPropertyValue(Reference parentReference, QName propertyQName, Serializable value) Retrieve the immediate children of a given node based on the value of a property of those children.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.
- cm:name - use getChildByName instead
- cm:created
- cm:creator
- cm:modified
- cm:modifier
- sys:node-uuid
- sys:node-dbid
- sys:store-identifier
- sys:store-protocol
- Parameters:
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.- Returns:
- Returns a list of
ChildAssociationRefinstances.
-
getChildAssocsWithoutParentAssocsOfType
Collection<ChildAssociationRef> getChildAssocsWithoutParentAssocsOfType(Reference parentReference, 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.- Parameters:
parent- the parent referenceassocTypeQName- the association type QName- Returns:
- a
Collectionof child associations
-
list
org.alfresco.query.PagingResults<Reference> list(Reference ref, boolean actual, boolean virtual, boolean files, boolean folders, String pattern, Set<QName> searchTypeQNames, Set<QName> ignoreTypeQNames, Set<QName> ignoreAspectQNames, List<Pair<QName, Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest) throws VirtualizationExceptionLists 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- Parameters:
ref-actual-virtual-files-folders-pattern-ignoreQNames-searchTypeQNames-ignoreAspectQNames-sortProps-pagingRequest-- Throws:
VirtualizationException
-
list
org.alfresco.query.PagingResults<Reference> list(Reference ref, boolean actual, boolean virtual, boolean files, boolean folders, String pattern, Set<QName> ignoreTypeQNames, Set<QName> ignoreAspectQNames, List<Pair<QName, Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest) throws VirtualizationExceptionLists page of immediate children of the referred virtualized artefact with optional filtering (exclusion of certain child file/folder subtypes, actual-virtual filtering) and sorting.- Parameters:
ref-actual-virtual-files-folders-pattern-ignoreQNames-sortProps-pagingRequest-- Throws:
VirtualizationException
-
list
org.alfresco.query.PagingResults<Reference> list(Reference ref, boolean actual, boolean virtual, Set<QName> searchTypeQNames, Set<QName> ignoreTypeQNames, Set<QName> ignoreAspectQNames, List<Pair<QName, Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest) throws VirtualizationExceptionLists page of immediate children of the referred virtualized artefact with optional filtering (exclusion of certain child file/folder subtypes, actual-virtual filtering) and sorting.- Throws:
VirtualizationException
-
list
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). You should consider using a paging request.- Parameters:
reference-- Throws:
VirtualizationException
-
search
List<Reference> search(Reference reference, String namePattern, boolean fileSearch, boolean folderSearch, boolean includeSubFolders) throws VirtualizationException Deprecated.FileFolderService.search(NodeRef, String, boolean, boolean, boolean)alignment : for shallow search use list, listFolders, listFiles, searchSimple. For deep listing use listDeepFolders. Avoid calling this method with any name pattern except for "*".Perform a search against the name of the files or folders within a virtualized artefactReferencehierarchy.
Wildcard characters are * and ?.
Warning: Please avoid using this method with any "namePattern" other than "*". Although it works, its performance is poor which is why this method is deprecated.- Parameters:
reference-namePattern-fileSearch-folderSearch-includeSubFolders-- Throws:
VirtualizationException
-
getType
- Parameters:
reference-- Returns:
- qualified type of the referred virtualized artefact
- Throws:
VirtualizationException
-
createFilingData
FilingData createFilingData(Reference reference, QName assocTypeQName, QName assocQName, QName nodeTypeQName, Map<QName, Serializable> properties) throws VirtualizationException- Parameters:
reference-assocTypeQName-assocQName-nodeTypeQName-properties-- Returns:
FilingDataof the given parent location- Throws:
VirtualizationException
-
hasPermission
Check that the given authentication has a particular permission for the given virtualized artefact. (The default behaviour is to inherit permissions)- Parameters:
reference-perm-- Returns:
- an
AccessStatus - Throws:
VirtualizationException
-
hasPermission
AccessStatus hasPermission(Reference reference, PermissionReference perm) throws VirtualizationException Check that the given authentication has a particular permission for the given virtualized artefact. (The default behaviour is to inherit permissions)- Parameters:
reference-perm-- Returns:
- an
AccessStatus - Throws:
VirtualizationException
-
getSetPermissions
- Throws:
VirtualizationException
-
getAllSetPermissions
-
FileFolderService.search(NodeRef, String, boolean, boolean, boolean)alignment : for shallow search use list, listFolders, listFiles, searchSimple.