org.alfresco.web.bean.dialog
Class BaseDialogBean

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
All Implemented Interfaces:
java.io.Serializable, IDialogBean
Direct Known Subclasses:
AboutBean, AddTranslationWithoutContentDialog, AddUsersDialog, AdminConsoleDialog, AdvancedSearchDialog, ApplyDocTemplateDialog, ApplyRssTemplateDialog, ApplySpaceTemplateDialog, AVMDetailsBean, AVMEditBean, BaseDetailsBean, BasePermissionsDialog, BasePreviewBean, BaseReassignDialog, BaseWizardBean, CancelWorkflowDialog, CategoriesDialog, ChangeExpirationDateDialog, CheckinCheckoutDialog, CompareSnapshotDialog, CreateCategoryDialog, CreateFolderDialog, CreateGroupDialog, DeleteCategoryDialog, DeleteContentDialog, DeleteDeploymentReportsDialog, DeleteFileDialog, DeleteFolderDialog, DeleteGroupDialog, DeleteRuleDialog, DeleteSandboxDialog, DeleteSpaceDialog, DeleteUserDialog, DeployWebsiteDialog, EditAvmFileDialog, EditCategoryDialog, EditContentPropertiesDialog, EditContentUserRolesDialog, EditFileDialog, EditMLContainerDialog, EditNodeCategoriesDialog, EditSimpleWorkflowDialog, EditSimpleWorkflowDialog, EditUserDetailsDialog, EditUserRolesDialog, EmailSpaceUsersDialog, ExportDialog, FormDetailsDialog, FormTemplatesDialog, FormWorkflowDialog, GroupsDialog, ImportDialog, ImportWebsiteDialog, LinkPropertiesDialog, MakeMultilingualDialog, ManageTaskDialog, MonitorDeploymentDialog, MultilingualManageDialog, PromptForWebFormDialog, ReleaseTestServerDialog, RemoveContentUserDialog, RemoveInvitedUserDialog, RevertAllDialog, RevertSelectedDialog, RevertSnapshotDialog, RulesDialog, ShowSystemInfoDialog, SnapshotSandboxDialog, SubmitDialog, TrashcanDialog, UnlockFileDialog, UserConsoleDialog, UserMembersBean, UserProfileDialog, UsersDialog, ViewContentPropertiesDialog, ViewDeploymentReportDialog

public abstract class BaseDialogBean
extends java.lang.Object
implements IDialogBean, java.io.Serializable

Base class for all dialog beans providing common functionality

See Also:
Serialized Form

Field Summary
protected  BrowseBean browseBean
           
protected  boolean isFinished
           
protected  NavigationBean navigator
           
protected  java.util.Map parameters
           
 
Constructor Summary
BaseDialogBean()
           
 
Method Summary
 java.lang.String cancel()
          Method handler called when the cancel button of the dialog is pressed
