Package nl.gx.webmanager.taglib
Class GetMediaItemVersionsTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.SimpleTagSupport
-
- nl.gx.webmanager.taglib.GetMediaItemVersionsTag
-
- All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.SimpleTag
- Direct Known Subclasses:
GetMediaItemsTag
public class GetMediaItemVersionsTag extends javax.servlet.jsp.tagext.SimpleTagSupport
This tag returns the media item versions that are the result of the search based on the given search criteria. The attributes of the tag represent the attributes of theMediaItemFilter
that are used to define the search criteria of the search query.Example of usage:
<wm:getmediaitemversions var="intermediateResult" contenttypes="article,image" andterms="apple,banana" orterms="dog,cat" andnotterms="car,bicycle" resultrange="0,4" sortoptions="mostviewed" sortascending="false" publicationdatefrom="1/6/2014" publicationdateto="1/12/2014" referenceddatabaseentity="105888" referencedresourceinstance="2" excludemediaitemids="45" languageid="43" fallbackstrategry="specific" fallbacklanguageid="42" /> <c:forEach var="mediaItemVersion" items="${intermediateResult}"> <h2>title: ${mediaItemVersion.title}</h2></br> </c:forEach>
- Since:
- 10.31.0
-
-
Constructor Summary
Constructors Constructor Description GetMediaItemVersionsTag()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doTag()
String
getAndnottermids()
Id representations of theandnottermids
.String
getAndnotterms()
String representations of theandnotterms
.String
getAndtermids()
Id representations of theandtermids
.String
getAndterms()
String representations of theandterms
.String
getContenttypes()
String representations of the content types.String
getCreatedsince()
The created since day in SimpleDateFormat (dd/MM/YYYY).String
getExcludemediaitemids()
The identifiers of the excluded media items.String
getFallbacklanguageid()
Return the ID of the language that has been set as the fallback languageString
getFallbackstrategy()
Returns the configured fallback strategyString
getLanguageid()
Returns the id of theLanguage
that is being used to filter the media item versions bystatic Logger
getLOG()
String
getOrtermids()
Id representations of theorterms
.String
getOrterms()
String representations of theorterms
.String
getPublicationdatefrom()
The start publication date in SimpleDateFormat (dd/MM/YYYY).String
getPublicationdateto()
The end publication date in SimpleDateFormat (dd/MM/YYYY).String
getReferenceddatabaseentity()
The identifier of the referencedResourceEntity
.String
getReferencedresourceinstance()
The identifier of the referencedResourceInstance
.String
getResultrange()
The resultrange in the format"<from>,<to>"
like
"0,4"
.String
getSortascending()
The sortascending indicator.String
getSortoptions()
The sortoption like "publicationdate" or "voteaverage".String
getStatusid()
Returns the identifier of the correspondingWorkflowModelState
.String
getVar()
Return the name of the variable to which the result will be assigned.void
setAndnottermids(String andnottermids)
Sets the givenandnottermids
by id on the search filter.void
setAndnotterms(String andnotterms)
Sets the givenandnotterms
on the search filter.void
setAndtermids(String andtermids)
Sets the givenandtermids
by id on the search filter.void
setAndterms(String andterms)
Sets the givenandterms
on the search filter.void
setContenttypes(String contenttypes)
Sets the content types on the search filter, like "article", "image" etc.void
setCreatedsince(String createdsince)
Sets the created since day property on the search filter, which is used to include media items in the search result.void
setExcludemediaitemids(String excludemediaitemids)
Sets the excludes media items identifiers on the search filter.void
setFallbacklanguageid(String fallbacklanguageid)
Set a language ID for the language that should be used as the fallback language.void
setFallbackstrategy(String fallbackstrategy)
Set the fallback strategy that should be used when querying for media items.void
setLanguageid(String languageId)
The id of theLanguage
to use for filtering the media item versions retrievedvoid
setOrtermids(String ortermids)
Sets the givenorterms
by id on the search filter.void
setOrterms(String orterms)
Sets the givenorterms
on the search filter.void
setPublicationdatefrom(String publicationdatefrom)
Sets the given start publication date on the search filter.void
setPublicationdateto(String publicationdateto)
Sets the given end publication date on the search filter.void
setReferenceddatabaseentity(String resourceentity)
Sets aResourceEntity
on the search filter by the given identifier (Integer
).void
setReferencedresourceinstance(String resourceinstance)
Sets a referencedResourceInstance
on the search filter by the given identifier (Integer
).void
setResultrange(String resultrange)
Sets the optional result range to include/exclude items from the search result.void
setSortascending(String sortascending)
Sets the optional sort direction indication,"true"
or"false"
.void
setSortoptions(String sortoptions)
Sets the sort option like "publicationdate" or "voteaverage".void
setStatusid(String statusid)
Sets theWorkflowModelState
by the given identifier.void
setVar(String var)
Sets the name of the variable to which the result will be assigned.
-
-
-
Method Detail
-
getLOG
public static Logger getLOG()
- Returns:
- the LOG
-
getVar
public String getVar()
Return the name of the variable to which the result will be assigned.- Returns:
- the name of the variable to which the result will be assigned
-
setVar
public void setVar(String var)
Sets the name of the variable to which the result will be assigned.- Parameters:
var
- the name of the variable to which the result will be assigned.
-
getAndnotterms
public String getAndnotterms()
String representations of theandnotterms
.- Returns:
- a comma separated value string of String representations of the
andnotterms
-
setAndnotterms
public void setAndnotterms(String andnotterms)
Sets the givenandnotterms
on the search filter. Media items that own theandnotterms
will be excluded from the search result- Parameters:
andnotterms
- comma separated value string of String representations of terms to set
-
getAndterms
public String getAndterms()
String representations of theandterms
.- Returns:
- a comma separated value string of String representations of the
andterms
-
setAndterms
public void setAndterms(String andterms)
Sets the givenandterms
on the search filter. Only media items that own all theandterms
will be included in the search result- Parameters:
andterms
- comma separated value string of String representations of terms to set
-
getOrterms
public String getOrterms()
String representations of theorterms
.- Returns:
- a comma separated value string of String representations of the
orterms
-
setOrterms
public void setOrterms(String orterms)
Sets the givenorterms
on the search filter. Media items that own one or more of theorterms
will be included in the search result- Parameters:
orterms
- comma separated value string of String representations of terms to set
-
getAndnottermids
public String getAndnottermids()
Id representations of theandnottermids
.- Returns:
- a comma separated string of id representations of the
andnottermids
-
setAndnottermids
public void setAndnottermids(String andnottermids)
Sets the givenandnottermids
by id on the search filter. Media items that own theandnottermids
will be excluded from the search result- Parameters:
andnottermids
- comma separated value string of String representations of terms to set
-
getAndtermids
public String getAndtermids()
Id representations of theandtermids
.- Returns:
- a comma separated string of id representations of the
andtermids
-
setAndtermids
public void setAndtermids(String andtermids)
Sets the givenandtermids
by id on the search filter. Only media items that own all theandtermids
will be included in the search result- Parameters:
andtermids
- comma separated value string of String representations of terms to set
-
getOrtermids
public String getOrtermids()
Id representations of theorterms
.- Returns:
- a separated string of id representations of the
orterms
-
setOrtermids
public void setOrtermids(String ortermids)
Sets the givenorterms
by id on the search filter. Media items that own one or more of theorterms
will be included in the search result- Parameters:
ortermids
- comma separated value string of String representations of terms to set
-
getSortascending
public String getSortascending()
The sortascending indicator.- Returns:
- the String representation of the sortascending indicator
"true"
or"false"
-
setSortascending
public void setSortascending(String sortascending)
Sets the optional sort direction indication,"true"
or"false"
.- Parameters:
sortascending
- Iftrue
the results are sorted ascending, otherwise descending
-
getSortoptions
public String getSortoptions()
The sortoption like "publicationdate" or "voteaverage".- Returns:
- the String representation of the sortoption like "publicationdate" or "voteaverage".
-
setSortoptions
public void setSortoptions(String sortoptions)
Sets the sort option like "publicationdate" or "voteaverage". At this moment only a single sort option is supported in the tag.- Parameters:
sortoptions
- String representations of the sort option to setpossible values:
- creationdate
- mostviewed
- mostreactions
- publicationdate
- modificationdate
- voteaverage
- webtitle
- lastpost
-
getCreatedsince
public String getCreatedsince()
The created since day in SimpleDateFormat (dd/MM/YYYY).- Returns:
- the String representation of the created since day in SimpleDateFormat (dd/MM/YYYY)
-
setCreatedsince
public void setCreatedsince(String createdsince)
Sets the created since day property on the search filter, which is used to include media items in the search result.- Parameters:
createdsince
- the createdsince to set in SimpleDateFormat (dd/MM/YYYY)
-
getExcludemediaitemids
public String getExcludemediaitemids()
The identifiers of the excluded media items.- Returns:
- a comma separated value string with the identifiers of the excluded media items
-
setExcludemediaitemids
public void setExcludemediaitemids(String excludemediaitemids)
Sets the excludes media items identifiers on the search filter.- Parameters:
excludemediaitemids
- comma separated value string of identifiers of media items to exclude
-
getPublicationdatefrom
public String getPublicationdatefrom()
The start publication date in SimpleDateFormat (dd/MM/YYYY).- Returns:
- a String representation of the start publication date in SimpleDateFormat (dd/MM/YYYY)
-
setPublicationdatefrom
public void setPublicationdatefrom(String publicationdatefrom)
Sets the given start publication date on the search filter.- Parameters:
publicationdatefrom
- the publicationdatefrom to set in SimpleDateFormat (dd/MM/YYYY)
-
getPublicationdateto
public String getPublicationdateto()
The end publication date in SimpleDateFormat (dd/MM/YYYY).- Returns:
- a String representation of the end publication date in SimpleDateFormat (dd/MM/YYYY)
-
setPublicationdateto
public void setPublicationdateto(String publicationdateto)
Sets the given end publication date on the search filter.- Parameters:
publicationdateto
- the publicationdateto to set in SimpleDateFormat (dd/MM/YYYY)
-
getResultrange
public String getResultrange()
The resultrange in the format"<from>,<to>"
like
"0,4"
.- Returns:
- the String representation of the resultrange in the format
"<from>,<to>"
like
"0,4"
-
setResultrange
public void setResultrange(String resultrange)
Sets the optional result range to include/exclude items from the search result.- Parameters:
resultrange
- the optional resultrange to set in the format"<from>,<to>"
like
"0,4"
-
getContenttypes
public String getContenttypes()
String representations of the content types.- Returns:
- a comma separated value string of String representations of the content types
-
setContenttypes
public void setContenttypes(String contenttypes)
Sets the content types on the search filter, like "article", "image" etc.- Parameters:
contenttypes
- comma separated value string of String representations of content types to set
-
getStatusid
public String getStatusid()
Returns the identifier of the correspondingWorkflowModelState
.- Returns:
- the statusid
-
setStatusid
public void setStatusid(String statusid)
Sets theWorkflowModelState
by the given identifier.- Parameters:
statusid
- the identifier of the WorkflowModelState to set
-
getReferencedresourceinstance
public String getReferencedresourceinstance()
The identifier of the referencedResourceInstance
.- Returns:
- the identifier of the referenced
ResourceInstance
-
setReferencedresourceinstance
public void setReferencedresourceinstance(String resourceinstance)
Sets a referencedResourceInstance
on the search filter by the given identifier (Integer
). Only media items that own a reference to a resource instance this resource entity are returned by the search.- Parameters:
resourceinstance
- the identifier (Integer
) of the ResourceInstance to set
-
getReferenceddatabaseentity
public String getReferenceddatabaseentity()
The identifier of the referencedResourceEntity
.- Returns:
- the identifier of the referenced
ResourceEntity
-
setReferenceddatabaseentity
public void setReferenceddatabaseentity(String resourceentity)
Sets aResourceEntity
on the search filter by the given identifier (Integer
).- Parameters:
resourceentity
- the identifier (Integer
) of the referenced ResourceEntity to set
-
setLanguageid
public void setLanguageid(String languageId)
The id of theLanguage
to use for filtering the media item versions retrieved- Parameters:
languageId
- the id of the language that should be used in the filter
-
getLanguageid
public String getLanguageid()
Returns the id of theLanguage
that is being used to filter the media item versions by- Returns:
- the language id as passed into this tag
-
setFallbackstrategy
public void setFallbackstrategy(String fallbackstrategy)
Set the fallback strategy that should be used when querying for media items. This works in a similar manner as the media collection overview element. The fallback strategy is only taken into account when a specific language id has been provided.This attribute allows 3 valid options: - default - uses the default fallback language - ignore - do not use a strategy and only return media item versions in the specified language - specific - provided a specific language to use as fallback. When using this option you need to provide a valid language id in the fallbacklanguageid parameter as well
- Parameters:
fallbackstrategy
- the strategy to use for language fallbacks.
-
getFallbackstrategy
public String getFallbackstrategy()
Returns the configured fallback strategy- Returns:
- fallback strategy
-
setFallbacklanguageid
public void setFallbacklanguageid(String fallbacklanguageid)
Set a language ID for the language that should be used as the fallback language. This option is only taken into account when the fallback strategy has been set to specific.- Parameters:
fallbacklanguageid
- the ID of the language that should be used as the fallback language
-
getFallbacklanguageid
public String getFallbacklanguageid()
Return the ID of the language that has been set as the fallback language- Returns:
- the ID of the language that has been set as the fallback language
-
doTag
public void doTag() throws javax.servlet.jsp.JspException
- Specified by:
doTag
in interfacejavax.servlet.jsp.tagext.SimpleTag
- Overrides:
doTag
in classjavax.servlet.jsp.tagext.SimpleTagSupport
- Throws:
javax.servlet.jsp.JspException
- See Also:
SimpleTagSupport.doTag()
-
-