class: ItemControllerSessionBean

public class: ItemControllerSessionBean
Author: : Thomas Diebäcker, created 25.04.2007
Project: Phase: 1.0; Status: Proposed; Version: : $Revision: 2769 $ $LastChangedDate: 2009-06-26 1; Complexity: 1
Dates: Created: 16.07.2009 15:34:17; Modified: 16.07.2009 15:34:17;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {CD7D9B3C-F3E6-43f5-8A72-415DACEB12F7}
Handles all actions on/with items, calls to the framework.
 

Goto: Custom Properties, Fields, Methods

Extends: FacesBean

See also: PubItemVOPresentation, ItemExporting, LoginHelper, PubItemDepositing, PubItemPublishing, PubItemSimpleStatistics, QualityAssurance, Search, FacesBean

Appears in: pubman

Connections
 
Custom Properties
 
ItemControllerSessionBean Attributes
Attribute Details
public static const String
  BEAN_NAME
Initial: "ItemControllerSessionBean"
private ContextVO
  currentContext
Initial: null
private ValidationReportVO
  currentItemValidationReport
Initial: null
private PubItemVOPresentation
  currentPubItem
Initial: null
private DataGathering
  dataGathering
Initial: null
private EmailHandling
  emailHandling
Initial: null
private ItemExporting
  itemExporting
Initial: null
private ItemValidating
  itemValidating
Initial: null
private static Logger
  logger
Initial: Logger.getLogger(ItemControllerSessionBean.class)
private LoginHelper
  loginHelper
Initial: (LoginHelper) getSessionBean(LoginHelper.class)
private static const String
  PROPERTY_CONTENT_MODEL
Initial: "escidoc.framework_access.content-model.id.publication"
private PubItemDepositing
  pubItemDepositing
Initial: null
private PubItemPublishing
  pubItemPublishing
Initial: null
private PubItemSimpleStatistics
  pubItemStatistic
Initial: null
private QualityAssurance
  qualityAssurance
Initial: null
private Search
  search
Initial: null
private static const long
  serialVersionUID
Initial: 8235607890711998557L
private XmlTransforming
  xmlTransforming
Initial: null
 
ItemControllerSessionBean Methods
Operation Details
public
acceptCurrentPubItem(
   String acceptanceComment,
   String navigationRuleWhenSuccessfull):String
Sequential
Notes: Accepts an item.
@param pubItem the item that should be accepted
@return string, identifying the page that should be navigated to after this method call
private
acceptPubItem(
   PubItemVO pubItem,
   String acceptanceComment,
   boolean ignoreInformativeMessages):ItemRO
Sequential
Tags: throws=Exception
Notes: Accepts an item.
@return reference to the accepted item
private
cleanUpCreator(
   CreatorVO creator):void
Sequential
Notes: Cleans up the CreatorVO from unused sub-VOs.
public
cleanUpItem(
   PubItemVO pubItem):void
Sequential
Notes: Cleans up the ValueObject for saving/submitting from unused sub-VOs.
public
createItemFromTemplate():String
Sequential
Notes: Redirects the user to the create new revision page Changed by DiT, 29.11.2007: only show contexts when user has privileges for more than one context
@return Sring nav rule to load the create new revision page
public
createNewPubItem(
   String navigationRuleWhenSuccessful,
   ContextRO pubContextRO):String
Sequential
Notes: Creates a new PubItem and handles navigation afterwards.
@return string, identifying the page that should be navigated to after this methodcall
private
createNewPubItem(
   ContextRO pubContextRO):PubItemVOPresentation
Sequential
Tags: throws=Exception
Notes: Creates a new PubItem.
@return the new PubItem
public
createNewRevision(
   String navigationRuleWhenSuccessfull,
   ContextRO pubContextRO,
   PubItemVO pubItem,
   String revisionDescription):String
Sequential
Notes: Creates a new Revision of a PubItem and handles navigation afterwards.
@return string, identifying the page that should be navigated to after this methodcall
private
createNewRevision(
   ContextRO pubContextRO,
   PubItemVO pubItem,
   String revisionDescription):PubItemVO
Sequential
Tags: throws=Exception
Notes: Creates a new Revision.
@return the new PubItem
public
deleteCurrentPubItem(
   String navigationRuleWhenSuccessfull):String
Sequential
Notes: Deletes a PubItem and handles navigation afterwards.
@return string, identifying the page that should be navigated to after this methodcall
private
deletePubItem(
   ItemRO pubItem):void
