Package io.goobi.viewer.model.cms
Class Highlight
java.lang.Object
io.goobi.viewer.model.cms.Highlight
- All Implemented Interfaces:
CMSMediaHolder,IPolyglott
-
Constructor Summary
ConstructorsConstructorDescriptionHighlight(HighlightData data) Highlight(HighlightData data, ThumbnailHandler thumbs, Configuration config) -
Method Summary
Modifier and TypeMethodDescriptiongetData()getImageURI(int width, int height) Get the URI to the image representing the objectA regular expression determining which filenames are shown in the media list and may be uploadedgetMediaItem.getMediaItemWrapper.A string representing the allowed media formates for a user.getMetadataForField(String field, Locale locale) getMetadataList(Locale locale) booleanCheck whether an image is set for this objectbooleanhasMediaItem.booleanisComplete(Locale locale) If this returns true, an associated language tab should have the 'already-translated' class, otherwise the '-partly-translated' class unlessIPolyglott.isEmpty(Locale)also returns truebooleanCheck if the object is active now.booleanisCurrent(LocalDateTime date) Check if the object is active at the given datebooleanIf this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' classbooleanCheck if this object may be active at allbooleanisFuture()Check if this object is not currently active but will be active in the future.booleanisFuture(LocalDateTime date) Check if this object is not currently active but will be active in the future of the given date.booleanisPast()Check if this object is no longer active.booleanisPast(LocalDateTime date) Check if this object was only active before the given date.booleanalias forisCurrent()booleanOnly meaningful for the default language for which all required fields must be filledvoidsetMediaItem(CMSMediaItem item) setMediaItem.voidsetSelectedLocale(Locale locale) Set the locale to use for display and editingtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.goobi.viewer.model.translations.IPolyglott
getLocales, isDefaultLocaleSelected, isSelected, setSelectedLocale
-
Constructor Details
-
Highlight
-
Highlight
-
-
Method Details
-
isComplete
Description copied from interface:IPolyglottIf this returns true, an associated language tab should have the 'already-translated' class, otherwise the '-partly-translated' class unlessIPolyglott.isEmpty(Locale)also returns true- Specified by:
isCompletein interfaceIPolyglott- Parameters:
locale-- Returns:
- true if
IPolyglott.isValid(Locale)returns true for the given locale and all fields contain a value which have a value in the default locale. For the default locale,IPolyglott.isComplete(Locale)andIPolyglott.isValid(Locale)are identical. For implementations with only one field, both methods are also always identical
-
isValid
Description copied from interface:IPolyglottOnly meaningful for the default language for which all required fields must be filled- Specified by:
isValidin interfaceIPolyglott- Parameters:
locale-- Returns:
- true if all required fields contain a value in the given locale
-
isEmpty
Description copied from interface:IPolyglottIf this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' class- Specified by:
isEmptyin interfaceIPolyglott- Parameters:
locale-- Returns:
- true if no fields are filled for the given locale
-
getSelectedLocale
- Specified by:
getSelectedLocalein interfaceIPolyglott- Returns:
- the locale currently set by
IPolyglott.setSelectedLocale(Locale)
-
setSelectedLocale
Description copied from interface:IPolyglottSet the locale to use for display and editing- Specified by:
setSelectedLocalein interfaceIPolyglott- Parameters:
locale-
-
getMediaFilter
Description copied from interface:CMSMediaHolderA regular expression determining which filenames are shown in the media list and may be uploaded
- Specified by:
getMediaFilterin interfaceCMSMediaHolder- Returns:
- a
Stringobject.
-
getMediaTypes
Description copied from interface:CMSMediaHolderA string representing the allowed media formates for a user. Should be a comma separated list of format names or filename suffixes- Specified by:
getMediaTypesin interfaceCMSMediaHolder- Returns:
String
-
hasMediaItem
public boolean hasMediaItem()Description copied from interface:CMSMediaHolderhasMediaItem.
- Specified by:
hasMediaItemin interfaceCMSMediaHolder- Returns:
- a boolean.
-
getMediaItem
Description copied from interface:CMSMediaHoldergetMediaItem.
- Specified by:
getMediaItemin interfaceCMSMediaHolder- Returns:
- a
CMSMediaItemobject.
-
setMediaItem
Description copied from interface:CMSMediaHoldersetMediaItem.
- Specified by:
setMediaItemin interfaceCMSMediaHolder- Parameters:
item- aCMSMediaItemobject.
-
getMediaItemWrapper
Description copied from interface:CMSMediaHoldergetMediaItemWrapper.
- Specified by:
getMediaItemWrapperin interfaceCMSMediaHolder- Returns:
- a
CategorizableTranslatedSelectableobject.
-
getData
-
hasImageURI
public boolean hasImageURI()Check whether an image is set for this object- Returns:
- true if the image is taken from the record identifier or if it is taken from a media item and the media item is set
-
getImageURI
public URI getImageURI(int width, int height) throws IndexUnreachableException, PresentationException, ViewerConfigurationException Get the URI to the image representing the object- Parameters:
width-height-- Returns:
- true if
hasImageURI()returns true and, if the image is taken from the record identifier, the record identifier points to a records which has a representative image - Throws:
IndexUnreachableExceptionPresentationExceptionViewerConfigurationException
-
getImageURI
public URI getImageURI() throws IndexUnreachableException, PresentationException, ViewerConfigurationException -
isPresent
public boolean isPresent()alias forisCurrent()- Returns:
- true if startTime is before now (or null) and endTime is after now (or null)
-
isCurrent
public boolean isCurrent()Check if the object is active now. Mutually exclusive withisPast()andisFuture()- Returns:
- true if startTime is before now (or null) and endTime is after now (or null)
-
isCurrent
Check if the object is active at the given date- Parameters:
date-- Returns:
- true if startTime is before now (or null) and endTime is after now (or null)
-
isPast
public boolean isPast()Check if this object is no longer active. Mutually exclusive withisCurrent()andisFuture()- Returns:
- true if timeEnd is not null and before now
-
isPast
Check if this object was only active before the given date.- Parameters:
date-- Returns:
- true if timeEnd is not null and before now
-
isFuture
public boolean isFuture()Check if this object is not currently active but will be active in the future. Mutually exclusive withisCurrent()andisPast()- Returns:
- true if startTime is not null and after now and timeEnd is either null or after now
-
isFuture
Check if this object is not currently active but will be active in the future of the given date.- Parameters:
date-- Returns:
- true if startTime is not null and after now and timeEnd is either null or after now
-
isEnabled
public boolean isEnabled()Check if this object may be active at all- Returns:
- true if data enabled; false otherwise
-
toString
-
getMetadataList
-
getMetadataList
public List<Metadata> getMetadataList(Locale locale) throws IndexUnreachableException, PresentationException - Parameters:
locale-- Returns:
- List
- Throws:
IndexUnreachableExceptionPresentationException
-
getMetadataForField
public List<Metadata> getMetadataForField(String field, Locale locale) throws IndexUnreachableException, PresentationException - Parameters:
field-locale-- Returns:
- List
- Throws:
IndexUnreachableExceptionPresentationException
-
getMetadataElement
-