org.alfresco.web.bean.categories
Class CategoriesDialog

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.categories.CategoriesDialog
All Implemented Interfaces:
java.io.Serializable, IContextListener, ChangeViewSupport, IDialogBean

public class CategoriesDialog
extends BaseDialogBean
implements IContextListener, ChangeViewSupport

Backing Bean for the Category Management pages.

See Also:
Serialized Form

Nested Class Summary
 class CategoriesDialog.CategoryBreadcrumbHandler
          Class to handle breadcrumb interaction for Categories pages
 
Field Summary
protected  UIRichList categoriesRichList
          Component references
static java.lang.String KEY_CATEGORY
           
static java.lang.String PARAM_CATEGORY_REF
           
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, isFinished, navigator, parameters
 
Constructor Summary
CategoriesDialog()
          Default Constructor
 
Method Summary
 void areaChanged()
          Method called by UIContextService.areaChanged() to inform all registered beans that the user has changed area i.e.
 void clearCategoryAction(javax.faces.event.ActionEvent event)
          Clear the category action context - e.g.
 void clickCategory(javax.faces.event.ActionEvent event)
          Action called when a category folder is clicked.
 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  java.lang.String finishImpl(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs the actual processing for the wizard.
 Node getActionCategory()
           
 java.lang.Object getActionsContext()
          Returns the object to use as the context for the main and more actions that may be configured by the dialog
 java.lang.String getCancelButtonLabel()
          Returns the label to use for the cancel button
 java.util.List getCategories()
           
 UIRichList getCategoriesRichList()
           
 Node getCategory()
           
 org.alfresco.service.cmr.repository.NodeRef getCategoryRef()
           
 org.alfresco.service.cmr.search.CategoryService getCategoryService()
           
 java.lang.String getContainerSubTitle()
          Returns the subtitle to be used for the dialog
 Node getCurrentCategory()
           
 java.lang.String getCurrentCategoryId()
           
 java.lang.String getDescription()
           
 java.lang.String getId()
           
 java.util.List getLocation()
           
 java.util.Collection getMembers()
           
 int getMembersCount()
           
 java.lang.String getMoreActionsConfigId()
          Returns the id of an action group to use for the more actions
 java.lang.String getName()
           
 org.alfresco.service.cmr.repository.NodeRef getNodeRef()
           
 java.util.List getViewItems()
           
 java.lang.String getViewMode()
           
protected  void removeFromBreadcrumb(java.lang.String category)
          If category.equals(handler.label) then the breadcrumb reverts one step back (needed for deleting) Else current breadcrumb is updated accordingly to the current category (needed for editing)
 void resetCategoryNavigation(javax.faces.event.ActionEvent event)
          Reset the current category navigation point - e.g.
 void restored()
          Called when the dialog is restored after a nested dialog is closed
 void setActionCategory(Node node)
           
 void setCategoriesRichList(UIRichList categoriesRichList)
           
 void setCategory(Node category)
           
 void setCategoryRef(org.alfresco.service.cmr.repository.NodeRef categoryRef)
           
 void setCategoryService(org.alfresco.service.cmr.search.CategoryService categoryService)
           
 void setCurrentCategory(org.alfresco.service.cmr.repository.NodeRef ref)
          Set the current category node.
 void setDescription(java.lang.String description)
           
 void setLocation(java.util.List location)
           
 void setMembers(java.util.Collection members)
           
 void setName(java.lang.String name)
           
 void setupCategoryAction(javax.faces.event.ActionEvent event)
          Set the Category to be used for next action dialog
 void setViewMode(java.lang.String viewMode)
           
 void spaceChanged()
          Method called by UIContextService.spaceChanged() to inform all registered beans that the current space has changed.
 void viewModeChanged(javax.faces.event.ActionEvent event)
          Change the current view mode based on user selection
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
cancel, doPostCommitProcessing, finish, formatErrorMessage, getActionsConfigId, getAdditionalButtons, getCheckOutCheckInService, getContainerDescription, getContainerTitle, getDefaultCancelOutcome, getDefaultFinishOutcome, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, getFinishButtonDisabled, getFinishButtonLabel, getNamespaceService, getNodeService, getRuleService, getSearchService, getTransactionService, init, isFinished, setBrowseBean, setDictionaryService, setFileFolderService, setNamespaceService, setNavigator, setNodeService, setSearchService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_CATEGORY

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

PARAM_CATEGORY_REF

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

categoriesRichList

protected UIRichList categoriesRichList
Component references

Constructor Detail

CategoriesDialog

public CategoriesDialog()
Default Constructor

Method Detail

getMembersCount

public int getMembersCount()
Returns:
Returns the members count for current action category.

getMembers

public java.util.Collection getMembers()

setMembers

public void setMembers(java.util.Collection members)

getActionCategory

public Node getActionCategory()

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getId

public java.lang.String getId()

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

getCategoryService

public org.alfresco.service.cmr.search.CategoryService getCategoryService()

setCategoryService

public void setCategoryService(org.alfresco.service.cmr.search.CategoryService categoryService)

getCategory

public Node getCategory()

setCategory

public void setCategory(Node category)

getCategoryRef

public org.alfresco.service.cmr.repository.NodeRef getCategoryRef()

setCategoryRef

public void setCategoryRef(org.alfresco.service.cmr.repository.NodeRef categoryRef)

getCategoriesRichList

public UIRichList getCategoriesRichList()

setCategoriesRichList

public void setCategoriesRichList(UIRichList categoriesRichList)

getActionsContext

public java.lang.Object getActionsContext()
Description copied from interface: IDialogBean
Returns the object to use as the context for the main and more actions that may be configured by the dialog

Specified by:
getActionsContext in interface IDialogBean
Overrides:
getActionsContext in class BaseDialogBean
Returns:
Object to use as the context for actions

setActionCategory

public void setActionCategory(Node node)
Parameters:
node - Set the Node to be used for the current category screen action.

getCurrentCategory

public Node getCurrentCategory()
Returns:
The currently displayed category as a Node or null if at the root.

getCurrentCategoryId

public java.lang.String getCurrentCategoryId()
Returns:
The ID of the currently displayed category or null if at the root.

setCurrentCategory

public void setCurrentCategory(org.alfresco.service.cmr.repository.NodeRef ref)
Set the current category node.

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

Parameters:
ref - The current category node.

setLocation

public void setLocation(java.util.List location)

getLocation

public java.util.List getLocation()
Returns:
Breadcrumb location list

getCategories

public java.util.List getCategories()
Returns:
The list of categories Nodes to display. Returns the list root categories or the list of sub-categories for the current category if set.

setupCategoryAction

public void setupCategoryAction(javax.faces.event.ActionEvent event)
Set the Category to be used for next action dialog


clearCategoryAction

public void clearCategoryAction(javax.faces.event.ActionEvent event)
Clear the category action context - e.g. ready for a Create operation


resetCategoryNavigation

public void resetCategoryNavigation(javax.faces.event.ActionEvent event)
Reset the current category navigation point - e.g. ready for redisplay of the root UI


clickCategory

public void clickCategory(javax.faces.event.ActionEvent event)
Action called when a category folder is clicked. Navigate into the category.


removeFromBreadcrumb

protected void removeFromBreadcrumb(java.lang.String category)
If category.equals(handler.label) then the breadcrumb reverts one step back (needed for deleting) Else current breadcrumb is updated accordingly to the current category (needed for editing)


finishImpl

protected java.lang.String finishImpl(javax.faces.context.FacesContext context,
                                      java.lang.String outcome)
                               throws java.lang.Exception
Description copied from class: BaseDialogBean
Performs the actual processing for the wizard. NOTE: This method is called within the context of a transaction so no transaction handling is required

Specified by:
finishImpl in class BaseDialogBean
Parameters:
context - FacesContext
outcome - The default outcome
Returns:
The outcome
Throws:
java.lang.Exception

getContainerSubTitle

public java.lang.String getContainerSubTitle()
Description copied from interface: IDialogBean
Returns the subtitle to be used for the dialog

If this returns null the DialogManager will lookup the subtitle via the dialog configuration

Specified by:
getContainerSubTitle in interface IDialogBean
Overrides:
getContainerSubTitle in class BaseDialogBean
Returns:
The subtitle or null if the subtitle is to be acquired via configuration

getCancelButtonLabel

public java.lang.String getCancelButtonLabel()
Description copied from interface: IDialogBean
Returns the label to use for the cancel button

Specified by:
getCancelButtonLabel in interface IDialogBean
Overrides:
getCancelButtonLabel in class BaseDialogBean
Returns:
The cancel button label

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()

getViewItems

public java.util.List getViewItems()
Specified by:
getViewItems in interface ChangeViewSupport

restored

public void restored()
Description copied from interface: IDialogBean
Called when the dialog is restored after a nested dialog is closed

Specified by:
restored in interface IDialogBean
Overrides:
restored in class BaseDialogBean

getViewMode

public java.lang.String getViewMode()
Specified by:
getViewMode in interface ChangeViewSupport

setViewMode

public void setViewMode(java.lang.String viewMode)
Specified by:
setViewMode in interface ChangeViewSupport

viewModeChanged

public void viewModeChanged(javax.faces.event.ActionEvent event)
Change the current view mode based on user selection

Specified by:
viewModeChanged in interface ChangeViewSupport
Parameters:
event - ActionEvent

getMoreActionsConfigId

public java.lang.String getMoreActionsConfigId()
Description copied from interface: IDialogBean
Returns the id of an action group to use for the more actions

Specified by:
getMoreActionsConfigId in interface IDialogBean
Overrides:
getMoreActionsConfigId in class BaseDialogBean
Returns:
Id of an action group

getNodeRef

public org.alfresco.service.cmr.repository.NodeRef getNodeRef()


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