class: ViewItem

public class: ViewItem
Author: Tobias Schraut (created on 08.02.2007)
Project: Phase: 1.0; Status: Proposed; Version: $Revision: 2026 $ $LastChangedDate: 2009-01-29 15:; Complexity: 1
Dates: Created: 16.07.2009 15:34:00; Modified: 16.07.2009 15:34:00;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {E2C6FAA9-6D82-4a2c-8315-3F6F01987D5C}
This class provides all functionality for viewing one specified item.
 

Goto: Custom Properties, Fields, Methods

Extends: FacesBean

See also: ViewItemOrganization, FacesBean

Appears in: viewItem

Connections
 
Custom Properties
 
ViewItem Attributes
Attribute Details
private ArrayList
  abstractsArray
Notes: The abstract(s) of the item.
private boolean
  abstractsCollapsed
Notes: a flag for showing the abstract collapsed or expanded.
private UIColumn
  abstractsColumn
Initial: new UIColumn()
private HtmlDataTable
  abstractsTable
Initial: new HtmlDataTable()
private HtmlOutputText
  abstractsText
Initial: new HtmlOutputText()
private String
  affiliatedOrganizations
Notes: The list of affiliated organizations in one string.
private List
  affiliatedOrganizationsList
Notes: The list of affiliated organizations in a list.
private String
  affiliationOfContext
Notes: The affiliation of the context.
private ArrayList
  alternativeTitlesArray
Notes: The list of the alternative titles of the item.
public static const String
  BEAN_NAME
Initial: "ViewItem"
private HtmlCommandButton
  btnBackToList1
Initial: new HtmlCommandButton()
private HtmlCommandButton
  btnNextItem1
Initial: new HtmlCommandButton()
private HtmlCommandButton
  btnPreviousItem1
Initial: new HtmlCommandButton()
Notes: the pub context the item is related to
private String
  buttonMoreAbstracts
Notes: The Text for the more button of the abstract.
private String
  buttonMoreCreatorList
Notes: The Text for the more button of the creators list.
private String
  buttonMoreItemAlternativeTitles
Notes: The Text for the more button of the alternative titles of the item.
private String
  buttonMoreItemEventTitles
Notes: The Text for the more button of the event titles of the item.
private String
  buttonMoreTOC
Notes: The Text for the more button of the table of contents.
private String
  contentLanguage
Notes: The the content language of the item.
private ContextVO
  context
Notes: The related PubCollection.
private ArrayList
  creatorArray
Notes: The list of formatted creators in an ArrayList.
private boolean
  creatorListCollapsed
Notes: a flag for showing the creatorList collapsed or expanded.
private ArrayList
  creatorOrganizationsArray
Notes: The list of formatted creators which are organizations in an ArrayList.
private String
  creators
Notes: The list of creators in one string.
private List
  creatorsList
Notes: The list of creators in a list.
private ArrayList
  eventTitleArray
Notes: The list of formatted event titles in an ArrayList.
private boolean
  eventTitlesCollapsed
Notes: a flag for showing the event titles collapsed or expanded.
private ArrayList
  fileArray
Notes: The file(s) of the item.
private UIColumn
  fileColumn
Initial: new UIColumn()
private HtmlDataTable
  fileTable
Initial: new HtmlDataTable()
private HtmlOutputText
  fileText
Initial: new HtmlOutputText()
private boolean
  itemAlternativeTitlesCollapsed
Notes: a flag for showing the alternative titles collapsed or expanded.
private String
  itemBookmarkTitle
Notes: The title of the item to bookmark
private String
  itemCitation
Notes: The URL where the item can be retrieved
private ArrayList
  itemIdentifierArray
Notes: The list of formatted identifiers of the item.
private UIColumn
  itemIdentifierColumn
Initial: new UIColumn()
private HtmlDataTable
  itemIdentifierTable
Initial: new HtmlDataTable()
private HtmlOutputText
  itemIdentifierText
Initial: new HtmlOutputText()
private ArrayList
  itemSourceList
Notes: ArrayList for the UI Component to examine which embedded elements of the Source are collapsed or expanded.
private ItemValidating
  itemValidating
