org.alfresco.repo.model.filefolder
Class HiddenAspect

java.lang.Object
  extended by org.alfresco.repo.model.filefolder.HiddenAspect

public class HiddenAspect
extends java.lang.Object

Functionality relating to hidden files and folders. Support for nodes marked as hidden but with visibility constraints for specific clients. A node can have the hidden aspect applied, which means that the node is hidden. However, for specific clients it can be defined whether the node is visible or will have its hidden attribute set in FileInfo.


Nested Class Summary
static class HiddenAspect.Visibility
           
 
Constructor Summary
HiddenAspect()
           
 
Method Summary
 void checkHidden(FileInfoImpl fileInfo, boolean cascade)
          Checks whether the file should be hidden and applies the hidden and not indexed aspects if so.
 HiddenFileInfo checkHidden(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean cascade)
          Checks whether the file should be hidden and applies the hidden and not indexed aspects if so.
 void checkHidden(org.alfresco.service.cmr.repository.StoreRef storeRef)
          Searches for nodes in the given store that should be hidden (i.e.
 org.alfresco.util.FileFilterMode.Client[] getClients()
           
 int getClientVisibilityMask(org.alfresco.util.FileFilterMode.Client client, HiddenAspect.Visibility visibility)
           
 java.util.List getPatterns()
           
 HiddenAspect.Visibility getVisibility(org.alfresco.util.FileFilterMode.Client client, org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Gets the visibility constraint for the given client on the given node.
 void hideNode(FileInfoImpl fileInfo, int visibilityMask)
          Hides the node by applying the hidden and not indexed aspects.
 void hideNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Hides the node by applying the hidden and not indexed aspects.
 void hideNode(org.alfresco.service.cmr.repository.NodeRef nodeRef, int clientVisibilityMask)
          Hides the node by applying the hidden and not indexed aspects.
 HiddenFileInfo onHiddenPath(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Checks whether the node is on a hidden path
 void setFileFolderService(FileFolderService fileFolderService)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setPatterns(java.util.List filters)
           
 void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiddenAspect

public HiddenAspect()
Method Detail

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)

setFileFolderService

public void setFileFolderService(FileFolderService fileFolderService)

setSearchService

public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)

setPatterns

public void setPatterns(java.util.List filters)

getPatterns

public java.util.List getPatterns()

getClients

public org.alfresco.util.FileFilterMode.Client[] getClients()

checkHidden

public void checkHidden(org.alfresco.service.cmr.repository.StoreRef storeRef)
Searches for nodes in the given store that should be hidden (i.e. match the hidden pattern) and hides them if they are not already hidden.

Parameters:
storeRef -

getClientVisibilityMask

public int getClientVisibilityMask(org.alfresco.util.FileFilterMode.Client client,
                                   HiddenAspect.Visibility visibility)

onHiddenPath

public HiddenFileInfo onHiddenPath(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Checks whether the node is on a hidden path

Parameters:
nodeRef -
Returns:
the matching filter, or null if no match

hideNode

public void hideNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Hides the node by applying the hidden and not indexed aspects. The node will be hidden from all clients.

Parameters:
client -
fileInfo -

hideNode

public void hideNode(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                     int clientVisibilityMask)
Hides the node by applying the hidden and not indexed aspects. The node will be hidden from clients according to the visibility mask.

Parameters:
client -
fileInfo -

checkHidden

public void checkHidden(FileInfoImpl fileInfo,
                        boolean cascade)
Checks whether the file should be hidden and applies the hidden and not indexed aspects if so.

Parameters:
fileInfo -

hideNode

public void hideNode(FileInfoImpl fileInfo,
                     int visibilityMask)
Hides the node by applying the hidden and not indexed aspects. The node will be hidden from clients according to the visibility mask.

Parameters:
client -
fileInfo -

checkHidden

public HiddenFileInfo checkHidden(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                  boolean cascade)
Checks whether the file should be hidden and applies the hidden and not indexed aspects if so.

Parameters:
fileInfo -
Returns:

getVisibility

public HiddenAspect.Visibility getVisibility(org.alfresco.util.FileFilterMode.Client client,
                                             org.alfresco.service.cmr.repository.NodeRef nodeRef)
Gets the visibility constraint for the given client on the given node.

Parameters:
client -
nodeRef -
Returns:
the visibility constraint for the given client and node


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.