Class 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 the MediaItemFilter 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 Detail

      • GetMediaItemVersionsTag

        public GetMediaItemVersionsTag()
    • 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 the andnotterms.
        Returns:
        a comma separated value string of String representations of the andnotterms
      • setAndnotterms

        public void setAndnotterms​(String andnotterms)
        Sets the given andnotterms on the search filter. Media items that own the andnotterms 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 the andterms.
        Returns:
        a comma separated value string of String representations of the andterms
      • setAndterms

        public void setAndterms​(String andterms)
        Sets the given andterms on the search filter. Only media items that own all the andterms 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 the orterms.
        Returns:
        a comma separated value string of String representations of the orterms
      • setOrterms

        public void setOrterms​(String orterms)
        Sets the given orterms on the search filter. Media items that own one or more of the orterms 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 the andnottermids.
        Returns:
        a comma separated string of id representations of the andnottermids
      • setAndnottermids

        public void setAndnottermids​(String andnottermids)
        Sets the given andnottermids by id on the search filter. Media items that own the andnottermids 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 the andtermids.
        Returns:
        a comma separated string of id representations of the andtermids
      • setAndtermids

        public void setAndtermids​(String andtermids)
        Sets the given andtermids by id on the search filter. Only media items that own all the andtermids 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 the orterms.
        Returns:
        a separated string of id representations of the orterms
      • setOrtermids

        public void setOrtermids​(String ortermids)
        Sets the given orterms by id on the search filter. Media items that own one or more of the orterms 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 - If true 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 set

        possible 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 corresponding WorkflowModelState.
        Returns:
        the statusid
      • setStatusid

        public void setStatusid​(String statusid)
        Sets the WorkflowModelState by the given identifier.
        Parameters:
        statusid - the identifier of the WorkflowModelState to set
      • setReferencedresourceinstance

        public void setReferencedresourceinstance​(String resourceinstance)
        Sets a referenced ResourceInstance 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 referenced ResourceEntity.
        Returns:
        the identifier of the referenced ResourceEntity
      • setReferenceddatabaseentity

        public void setReferenceddatabaseentity​(String resourceentity)
        Sets a ResourceEntity 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 the Language 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 the Language 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 interface javax.servlet.jsp.tagext.SimpleTag
        Overrides:
        doTag in class javax.servlet.jsp.tagext.SimpleTagSupport
        Throws:
        javax.servlet.jsp.JspException
        See Also:
        SimpleTagSupport.doTag()