protected  java.lang.String doPostCommitProcessing(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs any post commit processing subclasses may want to provide
 java.lang.String finish()
          Method handler called when the finish button of the dialog is pressed
protected abstract  java.lang.String finishImpl(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs the actual processing for the wizard.
protected  java.lang.String formatErrorMessage(java.lang.Throwable exception)
          Returns a formatted exception string for the given exception
 java.lang.String getActionsConfigId()
          Returns the id of an action group to use for the main actions
 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.util.List getAdditionalButtons()
          Returns a list of additional buttons to display in the dialog.
 java.lang.String getCancelButtonLabel()
          Returns the label to use for the cancel button
protected  org.alfresco.service.cmr.coci.CheckOutCheckInService getCheckOutCheckInService()
           
 java.lang.String getContainerDescription()
          Returns the description to be used for the dialog
 java.lang.String getContainerSubTitle()
          Returns the subtitle to be used for the dialog
 java.lang.String getContainerTitle()
          Returns the title to be used for the dialog
protected  java.lang.String getDefaultCancelOutcome()
          Returns the default cancel outcome
protected  java.lang.String getDefaultFinishOutcome()
          Returns the default finish outcome
protected  org.alfresco.service.cmr.dictionary.DictionaryService getDictionaryService()
           
protected  java.lang.String getErrorMessageId()
          The default message id to use in error messages
protected  java.lang.String getErrorOutcome(java.lang.Throwable exception)
          The outcome to return if the given exception occurs
protected  org.alfresco.service.cmr.model.FileFolderService getFileFolderService()
           
 boolean getFinishButtonDisabled()
          Determines whether the finish button on the dialog should be disabled
 java.lang.String getFinishButtonLabel()
          Returns the label to use for the finish button
 java.lang.String getMoreActionsConfigId()
          Returns the id of an action group to use for the more actions
protected  org.alfresco.service.namespace.NamespaceService getNamespaceService()
           
protected  org.alfresco.service.cmr.repository.NodeService getNodeService()
           
protected  org.alfresco.service.cmr.rule.RuleService getRuleService()
          Get the rule service
protected  org.alfresco.service.cmr.search.SearchService getSearchService()
           
protected  org.alfresco.service.transaction.TransactionService getTransactionService()
           
 void init(java.util.Map parameters)
          Initialises the dialog bean
 boolean isFinished()
          Determines whether the has finished
 void restored()
          Called when the dialog is restored after a nested dialog is closed
 void setBrowseBean(BrowseBean browseBean)
           
 void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
          Sets the dictionary service
 void setFileFolderService(org.alfresco.service.cmr.model.FileFolderService fileFolderService)
           
 void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
           
 void setNavigator(NavigationBean navigator)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 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
 

Field Detail

parameters

protected java.util.Map parameters

isFinished

protected boolean isFinished

browseBean

protected BrowseBean browseBean

navigator

protected NavigationBean navigator
Constructor Detail

BaseDialogBean

public BaseDialogBean()
Method Detail

init

public void init(java.util.Map parameters)
Description copied from interface: IDialogBean
Initialises the dialog bean

Specified by:
init in interface IDialogBean
Parameters:
parameters - Map of parameters for the dialog

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

cancel

public java.lang.String cancel()
Description copied from interface: IDialogBean
Method handler called when the cancel button of the dialog is pressed

Specified by:
cancel in interface IDialogBean
Returns:
The outcome to return

finish

public java.lang.String finish()
Description copied from interface: IDialogBean
Method handler called when the finish button of the dialog is pressed

Specified by:
finish in interface IDialogBean
Returns:
The outcome to return

isFinished

public boolean isFinished()
Description copied from interface: IDialogBean
Determines whether the has finished

Specified by:
isFinished in interface IDialogBean
Returns:
true if the wizard has finished

getAdditionalButtons

public java.util.List getAdditionalButtons()
Description copied from interface: IDialogBean
Returns a list of additional buttons to display in the dialog.

Specified by:
getAdditionalButtons in interface IDialogBean
Returns:
List of button configurations, null if there are no buttons

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
Returns:
The cancel button label

getFinishButtonLabel

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

Specified by:
getFinishButtonLabel in interface IDialogBean
Returns:
The finish button label

getFinishButtonDisabled

public boolean getFinishButtonDisabled()
Description copied from interface: IDialogBean
Determines whether the finish button on the dialog should be disabled

Specified by:
getFinishButtonDisabled in interface IDialogBean
Returns:
true if the button should be disabled

getContainerTitle

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

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

Specified by:
getContainerTitle in interface IDialogBean
Returns:
The title or null if the title is to be acquired via configuration

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
Returns:
The subtitle or null if the subtitle is to be acquired via configuration

getContainerDescription

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

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

Specified by:
getContainerDescription in interface IDialogBean
Returns:
The title or null if the title is to be acquired via configuration

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
Returns:
Object to use as the context for actions

getActionsConfigId

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

Specified by:
getActionsConfigId in interface IDialogBean
Returns:
Id of an action group

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
Returns:
Id of an action group

setBrowseBean

public void setBrowseBean(BrowseBean browseBean)
Parameters:
browseBean - The BrowseBean to set.

setNavigator

public void setNavigator(NavigationBean navigator)
Parameters:
navigator - The NavigationBean to set.

getTransactionService

protected org.alfresco.service.transaction.TransactionService getTransactionService()

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

getCheckOutCheckInService

protected org.alfresco.service.cmr.coci.CheckOutCheckInService getCheckOutCheckInService()

getRuleService

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

Returns:
RuleService rule service

setFileFolderService

public void setFileFolderService(org.alfresco.service.cmr.model.FileFolderService fileFolderService)
Parameters:
fileFolderService - used to manipulate folder/folder model nodes

getFileFolderService

protected org.alfresco.service.cmr.model.FileFolderService getFileFolderService()

setSearchService

public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Parameters:
searchService - the service used to find nodes

getSearchService

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

setDictionaryService

public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Sets the dictionary service

Parameters:
dictionaryService - the dictionary service

getDictionaryService

protected org.alfresco.service.cmr.dictionary.DictionaryService getDictionaryService()

setNamespaceService

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

getNamespaceService

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

getDefaultCancelOutcome

protected java.lang.String getDefaultCancelOutcome()
Returns the default cancel outcome

Returns:
Default close outcome, dialog:close by default

getDefaultFinishOutcome

protected java.lang.String getDefaultFinishOutcome()
Returns the default finish outcome

Returns:
Default finish outcome, dialog:close by default

finishImpl

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

Parameters:
context - FacesContext
outcome - The default outcome
Returns:
The outcome
Throws:
java.lang.Throwable

doPostCommitProcessing

protected java.lang.String doPostCommitProcessing(javax.faces.context.FacesContext context,
                                                  java.lang.String outcome)
Performs any post commit processing subclasses may want to provide

Parameters:
context - FacesContext
outcome - The default outcome
Returns:
The outcome

getErrorMessageId

protected java.lang.String getErrorMessageId()
The default message id to use in error messages

Returns:
The error message lookup id

getErrorOutcome

protected java.lang.String getErrorOutcome(java.lang.Throwable exception)
The outcome to return if the given exception occurs

Parameters:
exception - The exception that got thrown
Returns:
The error outcome, null by default

formatErrorMessage

protected java.lang.String formatErrorMessage(java.lang.Throwable exception)
Returns a formatted exception string for the given exception

Parameters:
exception - The exception that got thrown
Returns:
The formatted message


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