org.alfresco.web.bean.wcm
Class ImportWebsiteDialog

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.wcm.ImportWebsiteDialog
All Implemented Interfaces:
java.io.Serializable, IDialogBean

public class ImportWebsiteDialog
extends BaseDialogBean

Backing bean for the Import Website Content dialog. This dialog manages the upload of a ZIP archive file, which is then unpacked and loaded into the AVM store with the complete folder and file structure.

See Also:
Serialized Form

Field Summary
protected  AVMBrowseBean avmBrowseBean
           
protected  java.io.File file
           
protected  java.lang.String fileName
           
protected  boolean highByteZip
           
protected  boolean isFinished
           
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, navigator, parameters
 
Constructor Summary
ImportWebsiteDialog()
           
 
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
 java.lang.String finish()
          Action handler called when the Finish button is pressed
protected  java.lang.String finishImpl(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs the actual processing for the wizard.
protected  org.alfresco.wcm.asset.AssetService getAssetService()
           
 java.lang.String getFileName()
           
 boolean getFinishButtonDisabled()
          Determines whether the finish button on the dialog should be disabled
 boolean isHighByteZip()
           
 java.lang.String removeUploadedFile()
          Action handler called when the user wishes to remove an uploaded file
 void setAssetService(org.alfresco.wcm.asset.AssetService assetService)
           
 void setAvmBrowseBean(AVMBrowseBean avmBrowseBean)
           
 void setFileName(java.lang.String fileName)
           
 void setHighByteZip(boolean highByteZip)
           
 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.dialog.BaseDialogBean
doPostCommitProcessing, formatErrorMessage, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getCheckOutCheckInService, getContainerDescription, getContainerSubTitle, getContainerTitle, getDefaultCancelOutcome, getDefaultFinishOutcome, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, getFinishButtonLabel, getMoreActionsConfigId, getNamespaceService, getNodeService, getRuleService, getSearchService, getTransactionService, init, 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
 

Field Detail

file

protected java.io.File file

fileName

protected java.lang.String fileName

isFinished

protected boolean isFinished

highByteZip

protected boolean highByteZip

avmBrowseBean

protected AVMBrowseBean avmBrowseBean
Constructor Detail

ImportWebsiteDialog

public ImportWebsiteDialog()
Method Detail

setAvmBrowseBean

public void setAvmBrowseBean(AVMBrowseBean avmBrowseBean)
Parameters:
avmBrowseBean - The AVMBrowseBean to set.

setAssetService

public void setAssetService(org.alfresco.wcm.asset.AssetService assetService)
Parameters:
avmService - The AssetService to set.

getAssetService

protected org.alfresco.wcm.asset.AssetService getAssetService()

getFileName

public java.lang.String getFileName()
Returns:
Returns the name of the file

setFileName

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

isHighByteZip

public boolean isHighByteZip()
Returns:
the highByteZip encoding switch

setHighByteZip

public void setHighByteZip(boolean highByteZip)
Parameters:
highByteZip - the encoding switch for high-byte ZIP filenames to set

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

start

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


finish

public java.lang.String finish()
Action handler called when the Finish button is pressed

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

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


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


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