org.alfresco.web.bean
Class NavigationBean

java.lang.Object
  extended by org.alfresco.web.bean.NavigationBean
All Implemented Interfaces:
java.io.Serializable

public class NavigationBean
extends java.lang.Object
implements java.io.Serializable

Bean providing access and management of the various global navigation mechanisms such as the My Home, Company Home, Guest Home toolbar shortcuts, breadcrumb and the current node id and associated properties.

See Also:
Serialized Form

Nested Class Summary
 class NavigationBean.NavigationBreadcrumbHandler
          Class to handle breadcrumb interaction for top-level navigation pages
 
Field Summary
static java.lang.String BEAN_NAME
          Public JSF Bean name
protected  ClientConfigElement clientConfig
          Client configuration object
protected  org.alfresco.filesys.repo.ContentDiskInterface contentDiskDriver
          CIFS content disk driver bean reference
static java.lang.String LOCATION_COMPANY
          constant values used by the toolbar location modelist control
static java.lang.String LOCATION_GUEST
           
static java.lang.String LOCATION_HOME
           
static java.lang.String LOCATION_MYALFRESCO
           
static java.lang.String MSG_COMPANYHOME
           
static java.lang.String MSG_GUESTHOME
           
static java.lang.String MSG_MYALFRESCO
          constant value representing the display lables for toolbar locations
static java.lang.String MSG_MYHOME
           
 
Constructor Summary
NavigationBean()
          Default constructor
 
Method Summary
protected  org.alfresco.service.cmr.security.MutableAuthenticationService getAuthService()
           
 java.lang.String getCIFSServerPath(org.alfresco.jlan.server.filesys.DiskSharedDevice diskShare)
           
protected  ClientConfigElement getClientConfig()
           
 Node getCompanyHomeNode()
           
 boolean getCompanyHomeVisible()
           
 Node getCurrentNode()
           
 java.lang.String getCurrentNodeId()
           
 java.lang.String getCurrentNodeTemplate()
           
 java.lang.String getCurrentNodeWebscript()
           
 User getCurrentUser()
           
 Node getDispatchContextNode()
          Returns the node currently set in the dispatch context
 Node getGuestHomeNode()
           
 boolean getGuestHomeVisible()
           
 boolean getHasCustomView()
           
 boolean getHasTemplateView()
           
 boolean getHasWebscriptView()
           
 java.lang.String getHelpUrl()
           
 boolean getInPortalServer()
           
 boolean getIsGuest()
           
 java.util.List getLocation()
           
protected  org.alfresco.service.namespace.NamespaceService getNamespaceService()
           
 java.util.Map getNodeProperties()
           
protected  org.alfresco.service.cmr.repository.NodeService getNodeService()
           
protected  org.alfresco.service.cmr.security.PermissionService getPermissionService()
           
 org.alfresco.service.cmr.admin.RepoAdminService getRepoAdminService()
           
 java.lang.String getRSSFeedURL()
           
 int getRuleCount()
           
protected  org.alfresco.service.cmr.rule.RuleService getRuleService()
           
 SearchContext getSearchContext()
           
protected  org.alfresco.service.cmr.search.SearchService getSearchService()
           
protected  org.alfresco.jlan.server.config.ServerConfigurationAccessor getServerConfiguration()
           
 boolean[] getShelfItemExpanded()
           
 java.util.Map getTemplateModel()
          Returns a model for use by a template on a space Dashboard page.
 java.lang.String getToolbarLocation()
           
 java.lang.String getWorkAreaWidth()
          Return the width of the main work area depending on the visibility of the Shelf panel
 boolean isAllowUserChangePassword()
           
 boolean isAllowUserConfig()
           
 boolean isAllowUserGroupAdmin()
           
 boolean isCreateChildrenPermissionEnabled()
           
 boolean isRSSFeed()
           
 boolean isShelfExpanded()
          Return the expanded state of the Shelf panel wrapper component
 boolean isTeamMode()
           
 void processToolbarLocation(java.lang.String location, boolean navigate)
          Process the selected toolbar location.
 void resetCurrentNodeProperties()
          Clear state so that the current node properties cache for the next time they are requested
 void resetDispatchContext()
          Resets the dispatch context
 void setAuthenticationService(org.alfresco.service.cmr.security.MutableAuthenticationService authService)
           
 void setContentDiskDriver(org.alfresco.filesys.repo.ContentDiskInterface contentDiskDriver)
           
 void setCurrentNodeId(java.lang.String currentNodeId)
          Set the node Id of the current folder/space container node.
 void setHelpUrl(java.lang.String helpUrl)
           
 void setLocation(java.util.List location)
           
 void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
           
 void setRepoAdminService(org.alfresco.service.cmr.admin.RepoAdminService repoAdminService)
           
 void setRuleService(org.alfresco.service.cmr.rule.RuleService ruleService)
           
 void setSearchContext(SearchContext searchContext)
           
 void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
           
 void setServerConfiguration(org.alfresco.jlan.server.config.ServerConfigurationAccessor serverConfiguration)
           
 void setShelfExpanded(boolean expanded)
          Set the expanded state of the Shelf panel wrapper component
 void setShelfItemExpanded(boolean[] shelfItemExpanded)
           
 void setToolbarLocation(java.lang.String location)
           
 void setupDispatchContext(Node node)
          Sets up the dispatch context so that the navigation handler knows what object is being acted upon
 void setUserPreferencesBean(UserPreferencesBean preferences)
           
 void shelfGroupToggled(javax.faces.event.ActionEvent event)
          Action handler called after a Shelf Group has had its expanded state toggled by the user
 void toggleShelf(javax.faces.event.ActionEvent event)
          Action handler to toggle the expanded state of the shelf.
 void toolbarLocationChanged(javax.faces.event.ActionEvent event)
          Action to change the toolbar location Currently this will changed the location from Company to the users Home space
 
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
Public JSF Bean name

