Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.repo.model.filefolder
Class HiddenAspect
java.lang.Object
  org.alfresco.repo.model.filefolder.HiddenAspect

@org.alfresco.api.AlfrescoPublicApi
public class HiddenAspect
extends 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.

Field Summary
static Set<QName>
HIDDEN_PROPERTIES
Constructor Summary
HiddenAspect()
Method Summary
boolean
checkHidden(FileInfo fileInfo, boolean both, boolean checkChildren)
          Checks whether the file should be hidden and applies the hidden and not indexed aspects if so.
boolean
checkHidden(NodeRef nodeRef, boolean both, boolean checkChildren)
          Checks whether the file should be hidden and applies the hidden and not indexed aspects to it and its children (if cascadeHidden == true).
void
checkHidden(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, org.alfresco.repo.model.filefolder.HiddenAspect.Visibility visibility)
          getClientVisibilityMap
List<org.alfresco.repo.model.filefolder.HiddenFileInfo>
getPatterns()
org.alfresco.repo.model.filefolder.HiddenAspect.Visibility
getVisibility(org.alfresco.util.FileFilterMode.Client client, NodeRef nodeRef)
          Gets the visibility constraint for the given client on the given node.
boolean
hasHiddenAspect(NodeRef nodeRef)
void
hideNode(org.alfresco.repo.model.filefolder.FileInfoImpl fileInfo, int visibilityMask, boolean cascadeHiddenAspect, boolean cascadeIndexControlAspect, boolean clientControlled)
          Hides the node by applying the hidden and not indexed aspects.
void
hideNode(NodeRef nodeRef, boolean cascadeHiddenAspect, boolean cascadeIndexControlAspect, boolean clientControlled)
          Hides the node by applying the hidden and not indexed aspects.
void
hideNode(NodeRef nodeRef, int clientVisibilityMask, boolean cascadeHiddenAspect, boolean cascadeIndexControlAspect, boolean clientControlled)
          Hides the node by applying the hidden and not indexed aspects.
void
hideNodeExplicit(NodeRef nodeRef)
          Mark this node as hidden regardless of any name/pattern/matching rules.
void
init()
boolean
isClientControlled(NodeRef nodeRef)
org.alfresco.repo.model.filefolder.HiddenFileInfo
onHiddenPath(NodeRef nodeRef)
          Checks whether the node is on a hidden path
void
removeHidden(NodeRef nodeRef)
void
removeHiddenAspect(NodeRef nodeRef)
void
setBehaviourFilter(BehaviourFilter behaviourFilter)
void
setFileFolderService(FileFolderService fileFolderService)
void
setNodeService(NodeService nodeService)
void
setPatterns(List<org.alfresco.repo.model.filefolder.HiddenFileFilter> filters)
void
setPolicyComponent(PolicyComponent policyComponent)
void
setSearchService(SearchService searchService)
void
showNode(NodeRef nodeRef, boolean cascade)
          Removes the hidden and index contol aspect.
void
unhideExplicit(NodeRef nodeRef)
          Remove the explicit hiding of a node.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
HIDDEN_PROPERTIES
public static Set<QName> HIDDEN_PROPERTIES
Constructor Detail
HiddenAspect
public HiddenAspect()
Method Detail
setBehaviourFilter
public void setBehaviourFilter(BehaviourFilter behaviourFilter)

setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)

setNodeService
public void setNodeService(NodeService nodeService)

setFileFolderService
public void setFileFolderService(FileFolderService fileFolderService)

setSearchService
public void setSearchService(SearchService searchService)

setPatterns
public void setPatterns(List<org.alfresco.repo.model.filefolder.HiddenFileFilter> filters)

init
public void init()

getPatterns
public List<org.alfresco.repo.model.filefolder.HiddenFileInfo> getPatterns()

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

hideNodeExplicit
public void hideNodeExplicit(NodeRef nodeRef)
Mark this node as hidden regardless of any name/pattern/matching rules. Following this call the node will be hidden. If the node is already hidden will do nothing.
Parameters:
nodeRef - NodeRef

unhideExplicit
public void unhideExplicit(NodeRef nodeRef)
Remove the explicit hiding of a node. Following this call the node may or may not remain hidden based upon the other properties of the node.
Parameters:
nodeRef - NodeRef

