Class BaseClassificationPdCTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.SimpleTagSupport
-
- org.silverpeas.core.web.util.viewgenerator.html.pdc.BaseClassificationPdCTag
-
- All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.SimpleTag
- Direct Known Subclasses:
PdcClassificationPositionsTag
,PdcClassificationPreviewTag
,PdcClassificationTag
,PdcClassificationValidationTag
,PdcNewContentClassificationTag
public abstract class BaseClassificationPdCTag extends javax.servlet.jsp.tagext.SimpleTagSupport
The base tag for all concrete tags on the PdC classification of a content.
-
-
Field Summary
Fields Modifier and Type Field Description static String
PDC_CLASSIFICATION_WIDGET_TAG_ID
The identifier of the XHTML tag within which the PdC classification will be displayed.
-
Constructor Summary
Constructors Constructor Description BaseClassificationPdCTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getComponentId()
Gets the identifier of the Silverpeas component instance to which the resource belongs.String
getContentId()
Gets the unique identifier of the resource content in Silverpeas.String
getId()
Gets the identifier used to identify the HTML element in which is rendered the classification.String
getNodeId()
Gets the identifier of the node to which the content belongs.protected javax.servlet.jsp.JspWriter
getOut()
protected <T> T
getRequestAttribute(String name)
protected MultiSilverpeasBundle
getResources()
Gets the resources from which translated text and PdC settings can be get.protected <T> T
getSessionAttribute(String name)
org.apache.ecs.ElementContainer
invoke(PdcClassificationTagOperation operation)
Invokes the underlying JQuery PdC plugin with the appropriate function according to the specified operation.boolean
isExternalManagement()
Is the PDC classification handled by an external manager?protected boolean
isPdcUsed()
Is the PdC is used currently by the underlying Silverpeas component instance.void
setComponentId(String componentId)
Sets the unique identifier of the Silverpeas component instance to which the resource belongs.void
setContentId(String contentId)
Sets the unique identifier of the resource content.void
setExternalManagement(boolean externalManagement)
Indicates if the PDC classification is handled by an external manager.void
setId(String id)
Sets the identifier of the HTML element in which the classification is rendered.void
setNodeId(String nodeId)
Sets the identifier of the node to which the content belongs (if any).
-
-
-
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
-
-
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.
-
isExternalManagement
public boolean isExternalManagement()
Is the PDC classification handled by an external manager?- Returns:
- true if handled into form transaction, false otherwise.
-
setExternalManagement
public void setExternalManagement(boolean externalManagement)
Indicates if the PDC classification is handled by an external manager.- Parameters:
externalManagement
- true if handled by external manager, false otherwise.
-
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()
-
-