org.alfresco.web.bean.wcm
Class CreateFormWizard

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.wcm.CreateFormWizard
All Implemented Interfaces:
java.io.Serializable, IDialogBean, IWizardBean
Direct Known Subclasses:
EditFormWizard

public class CreateFormWizard
extends BaseWizardBean

Bean implementation for the "Create XML Form" dialog

See Also:
Serialized Form

Nested Class Summary
 class CreateFormWizard.RenderingEngineTemplateData
          Simple wrapper class to represent a form data renderer
 
Field Summary
protected  boolean applyDefaultWorkflow
           
protected  org.alfresco.service.cmr.repository.ContentService contentService
           
protected  java.lang.String defaultWorkflowName
           
static java.lang.String FILE_RENDERING_ENGINE_TEMPLATE
           
static java.lang.String FILE_SCHEMA
           
protected  FormsService formsService
           
protected  org.alfresco.service.cmr.repository.MimetypeService mimetypeService
           
protected  java.util.List renderingEngineTemplates
           
protected  javax.faces.model.DataModel renderingEngineTemplatesDataModel
           
protected  org.w3c.dom.Document schema
           
protected  java.lang.String schemaFileName
           
protected  org.alfresco.service.cmr.workflow.WorkflowService workflowService
           
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, isFinished, navigator, parameters
 
Constructor Summary
CreateFormWizard()
           
 
Method Summary
 void addSelectedRenderingEngineTemplate(javax.faces.event.ActionEvent event)
          Add the selected rendering engine to the list
 java.lang.String cancel()
          Method handler called when the cancel button of the dialog is pressed
protected  void clearUpload(java.lang.String id)
          Clear the uploaded form, clearing the specific Upload component by Id
