Nuxeo Enterprise Platform 5.1

org.nuxeo.ecm.platform.archive.web.listener.ejb
Class ArchiveManagerActionsBean

java.lang.Object
  extended by org.nuxeo.ecm.platform.archive.web.listener.ejb.ArchiveManagerActionsBean
All Implemented Interfaces:
Serializable, ArchiveManagerActions

@Name(value="archiveManagerActions")
@Scope(value=CONVERSATION)
public class ArchiveManagerActionsBean
extends Object
implements ArchiveManagerActions

Archive manager actions bean.

Author:
Bogdan Tatar
See Also:
Serialized Form

Constructor Summary
ArchiveManagerActionsBean()
           
 
Method Summary
 String addArchiveRecord()
          Adds a new archive record.
 String cancel()
          Cancels the process of adding or editing an archive record.
 void computeArchiveRecords()
          Computes all archive records.
 String deleteArchiveRecord()
          Deletes an archive record.
 void destroy()
           
 String editArchiveRecord()
          Edits an archive record.
 String getCommandName1()
          Sets the first button command name from the page used to add/edit an archive record.
 String getCommandName2()
          Sets the second button command name from the page used to add/edit an archive record.
 List<SelectItem> getDocumentVersions()
          Returns a list of SelectItems with the versions of the current document.
 boolean getEditable()
          Checks if the page used to add/edit an archive record is editable.
 boolean getRequired()
          This method is used to mark the fields that are required to be given a value when an archive record is created.This method is mostly used in the xhtml for an archive record.
 ArchiveRecord getSelectedArchiveRecord()
          Returns the archive record to add/edit.
 boolean getShowCreateForm()
          Tells if the "add new archive" record button should appear or not.
 String getStyle()
          Returns the style of the components that appear in the add/edit archive record page.
 void initialize()
           
 void initializeArchiveManager()
           
 void invalidateArchiveRecords()
          Invalidates archive records.
 void setCommandName1(String commandName)
          Sets the first command button name.
 void setCommandName2(String commandName)
          Sets the second command button name.
 void setEditable(boolean editable)
          Sets the page for add/edit archive record as editable or not.
 void setRequired(ActionEvent event)
          This method is used when the cancel button on the page that is used to add an archive recod, is clicked.This way the user is not asked to give values for the fields that needs to have a value.The 'event' parameter is introduced in the signature of the method in order to be use this method as an 'actionListener' for the 'h:commandButton' tag
 void setSelectedArchiveRecord(ArchiveRecord selectedArchiveRecord)
          Sets the archive record to add/edit.
 void setShowCreateForm(boolean showCreateForm)
           
 void setStyle(String style)
          Sets the style of the components that appear in the add/edit archive record page.
 void toggleCreateForm(ActionEvent event)
          Used to decide if the add new archive record button should appear or not.
 String viewArchiveRecord()
          Views an archive record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArchiveManagerActionsBean

public ArchiveManagerActionsBean()
Method Detail

initialize

@PostConstruct
public void initialize()

destroy

@Destroy
public void destroy()
Specified by:
destroy in interface ArchiveManagerActions

invalidateArchiveRecords

@Observer(value="documentSelectionChanged",
          create=false)
public void invalidateArchiveRecords()
                              throws Exception
Description copied from interface: ArchiveManagerActions
Invalidates archive records.

Specified by:
invalidateArchiveRecords in interface ArchiveManagerActions
Throws:
Exception

computeArchiveRecords

@Begin(join=true)
@Factory(value="archiveRecords")
public void computeArchiveRecords()
                           throws Exception
Description copied from interface: ArchiveManagerActions
Computes all archive records.

Specified by:
computeArchiveRecords in interface ArchiveManagerActions
Throws:
Exception
See Also:

getDocumentVersions

public List<SelectItem> getDocumentVersions()
                                     throws Exception
Description copied from interface: ArchiveManagerActions
Returns a list of SelectItems with the versions of the current document.

Specified by:
getDocumentVersions in interface ArchiveManagerActions
Returns:
a list of SelectItems with the versions of the current document
Throws:
Exception

addArchiveRecord

public String addArchiveRecord()
                        throws Exception
Description copied from interface: ArchiveManagerActions
Adds a new archive record.

Specified by:
addArchiveRecord in interface ArchiveManagerActions
Returns:
where to forward to after the archive record is added
Throws:
Exception

deleteArchiveRecord

public String deleteArchiveRecord()
                           throws Exception
Description copied from interface: ArchiveManagerActions
Deletes an archive record.

Specified by:
deleteArchiveRecord in interface ArchiveManagerActions
Returns:
where to forward to after the archive record is deleted
Throws:
Exception

editArchiveRecord

public String editArchiveRecord()
                         throws Exception
Description copied from interface: ArchiveManagerActions
Edits an archive record.

