org.alfresco.web.bean.ajax
Class NavigatorPluginBean

java.lang.Object
  extended by org.alfresco.web.bean.ajax.NavigatorPluginBean
All Implemented Interfaces:
java.io.Serializable, IContextListener

public class NavigatorPluginBean
extends java.lang.Object
implements IContextListener, java.io.Serializable

Bean used by the navigator component to manage the tree data.

See Also:
Serialized Form

Field Summary
static java.lang.String BEAN_NAME
           
protected  java.util.Map companyHomeNodes
           
protected  java.util.List companyHomeRootNodes
           
protected  java.util.Map guestHomeNodes
           
protected  java.util.List guestHomeRootNodes
           
protected  java.util.Map myHomeNodes
           
protected  java.util.List myHomeRootNodes
           
protected  org.alfresco.service.cmr.repository.NodeRef previouslySelectedNode
           
 
Constructor Summary
NavigatorPluginBean()
           
 
Method Summary
 void areaChanged()
          Method called by UIContextService.areaChanged() to inform all registered beans that the user has changed area i.e.
 void contextUpdated()
          Method called by UIContextService.notifyBeans() to inform all registered beans that all UI Beans should refresh dump all cached data and settings.
protected  UITree.TreeNode createTreeNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Creates a TreeNode object from the given NodeRef
protected  BrowseBean getBrowseBean()
          Retrieves the instance of the BrowseBean being used by the application
 java.util.List getCompanyHomeRootNodes()
          Returns the root nodes for the company home panel.
 java.util.List getGuestHomeRootNodes()
          Returns the root nodes for the guest home panel.
 java.util.List getMyHomeRootNodes()
          Returns the root nodes for the my home panel.
protected  NavigationBean getNavigationBean()
          Retrieves the instance of the NavigationBean being used by the application
protected  java.util.Map getNodesMapForArea(java.lang.String area)
          Returns the map of tree nodes for the given area
protected  boolean isAddableChild(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Determines whether the given NodeRef can be added to the tree as a child for example, if it's a folder.
 void nodeCollapsed()
          Sets the state of the node given in the 'nodeRef' parameter to collapsed
 void reset()
          Resets all the caches held by the bean.
 void resetSelectedNode()
          Resets the selected node
 void retrieveChildren()
          Retrieves the child folders for the noderef given in the 'noderef' parameter and caches the nodes against the area in the 'area' parameter.
 void selectNode(org.alfresco.service.cmr.repository.NodeRef selectedNode, java.lang.String area)
          Sets the currently selected node in the tree
 void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
           
 void setInternalNodeService(org.alfresco.service.cmr.repository.NodeService internalNodeService)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void spaceChanged()
          Method called by UIContextService.spaceChanged() to inform all registered beans that the current space has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_NAME

public static final java.lang.String BEAN_NAME
See Also:
Constant Field Values

companyHomeRootNodes

protected java.util.List companyHomeRootNodes

myHomeRootNodes

protected java.util.List myHomeRootNodes

guestHomeRootNodes

protected java.util.List guestHomeRootNodes

companyHomeNodes

protected java.util.Map companyHomeNodes

myHomeNodes

protected java.util.Map myHomeNodes

guestHomeNodes

protected java.util.Map guestHomeNodes

previouslySelectedNode

protected org.alfresco.service.cmr.repository.NodeRef previouslySelectedNode
Constructor Detail

NavigatorPluginBean

public NavigatorPluginBean()
Method Detail

retrieveChildren

public void retrieveChildren()
                      throws java.io.IOException
Retrieves the child folders for the noderef given in the 'noderef' parameter and caches the nodes against the area in the 'area' parameter.

Throws:
java.io.IOException

nodeCollapsed

public void nodeCollapsed()
                   throws java.io.IOException
Sets the state of the node given in the 'nodeRef' parameter to collapsed

Throws:
java.io.IOException

contextUpdated

public void contextUpdated()
Description copied from interface: IContextListener
Method called by UIContextService.notifyBeans() to inform all registered beans that all UI Beans should refresh dump all cached data and settings.

Specified by:
contextUpdated in interface IContextListener
See Also:
IContextListener.contextUpdated()

areaChanged

public void areaChanged()
Description copied from interface: IContextListener
Method called by UIContextService.areaChanged() to inform all registered beans that the user has changed area i.e. from company home to my home.

Specified by:
areaChanged in interface IContextListener
See Also:
IContextListener.areaChanged()

spaceChanged

public void spaceChanged()
Description copied from interface: IContextListener
Method called by UIContextService.spaceChanged() to inform all registered beans that the current space has changed.

Specified by:
spaceChanged in interface IContextListener
See Also:
IContextListener.spaceChanged()

getCompanyHomeRootNodes

public java.util.List getCompanyHomeRootNodes()
Returns the root nodes for the company home panel.

As the user expands and collapses nodes in the client this cache will be updated with the appropriate nodes and states.

Returns:
List of root nodes for the company home panel

getMyHomeRootNodes

public java.util.List getMyHomeRootNodes()
Returns the root nodes for the my home panel.

As the user expands and collapses nodes in the client this cache will be updated with the appropriate nodes and states.

Returns:
List of root nodes for the my home panel

getGuestHomeRootNodes

public java.util.List getGuestHomeRootNodes()
Returns the root nodes for the guest home panel.

As the user expands and collapses nodes in the client this cache will be updated with the appropriate nodes and states.

Returns:
List of root nodes for the guest home panel

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Parameters:
nodeService - The NodeService to set.

setInternalNodeService

public void setInternalNodeService(org.alfresco.service.cmr.repository.NodeService internalNodeService)
Parameters:
internalNodeService - The internalNodeService to set.

setDictionaryService

public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Parameters:
dictionaryService - The DictionaryService to set.

selectNode

public void selectNode(org.alfresco.service.cmr.repository.NodeRef selectedNode,
                       java.lang.String area)
Sets the currently selected node in the tree

Parameters:
selectedNode - The node that has been selected

resetSelectedNode

public void resetSelectedNode()
Resets the selected node


reset

public void reset()
Resets all the caches held by the bean.


isAddableChild

protected boolean isAddableChild(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Determines whether the given NodeRef can be added to the tree as a child for example, if it's a folder.

Parameters:
nodeRef - The NodeRef to check
Returns:
true if the node should be added to the tree

createTreeNode

protected UITree.TreeNode createTreeNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Creates a TreeNode object from the given NodeRef

Parameters:
nodeRef - The NodeRef to create the TreeNode from

getNavigationBean

protected NavigationBean getNavigationBean()
Retrieves the instance of the NavigationBean being used by the application

Returns:
NavigationBean instance

getBrowseBean

protected BrowseBean getBrowseBean()
Retrieves the instance of the BrowseBean being used by the application

Returns:
BrowseBean instance

getNodesMapForArea

protected java.util.Map getNodesMapForArea(java.lang.String area)
Returns the map of tree nodes for the given area

Parameters:
area - The area to retrieve the map for
Returns:
The map of nodes


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