class: EditItem

public class: EditItem
Author: : Thomas Diebäcker, created 10.01.2007
Project: Phase: 1.0; Status: Proposed; Version: : $Revision: 2769 $ $LastChangedDate: 2009-06-26 1; Complexity: 1
Dates: Created: 16.07.2009 15:32:24; Modified: 16.07.2009 15:32:24;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {10068771-47E0-4cb5-A7ED-942DA7D4D796}
Fragment class for editing PubItems. This class provides all functionality for editing, saving and submitting a PubItem including methods for depending dynamic UI components.
 

Goto: Custom Properties, Fields, Methods

Extends: FacesBean

See also: ContentAbstractCollection, ContentSubjectCollection, CreatorCollection, TitleCollection, IdentifierCollection, PubItemVOPresentation, SourceCollection, TitleCollection, FacesBean, LocatorUploadBean

Appears in: editItem

Connections
 
Custom Properties
 
EditItem Attributes
Attribute Details
public static const String
  BEAN_NAME
Initial: "EditItem"
private boolean
  bindFilesAndLocators
Initial: true
Notes: Flag for the binding method to avoid unnecessary binding
private ContentAbstractCollection
  contentAbstractCollection
private ContentSubjectCollection
  contentSubjectCollection
private String
  contextName
Initial: null
Notes: pub context name.
private CreatorCollection
  creatorCollection
private TitleCollection
  eventTitleCollection
private UIXIterator
  fileIterator
Initial: new UIXIterator()
private CoreTable
  fileTable
Initial: new CoreTable()
private boolean
  fromEasySubmission
Initial: false
private String
  genreBundle
private HtmlSelectOneMenu
  genreSelect
Initial: new HtmlSelectOneMenu()
private IdentifierCollection
  identifierCollection
private UIXIterator
  identifierIterator
Initial: new UIXIterator()
private CoreInputFile
  inputFile
Initial: new CoreInputFile()
private PubItemVOPresentation
  item
Initial: null
private ItemValidating
  itemValidating
Initial: null
Notes: Validation Service
private List
  languages
Initial: null
Notes: private CreatorCollection authorCopyPasteOrganizations;
private HtmlCommandLink
  lnkAccept
Initial: new HtmlCommandLink()
private HtmlCommandLink
  lnkDelete
Initial: new HtmlCommandLink()
private HtmlCommandLink
  lnkRelease
Initial: new HtmlCommandLink()
private HtmlCommandLink
  lnkSave
Initial: new HtmlCommandLink()
Notes: bindings
private HtmlCommandLink
  lnkSaveAndSubmit
Initial: new HtmlCommandLink()
public static const String
  LOAD_EDITITEM
Initial: "loadEditItem"
Notes: Faces navigation string
private String
  locatorUpload
private static Logger
  logger
Initial: Logger.getLogger(EditItem.class)
private UIXIterator
  pubLangIterator
Initial: new UIXIterator()
private static const long
  serialVersionUID
Initial: 1L
private SourceCollection
  sourceCollection
private UIXIterator
  sourceIdentifierIterator
Initial: new UIXIterator()
private UIXIterator
  sourceIterator
Initial: new UIXIterator()
private String
  suggestConeUrl
Initial: null
private TitleCollection
  titleCollection
Notes: FIXME delegated internal collections
private UploadedFile
  uploadedFile
public static const String
  VALIDATIONPOINT_ACCEPT
Initial: "accept_item"
public static const String
  VALIDATIONPOINT_SUBMIT
Initial: "submit_item"
Notes: Constants for validation points
private HtmlMessages
  valMessage
Initial: new HtmlMessages()
public static const String
  VALUE_BINDING_PUBITEM_METADATA
Initial: "EditItem.pubItem.metadata"
Notes: Constants for value bindings
public static const String
  VALUE_BINDING_PUBITEM_METADATA_CREATORS
Initial: "EditItem.pubItem.metadata.creators"
public static const String
  VALUE_BINDING_PUBITEM_METADATA_EVENT
Initial: "EditItem.pubItem.metadata.event"
public static const String
  VALUE_BINDING_PUBITEM_METADATA_IDENTIFIERS
