Class BaseClassificationPdCTag

    • Field Detail

      • PDC_CLASSIFICATION_WIDGET_TAG_ID

        public static final String PDC_CLASSIFICATION_WIDGET_TAG_ID
        The identifier of the XHTML tag within which the PdC classification will be displayed.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BaseClassificationPdCTag

        public BaseClassificationPdCTag()
    • Method Detail

      • setId

        public void setId​(String id)
        Sets the identifier of the HTML element in which the classification is rendered.
        Parameters:
        id - the widget identifier to set.
      • getId

        public String getId()
        Gets the identifier used to identify the HTML element in which is rendered the classification.
        Returns:
        the id of the widget.
      • setComponentId

        public void setComponentId​(String componentId)
        Sets the unique identifier of the Silverpeas component instance to which the resource belongs.
        Parameters:
        componentId - the unique identifier of the instance of a Silverpeas component.
      • setContentId

        public void setContentId​(String contentId)
        Sets the unique identifier of the resource content.
        Parameters:
        contentId - the unique identifier of the resource content.
      • getComponentId

        public String getComponentId()
        Gets the identifier of the Silverpeas component instance to which the resource belongs. If no component instance identifier is set, then it is fecthed from the request.
        Returns:
        the component identifier.
      • getContentId

        public String getContentId()
        Gets the unique identifier of the resource content in Silverpeas.
        Returns:
        the resource content identifier.
      • getNodeId

        public String getNodeId()
        Gets the identifier of the node to which the content belongs. A node is an hierarchic way to organize the contents. A node can represents a category, a topic, or a folder and its semantic depends on the Silverpeas component that handle the content.
        Returns:
        the identifier of the node or an empty string.
      • setNodeId

        public void setNodeId​(String nodeId)
        Sets the identifier of the node to which the content belongs (if any). A node is an hierarchic way to organize the contents. A node can represents a category, a topic, or a folder and its semantic depends on the Silverpeas component that handle the content.
        Parameters:
        nodeId - the identifier of the node.
      • invoke

        public org.apache.ecs.ElementContainer invoke​(PdcClassificationTagOperation operation)
                                               throws javax.servlet.jsp.JspException
        Invokes the underlying JQuery PdC plugin with the appropriate function according to the specified operation. The operation is actually invoked only if the PdC is used by the underlying Silverpeas component instance.
        Parameters:
        operation - the operation to invoke.
        Returns:
        the HTML elements container with the code to render.
        Throws:
        javax.servlet.jsp.JspException
      • getResources

        protected MultiSilverpeasBundle getResources()
                                              throws javax.servlet.jsp.JspTagException
        Gets the resources from which translated text and PdC settings can be get.
        Returns:
        a resources wrapper instance.
        Throws:
        javax.servlet.jsp.JspTagException - if an error occurs while fetching the resources.
      • isPdcUsed

        protected boolean isPdcUsed()
        Is the PdC is used currently by the underlying Silverpeas component instance. For some components, the use of the PdC can be set per instance. For others, the PdC is used by default.
        Returns:
        true if the component instance uses the PdC, false otherwise.
      • getRequestAttribute

        protected <T> T getRequestAttribute​(String name)
      • getSessionAttribute

        protected <T> T getSessionAttribute​(String name)
      • getOut

        protected javax.servlet.jsp.JspWriter getOut()