Initial: null
Notes: Validation Service
private HtmlCommandLink
  lnkDelete
Initial: new HtmlCommandLink()
private HtmlCommandLink
  lnkEdit
Initial: new HtmlCommandLink()
private HtmlCommandLink
  lnkNewSubmission
Initial: new HtmlCommandLink()
private HtmlCommandLink
  lnkSubmit
Initial: new HtmlCommandLink()
private HtmlCommandLink
  lnkWithdraw
Initial: new HtmlCommandLink()
public static const String
  LOAD_VIEWITEM
Initial: "loadViewItem"
Notes: Faces navigation string
private static Logger
  logger
Initial: Logger.getLogger(ViewItem.class)
Notes: <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
private int
  numberCharsAbstractsCollapsed
Notes: number of characters which should be displayed when abstract is shown collapsed.
private int
  numberCharsTOCCollapsed
Notes: number of characters which should be displayed when toc is shown collapsed.
private int
  numberCreatorListCollapsed
Notes: number of ceators which should be displayed when shown collapsed.
private int
  numberEventTitlesCollapsed
Notes: number of event titles which should be displayed when shown collapsed.
private int
  numberItemAlternativeTitlesCollapsed
Notes: number of entries which should be displayed when alternative titles is shown collapsed.
private ArrayList
  organizationArray
Notes: The list of formatted organzations in an ArrayList.
private ArrayList
  organizationList
Notes: The list of affiliated organizations as VO List.
private AccountUserVO
  owner
Notes: the owner of the item.
private HtmlPanelGrid
  panFiles
Initial: new HtmlPanelGrid()
Notes: Panel grid for dynamic File output.
private HtmlPanelGrid
  panSources
Initial: new HtmlPanelGrid()
Notes: Panel grid for dynamic Source output.
public static const String
  PARAMETERNAME_ITEM_ID
Initial: "itemId"
private PubItemVO
  pubItem
Notes: The PubItem to be displayed.
private ArrayList
  relationArray
Notes: The list of formatted relations of the item.
private UIColumn
  relationColumn
Initial: new UIColumn()
private HtmlDataTable
  relationTable
Initial: new HtmlDataTable()
private HtmlOutputText
  relationText
Initial: new HtmlOutputText()
private ArrayList
  sourceArray
Notes: The source(s) of the item.
private String
  tableOfContents
Notes: The table of contents of the item.
private boolean
  tocCollapsed
Notes: a flag for showing the TOC collapsed or expanded.
private HtmlMessages
  valMessage
Initial: new HtmlMessages()
private String
  valWithdrawalComment
private ViewItemOrganization
  viewOrganisation
Notes: A ViewItemOrganization object for displaying the organization�s information.
 
ViewItem Methods
Operation Details
private
addHandleToMethod(
   HttpMethod method,
   String eSciDocUserHandle):void
Sequential
Notes: Adds a cookie named "escidocCookie" that holds the eScidoc user handle to the provided http method object.
public
backToList():String
Sequential
Notes: redirects the user to the list he came from
@return String nav rule for loading the page the user came from
private
createFiles():void
Sequential
Notes: Creates a list of files that are related to the item
private
createSources():void
Sequential
Notes: Creates a list of sources
public
deleteItem():String
Sequential
Notes: deletes the selected item(s) an redirects the user to the page he came from (depositor workspace or search result list)
@return String nav rule to load the page the user came from
public
downloadFile(
   int filePosition):void
Sequential
Tags: throws=IOException,Exception
Notes: downloads the file the user wants to download directly from FIZ Framework
public
editItem():String
Sequential
Notes: Redirects the user to the edit item page
@return Sring nav rule to load the edit item page
public
expandCollapseAbstracts():String
Sequential
Notes: sets the abstracts collapsed flag to true or false and switches the expand/collapsed link
@return String faces navigation string to reload the view item page
public
expandCollapseCreatorList():String
Sequential
Notes: sets the creatorList collapsed flag to true or false
@return String faces navigation string to reload the view item page
public
expandCollapseEventTitles():String
Sequential
Notes: sets the event titles collapsed flag to true or false
@return String faces navigation string to reload the view item page
public
expandCollapseItemAlternativeTitles():String
Sequential
Notes: sets the alternative titles of the item collapsed flag to true or false and switches the label of the expand/collapse link
@return String faces navigation string to reload the view item page
public
expandCollapseSourceAlternativeTitle(
   String sourceID):void
