Interface PersonalizationItem

  • All Superinterfaces:
    Wrapper
    All Known Subinterfaces:
    PersonalizationExpression, PersonalizationModel

    public interface PersonalizationItem
    extends Wrapper
    This interface defines the common contract of both personalization expressions and models. The personalization expression and model interfaces extends this interface.
    Author:
    Sander Dahlberg
    • Method Detail

      • getName

        String getName()
        Returns the name of the item by which it is identified in the user interface.
        Returns:
        The name of the item by which it is identified in the user interface.
      • isAvailable

        boolean isAvailable()
        Returns true if the item is available, false otherwise.
        Returns:
        true if the item is available, false otherwise.
      • isShownByLinks

        boolean isShownByLinks()
        Returns true if links to the object personalized by the item may still be shown, even though the object itself is hidden by the item.
        Returns:
        true if links to the object personalized by the item may still be shown, even though the object itself is hidden by the item.
      • isValid

        boolean isValid()
        Returns true if the item consists of valid XPATH or XSL, false otherwise.
        Returns:
        true if the item consists of valid XPATH or XSL, false otherwise.
      • getPersonalizationCategory

        PersonalizationCategory getPersonalizationCategory()
        Returns the personalization category the item is assigned to. An item does not need to be categorized.
        Returns:
        Personalization category this item is in. Returns null if the item is not in any category.
      • setName

        void setName​(String name)
        Sets the name of a personalization item.
        Parameters:
        name - The new name for the personalization item. If null an illegal argument exception is thrown.
      • setAvailable

        void setAvailable​(boolean isAvailable)
        Sets whether the personalization item should be available or not.
        Parameters:
        isAvailable - Set to true to make the personalization item available, else false.
      • setShownByLinks

        void setShownByLinks​(boolean isShownByLinks)
        Sets whether the personalization item should show or hide links to the personalized object.
        Parameters:
        isShownByLinks - Set to true to make links to the personalized object visible, false to hide them.
      • setPersonalizationCategory

        void setPersonalizationCategory​(PersonalizationCategory category)
        Sets the personalization category to which the personalization item should belong. An personalization item can only belong to one category, so setting it overwrites any previous category it belonged to.
        Parameters:
        category - Categorize this item in this category. If category is null then the item is not categorized.
      • getStartTag

        String getStartTag()
        Return start tag. Example:
           <wm-user-personalization-[id] forpage="true" reurl="" orgurl="...">
         
        or
           <wm-user-authorization reurl="..." orgurl="..."><wm-groupid>1</wm-groupid><wm-groupid>2</wm-groupid>
         
        Returns:
        start tag.
      • getStartTag

        String getStartTag​(String defaultText)
        Return the starttag taking into account that the target page can be personalized. The defaulttext is added to the XML tag and in the XSL will the defaulttext be shown when the user has no authorization to the target page.
        Returns:
        the starttag taking into account that the target page can be personalized.
      • getEndTag

        String getEndTag()
        Return end tag. Example:
           </wm-user-personalization-[id]>
         
        or
           </wm-user-authorization>
         
        Returns:
        end tag.
      • getTagName

        String getTagName()
        Return the tagname of the personalization.
        Returns:
        the tagname of the personalization.
      • getXslTemplate

        String getXslTemplate()
        Return the xsl of the expression or model.
        Returns:
        the xsl of the expression or model.