Sequential
Tags: throws=Exception
Notes: Deletes a PubItem from the framework.
@return a reference to the PubItem returned by the framework
public
deletePubItemList(
   List pubItemList,
   String navigationRuleWhenSuccessfull):String
Sequential
Notes: TODO NBU: remove this method
private
getContextListSessionBean():ContextListSessionBean
Sequential
public
getCurrentContext():ContextVO
Sequential
public
getCurrentItemValidationReport():ValidationReportVO
Sequential
public
getCurrentPubItem():PubItemVOPresentation
Sequential
public
getCurrentWorkflow():String
Sequential
protected
getEditItemSessionBean():EditItemSessionBean
Sequential
Notes: Returns a reference to the scoped data bean (the EditItemSessionBean).
@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
getPubItemListSessionBean():PubItemListSessionBean
Sequential
public
getStatisticValue(
   String reportDefinitionType):String
Sequential
Tags: throws=Exception
public
hasChanged(
   PubItemVO oldPubItem,
   PubItemVO newPubItem):boolean
Sequential
Notes: Tests if the metadata of the two items have changed.
@return true if the metadata of the new item has changed
public
init():void
Sequential
Notes: This method is called when this bean is initially added to session scope. Typically, this occurs as a result of evaluating a value binding or method binding expression, which utilizes the managed bean facility to instantiate this bean and store it into session scope.
public
initializeItem(
   PubItemVO newPubItem):PubItemVO
Sequential
Notes: Initializes a new item with ValueObjects. FrM: Changes to be able to initialize an item created as a new revision of an existing item.
@return the initialized item.
public
ItemControllerSessionBean():
Sequential
Notes: Public constructor, initializing used Beans.
public
retrieveAffiliation(
   String affiliationId):AffiliationVO
Sequential
Tags: throws=Exception
Notes: Returns an affiliation retrieved by its ID.
@return the requested affiliation
public
retrieveChildAffiliations(
   AffiliationVOPresentation parentAffiliation):List
Sequential
Tags: throws=Exception
Notes: Returns all child affiliations for a parent affiliation.
@return all child affiliations
public
retrieveCollections():List
Sequential
Tags: throws=Exception
Notes: Returns all contexts for a user.
@return the list of contexts
public
retrieveContext(
   String contextID):ContextVO
Sequential
Notes: Returns all items for a user depending on the selected itemState.
@return the context with the given ID
public
retrieveExportData(
   ExportFormatVO exportFormatVO,
   List itemsToExportList):byte
Sequential
Tags: throws=TechnicalException
Notes: Returns the export data stream with the selelcted items in the proper export format
@author: StG
@return the export data stream as array of bytes
public
retrieveExportFormats():List
Sequential
Tags: throws=TechnicalException
Notes: Returns the available export formats (structured formats and citation layout styles) contained in exportFrrmatVO. It calls the proper external services for the retrieval of the export formats.
@author: StG
@param searchString the string which should be serached for
@param includeFiles determines if the search should include the files of the items
@return all items which contain the searchString
public
retrieveItem(
   String itemID):PubItemVOPresentation
Sequential
Tags: throws=Exception
Notes: Returns a list of releases for a pubitem.
@author Tobias Schraut
@param the item id for which releases should be fetched
@return the item with the requested id
public
retrieveItems(
   String selectedItemState):ArrayList
Sequential
Tags: throws=Exception
Notes: Returns all items for a user depending on the selected itemState.
@return all items for a user in the selected state
public
retrieveItems(
   List itemRefs):ArrayList
Sequential
Tags: throws=Exception
Notes: Returns all items in a list of item ids.
@return all items for a user with the given ids
public
retrieveParentsForRevision(
   PubItemVO pubItemVO):List
Sequential
Tags: throws=Exception
Notes: @author Markus Haarlaender
@return a list of wrapped ReleationVOs that contain information about the items from which this revision was created
public
retrieveRevisions(
   PubItemVO pubItemVO):List
Sequential
Tags: throws=Exception
Notes: @author Tobias Schraut
@return a list of wrapped released ReleationVOs
public
retrieveTopLevelAffiliations():ArrayList
Sequential
Tags: annotations=@Deprecated
throws=Exception
Notes: Returns all top-level affiliations.
@deprecated Use searchTopLevelAffiliations instead.
@return all top-level affiliations
public
retrieveVersionHistoryForItem(
   String itemID):List