Sequential
Notes: expands or collapses the source's elements of type alternative title the user has selected (currently limited to 5 levels)
public
expandCollapseSourceCreators(
   String sourceID):void
Sequential
Notes: expands or collapses the source's elements of type creator the user has selected (currently limited to 5 levels)
public
expandCollapseSourceElements():String
Sequential
Notes: expands or collapses the source's elements the user has selected
@return String faces navigation string to reload the view item page
public
expandCollapseSourceOfSource(
   String sourceID):void
Sequential
Notes: expands or collapses the source's elements of type source the user has selected
public
expandCollapseTOC():String
Sequential
Notes: sets the TOC collapsed flag to true or false
@return String faces navigation string to reload the view item page
public
generateDownloadLink(
   ActionEvent event):String
Sequential
Tags: throws=Exception
Notes: Method is called in jsp by the action handler. Triggers download action
@return String faces navigation rule to open the file download page
private
getAbstract():ArrayList
Sequential
Notes: gets the table of content of the item
@return ArrayList<String> list of abstracts according to the expand/collapsed state
public
getAbstractsArray():ArrayList
Sequential
public
getAbstractsColumn():UIColumn
Sequential
public
getAbstractsTable():HtmlDataTable
Sequential
public
getAbstractsText():HtmlOutputText
Sequential
private
getAffiliatedOrganizationList():void
Sequential
Notes: generates the affiliated organization list as one string for presenting it in the jsp
public
getAffiliatedOrganizations():String
Sequential
public
getAffiliatedOrganizationsList():List
Sequential
private
getAffiliation(
   String affiliationID):String
Sequential
Tags: throws=Exception
Notes: Returns the affiliation refered in the collection of the item.
@return the requested affiliation name as string
public
getAffiliationOfCollection():String
Sequential
Notes: gets the responsible affiliation of the collection the pubitem is in
@return String the affiliation
private
getAlternativeTitles():ArrayList
Sequential
Notes: gets the alternative title(s) of the item
@return ArrayList<String> the list of formatted alternative titles (either collapsed or expanded)
public
getAlternativeTitlesArray():ArrayList
Sequential
public static
getBEAN_NAME():String
Sequential <<property get>>
Tags: attribute_name=BEAN_NAME
Notes: Getters and Setters
public
getBtnBackToList1():HtmlCommandButton
Sequential
public
getBtnNextItem1():HtmlCommandButton
Sequential
public
getBtnPreviousItem1():HtmlCommandButton
Sequential
public
getButtonMoreAbstracts():String
Sequential
public
getButtonMoreCreatorList():String
Sequential
public
getButtonMoreItemAlternativeTitles():String
Sequential
public
getButtonMoreItemEventTitles():String
Sequential
public
getButtonMoreTOC():String
Sequential
protected
getCollectionListSessionBean():ContextListSessionBean
Sequential
Notes: Returns the ContextListSessionBean.
@return a reference to the scoped data bean (ContextListSessionBean)
protected
getCommonSessionBean():CommonSessionBean
Sequential
Notes: Returns a reference to the scoped data bean (the CommonSessionBean).
@return a reference to the scoped data bean
public
getContentLanguage():String
Sequential
public
getCreatorArray():ArrayList
Sequential
private
getCreatorList():String
Sequential
Notes: generates the creator list as one string for presenting it in the jsp
@return String formatted creator list as string
public
getCreatorOrganizationsArray():ArrayList
Sequential
public
getCreators():String
Sequential
public
getCreatorsList():List
Sequential
public
getDateEvent():String
Sequential
Notes: Gets the formatted event date of the pubitem
@return String formatted event date
public
getEventTitleArray():ArrayList
Sequential
private
getEventTitles():ArrayList
Sequential
Notes: gets the event title(s) of the item
@return ArrayList<String> formatted event titles according the current collapsed or expanded state
public static
getFacesParamValue(
   String name):String