Initial: "EditItem.pubItem.metadata.identifiers"
 
EditItem Methods
Operation Details
public
acceptLocalTags():String
Sequential
public
addCreatorString():String
Sequential
public
addFile():String
Sequential
Notes: This method adds a file to the list of files of the item
@return navigation string (null)
public
addFile(
   ActionEvent event):void
Sequential
Notes: This method adds a file to the list of files of the item
@return navigation string (null)
public
addLanguage():String
Sequential
public
addLocalTag():String
Sequential
Notes: Adds a new local tag to the PubItemVO and a new wrapped local tag to PubItemVOPresentation.
@return Returns always null.
public
addLocator():String
Sequential
Notes: This method adds a locator to the list of locators of the item
@return navigation string (null)
package
bindFiles():void
Sequential
private
bindUploadedFilesAndLocators():void
Sequential
Notes: This method binds the uploaded files and locators to the files in the PubItem during the save process
public
cancel():String
Sequential
Notes: Cancels the editing.
@return string, identifying the page that should be navigated to after this methodcall
public
changeGenre():String
Sequential
Notes: This method changes the Genre and sets the needed property file for genre specific Metadata
@return String null
private
cleanEditItem():void
Sequential
Notes: This method cleans up all the helping constructs like collections etc.
public
delete():String
Sequential
Notes: Deletes the current item.
@return string, identifying the page that should be navigated to after this methodcall
public
EditItem():
Sequential
Notes: Public constructor.
private
enableLinks():void
Sequential
Notes: Enables/Disables the action links.
public
fileDownloaded():void
Sequential
Notes: Preview method for uploaded files
public
fileUploaded(
   ValueChangeEvent event):void