See Also:
Constant Field Values

LOCATION_COMPANY

public static final java.lang.String LOCATION_COMPANY
constant values used by the toolbar location modelist control

See Also:
Constant Field Values

LOCATION_HOME

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

LOCATION_GUEST

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

LOCATION_MYALFRESCO

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

MSG_MYALFRESCO

public static final java.lang.String MSG_MYALFRESCO
constant value representing the display lables for toolbar locations

See Also:
Constant Field Values

MSG_MYHOME

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

MSG_COMPANYHOME

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

MSG_GUESTHOME

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

contentDiskDriver

protected org.alfresco.filesys.repo.ContentDiskInterface contentDiskDriver
CIFS content disk driver bean reference


clientConfig

protected ClientConfigElement clientConfig
Client configuration object

Constructor Detail

NavigationBean

public NavigationBean()
Default constructor

Method Detail

setNodeService

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

getNodeService

protected org.alfresco.service.cmr.repository.NodeService getNodeService()

setSearchService

public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Parameters:
searchService - The searchService to set.

getSearchService

protected org.alfresco.service.cmr.search.SearchService getSearchService()

setNamespaceService

public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
Parameters:
namespaceService - The namespaceService to set.

getNamespaceService

protected org.alfresco.service.namespace.NamespaceService getNamespaceService()

setRepoAdminService

public void setRepoAdminService(org.alfresco.service.cmr.admin.RepoAdminService repoAdminService)

getRepoAdminService

public org.alfresco.service.cmr.admin.RepoAdminService getRepoAdminService()

setRuleService

public void setRuleService(org.alfresco.service.cmr.rule.RuleService ruleService)
Parameters:
ruleService - The ruleService to use

getRuleService

protected org.alfresco.service.cmr.rule.RuleService getRuleService()

setServerConfiguration

public void setServerConfiguration(org.alfresco.jlan.server.config.ServerConfigurationAccessor serverConfiguration)
Parameters:
serverConfiguration - The serverConfiguration to set.

getServerConfiguration

protected org.alfresco.jlan.server.config.ServerConfigurationAccessor getServerConfiguration()

setContentDiskDriver

public void setContentDiskDriver(org.alfresco.filesys.repo.ContentDiskInterface contentDiskDriver)
Parameters:
contentDiskDriver - The contentDiskDriver to set.

getClientConfig

protected ClientConfigElement getClientConfig()

setUserPreferencesBean

public void setUserPreferencesBean(UserPreferencesBean preferences)
Parameters:
preferences - The UserPreferencesBean to set

setAuthenticationService

public void setAuthenticationService(org.alfresco.service.cmr.security.MutableAuthenticationService authService)
Parameters:
authService - The AuthenticationService to set.

getAuthService

protected org.alfresco.service.cmr.security.MutableAuthenticationService getAuthService()

setPermissionService

public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
Parameters:
permissionService - The PermissionService to set.

getPermissionService

protected org.alfresco.service.cmr.security.PermissionService getPermissionService()

getCurrentUser

public User getCurrentUser()
Returns:
the User object representing the current instance for this user

getInPortalServer

public boolean getInPortalServer()
Returns:
true if the system is running within a JSR-168 portal container

isShelfExpanded

public boolean isShelfExpanded()
Return the expanded state of the Shelf panel wrapper component

Returns:
the expanded state of the Shelf panel wrapper component

setShelfExpanded

public void setShelfExpanded(boolean expanded)
Set the expanded state of the Shelf panel wrapper component

Parameters:
expanded - true to expanded the Shelf panel area, false to hide it

getWorkAreaWidth

public java.lang.String getWorkAreaWidth()
Return the width of the main work area depending on the visibility of the Shelf panel

Returns:
width, which will either be "80%" or "100%"

getShelfItemExpanded

public boolean[] getShelfItemExpanded()
Returns:
Returns the array containing the expanded state of the shelf items

setShelfItemExpanded

public void setShelfItemExpanded(boolean[] shelfItemExpanded)
Parameters:
shelfItemExpanded - The array containing the expanded state of the shelf items

getToolbarLocation

public java.lang.String getToolbarLocation()
Returns:
Returns the toolbar Location - initially set from the user preferences.

setToolbarLocation

public void setToolbarLocation(java.lang.String location)
Parameters:
location - The toolbar Location to set.

processToolbarLocation