Sequential
Notes: gets the parameters out of the faces context
@return the value of the parameter as string
public
getFileArray():ArrayList
Sequential
public
getFileColumn():UIColumn
Sequential
private
getFiles():ArrayList
Sequential
Notes: gets the list of files of the item
@return ArrayList<FileVO> the list of files
public
getFileTable():HtmlDataTable
Sequential
public
getFileText():HtmlOutputText
Sequential
private
getItemBMTitle():String
Sequential
Notes: Generates the name for the item to be bookmarked
@return String bookmark title
public
getItemBookmarkTitle():String
Sequential
public
getItemCitation():String
Sequential
private
getItemCitationURL():String
Sequential
Notes: Generates the item citation URL (workaround!). This method has to be changed when PID can be assigned and stored in the framework
@return String complete citation URL
protected
getItemControllerSessionBean():ItemControllerSessionBean
Sequential
Notes: Returns the ItemControllerSessionBean.
@return a reference to the scoped data bean (ItemControllerSessionBean)
public
getItemIdentifierArray():ArrayList
Sequential
public
getItemIdentifierColumn():UIColumn
Sequential
private
getItemIdentifiers():ArrayList
Sequential
Notes: gets formatted identifier(s) of the item
@return ArrayList<String> formatted identifier(s)
public
getItemIdentifierTable():HtmlDataTable
Sequential
public
getItemIdentifierText():HtmlOutputText
Sequential
protected
getItemListSessionBean():ItemListSessionBean
Sequential
Notes: Returns a reference to the scoped data bean (the DepositorWSSessionBean).
@return a reference to the scoped data bean
public
getItemSourceList():ArrayList
Sequential
private
getLanguages():String
Sequential
Notes: gets language(s) of the item' s content
@return String formatted languages
public
getLnkDelete():HtmlCommandLink
Sequential
public
getLnkEdit():HtmlCommandLink
Sequential
public
getLnkNewSubmission():HtmlCommandLink
Sequential
public
getLnkSubmit():HtmlCommandLink
Sequential
public
getLnkWithdraw():HtmlCommandLink
Sequential
public static
getLogger():Logger
Sequential
public
getNumberCharsAbstractsCollapsed():int
Sequential
public
getNumberCharsTOCCollapsed():int
Sequential
public
getNumberCreatorListCollapsed():int
Sequential
public
getNumberItemAlternativeTitlesCollapsed():int
Sequential
public
getOrganizationArray():ArrayList
Sequential
public
getOrganizationList():ArrayList
Sequential
public
getOwner():AccountUserVO
Sequential
public
getPanFiles():HtmlPanelGrid
Sequential
public
getPanSources():HtmlPanelGrid
Sequential
public
getPubCollection():ContextVO
Sequential
public
getPubItem():PubItemVO
Sequential
public
getRelationArray():ArrayList
Sequential
public
getRelationColumn():UIColumn
Sequential
private
getRelations():ArrayList
Sequential
Notes: gets the formatted relations of an item
@return ArrayList<String> formatted relation(s)
public
getRelationTable():HtmlDataTable
Sequential
public
getRelationText():HtmlOutputText
Sequential
protected
getSearchResultListSessionBean():SearchResultListSessionBean
Sequential
Notes: Returns the SearchResultListSessionBean.
@return a reference to the scoped data bean (SearchResultListSessionBean)
private
getSelectedItem():String
Sequential
Notes: Returns the position of the selected item in the session bean's list.
@return String the position of the selected item as string
public
getSourceArray():ArrayList
Sequential
private
getSources():ArrayList
Sequential
Notes: gets the list of sources of the item
@return ArrayList<SourceVO> the list of sources
protected
getSubmitItemSessionBean():SubmitItemSessionBean
Sequential
Notes: Returns a reference to the scoped data bean (the SubmitItemSessionBean).
@return a reference to the scoped data bean
public
getTableOfContents():String
Sequential
private
getTOC():String
Sequential
Notes: gets the table of content of the item
@return String the formatted TOC as String (either collapsed or expanded)
public
getValMessage():HtmlMessages
Sequential
public
getValWithdrawalComment():String
Sequential
protected
getViewItemSessionBean():ViewItemSessionBean
Sequential
Notes: Returns a reference to the scoped data bean (the ViewItemSessionBean).
@return a reference to the scoped data bean
public
getViewOrganisation():ViewItemOrganization
Sequential
private
getWithdrawalComment():String
Sequential
Notes: Gets the withdrawal comment if the item to be viewed is already withdrawn
@return String formatted withdrawal comment and adte of withdrawal
protected
getWithdrawItemSessionBean():WithdrawItemSessionBean
Sequential
Notes: Returns a reference to the scoped data bean (the ViewItemSessionBean).
@return a reference to the scoped data bean
public
init():void
Sequential
Notes: Callback method that is called whenever a page is navigated to, either directly via a URL, or indirectly via page navigation.
private
initializeItemSourceView():void
Sequential
Notes: Creates the structure of the sources tree attached to the item (currently limited to 5 levels)
public
isAbstractsCollapsed():boolean
Sequential
public
isCreatorListCollapsed():boolean
Sequential
public
isItemAlternativeTitlesCollapsed():boolean
Sequential
public
isTocCollapsed():boolean
Sequential
public
loadItem():String
Sequential
Notes: Fetches the requested pubitem from the Framework and prepares it to display. The method also distinguishs between the different possibilities of getting the item's ID (out of the faces context or as URL parameter)
@return String navigation string (null for just reloadinh the page)
public
newSubmission():String
Sequential
Notes: initiates a new submission and redirects the user to the edit item page
@return String nav rule for loading the edit item page
public
setAbstractsArray(
   ArrayList abstractsArray):void