protected  java.lang.String finishImpl(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs the actual processing for the wizard.
 boolean getAddToListDisabled()
           
 boolean getApplyDefaultWorkflow()
           
 java.util.List getAssociatedWebProjects()
           
protected  org.alfresco.service.cmr.repository.ContentService getContentService()
           
 java.util.List getDefaultWorkflowChoices()
           
 org.alfresco.service.cmr.workflow.WorkflowDefinition getDefaultWorkflowDefinition()
           
 java.lang.String[] getDefaultWorkflowName()
          Returns the default workflow name
 boolean getEditMode()
          Indicates whether or not the wizard is currently in edit mode
 boolean getFinishButtonDisabled()
          Determines whether the finish button on the dialog should be disabled
 java.lang.String getFormDescription()
           
 java.lang.String getFormDescriptionAttribute()
           
 java.lang.String getFormLabelAttribute()
           
 java.lang.String getFormName()
           
protected  FormsService getFormsService()
           
 java.lang.String getFormTitle()
           
 boolean getIsWebForm()
           
 java.util.List getMimeTypeChoices()
          Returns a list of mime types in the system
 java.lang.String getMimetypeForRendition()
           
protected  org.alfresco.service.cmr.repository.MimetypeService getMimetypeService()
           
 boolean getNextButtonDisabled()
          Determines whether the next button on the wizard should be disabled
 java.lang.String getOutputPathPatternForFormInstanceData()
           
 java.lang.String getOutputPathPatternForRendition()
           
 java.util.List getRenderingEngineChoices()
           
 java.lang.String getRenderingEngineName()
           
 java.lang.String getRenderingEngineTemplateDescription()
           
 java.io.File getRenderingEngineTemplateFile()
           
 java.lang.String getRenderingEngineTemplateFileName()
           
 java.lang.String getRenderingEngineTemplateName()
           
 java.util.List getRenderingEngineTemplates()
          Returns all configured rendering engine templates.
 javax.faces.model.DataModel getRenderingEngineTemplatesDataModel()
          Returns the properties for current configured output methods JSF DataModel
 java.lang.String getRenderingEngineTemplateTitle()
           
 java.io.File getSchemaFile()
           
 java.lang.String getSchemaFileName()
           
 java.lang.String getSchemaRootElementName()
          Returns the root element name to use when processing the schema.
 java.util.List getSchemaRootElementNameChoices()
           
 java.lang.String getStepDescription()
          Returns the description to be used for the current step
 java.lang.String getWorkflowDescriptionAttribute()
           
 java.lang.String getWorkflowLabelAttribute()
           
protected  org.alfresco.service.cmr.workflow.WorkflowService getWorkflowService()
           
 void init(java.util.Map parameters)
          Initialises the dialog bean
 java.lang.String mimetypeForRenditionChanged(javax.faces.event.ValueChangeEvent vce)
          Action handler called when the user changes the selected mimetype
 void removeSelectedRenderingEngineTemplate(javax.faces.event.ActionEvent event)
          Action handler called when the Remove button is pressed to remove a rendering engine
 java.lang.String removeUploadedRenderingEngineTemplateFile()
          Action handler called when the user wishes to remove an uploaded file
 java.lang.String removeUploadedSchemaFile()
          Action handler called when the user wishes to remove an uploaded file
 java.lang.String renderingEngineTemplateFileValueChanged(javax.faces.event.ValueChangeEvent vce)
          Action handler called when a rendering engine template file has been uploaded.
protected  void saveRenderingEngineTemplate(CreateFormWizard.RenderingEngineTemplateData retd, org.alfresco.service.cmr.repository.NodeRef formNodeRef)
           
 java.lang.String schemaFileValueChanged(javax.faces.event.ValueChangeEvent vce)
          Action handler called when the schema has been uploaded.
 void setApplyDefaultWorkflow(boolean applyDefaultWorkflow)
          Indicates whether or not to configure a default workflow
 void setContentService(org.alfresco.service.cmr.repository.ContentService contentService)
           
 void setDefaultWorkflowName(java.lang.String[] defaultWorkflowName)
          Sets the default workflow name
 void setFormDescription(java.lang.String formDescription)
          Sets the description for this form.
 void setFormName(java.lang.String formName)
          Sets the human friendly name for this form.
 void setFormsService(FormsService formsService)
           
 void setFormTitle(java.lang.String formTitle)
          Sets the title for this form.
 void setMimetypeForRendition(java.lang.String mimetypeForRendition)
           
 void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
           
 void setOutputPathPatternForFormInstanceData(java.lang.String outputPathPatternForFormInstanceData)
           
 void setOutputPathPatternForRendition(java.lang.String outputPathPatternForRendition)
           
 void setRenderingEngineName(java.lang.String renderingEngineName)
           
 void setRenderingEngineTemplateDescription(java.lang.String renderingEngineTemplateDescription)
          Sets the description for this renderingEngineTemplate.
 void setRenderingEngineTemplateFileName(java.lang.String renderingEngineTemplateFileName)
          Sets the rendering engine template file name
 void setRenderingEngineTemplateName(java.lang.String renderingEngineTemplateName)
          Sets the name for this renderingEngineTemplate.
 void setRenderingEngineTemplateTitle(java.lang.String renderingEngineTemplateTitle)
          Sets the title for this renderingEngineTemplate.
 void setSchemaFileName(java.lang.String schemaFileName)
          Sets the schema file name
 void setSchemaRootElementName(java.lang.String schemaRootElementName)
          Sets the root element name to use when processing the schema.
 void setWorkflowService(org.alfresco.service.cmr.workflow.WorkflowService workflowService)
           
 
Methods inherited from class org.alfresco.web.bean.wizard.BaseWizardBean
back, buildSummary, getBackButtonLabel, getDefaultCancelOutcome, getDefaultFinishOutcome, getFinishButtonLabel, getNextButtonLabel, getStepTitle, next
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
doPostCommitProcessing, finish, formatErrorMessage, 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

FILE_RENDERING_ENGINE_TEMPLATE

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

FILE_SCHEMA

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

defaultWorkflowName

protected java.lang.String defaultWorkflowName

applyDefaultWorkflow

protected boolean applyDefaultWorkflow

renderingEngineTemplates

protected java.util.List renderingEngineTemplates

schema

protected transient org.w3c.dom.Document schema

schemaFileName

protected java.lang.String schemaFileName

contentService

protected transient org.alfresco.service.cmr.repository.ContentService contentService

mimetypeService

protected transient org.alfresco.service.cmr.repository.MimetypeService mimetypeService

workflowService

protected transient org.alfresco.service.cmr.workflow.WorkflowService workflowService

formsService

protected transient FormsService formsService

renderingEngineTemplatesDataModel

protected transient javax.faces.model.DataModel renderingEngineTemplatesDataModel
Constructor Detail

CreateFormWizard

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

saveRenderingEngineTemplate

protected void saveRenderingEngineTemplate(CreateFormWizard.RenderingEngineTemplateData retd,
                                           org.alfresco.service.cmr.repository.NodeRef formNodeRef)

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 BaseDialogBean
Parameters:
parameters - Map of parameters for the dialog

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

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 BaseDialogBean
Returns:
true if the button should be disabled

getStepDescription

public java.lang.String getStepDescription()
Description copied from interface: IWizardBean
Returns the description to be used for the current step

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

Specified by:
getStepDescription in interface IWizardBean
Overrides:
getStepDescription in class BaseWizardBean
Returns:
The decsription or null if the title is to be acquired via configuration

getAddToListDisabled

public boolean getAddToListDisabled()
Returns:
true if the Add To List button on the configure rendering engines page should be disabled

getFormDescriptionAttribute

public java.lang.String getFormDescriptionAttribute()
Returns:
Returns HTML code of the formDescriptionAttribute for the attribute "description" of the tag. See create-form-wizard/summary.jsp

getFormLabelAttribute

public java.lang.String getFormLabelAttribute()
Returns:
HTML code for the form label

getWorkflowDescriptionAttribute

public java.lang.String getWorkflowDescriptionAttribute()
Returns:
Returns HTML code of the formDescriptionAttribute for the attribute "description" of the tag. See create-form-wizard/summary.jsp

getWorkflowLabelAttribute

public java.lang.String getWorkflowLabelAttribute()
Returns:
Returns HTML code of the workflow label

getOutputPathPatternForRendition

public java.lang.String getOutputPathPatternForRendition()
Returns:
Returns the output path for the rendition.

setOutputPathPatternForRendition

public void setOutputPathPatternForRendition(java.lang.String outputPathPatternForRendition)
Parameters:
outputPathPatternForRendition - The output path for the rendition.

getMimetypeForRendition

public java.lang.String getMimetypeForRendition()
Returns:
Returns the mimetype.

setMimetypeForRendition

public void setMimetypeForRendition(java.lang.String mimetypeForRendition)
Parameters:
mimetypeForRendition - The mimetype to set.

addSelectedRenderingEngineTemplate

public void addSelectedRenderingEngineTemplate(javax.faces.event.ActionEvent event)
Add the selected rendering engine to the list


removeSelectedRenderingEngineTemplate

public void removeSelectedRenderingEngineTemplate(javax.faces.event.ActionEvent event)
Action handler called when the Remove button is pressed to remove a rendering engine


mimetypeForRenditionChanged

public java.lang.String mimetypeForRenditionChanged(javax.faces.event.ValueChangeEvent vce)
Action handler called when the user changes the selected mimetype


removeUploadedSchemaFile

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


removeUploadedRenderingEngineTemplateFile

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


schemaFileValueChanged

public java.lang.String schemaFileValueChanged(javax.faces.event.ValueChangeEvent vce)
Action handler called when the schema has been uploaded.


renderingEngineTemplateFileValueChanged

public java.lang.String renderingEngineTemplateFileValueChanged(javax.faces.event.ValueChangeEvent vce)
Action handler called when a rendering engine template file has been uploaded.


getEditMode

public boolean getEditMode()
Indicates whether or not the wizard is currently in edit mode


getAssociatedWebProjects

public java.util.List getAssociatedWebProjects()

getRenderingEngineTemplatesDataModel

public javax.faces.model.DataModel getRenderingEngineTemplatesDataModel()
Returns the properties for current configured output methods JSF DataModel

Returns:
JSF DataModel representing the current configured output methods

getRenderingEngineTemplates

public java.util.List getRenderingEngineTemplates()
Returns all configured rendering engine templates.


getRenderingEngineName

public java.lang.String getRenderingEngineName()
Returns:
Returns the mime type currenty selected

setRenderingEngineName

public void setRenderingEngineName(java.lang.String renderingEngineName)
Parameters:
renderingEngineName - Sets the currently selected rendering engine name

getRenderingEngineChoices

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

getMimeTypeChoices

public java.util.List getMimeTypeChoices()
Returns a list of mime types in the system

Returns:
List of mime types

getSchemaFile

public java.io.File getSchemaFile()
Returns:
Returns the schema file or null

setSchemaFileName

public void setSchemaFileName(java.lang.String schemaFileName)
Sets the schema file name


getSchemaFileName

public java.lang.String getSchemaFileName()
Returns:
Returns the schema file or null

setRenderingEngineTemplateFileName

public void setRenderingEngineTemplateFileName(java.lang.String renderingEngineTemplateFileName)
Sets the rendering engine template file name


getRenderingEngineTemplateFileName

public java.lang.String getRenderingEngineTemplateFileName()
Returns:
Returns the rendering engine template file name or null

getRenderingEngineTemplateFile

public java.io.File getRenderingEngineTemplateFile()
Returns:
Returns the rendering engine template file or null

setSchemaRootElementName

public void setSchemaRootElementName(java.lang.String schemaRootElementName)
Sets the root element name to use when processing the schema.


getSchemaRootElementName

public java.lang.String getSchemaRootElementName()
Returns the root element name to use when processing the schema.


getSchemaRootElementNameChoices

public java.util.List getSchemaRootElementNameChoices()
Returns:
the possible root element names for use with the schema based on the element declarations it defines.

setFormName

public void setFormName(java.lang.String formName)
Sets the human friendly name for this form.


getFormName

public java.lang.String getFormName()
Returns:
the human friendly name for this form.

getOutputPathPatternForFormInstanceData

public java.lang.String getOutputPathPatternForFormInstanceData()
Returns:
Returns the output path for form instance data.

setOutputPathPatternForFormInstanceData

public void setOutputPathPatternForFormInstanceData(java.lang.String outputPathPatternForFormInstanceData)
Parameters:
outputPathPatternForFormInstanceData - the output path for form instance data

setFormTitle

public void setFormTitle(java.lang.String formTitle)
Sets the title for this form.


getFormTitle

public java.lang.String getFormTitle()
Returns:
the title for this form.

setFormDescription

public void setFormDescription(java.lang.String formDescription)
Sets the description for this form.


getFormDescription

public java.lang.String getFormDescription()
Returns:
the description for this form.

setRenderingEngineTemplateName

public void setRenderingEngineTemplateName(java.lang.String renderingEngineTemplateName)
Sets the name for this renderingEngineTemplate.


getRenderingEngineTemplateName

public java.lang.String getRenderingEngineTemplateName()
Returns:
the name for this renderingEngineTemplate.

setRenderingEngineTemplateTitle

public void setRenderingEngineTemplateTitle(java.lang.String renderingEngineTemplateTitle)
Sets the title for this renderingEngineTemplate.


getRenderingEngineTemplateTitle

public java.lang.String getRenderingEngineTemplateTitle()
Returns:
the title for this renderingEngineTemplate.

setRenderingEngineTemplateDescription

public void setRenderingEngineTemplateDescription(java.lang.String renderingEngineTemplateDescription)
Sets the description for this renderingEngineTemplate.


getRenderingEngineTemplateDescription

public java.lang.String getRenderingEngineTemplateDescription()
Returns:
the description for this renderingEngineTemplate.

getDefaultWorkflowDefinition

public org.alfresco.service.cmr.workflow.WorkflowDefinition getDefaultWorkflowDefinition()
Returns:
the default workflow

setDefaultWorkflowName

public void setDefaultWorkflowName(java.lang.String[] defaultWorkflowName)
Sets the default workflow name


getDefaultWorkflowName

public java.lang.String[] getDefaultWorkflowName()
Returns the default workflow name


setApplyDefaultWorkflow

public void setApplyDefaultWorkflow(boolean applyDefaultWorkflow)
Indicates whether or not to configure a default workflow


getApplyDefaultWorkflow

public boolean getApplyDefaultWorkflow()
Returns:
whether or not to configure a default workflow

getDefaultWorkflowChoices

public java.util.List getDefaultWorkflowChoices()
Returns:
List of UI items to represent the available Workflows for all websites

getIsWebForm

public boolean getIsWebForm()

setContentService

public void setContentService(org.alfresco.service.cmr.repository.ContentService contentService)
Parameters:
contentService - The contentService to set.

getContentService

protected org.alfresco.service.cmr.repository.ContentService getContentService()

setMimetypeService

public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
Parameters:
mimetypeService - The mimetypeService to set.

getMimetypeService

protected org.alfresco.service.cmr.repository.MimetypeService getMimetypeService()

setWorkflowService

public void setWorkflowService(org.alfresco.service.cmr.workflow.WorkflowService workflowService)
Parameters:
workflowService - The workflowService to set.

getWorkflowService

protected org.alfresco.service.cmr.workflow.WorkflowService getWorkflowService()

setFormsService

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

getFormsService

protected FormsService getFormsService()

clearUpload

protected void clearUpload(java.lang.String id)
Clear the uploaded form, clearing the specific Upload component by Id



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