com.alarmpoint.integrations.infrastructure.agent.service.tag
Class IntegrationAgentServiceOptionTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.alarmpoint.integrations.infrastructure.agent.service.tag.IntegrationAgentServiceTag
          extended by com.alarmpoint.integrations.infrastructure.agent.service.tag.IntegrationAgentServiceFilteredTag
              extended by com.alarmpoint.integrations.infrastructure.agent.service.tag.IntegrationAgentServiceOptionTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class IntegrationAgentServiceOptionTag
extends IntegrationAgentServiceFilteredTag

A JSP custom tag to make an external service request to the integration agent To declare the tag library use the JSP taglib directive.

 <%@ taglib uri="http://alarmpoint.com/alarmpoint/4.0#integrationagentservice" prefix="apia" %>
 
Tag Reference: request
AttributeDescription
idUnique identifier for the option. This is useful when tying the option list to a parent collection
actionAn action provided by the integration service.
serviceThe integration service that will perform the action provided by an integration agent.
domainThe Event Domain associated with the integration service.
keyFieldThe name of the field containing the value that will be used in the id attribute of the option.
valueFieldThe name of the field containing the value that will be used in the body of the option.
selectedValueThis should contain the id of the outer select as a parameter e.g., selectedValue="${param.selectId}".
filterOperatorThe filter operator that is being used to filter the results.
filterValueThe filter string to be applied.
sortedBoolean indicating whether the option list will be sorted in natural order. TRUE by default
allowDuplicatesBoolean indicating whether duplicates will be permitted into the list. FALSE by default
addToParentBoolean indicating whether the option list will be added into a collection in the parent. This requires the parent tag to implement OptionContainer. FALSE by default
doNotRunBoolean indicating whether the tag should be run. This allows the tag to be inert on initial page load if required. FALSE by default
Tag Reference: argument
AttributeDescription
namename of the parameter
typethe data type associated with the parameter
Sample request:
 <apia:option action="echo" service="test_service_1" domain="default" keyField="name" valueField="name"> selectedValue="${param.selectId}"
   <apia:argument name="String" type="string">This is a string.</apia:argument>
   <apia:argument name="Integer" type="integer">100</apia:argument>
   <apia:argument name="Float" type="float">11.11</apia:argument>
   <apia:argument name="Boolean" type="boolean">true</apia:argument>
 </apia:option>
 

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

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
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
IntegrationAgentServiceOptionTag()
          Creates a new instance of IntegrationAgentServiceOptionTag
 
Method Summary
 int doEndTag()
          Using the tag data, pass the information to the Integration Agent and process the response
 void setAddToParent(java.lang.Boolean addToParent)
          Determines whether the output of the tag should be added to the parent tag identified by the tag id
 void setAllowDuplicates(java.lang.Boolean allowDuplicates)
          If set and not set to false, identifies that the collection should be allowed to contain duplicates
 void setDoNotRun(java.lang.Boolean doNotRun)
          Set to determine whether the tag will be processed
 void setId(java.lang.String id)
          Uniqie identifier for this tag
 void setKeyField(java.lang.String keyField)
          Sets the name of the field that will be used as the id field in an Option list
 void setSelectedValue(java.lang.String selectedValue)
           
 void setSorted(java.lang.Boolean sorted)
          If set and not set to false, identifies that the collection should be sorted in natural order
 
Methods inherited from class com.alarmpoint.integrations.infrastructure.agent.service.tag.IntegrationAgentServiceFilteredTag
getValueField, setFilterOperator, setFilterValue, setValueField
 
Methods inherited from class com.alarmpoint.integrations.infrastructure.agent.service.tag.IntegrationAgentServiceTag
convertProperty, doStartTag, getArguments, getValue, setAction, setArguments, setCompany, setDomain, setService
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegrationAgentServiceOptionTag

public IntegrationAgentServiceOptionTag()
Creates a new instance of IntegrationAgentServiceOptionTag

Method Detail

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspTagException
Description copied from class: IntegrationAgentServiceTag
Using the tag data, pass the information to the Integration Agent and process the response

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

setKeyField

public void setKeyField(java.lang.String keyField)
Sets the name of the field that will be used as the id field in an Option list

Parameters:
keyField - name of the property to retrieve to identify the option

setSorted

public void setSorted(java.lang.Boolean sorted)
If set and not set to false, identifies that the collection should be sorted in natural order

Parameters:
sorted - String to determine if collection should be sorted. If set and not false, collection will be sorted.

setAllowDuplicates

public void setAllowDuplicates(java.lang.Boolean allowDuplicates)
If set and not set to false, identifies that the collection should be allowed to contain duplicates

Parameters:
allowDuplicates - String to determine if collection should allow duplicates. If set and not false, collection will contain duplicates

setAddToParent

public void setAddToParent(java.lang.Boolean addToParent)
Determines whether the output of the tag should be added to the parent tag identified by the tag id

Parameters:
addToParent - true if the output should be added to the parent, false otherwise

setId

public void setId(java.lang.String id)
Uniqie identifier for this tag

Overrides:
setId in class javax.servlet.jsp.tagext.TagSupport
Parameters:
id - String to identify the tag

setDoNotRun

public void setDoNotRun(java.lang.Boolean doNotRun)
Set to determine whether the tag will be processed

Parameters:
doNotRun - true if the tag should NOT be processed, false otherwise. FALSE by default

setSelectedValue

public void setSelectedValue(java.lang.String selectedValue)