org.alfresco.web.bean.content
Class CreateContentWizard

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.CreateContentWizard
All Implemented Interfaces:
java.io.Serializable, IDialogBean, IWizardBean
Direct Known Subclasses:
CreatePostDialog, CreateWebContentWizard, EditContentWizard

public class CreateContentWizard
extends BaseContentWizard

Bean implementation for the "Create Content Wizard" dialog

See Also:
Serialized Form

Field Summary
protected  java.lang.String content
           
protected  java.util.List createMimeTypes
           
protected  java.lang.String formName
           
protected  FormProcessor.Session formProcessorSession
           
protected  FormsService formsService
           
protected  org.w3c.dom.Document instanceDataDocument
           
 
Fields inherited from class org.alfresco.web.bean.content.BaseContentWizard
author, createdNode, description, encoding, fileName, inlineEdit, 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
CreateContentWizard()
           
 
Method Summary
 void createContentChanged(javax.faces.event.ValueChangeEvent event)
          Create content type value changed by the user
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  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 getContent()
           
 java.util.List getCreateMimeTypes()
           
 java.lang.String getFileName()
          Overrides in order to strip an xml extension if the user entered it
 boolean getFinishButtonDisabled()
          Determines whether the finish button on the dialog should be disabled
 Form getForm()
           
 java.lang.String getFormName()
           
 FormProcessor.Session getFormProcessorSession()
           
 java.util.List getFormsList()
           
 org.w3c.dom.Document getInstanceDataDocument()
           
 boolean getNextButtonDisabled()
          Determines whether the next button on the wizard should be disabled
 java.lang.String getSummary()
           
 void init(java.util.Map parameters)
          Initialises the dialog bean
 void setContent(java.lang.String content)
           
 void setFormName(java.lang.String formName)
           
 void setFormProcessorSession(FormProcessor.Session formProcessorSession)
           
 void setFormsService(FormsService formsService)
           
 
Methods inherited from class org.alfresco.web.bean.content.BaseContentWizard
getAuthor, getContentService, getDescription, getEncoding, getEncodings, getMimeType, getObjectType, getObjectTypes, getOtherPropertiesChoiceVisible, getShowOtherProperties, getSummaryMimeType, getSummaryObjectType, getTitle, initOtherProperties, isInlineEdit, saveContent, setAuthor, setContentService, setDescription, setEncoding, setFileName, setInlineEdit, setMimeType, setObjectType, setShowOtherProperties, setTitle
 
Methods inherited from class org.alfresco.web.bean.wizard.BaseWizardBean
back, buildSummary, getBackButtonLabel, getDefaultCancelOutcome, getDefaultFinishOutcome, getFinishButtonLabel, getNextButtonLabel, getStepDescription, getStepTitle, next
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
cancel, 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
cancel, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getContainerDescription, getContainerSubTitle, getContainerTitle, getMoreActionsConfigId, isFinished, restored
 

Field Detail

content

protected java.lang.String content

createMimeTypes

protected java.util.List createMimeTypes

formsService

protected transient FormsService formsService

formName

protected java.lang.String formName

formProcessorSession

protected FormProcessor.Session formProcessorSession

instanceDataDocument

protected transient org.w3c.dom.Document instanceDataDocument
Constructor Detail

CreateContentWizard

public CreateContentWizard()
Method Detail

setFormsService

public void setFormsService(FormsService formsService)
Parameters:
formsService - The FormsService to set.

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
Overrides:
finish in class BaseDialogBean
Returns:
The outcome to return

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

getNextButtonDisabled

public boolean getNextButtonDisabled()
Description copied from interface: IWizardBean
Determines whether the next button on the wizard should be disabled

Specified by:
getNextButtonDisabled in interface IWizardBean
Overrides:
getNextButtonDisabled in class BaseWizardBean
Returns:
true if the button should be disabled

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
Overrides:
getFinishButtonDisabled in class BaseContentWizard
Returns:
true if the button should be disabled

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

getContent

public java.lang.String getContent()
Returns:
Returns the content from the edited form.

setContent

public void setContent(java.lang.String content)
Parameters:
content - The content to edit (should be clear initially)

getCreateMimeTypes

public java.util.List getCreateMimeTypes()
Returns:
Returns a list of mime types to allow the user to select from

getSummary

public java.lang.String getSummary()
Returns:
Returns the summary data for the wizard.

getFormsList

public java.util.List getFormsList()
Returns:
List of UI items to represent the full list of available ECM Forms

getFormName

public java.lang.String getFormName()

setFormName

public void setFormName(java.lang.String formName)

getForm

public Form getForm()
             throws FormNotFoundException
Throws:
FormNotFoundException

getFormProcessorSession

public FormProcessor.Session getFormProcessorSession()

setFormProcessorSession

public void setFormProcessorSession(FormProcessor.Session formProcessorSession)

getInstanceDataDocument

public org.w3c.dom.Document getInstanceDataDocument()

getFileName

public java.lang.String getFileName()
Overrides in order to strip an xml extension if the user entered it

Overrides:
getFileName in class BaseContentWizard
Returns:
Returns the name of the file

createContentChanged

public void createContentChanged(javax.faces.event.ValueChangeEvent event)
Create content type value changed by the user


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.