class: FileBean

public class: FileBean
Author: : Tobias Schraut, created 25.03.2008
Project: Phase: 1.0; Status: Proposed; Version: : $Revision: 2742 $ $LastChangedDate: 2009-06-09 0; Complexity: 1
Dates: Created: 16.07.2009 15:33:52; Modified: 16.07.2009 15:33:52;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {21ADB727-62CA-4fce-8F5D-C3B0EDA3D654}
Bean for storing the information of files attached to items.
 

Goto: Custom Properties, Fields, Methods

Extends: FacesBean

See also: LoginHelper, FacesBean

Appears in: bean

Connections
 
Custom Properties
 
FileBean Attributes
Attribute Details
private FileVO
  file
private State
  itemState
private static Logger
  logger
Initial: Logger.getLogger(FileBean.class)
private LoginHelper
  loginHelper
private ArrayList
  searchHitList
Initial: new ArrayList()
private ArrayList
  searchHits
Initial: new ArrayList()
 
FileBean 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.
@author Tobias Schraut
public
displayChecksum():String
Sequential
Notes: Sends back an html response of content type text/plain that includes the checksum as UTF-8 string.
@return
public
downloadFile():String
Sequential
Notes: Prepares the file the user wants to download
public
FileBean(
   FileVO file,
   State itemState):
Sequential
Notes: Public constructor
@param position
public
FileBean(
   FileVO file,
   State itemState,
   List searchHitList):
Sequential
Notes: Second constructor (used if pubitem has fulltext search hits)
@param position
@param resultitem
protected
getApplicationBean():ApplicationBean
Sequential
Notes: Returns the ApplicationBean.
@return a reference to the scoped data bean (ApplicationBean)
public
getChecksumAlgorithmAsString():String
Sequential
Notes: Returns the checksum algorithm of the file as string.
@return
protected
getCommonSessionBean():CommonSessionBean
Sequential
Notes: Returns the CommonSessionBean.
@return a reference to the scoped data bean (CommonSessionBean)
public
getContentCategory():String
Sequential
public
getFile():FileVO
Sequential
public
getFileDescription():String
Sequential
public
getFileLink():String
Sequential
public
getFileName():String
Sequential
public
getFileSize():String
Sequential
public
getIsVisible():boolean
Sequential
protected
getItemControllerSessionBean():ItemControllerSessionBean
Sequential
Notes: Returns the ItemControllerSessionBean.
@return a reference to the scoped data bean (ItemControllerSessionBean)
public
getItemWithdrawn():boolean
Sequential
public
getLocator():String
Sequential
public
getLocatorIsLink():boolean
Sequential
public
getLocatorLink():String
Sequential
public
getSearchHits():List
Sequential
public
getShowEmbargoDate():boolean
Sequential
Notes: This Method evaluates if the embargo date input filed has to be displayed or not (yes, if visibility is set to private or restricted)
@return boolean flag if embargo date input field should be displayed or not
public
getShowSearchHits():boolean
Sequential
public
getUrlToLicenceImage():String
Sequential
Notes: This method generates a link to a refering thumbnail image out of a link to a creativecommons licence
@return teh generated link to the refering thumbnail image
public
getVisibility():String
Sequential
protected
initialize(
   FileVO file,
   State itemState,
   List searchHitList):void
Sequential
Notes: Sets up some extra information concerning full text search hits
@param position
@param resultitem
public
setFile(
   FileVO file):void
Sequential
public
setSearchHits(
   List searchHits):void
Sequential
public
setUpdateVisibility(
   ValueChangeEvent event):void
Sequential