Sequential
public
setAbstractsCollapsed(
   boolean abstractsCollapsed):void
Sequential
public
setAbstractsColumn(
   UIColumn abstractsColumn):void
Sequential
public
setAbstractsTable(
   HtmlDataTable abstractsTable):void
Sequential
public
setAbstractsText(
   HtmlOutputText abstractsText):void
Sequential
public
setAffiliatedOrganizations(
   String affiliatedOrganizations):void
Sequential
public
setAffiliatedOrganizationsList(
   List affiliatedOrganizationsList):void
Sequential
public
setAffiliationOfCollection(
   String affiliationOfCollection):void
Sequential
public
setAlternativeTitlesArray(
   ArrayList alternativeTitlesArray):void
Sequential
public
setBtnBackToList1(
   HtmlCommandButton btnBackToList1):void
Sequential
public
setBtnNextItem1(
   HtmlCommandButton btnNextItem1):void
Sequential
public
setBtnPreviousItem1(
   HtmlCommandButton btnPreviousItem1):void
Sequential
public
setButtonMoreAbstracts(
   String buttonMoreAbstracts):void
Sequential
public
setButtonMoreCreatorList(
   String buttonMoreCreatorList):void
Sequential
public
setButtonMoreItemAlternativeTitles(
   String buttonMoreItemAlternativeTitles):void
Sequential
public
setButtonMoreItemEventTitles(
   String buttonMoreItemEventTitles):void
Sequential
public
setButtonMoreTOC(
   String buttonMoreTOC):void
Sequential
public
setContentLanguage(
   String contentLanguage):void
Sequential
public
setCreatorArray(
   ArrayList creatorArray):void
Sequential
public
setCreatorListCollapsed(
   boolean creatorListCollapsed):void
Sequential
public
setCreatorOrganizationsArray(
   ArrayList creatorOrganizationsArray):void
Sequential
public
setCreators(
   String creators):void
Sequential
public
setCreatorsList(
   List creatorsList):void
Sequential
public
setEventTitleArray(
   ArrayList eventTitleArray):void
Sequential
public
setFileArray(
   ArrayList fileArray):void
Sequential
public
setFileColumn(
   UIColumn fileColumn):void
Sequential
public
setFileTable(
   HtmlDataTable fileTable):void
Sequential
public
setFileText(
   HtmlOutputText fileText):void
