com.alarmpoint.integration.infrastructure.subscription.tag
Class SubscriptionPanelTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.alarmpoint.integration.infrastructure.subscription.tag.SubscriptionPanelTag
All Implemented Interfaces:
OptionContainer, java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class SubscriptionPanelTag
extends javax.servlet.jsp.tagext.TagSupport
implements OptionContainer

A JSP custom tag to define a panel for a custom subscription panel To declare the tag library use the JSP taglib directive.

 <%@ taglib uri="http://alarmpoint.com/alarmpoint/4.0#subscription" prefix="subs" %>
 
Tag Reference: panel
AttributeDescription
tabLabelThe label that will be displayed on the subscription panel tab.
tabCountThe number of tabs that this panel will contain.
subscriptionIdThe subscription id. This should be passed from the request as ${param.subscriptionId}.
maxDisplayCharactersMax number of characters to display for a predicate's selected values. Optional - default = 60.
maxRecipientDisplayCharactersMax number of characters to display for a subscription's recipients. Optional - default = 80.
showSummaryOptional - use to turn off the summary display (usually when defining a second custom tab).
showPreferencesOptional - use to turn off the preferences display (usually when defining a second custom tab, the first tab will set this to FALSE).
showPreferencesOptional - use to turn off the preferences display (usually when defining a second custom tab, the first tab will set this to FALSE).
Tag Reference: predicate
AttributeDescription
namename of the predicate
labelvalue to be displayed as a label on the screen
tabPositiontab position of the predicate
urlif this predicate has a popup (performSearch is TRUE), this is the URL to the sub search page along with all the appropriate parameters
queryPredicateValueidentifies this predicate as retrieving its content from a query to the integration agent. FALSE by default
performSearchidentifies this predicate as requiring a sub-search due to the volume of data that may apply. FALSE by default
Sample panel:
 <subs:panel tabLabel="Alarm Information" tabCount="4" subscriptionId="${param.subscriptionId}">
   <subs:predicate name="MNAME" label="Model Name" tabPosition="1" performSearch="true"
                      url="${pageContext.request.servletPath}/jsp/subscription/caspectrum/SpectrumSubscriptionSubSearch.jsp;jsessionid=${pageContext.session.id}?name=MNAME&desc=Model Name&key=name&value=name&doNotRun=true"/>
   <subs:predicate name="MTYPENAME" label="Model Type Name" tabPosition="1" performSearch="true"
                      url="${pageContext.request.servletPath}/jsp/subscription/caspectrum/SpectrumSubscriptionSubSearch.jsp;jsessionid=${pageContext.session.id}?name=MTYPENAME&desc=Model Type Name&key=typeName&value=typeName&doNotRun=true"/>
   <subs:predicate name="SEVERITY" label="Severity" tabPosition="1"/>
   <subs:predicate name="CAUSE_ID" label="Cause Id" tabPosition="1"/>
   <subs:predicate name="DEVICE_TYPE" label="Device Type" tabPosition="1"/>
   <subs:predicate name="IP_ADDRESS" label="IP Address" tabPosition="1"/>
   <subs:predicate name="PCAUSE" label="Cause" tabPosition="1"/>
   <subs:predicate name="SMSTEXT" label="SMS Text" tabPosition="1"/>
 </subs:panel>
 

Since:
4.0
Author:
Mike Bennett
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
SubscriptionPanelTag()
          Creates a new instance of SubscriptionPanelTag
 
Method Summary
 int doEndTag()
           
 int doStartTag()
          Start processing the tag
 java.util.Map<java.lang.String,PredicateContainer> getArguments()
          Retrieve a map of names and values to be provided as parameters to the integration service as part of the action.
 java.lang.Integer getMaxDisplayCharacters()
           
 java.lang.Integer getMaxRecipientDisplayCharacters()
           
 java.util.Map<java.lang.String,java.util.List<JspOption>> getOptionMap()
          Retrieve a Map containing a collection of options
 java.lang.String getSubscriptionId()
           
 java.lang.Integer getTabCount()
           
 void setArguments(java.util.Map<java.lang.String,PredicateContainer> arguments)
          Set a map of names and values to be provided as parameters to the integration service as part of the action.
 void setMaxDisplayCharacters(java.lang.Integer maxDisplayCharacters)
           
 void setMaxRecipientDisplayCharacters(java.lang.Integer maxRecipientDisplayCharacters)
           
 void setShowPreferences(java.lang.Boolean showPreferences)
           
 void setShowSummary(java.lang.Boolean showSummary)
           
 void setSubscriptionId(java.lang.String subscriptionId)
           
 void setTabCount(java.lang.Integer tabCount)
           
 void setTabLabel(java.lang.String tabLabel)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionPanelTag

public SubscriptionPanelTag()
Creates a new instance of SubscriptionPanelTag

Method Detail

doStartTag

public int doStartTag()
Start processing the tag

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Returns:
int indicating the body of the tag (argument list) should be processed

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Returns:
int indicating the remainder of the page should be processed
Throws:
javax.servlet.jsp.JspException - if there are any issue processing the request

setArguments

public void setArguments(java.util.Map<java.lang.String,PredicateContainer> arguments)
Set a map of names and values to be provided as parameters to the integration service as part of the action.

Parameters:
arguments - map of names and values

getArguments

public java.util.Map<java.lang.String,PredicateContainer> getArguments()
Retrieve a map of names and values to be provided as parameters to the integration service as part of the action.

Returns:
map of names and values

setMaxDisplayCharacters

public void setMaxDisplayCharacters(java.lang.Integer maxDisplayCharacters)

getMaxDisplayCharacters

public java.lang.Integer getMaxDisplayCharacters()

setMaxRecipientDisplayCharacters

public void setMaxRecipientDisplayCharacters(java.lang.Integer maxRecipientDisplayCharacters)

getMaxRecipientDisplayCharacters

public java.lang.Integer getMaxRecipientDisplayCharacters()

setTabCount

public void setTabCount(java.lang.Integer tabCount)

getTabCount

public java.lang.Integer getTabCount()

setSubscriptionId

public void setSubscriptionId(java.lang.String subscriptionId)

getSubscriptionId

public java.lang.String getSubscriptionId()

getOptionMap

public java.util.Map<java.lang.String,java.util.List<JspOption>> getOptionMap()
Description copied from interface: OptionContainer
Retrieve a Map containing a collection of options

Specified by:
getOptionMap in interface OptionContainer
Returns:
Map of options

setTabLabel

public void setTabLabel(java.lang.String tabLabel)

setShowSummary

public void setShowSummary(java.lang.Boolean showSummary)

setShowPreferences

public void setShowPreferences(java.lang.Boolean showPreferences)