public void processToolbarLocation(java.lang.String location,
                                   boolean navigate)
Process the selected toolbar location. Setup the breadcrumb with initial value and setup the current node ID. This method can also perform the navigatin setup if requested.

Parameters:
location - Toolbar location constant
navigate - True to perform navigation, false otherwise

getHelpUrl

public java.lang.String getHelpUrl()
Returns:
Returns the helpUrl.

setHelpUrl

public void setHelpUrl(java.lang.String helpUrl)
Parameters:
helpUrl - The helpUrl to set.

getRuleCount

public int getRuleCount()
Returns:
the number of rules associated with the current space

getSearchContext

public SearchContext getSearchContext()
Returns:
Returns the search context object if any.

setSearchContext

public void setSearchContext(SearchContext searchContext)
Parameters:
searchContext - The search context object to set or null to clear search.

getCurrentNodeId

public java.lang.String getCurrentNodeId()
Returns:
Returns the currently browsing node Id.

setCurrentNodeId

public void setCurrentNodeId(java.lang.String currentNodeId)
Set the node Id of the current folder/space container node.

Setting this value causes the UI to update and display the specified node as current.

Parameters:
currentNodeId - The currently browsing node Id.

getHasCustomView

public boolean getHasCustomView()
Returns:
true if the current node has a custom view available

getHasTemplateView

public boolean getHasTemplateView()
Returns:
true if the current node has a Template based custom view available

getHasWebscriptView

public boolean getHasWebscriptView()
Returns:
true if the current node has a Webscript based custom view available

getCurrentNodeTemplate

public java.lang.String getCurrentNodeTemplate()
Returns:
the NodeRef.toString() for the current node Template custom view if it has one

getCurrentNodeWebscript

public java.lang.String getCurrentNodeWebscript()
Returns:
the service url for the current node Webscript custom view if it has one

getTemplateModel

public java.util.Map getTemplateModel()
Returns a model for use by a template on a space Dashboard page.

Returns:
model containing current current space info.

resetCurrentNodeProperties

public void resetCurrentNodeProperties()
Clear state so that the current node properties cache for the next time they are requested


getNodeProperties

public java.util.Map getNodeProperties()
Returns:
The Map of properties for the current Node.

getCurrentNode

public Node getCurrentNode()
Returns:
The current Node object for UI context operations

isCreateChildrenPermissionEnabled

public boolean isCreateChildrenPermissionEnabled()
Returns:
Boolean value according to CREATE_CHILDREN permission on the current node.

getLocation

public java.util.List getLocation()
Returns:
Returns the breadcrumb handler elements representing the location path of the UI.

setLocation

public void setLocation(java.util.List location)
Parameters:
location - The UI location representation to set.

getIsGuest

public boolean getIsGuest()
Returns:
true if we are currently the special Guest user

setupDispatchContext

public void setupDispatchContext(Node node)
Sets up the dispatch context so that the navigation handler knows what object is being acted upon

Parameters:
node - The node to be added to the dispatch context

resetDispatchContext

public void resetDispatchContext()
Resets the dispatch context


getDispatchContextNode

public Node getDispatchContextNode()
Returns the node currently set in the dispatch context

Returns:
The node being dispatched or null if there is no dispatch context

getCompanyHomeNode

public Node getCompanyHomeNode()
Returns:
Node representing the Company Home folder

getGuestHomeNode

public Node getGuestHomeNode()
Returns:
Node representing the Guest Home Space folder

getCompanyHomeVisible

public boolean getCompanyHomeVisible()
Returns:
true if the Company home node is accessible to the current user

getGuestHomeVisible

public boolean getGuestHomeVisible()
Returns:
true if the Guest home node is accessible to the current user

toggleShelf

public void toggleShelf(javax.faces.event.ActionEvent event)
Action handler to toggle the expanded state of the shelf. The panel component wrapping the shelf area of the UI is value bound to the shelfExpanded property.


shelfGroupToggled

public void shelfGroupToggled(javax.faces.event.ActionEvent event)
Action handler called after a Shelf Group has had its expanded state toggled by the user


toolbarLocationChanged

public void toolbarLocationChanged(javax.faces.event.ActionEvent event)
Action to change the toolbar location Currently this will changed the location from Company to the users Home space


getCIFSServerPath

public java.lang.String getCIFSServerPath(org.alfresco.jlan.server.filesys.DiskSharedDevice diskShare)
Parameters:
diskShare - Filesystem shared device
Returns:
CIFS server path as network style string label

isRSSFeed

public boolean isRSSFeed()
Returns:
true if the current space has an RSS feed applied

getRSSFeedURL

public java.lang.String getRSSFeedURL()
Returns:
RSS Feed URL for the current space

isAllowUserGroupAdmin

public boolean isAllowUserGroupAdmin()
Returns:
true if User/Group admin is allowed by admin users

isAllowUserConfig

public boolean isAllowUserConfig()
Returns:
true if users can configure their own settings in the User Console

isAllowUserChangePassword

public boolean isAllowUserChangePassword()
Returns:
true if a users can modify the password set against their authentication

isTeamMode

public boolean isTeamMode()
Returns:
true if this is a team license


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