Sequential
Tags: throws=Exception
Notes: Returns an item by its id.
@param the item id which belongs to the item
@return the item with the requested id
public
reviseCurrentPubItem(
   String reviseComment,
   String navigationStringToGoBack):String
Sequential
public
saveAndSubmitOrReleaseCurrentPubItem(
   String submissionComment,
   String navigationRuleWhenSuccessfull):String
Sequential
Notes: Submits a PubItem and handles navigation afterwards.
@return string, identifying the page that should be navigated to after this methodcall
private
saveAndSubmitOrReleasePubItem(
   PubItemVO pubItem,
   String submissionComment,
   boolean ignoreInformativeMessages):ItemRO
Sequential
Tags: throws=Exception
Notes: Submits a PubItem to the framework.
@return a reference to the PubItem returned by the framework
public
saveCurrentPubItem(
   String navigationRuleWhenSuccessfull,
   boolean ignoreInformativeMessages):String
Sequential
Notes: Saves a PubItem and handles navigation afterwards.
@return string, identifying the page that should be navigated to after this methodcall
private
savePubItem(
   PubItemVO pubItemToSave,
   boolean ignoreInformativeMessages):PubItemVO
Sequential
Tags: throws=Exception
Notes: Saves a PubItem to the framework.
@param pubItem the PubItem to save
@return the PubItem returned by the framework
public
searchChildAffiliations(
   AffiliationVOPresentation parentAffiliation):List
Sequential
Tags: throws=Exception
Notes: Returns all child affiliations of a given affiliation.
@return all child affiliations
public
searchItems(
   ArrayList criteria):ItemContainerSearchResult
Sequential
Tags: throws=Exception
Notes: Returns all items which contain the searchString as List.
@param searchString the string which should be searched for
@param includeFiles determines if the search should include the files of the items
@return all items which contain the searchString
public
searchTopLevelAffiliations():List
Sequential
Tags: throws=Exception
Notes: Returns all top-level affiliations.
@return all top-level affiliations
public
sendEmail(
   String smtpHost,
   String usr,
   String pwd,
   String senderAddress,
   String[] recipientsAddresses,
   String[] recipientsCCAddresses,
   String[] recipientsBCCAddresses,
   String[] replyToAddresses,
   String subject,
   String text,
   String[] attachments):String
Sequential
Tags: throws=TechnicalException
Notes: Method for sending an email with attached file. The sending requires authentication.
@author: StG
public
setCurrentCollection(
   ContextVO currentCollection):void
Sequential
public
setCurrentItemValidationReport(
   ValidationReportVO currentItemValidationReport):void
Sequential
public
setCurrentPubItem(
   PubItemVOPresentation currentPubItem):void
Sequential
public
submitOrReleaseCurrentPubItem(
   String submissionComment,
   String navigationRuleWhenSuccessfull):String
Sequential
Notes: Submits a PubItem and handles navigation afterwards.
@return string, identifying the page that should be navigated to after this methodcall
private
submitOrReleasePubItem(
   PubItemVO pubItem,
   String submissionComment,
   boolean ignoreInformativeMessages):ItemRO
Sequential
Tags: throws=Exception
Notes: Submits a PubItem to the framework.
@return a reference to the PubItem returned by the framework
public
submitOrReleasePubItemList(
   ArrayList pubItemList,
   String submissionComment,
   String navigationRuleWhenSuccessfull):String
Sequential
Notes: //TODO NBU: remove this method
private
submitOrSubmitAndReleasePubItem(
   PubItemVO pubItem,
   String submissionComment,
   AccountUserVO user):PubItemVO
Sequential
Tags: throws=Exception
public
validate(
   PubItemVO pubItem,
   String validationPoint):String
Sequential
Tags: throws=Exception
Notes: Validates the item.
@author Michael Franke Changed by DiT, 17.10.2007: new parameter: validation point
@return string, identifying the page that should be navigated to after this methodcall
public
withdrawCurrentPubItem(
   String navigationRuleWhenSuccessfull,
   String withdrawalComment):String
Sequential
Notes: Submits a PubItem and handles navigation afterwards.
@return string, identifying the page that should be navigated to after this methodcall
private
withdrawPubItem(
   PubItemVO pubItem,
   String withdrawalComment):void
Sequential
Tags: throws=Exception
Notes: Submits a PubItem to the framework.
@author Michael Franke
@return a reference to the PubItem returned by the framework