Specified by:
editArchiveRecord in interface ArchiveManagerActions
Returns:
where to forward to after the archive record is modified
Throws:
Exception

viewArchiveRecord

public String viewArchiveRecord()
                         throws Exception
Description copied from interface: ArchiveManagerActions
Views an archive record.

Specified by:
viewArchiveRecord in interface ArchiveManagerActions
Returns:
where to forward to after the archive record is viewed
Throws:
Exception

getShowCreateForm

public boolean getShowCreateForm()
Description copied from interface: ArchiveManagerActions
Tells if the "add new archive" record button should appear or not.

Specified by:
getShowCreateForm in interface ArchiveManagerActions
Returns:
true if the "add new archive" record button should appear, false otherwise.

setShowCreateForm

public void setShowCreateForm(boolean showCreateForm)

toggleCreateForm

public void toggleCreateForm(ActionEvent event)
Description copied from interface: ArchiveManagerActions
Used to decide if the add new archive record button should appear or not. The 'event' parameter is not used in the implementation of the method, and it had to be included in the signature of the method in order to accomodate the jsf specification for an 'actionListener' method added to an 'h:commandLink' tag.

Specified by:
toggleCreateForm in interface ArchiveManagerActions

initializeArchiveManager

public void initializeArchiveManager()
                              throws Exception
Throws:
Exception

getSelectedArchiveRecord

public ArchiveRecord getSelectedArchiveRecord()
Description copied from interface: ArchiveManagerActions
Returns the archive record to add/edit.

Specified by:
getSelectedArchiveRecord in interface ArchiveManagerActions
Returns:
the archive record to add/edit

setSelectedArchiveRecord

public void setSelectedArchiveRecord(ArchiveRecord selectedArchiveRecord)
Description copied from interface: ArchiveManagerActions
Sets the archive record to add/edit.

Specified by:
setSelectedArchiveRecord in interface ArchiveManagerActions

cancel

public String cancel()
              throws Exception
Description copied from interface: ArchiveManagerActions
Cancels the process of adding or editing an archive record.

Specified by:
cancel in interface ArchiveManagerActions
Returns:
where to forward to after canceling
Throws:
Exception

getRequired

public boolean getRequired()
Description copied from interface: ArchiveManagerActions
This method is used to mark the fields that are required to be given a value when an archive record is created.This method is mostly used in the xhtml for an archive record.

Specified by:
getRequired in interface ArchiveManagerActions
Returns:
true - if the field needs to have a value false- otherwise

setRequired

public void setRequired(ActionEvent event)
Description copied from interface: ArchiveManagerActions
This method is used when the cancel button on the page that is used to add an archive recod, is clicked.This way the user is not asked to give values for the fields that needs to have a value.The 'event' parameter is introduced in the signature of the method in order to be use this method as an 'actionListener' for the 'h:commandButton' tag

Specified by:
setRequired in interface ArchiveManagerActions

getEditable

public boolean getEditable()
Description copied from interface: ArchiveManagerActions
Checks if the page used to add/edit an archive record is editable.

Specified by:
getEditable in interface ArchiveManagerActions
Returns:
- true if the page is editable

- false otherwise


setEditable

public void setEditable(boolean editable)
Description copied from interface: ArchiveManagerActions
Sets the page for add/edit archive record as editable or not.

Specified by:
setEditable in interface ArchiveManagerActions
Parameters:
editable - - if true then the page is editable

getCommandName1

public String getCommandName1()
Description copied from interface: ArchiveManagerActions
Sets the first button command name from the page used to add/edit an archive record.

Specified by:
getCommandName1 in interface ArchiveManagerActions
Returns:
- the name of the command button

setCommandName1

public void setCommandName1(String commandName)
Description copied from interface: ArchiveManagerActions
Sets the first command button name.

Specified by:
setCommandName1 in interface ArchiveManagerActions
Parameters:
commandName - - the name of the command button

getCommandName2

public String getCommandName2()
Description copied from interface: ArchiveManagerActions
Sets the second button command name from the page used to add/edit an archive record.

Specified by:
getCommandName2 in interface ArchiveManagerActions
Returns:
- the name of the command button

setCommandName2

public void setCommandName2(String commandName)
Description copied from interface: ArchiveManagerActions
Sets the second command button name.

Specified by:
setCommandName2 in interface ArchiveManagerActions
Parameters:
commandName - - the name of the command button

getStyle

public String getStyle()
Description copied from interface: ArchiveManagerActions
Returns the style of the components that appear in the add/edit archive record page.

Specified by:
getStyle in interface ArchiveManagerActions
Returns:
- the style used for the components of the page

setStyle

public void setStyle(String style)
Description copied from interface: ArchiveManagerActions
Sets the style of the components that appear in the add/edit archive record page.

Specified by:
setStyle in interface ArchiveManagerActions
Parameters:
style - - the style used for the components of the page

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.