Class VirtualStoreImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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, java.util.Map<org.alfresco.service.namespace.QName,​java.io.Serializable> properties)  
      java.util.Set<org.alfresco.service.cmr.security.AccessPermission> getAllSetPermissions​(Reference reference)  
      java.util.List<org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssocs​(Reference parentReference, java.util.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.
      java.util.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.
      java.util.List<org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssocsByPropertyValue​(Reference parentReference, org.alfresco.service.namespace.QName propertyQName, java.io.Serializable value)
      Retrieve the immediate children of a given node based on the value of a property of those children.
      java.util.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, java.lang.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)  
      java.util.Map<org.alfresco.service.namespace.QName,​java.io.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, java.lang.String perm)
      Check that the given authentication has a particular permission for the given virtualized artefact.
      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.
      boolean isVirtual​(org.alfresco.service.cmr.repository.NodeRef nodeRef)  
      java.util.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, java.lang.String pattern, java.util.Set<org.alfresco.service.namespace.QName> ignoreTypeQNames, java.util.Set<org.alfresco.service.namespace.QName> ignoreAspectQNames, java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,​java.lang.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, java.lang.String pattern, java.util.Set<org.alfresco.service.namespace.QName> searchTypeQNames, java.util.Set<org.alfresco.service.namespace.QName> ignoreTypeQNames, java.util.Set<org.alfresco.service.namespace.QName> ignoreAspectQNames, java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,​java.lang.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, java.util.Set<org.alfresco.service.namespace.QName> searchTypeQNames, java.util.Set<org.alfresco.service.namespace.QName> ignoreTypeQNames, java.util.Set<org.alfresco.service.namespace.QName> ignoreAspectQNames, java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,​java.lang.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)  
      java.util.Collection<org.alfresco.service.cmr.repository.NodeRef> materializeIfPossible​(java.util.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)  
      java.util.List<Reference> search​(Reference reference, java.lang.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​(java.util.List<VirtualizationMethod> methdods)  
      Reference virtualize​(org.alfresco.service.cmr.repository.NodeRef nodeRef)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VirtualStoreImpl

        public VirtualStoreImpl()
    • Method Detail

      • setVirtualizationMethods

        public void setVirtualizationMethods​(java.util.List<VirtualizationMethod> methdods)
      • getChildAssocs

        public java.util.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
        Description copied from interface: VirtualStore
        Gets all child references associations where the pattern of the association qualified name is an exact match.
        Specified by:
        getChildAssocs in interface VirtualStore
        Parameters:
        parentReference - the parent node - usually a container
        typeQNamePattern - the qualified name of the association ( null to ignore)
        qnamePattern - the path qualified name (null to ignore)
        maxResults - the number of results to get
        preload - true if the nodes must be preloaded into the cache
        Returns:
        Returns a list of ChildAssociationRef instances
        Throws:
        org.alfresco.service.cmr.repository.InvalidNodeRefException - if the node could not be found
        See Also:
        QName
      • getChildAssocs

        public java.util.List<org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssocs​(Reference parentReference,
                                                                                                      java.util.Set<org.alfresco.service.namespace.QName> childNodeTypeQNames)
        Description copied from interface: VirtualStore
        Retrieve immediate children references of a given reference where the child nodes are in the given inclusive list.
        Specified by:
        getChildAssocs in interface VirtualStore
        Parameters:
        parentReference - the parent node - usually a container
        childNodeTypeQNames - the types that the children may be. Subtypes are not automatically calculated and the list must therefore be exhaustive.
        Returns:
        Returns a list of ChildAssociationRef instances.
      • getChildAssocsWithoutParentAssocsOfType

        public java.util.Collection<org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssocsWithoutParentAssocsOfType​(Reference parentReference,
                                                                                                                                     org.alfresco.service.namespace.QName assocTypeQName)
        Description copied from interface: VirtualStore
        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.
        Specified by:
        getChildAssocsWithoutParentAssocsOfType in interface VirtualStore
        assocTypeQName - the association type QName
        Returns:
        a Collection of child associations
      • getChildAssocsByPropertyValue

        public java.util.List<org.alfresco.service.cmr.repository.ChildAssociationRef> getChildAssocsByPropertyValue​(Reference parentReference,
                                                                                                                     org.alfresco.service.namespace.QName propertyQName,
                                                                                                                     java.io.Serializable value)
        Description copied from interface: VirtualStore
        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
        Specified by:
        getChildAssocsByPropertyValue in interface VirtualStore
        Parameters:
        parentReference - the parent reference - usually a container
        propertyQName - the fully qualified name of the property
        value - 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 ChildAssociationRef instances.
      • getChildByName

        public Reference getChildByName​(Reference reference,
                                        org.alfresco.service.namespace.QName assocTypeQName,
                                        java.lang.String childName)
                                 throws VirtualizationException
        Description copied from interface: VirtualStore
        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.
        Specified by:
        getChildByName in interface VirtualStore
        Parameters:
        reference - parent Reference
        Returns:
        the virtual child reference for the given name in the context of the given parent reference
        Throws:
        VirtualizationException
        See Also:
        NodeService.getChildByName(org.alfresco.service.cmr.repository.NodeRef, QName, String)
      • list

        public org.alfresco.query.PagingResults<Reference> list​(Reference ref,
                                                                boolean actual,
                                                                boolean virtual,
                                                                boolean files,
                                                                boolean folders,
                                                                java.lang.String pattern,
                                                                java.util.Set<org.alfresco.service.namespace.QName> searchTypeQNames,
                                                                java.util.Set<org.alfresco.service.namespace.QName> ignoreTypeQNames,
                                                                java.util.Set<org.alfresco.service.namespace.QName> ignoreAspectQNames,
                                                                java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,​java.lang.Boolean>> sortProps,
                                                                org.alfresco.query.PagingRequest pagingRequest)
                                                         throws VirtualizationException
        Description copied from interface: VirtualStore
        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
        Specified by:
        list in interface VirtualStore
        Throws:
        VirtualizationException
      • list

        public org.alfresco.query.PagingResults<Reference> list​(Reference ref,
                                                                boolean actual,
                                                                boolean virtual,
                                                                boolean files,
                                                                boolean folders,
                                                                java.lang.String pattern,
                                                                java.util.Set<org.alfresco.service.namespace.QName> ignoreTypeQNames,
                                                                java.util.Set<org.alfresco.service.namespace.QName> ignoreAspectQNames,
                                                                java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,​java.lang.Boolean>> sortProps,
                                                                org.alfresco.query.PagingRequest pagingRequest)
                                                         throws VirtualizationException
        Description copied from interface: VirtualStore
        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.
        Specified by:
        list in interface VirtualStore
        Throws:
        VirtualizationException
      • list

        public org.alfresco.query.PagingResults<Reference> list​(Reference ref,
                                                                boolean actual,
                                                                boolean virtual,
                                                                java.util.Set<org.alfresco.service.namespace.QName> searchTypeQNames,
                                                                java.util.Set<org.alfresco.service.namespace.QName> ignoreTypeQNames,
                                                                java.util.Set<org.alfresco.service.namespace.QName> ignoreAspectQNames,
                                                                java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,​java.lang.Boolean>> sortProps,
                                                                org.alfresco.query.PagingRequest pagingRequest)
                                                         throws VirtualizationException
        Description copied from interface: VirtualStore
        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.
        Specified by:
        list in interface VirtualStore
        Throws:
        VirtualizationException
      • search

        public java.util.List<Reference> search​(Reference reference,
                                                java.lang.String namePattern,
                                                boolean fileSearch,
                                                boolean folderSearch,
                                                boolean includeSubFolders)
                                         throws VirtualizationException
        Description copied from interface: VirtualStore
        Perform a search against the name of the files or folders within a virtualized artefact Reference hierarchy.
        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.
        Specified by:
        search in interface VirtualStore
        Throws:
        VirtualizationException
      • hasPermission

        public org.alfresco.service.cmr.security.AccessStatus hasPermission​(Reference reference,
                                                                            java.lang.String perm)
                                                                     throws VirtualizationException
        Description copied from interface: VirtualStore
        Check that the given authentication has a particular permission for the given virtualized artefact. (The default behaviour is to inherit permissions)
        Specified by:
        hasPermission in interface VirtualStore
        Returns:
        an AccessStatus
        Throws:
        VirtualizationException
      • setUserPermissions

        public void setUserPermissions​(VirtualUserPermissions userPermissions)
        Parameters:
        userPermissions - user permissions
      • getAllSetPermissions

        public java.util.Set<org.alfresco.service.cmr.security.AccessPermission> getAllSetPermissions​(Reference reference)
        Specified by:
        getAllSetPermissions in interface VirtualStore