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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncleanUpValue(String value) Removes script tags from the given string.getCurrentUGCCoords.Getter for the fielduserGeneratedContentsForDisplay.booleanhasGeoCoordinateAnnotations(String persistentIdentifier) voidinit()init.static booleanisAccessible(DisplayUserGeneratedContent content, jakarta.servlet.http.HttpServletRequest request) voidloadUserGeneratedContentsForDisplay(String pi, jakarta.servlet.http.HttpServletRequest request) loadUserGeneratedContentsForDisplay.voidResets 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:
IndexUnreachableExceptionPresentationExceptionDAOException
-
loadUserGeneratedContentsForDisplay
public void loadUserGeneratedContentsForDisplay(String pi, jakarta.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, jakarta.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- aPhysicalElementobject.- Returns:
- a
Listobject. - Throws:
IndexUnreachableException- if any.PresentationException- if any.DAOException
-
cleanUpValue
Removes script tags from the given string.- Parameters:
value- aStringobject.- 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:
IndexUnreachableExceptionPresentationExceptionDAOException
-