removeHiddenAspect
public void removeHiddenAspect(NodeRef nodeRef)

hasHiddenAspect
public boolean hasHiddenAspect(NodeRef nodeRef)

removeHidden
public void removeHidden(NodeRef nodeRef)

getClientVisibilityMask
public int getClientVisibilityMask(org.alfresco.util.FileFilterMode.Client client,
                                   org.alfresco.repo.model.filefolder.HiddenAspect.Visibility visibility)
getClientVisibilityMap
Parameters:
client - Client
visibility - Visibility
Returns:
the client visibilityMask

onHiddenPath
public org.alfresco.repo.model.filefolder.HiddenFileInfo onHiddenPath(NodeRef nodeRef)
Checks whether the node is on a hidden path
Parameters:
nodeRef - NodeRef
Returns:
the matching filter, or null if no match

hideNode
public void hideNode(NodeRef nodeRef,
                     boolean cascadeHiddenAspect,
                     boolean cascadeIndexControlAspect,
                     boolean clientControlled)
Hides the node by applying the hidden and not indexed aspects. The node will be hidden from all clients.
Parameters:
nodeRef - nodeRef
cascadeHiddenAspect - boolean
cascadeIndexControlAspect - boolean
clientControlled - boolean

showNode
public void showNode(NodeRef nodeRef,
                     boolean cascade)
Removes the hidden and index contol aspect. Reverses the effect of calling hideNode(NodeRef nodeRef)
Parameters:
nodeRef - the node to show
cascade - true to cascade to all descendents of this node

hideNode
public void hideNode(NodeRef nodeRef,
                     int clientVisibilityMask,
                     boolean cascadeHiddenAspect,
                     boolean cascadeIndexControlAspect,
                     boolean clientControlled)
Hides the node by applying the hidden and not indexed aspects. The node will be hidden from clients according to the visibility mask.
Parameters:
nodeRef - the node to hide
clientVisibilityMask - int
cascadeHiddenAspect - boolean
cascadeIndexControlAspect - boolean
clientControlled - boolean

checkHidden
public void checkHidden(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 - StoreRef

checkHidden
public boolean checkHidden(FileInfo fileInfo,
                           boolean both,
                           boolean checkChildren)
Checks whether the file should be hidden and applies the hidden and not indexed aspects if so.
Parameters:
fileInfo - FileInfo
both - if true, will check if the node should not be hidden and remove hidden and index control aspects if they are present
checkChildren - boolean
Returns:
boolean

hideNode
public void hideNode(org.alfresco.repo.model.filefolder.FileInfoImpl fileInfo,
                     int visibilityMask,
                     boolean cascadeHiddenAspect,
                     boolean cascadeIndexControlAspect,
                     boolean clientControlled)
Hides the node by applying the hidden and not indexed aspects. The node will be hidden from clients according to the visibility mask.
Parameters:
fileInfo - file to make hidden
visibilityMask - int
cascadeHiddenAspect - boolean
cascadeIndexControlAspect - boolean
clientControlled - boolean

isClientControlled
public boolean isClientControlled(NodeRef nodeRef)

checkHidden
public boolean checkHidden(NodeRef nodeRef,
                           boolean both,
                           boolean checkChildren)
Checks whether the file should be hidden and applies the hidden and not indexed aspects to it and its children (if cascadeHidden == true). The visibility mask property will determine visibility for specific clients.

Can optionally remove the hidden and index control aspects if the name of a node no longer matches the filter.

Parameters:
nodeRef - NodeRef
both - if true, will check both if the node should not be hidden and remove hidden and index control aspects if they are present, and if the node should be hidden and add hidden and index control aspects if they are not present.
checkChildren - boolean
Returns:
true if the node is hidden, irrespective of the clientVisibility property value.

getVisibility
public org.alfresco.repo.model.filefolder.HiddenAspect.Visibility getVisibility(org.alfresco.util.FileFilterMode.Client client,
                                                                                NodeRef nodeRef)
Gets the visibility constraint for the given client on the given node.
Parameters:
client - Client
nodeRef - NodeRef
Returns:
the visibility constraint for the given client and node

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2018 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.