Package io.goobi.viewer.managedbeans
Class ContentBean
java.lang.Object
io.goobi.viewer.managedbeans.ContentBean
- All Implemented Interfaces:
Serializable
Supplies additional content for records (such contents produced by the crowdsourcing module).
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncleanUpValue
(String value) Removes script tags from the given string.getCurrentUGCCoords.Getter for the fielduserGeneratedContentsForDisplay
.boolean
hasGeoCoordinateAnnotations
(String persistentIdentifier) void
init()
init.static boolean
isAccessible
(DisplayUserGeneratedContent content, javax.servlet.http.HttpServletRequest request) void
loadUserGeneratedContentsForDisplay
(String pi, javax.servlet.http.HttpServletRequest request) loadUserGeneratedContentsForDisplay.void
Resets loaded content.
-
Constructor Details
-
ContentBean
public ContentBean()Empty Constructor.
-
-
Method Details
-
init
@PostConstruct public void init()init.
-
resetContentList
public void resetContentList()Resets loaded content. Use when logging in/out. -
getUserGeneratedContentsForDisplay
public List<DisplayUserGeneratedContent> getUserGeneratedContentsForDisplay(String pi) throws PresentationException, IndexUnreachableException, DAOException Getter for the field
userGeneratedContentsForDisplay
.- Parameters:
pi
- Record identifier- Returns:
- User-generated contents for the given record identifier
- Throws:
PresentationException
- if any.IndexUnreachableException
- if any.DAOException
-
getUserGeneratedContentsOfPageForDisplay
public List<DisplayUserGeneratedContent> getUserGeneratedContentsOfPageForDisplay(PhysicalElement page) throws PresentationException, IndexUnreachableException, DAOException - Parameters:
page
-- Returns:
- User-generated contents for the given page element
- Throws:
IndexUnreachableException
PresentationException
DAOException
-
loadUserGeneratedContentsForDisplay
public void loadUserGeneratedContentsForDisplay(String pi, javax.servlet.http.HttpServletRequest request) throws PresentationException, IndexUnreachableException, DAOException loadUserGeneratedContentsForDisplay.
- Parameters:
pi
- Record identifierrequest
-- Throws:
PresentationException
- if any.IndexUnreachableException
- if any.DAOException
-
isAccessible
public static boolean isAccessible(DisplayUserGeneratedContent content, javax.servlet.http.HttpServletRequest request) - Parameters:
content
-request
-- Returns:
- true if request has access rights to content; false otherwise
-
getCurrentUGCCoords
public List<List<String>> getCurrentUGCCoords(PhysicalElement page) throws IndexUnreachableException, PresentationException, DAOException getCurrentUGCCoords.
- Parameters:
page
- aPhysicalElement
object.- Returns:
- a
List
object. - Throws:
IndexUnreachableException
- if any.PresentationException
- if any.DAOException
-
cleanUpValue
Removes script tags from the given string.- Parameters:
value
- aString
object.- Returns:
- value sans any script tags
-
getEscapedBodyUrl
-
hasGeoCoordinateAnnotations
public boolean hasGeoCoordinateAnnotations(String persistentIdentifier) throws PresentationException, IndexUnreachableException, DAOException - Parameters:
persistentIdentifier
-- Returns:
- true if record with given identifier has any geo-location type annotations; false otherwise
- Throws:
IndexUnreachableException
PresentationException
DAOException
-