Sequential
public
setItemAlternativeTitlesCollapsed(
   boolean itemAlternativeTitlesCollapsed):void
Sequential
public
setItemBookmarkTitle(
   String itemBookmarkTitle):void
Sequential
public
setItemCitation(
   String itemCitation):void
Sequential
public
setItemIdentifierArray(
   ArrayList itemIdentifierArray):void
Sequential
public
setItemIdentifierColumn(
   UIColumn itemIdentifierColumn):void
Sequential
public
setItemIdentifierTable(
   HtmlDataTable itemIdentifierTable):void
Sequential
public
setItemIdentifierText(
   HtmlOutputText itemIdentifierText):void
Sequential
public
setItemSourceList(
   ArrayList itemSourceList):void
Sequential
public
setLnkDelete(
   HtmlCommandLink lnkDelete):void
Sequential
public
setLnkEdit(
   HtmlCommandLink lnkEdit):void
Sequential
public
setLnkNewSubmission(
   HtmlCommandLink lnkNewSubmission):void
Sequential
public
setLnkSubmit(
   HtmlCommandLink lnkSubmit):void
Sequential
public
setLnkWithdraw(
   HtmlCommandLink lnkWithdraw):void
Sequential
public static
setLogger(
   Logger logger):void
Sequential
public
setNumberCharsAbstractsCollapsed(
   int numberCharsAbstractsCollapsed):void
Sequential
public
setNumberCharsTOCCollapsed(
   int numberCharsTOCCollapsed):void
Sequential
public
setNumberCreatorListCollapsed(
   int numberCreatorListCollapsed):void
Sequential
public
setNumberItemAlternativeTitlesCollapsed(
   int numberItemAlternativeTitlesCollapsed):void
Sequential
public
setOrganizationArray(
   ArrayList organizationArray):void
Sequential
public
setOrganizationList(
   ArrayList organizationList):void
Sequential
public
setOwner(
   AccountUserVO owner):void
Sequential
public
setPanFiles(
   HtmlPanelGrid panFiles):void
Sequential
public
setPanSources(
   HtmlPanelGrid panSources):void
Sequential
public
setPubCollection(
   ContextVO context):void
Sequential
public
setPubItem(
   PubItemVO pubItem):void
Sequential
public
setRelationArray(
   ArrayList relationArray):void
Sequential
public
setRelationColumn(
   UIColumn relationColumn):void
Sequential
public
setRelationTable(
   HtmlDataTable relationTable):void
Sequential
public
setRelationText(
   HtmlOutputText relationText):void
Sequential
public
setSourceArray(
   ArrayList sourceArray):void
Sequential
public
setTableOfContents(
   String tableOfContents):void
Sequential
public
setTocCollapsed(
   boolean tocCollapsed):void
Sequential
public
setValMessage(
   HtmlMessages valMessage):void
Sequential
public
setValWithdrawalComment(
   String valWithdrawalComment):void
Sequential
public
setViewOrganisation(
   ViewItemOrganization viewOrganisation):void
Sequential
public
showCreatorOrganization():String
Sequential
Notes: selects the organization (which is a creator) the detailed information should be displayed.
@return String faces navigation string to open the organisation information page
public
showNextItem():String
Sequential
Notes: shows the next item in the list
@return String nav rule for reloading the view item page
public
showOrganization():String
Sequential
Notes: selects the organization the detailed information should be displayed.
@return String faces navigation string to open the organisation information page
public
showPreviousItem():String
Sequential
Notes: shows the previous item in the list
@return String nav rule for reloading the view item page
private
showValidationMessages(
   ValidationReportVO report):void
Sequential
Notes: Displays validation messages.
@author Michael Franke
public
submitItem():String
Sequential
Notes: submits the selected item(s) an redirects the user to the page he came from (depositor workspace or search result list) Changed by FrM: Inserted validation and call to "enter submission comment" page.
@return String nav rule to load the page the user came from
public
ViewItem():
Sequential
Notes: Public constructor
public
withdrawItem():String
Sequential
Notes: Redirects the user to the withdraw item page
@return Sring nav rule to load the withdraw item page