org.alfresco.web.bean.content
Class AddContentDialog

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.wizard.BaseWizardBean
          extended by org.alfresco.web.bean.content.BaseContentWizard
              extended by org.alfresco.web.bean.content.AddContentDialog
All Implemented Interfaces:
java.io.Serializable, IDialogBean, IWizardBean
Direct Known Subclasses:
AddAvmContentDialog, AddTranslationDialog

public class AddContentDialog
extends BaseContentWizard

Bean implementation for the "Add Content" dialog

See Also:
Serialized Form

Field Summary
protected  java.io.File file
           
protected  java.util.List inlineEditableMimeTypes
           
 
Fields inherited from class org.alfresco.web.bean.content.BaseContentWizard
author, createdNode, description, encoding, fileName, inlineEdit, logger, mimeType, MSG_NODE_LOCKED, objectType, objectTypes, otherPropertiesChoiceVisible, showOtherProperties, title
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, isFinished, navigator, parameters
 
Constructor Summary
AddContentDialog()
           
 
Method Summary
 java.lang.String cancel()
          Action handler called when the dialog is cancelled
protected  void clearUpload()
          Deletes the uploaded file and removes the FileUploadBean from the session
protected  java.lang.String doPostCommitProcessing(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs any post commit processing subclasses may want to provide
protected  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
protected  java.lang.String getDefaultFinishOutcome()
          Returns the default finish outcome
 java.lang.String getFileName()
           
 java.lang.String getFileUploadSuccessMsg()
           
 java.lang.String getFinishButtonLabel()
          Returns the label to use for the finish button
protected  java.util.List getInlineEditableMimeTypes()
           
 void init(java.util.Map parameters)
          Initialises the dialog bean
 java.lang.String removeUploadedFile()
          Action handler called when the user wishes to remove an uploaded file
 void setFileName(java.lang.String fileName)
           
 void start(javax.faces.event.ActionEvent event)
          Action listener called when the add content dialog is called
 
Methods inherited from class org.alfresco.web.bean.content.BaseContentWizard
getAuthor, getContentService, getDescription, getEncoding, getEncodings, getFinishButtonDisabled, getMimeType, getObjectType, getObjectTypes, getOtherPropertiesChoiceVisible, getShowOtherProperties, getSummaryMimeType, getSummaryObjectType, getTitle, initOtherProperties, isInlineEdit, saveContent, setAuthor, setContentService, setDescription, setEncoding, setInlineEdit, setMimeType, setObjectType, setShowOtherProperties, setTitle
 
Methods inherited from class org.alfresco.web.bean.wizard.BaseWizardBean
back, buildSummary, getBackButtonLabel, getDefaultCancelOutcome, getNextButtonDisabled, getNextButtonLabel, getStepDescription, getStepTitle, next
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
finish, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getCheckOutCheckInService, getContainerDescription, getContainerSubTitle, getContainerTitle, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, getMoreActionsConfigId, getNamespaceService, getNodeService, getRuleService, getSearchService, getTransactionService, isFinished, restored, 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
 
Methods inherited from interface org.alfresco.web.bean.dialog.IDialogBean
finish, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getContainerDescription, getContainerSubTitle, getContainerTitle, getMoreActionsConfigId, isFinished, restored
 

Field Detail

inlineEditableMimeTypes

protected java.util.List inlineEditableMimeTypes

file

protected java.io.File file
Constructor Detail

AddContentDialog

public AddContentDialog()
Method Detail

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

init

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

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

doPostCommitProcessing

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

Overrides:
doPostCommitProcessing in class BaseDialogBean
Parameters:
context - FacesContext
outcome - The default outcome
Returns:
The outcome

getDefaultFinishOutcome

protected java.lang.String getDefaultFinishOutcome()
Description copied from class: BaseDialogBean
Returns the default finish outcome

Overrides:
getDefaultFinishOutcome in class BaseWizardBean
Returns:
Default finish outcome, dialog:close by default

getFileUploadSuccessMsg

public java.lang.String getFileUploadSuccessMsg()
Returns:
Returns the message to display when a file has been uploaded

getFileName

public java.lang.String getFileName()
Overrides:
getFileName in class BaseContentWizard
Returns:
Returns the name of the file

setFileName

public void setFileName(java.lang.String fileName)
Overrides:
setFileName in class BaseContentWizard
Parameters:
fileName - The name of the file

start

public void start(javax.faces.event.ActionEvent event)
Action listener called when the add content dialog is called


removeUploadedFile

public java.lang.String removeUploadedFile()
Action handler called when the user wishes to remove an uploaded file


cancel

public java.lang.String cancel()
Action handler called when the dialog is cancelled

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

clearUpload

protected void clearUpload()
Deletes the uploaded file and removes the FileUploadBean from the session


getInlineEditableMimeTypes

protected java.util.List getInlineEditableMimeTypes()

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
Overrides:
getFinishButtonLabel in class BaseWizardBean
Returns:
The finish button label

formatErrorMessage

protected java.lang.String formatErrorMessage(java.lang.Throwable exception)
Description copied from class: BaseDialogBean
Returns a formatted exception string for the given exception

Overrides:
formatErrorMessage in class BaseDialogBean
Parameters:
exception - The exception that got thrown
Returns:
The formatted message


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