Sequential
public
fileUploaded():String
Sequential
protected
getAcceptItemSessionBean():AcceptItemSessionBean
Sequential
Notes: Returns a reference to the scoped data bean (the AcceptItemSessionBean).
@return a reference to the scoped data bean
protected
getAffiliationSessionBean():AffiliationSessionBean
Sequential
Notes: Returns the AffiliationSessionBean.
@return a reference to the scoped data bean (AffiliationSessionBean)
public
getAttributes():String
Sequential
public
getCcScriptTag():String
Sequential
protected
getCollectionListSessionBean():ContextListSessionBean
Sequential
Notes: Returns the ContextListSessionBean.
@return a reference to the scoped data bean (ContextListSessionBean)
public
getContentAbstractCollection():ContentAbstractCollection
Sequential
public
getContentCategories():SelectItem
Sequential
Notes: Returns all options for content categories.
@return all options for content c ategories.
public
getContentSubjectCollection():ContentSubjectCollection
Sequential
public
getContextDescription():String
Sequential
Notes: Retrieves the description of a context from the framework.
@return the context description
public
getContextDescriptionForPopup():String
Sequential
Notes: Retrieves the description of a context to open it in a popup box. This method removes all carriage returns because javascript throws an error if they are present.
@return the context description without carriage returns
public
getContextName():String
Sequential
public
getCreatorCollection():CreatorCollection
Sequential
public
getDegreeTypes():SelectItem
Sequential
Notes: Returns all options for degreeType.
@return all options for degreeType
public
getEditItemPage():EditItemPage
Sequential
protected
getEditItemSessionBean():de.mpg.escidoc.pubman.editItem.EditItemSessionBean
Sequential
Notes: Returns a reference to the scoped data bean (the EditItemSessionBean).
@return a reference to the scoped data bean
public
getEventTitleCollection():TitleCollection
Sequential
public
getFileIterator():UIXIterator
Sequential
public
getFiles():List
Sequential
public
getFileTable():CoreTable
Sequential
public
getGenreBundle():String
Sequential
public
getGenres():SelectItem
Sequential
Notes: localized creation of SelectItems for the genres available.
@return SelectItem[] with Strings representing genres.
public
getGenreSelect():HtmlSelectOneMenu
Sequential
public
getIdentifierCollection():IdentifierCollection
Sequential
public
getIdentifierIterator():UIXIterator
Sequential
public
getInputFile():CoreInputFile
Sequential
public
getInvitationStatuses():SelectItem
Sequential
public
getInvited():boolean
Sequential
Notes: Invitationstatus of event has to be converted as it's an enum that is supposed to be shown in a checkbox.
@return true if invitationstatus in VO is set, else false
public
getItem():PubItemVO
Sequential
protected
getItemControllerSessionBean():de.mpg.escidoc.pubman.ItemControllerSessionBean
Sequential
Notes: Returns a reference to the scoped data bean (the ItemControllerSessionBean).
@return a reference to the scoped data bean
protected
getItemListSessionBean():ItemListSessionBean
Sequential
Notes: Returns the ItemListSessionBean.
@return a reference to the scoped data bean (ItemListSessionBean)
public
getLanguageOptions():SelectItem
Sequential
public
getLanguages():List
Sequential
public
getLnkAccept():HtmlCommandLink
Sequential
public
getLnkDelete():HtmlCommandLink
Sequential
public
getLnkRelease():HtmlCommandLink
Sequential
public
getLnkSave():HtmlCommandLink
Sequential
public
getLnkSaveAndSubmit():HtmlCommandLink
Sequential
public
getLocalTagEditingAllowed():boolean
Sequential
public
getLocators():List
Sequential
public
getLocatorUpload():String
Sequential
public
getNumberOfFiles():int
Sequential
public
getNumberOfLocators():int
Sequential
public
getPubCollectionName():String
Sequential
public
getPubItem():PubItemVOPresentation
Sequential
Notes: Delivers a reference to the currently edited item. This is a shortCut for the method in the ItemController.
@return the item that is currently edited
public
getPubLangIterator():UIXIterator
Sequential
protected
getPubManSessionBean():de.mpg.escidoc.pubman.PubManSessionBean
Sequential
Notes: Returns a reference to the scoped data bean (the PubManSessionBean).
@return a reference to the scoped data bean
public
getRenderRemoveLanguage():boolean
Sequential
public
getReviewMethods():SelectItem
Sequential
Notes: Returns all options for reviewMethod.
@return all options for reviewMethod
public
getSourceCollection():SourceCollection
Sequential
public
getSourceIdentifierIterator():UIXIterator
Sequential
public
getSourceIterator():UIXIterator
Sequential
protected
getSubmitItemSessionBean():SubmitItemSessionBean
Sequential
Notes: Returns a reference to the scoped data bean (the SubmitItemSessionBean).
@return a reference to the scoped data bean
public
getSuggestConeUrl():String
Sequential
Tags: throws=Exception
public
getTitleCollection():TitleCollection
Sequential
public
getUploadedFile():UploadedFile
Sequential
public
getValMessage():HtmlMessages
Sequential
public
getVisibilities():SelectItem
Sequential
Notes: Returns all options for visibility.
@return all options for visibility
public
init():void
Sequential
Notes: Callback method that is called whenever a page containing this page fragment is navigated to, either directly via a URL, or indirectly via page navigation.
private
initializeItem():void
Sequential
Notes: Adds sub-ValueObjects to an item initially to be able to bind uiComponents to them.
public
isFromEasySubmission():boolean
Sequential
private
isInModifyMode():boolean
Sequential
Notes: Evaluates if the EditItem should be in modify mode.
@return true if modify mode should be on
public
loadAffiliationTree():String
Sequential
public static
parseCreatorString(
   String creatorString,
   CreatorCollection creatorCollection,
   List orgs,
   boolean overwrite):void
Sequential
Tags: throws=Exception
Notes: Parses a string that includes creators in different formats and adds them to the given creatorCollection.
public
removeLanguage():String
Sequential
public
reorganizeFileIndexes():void
Sequential
Notes: This method reorganizes the index property in PubFileVOPresentation after removing one element of the list.
public
reorganizeLocatorIndexes():void
Sequential
Notes: This method reorganizes the index property in PubFileVOPresentation after removing one element of the list.
public
save():String
Sequential
Notes: Saves the item.
@return string, identifying the page that should be navigated to after this methodcall
public
saveAndAccept():String
Sequential
Notes: Saves and accepts an item.
@return string, identifying the page that should be navigated to after this methodcall
public
saveAndSubmit():String
Sequential
Notes: Saves and submits an item.
@return string, identifying the page that should be navigated to after this methodcall Changed by FrM: Inserted validation and call to "enter submission comment" page.
public
saveAnyway():String
Sequential
Notes: Saves the item, even if there are informative validation messages.
@author Michael Franke
@return string, identifying the page that should be navigated to after this methodcall
public
saveLocator():String
Sequential
Notes: This method saves the latest locator to the list of files of the item
@return navigation string (null)
public
setContentAbstractCollection(
   ContentAbstractCollection contentAbstractCollection):void
Sequential
public
setContentSubjectCollection(
   ContentSubjectCollection contentSubjectCollection):void
Sequential
public
setCreatorCollection(
   CreatorCollection creatorCollection):void
Sequential
public
setEventTitleCollection(
   TitleCollection eventTitleCollection):void
Sequential
public
setFileIterator(
   UIXIterator fileIterator):void
Sequential
public
setFiles(
   List files):void
Sequential
public
setFileTable(
   CoreTable fileTable):void
Sequential
public
setFromEasySubmission(
   boolean fromEasySubmission):void
Sequential
public
setGenreBundle(
   String genreBundle):void
Sequential
public
setGenreSelect(
   HtmlSelectOneMenu genreSelect):void
Sequential
public
setIdentifierCollection(
   IdentifierCollection identifierCollection):void
Sequential
public
setIdentifierIterator(
   UIXIterator identifierIterator):void
Sequential
public
setInputFile(
   CoreInputFile inputFile):void
Sequential
public
setInvited(
   boolean invited):void
Sequential
Notes: Invitationstatus of event has to be converted as it's an enum that is supposed to be shown in a checkbox.
public
setItem(
   PubItemVOPresentation item):void
Sequential
public
setLnkAccept(
   HtmlCommandLink lnkAccept):void
Sequential
public
setLnkDelete(
   HtmlCommandLink lnkDelete):void
Sequential
public
setLnkRelease(
   HtmlCommandLink lnkRelease):void
Sequential
public
setLnkSave(
   HtmlCommandLink lnkSave):void
Sequential
public
setLnkSaveAndSubmit(
   HtmlCommandLink lnkSaveAndSubmit):void
Sequential
public
setLocators(
   List locators):void
Sequential
public
setLocatorUpload(
   String locatorUpload):void
Sequential
public
setPubCollectionName(
   String pubCollection):void
Sequential
public
setPubLangIterator(
   UIXIterator pubLangIterator):void
Sequential
public
setSourceCollection(
   SourceCollection sourceCollection):void
Sequential
public
setSourceIdentifierIterator(
   UIXIterator sourceIdentifierIterator):void
Sequential
public
setSourceIterator(
   UIXIterator sourceIterator):void
Sequential
public
setSuggestConeUrl(
   String suggestConeUrl):void
Sequential
public
setTitleCollection(
   TitleCollection titleCollection):void
Sequential
public
setUploadedFile(
   UploadedFile uploadedFile):void
Sequential
public
setValMessage(
   HtmlMessages valMessage):void
Sequential
private
showValidationMessages(
   ValidationReportVO report):void
Sequential
Notes: Displays validation messages.
@author Michael Franke
public
submit():String
Sequential
Notes: Submits the item. Should not be used at the moment.
@return string, identifying the page that should be navigated to after this methodcall
protected
uploadFile(
   UploadedFile uploadedFile,
   String mimetype,
   String userHandle):URL
Sequential
Tags: throws=Exception
Notes: Uploads a file to the staging servlet and returns the corresponding URL.
@return The URL of the uploaded file.
public
uploadFile(
   UploadedFile file):String
Sequential
public
uploadLocator():void
Sequential
Notes: Uploads a file from a given locator.
public
validate():String
Sequential
Notes: Validates the item.
@return string, identifying the page that should be navigated to after this methodcall