ca.infoway.messagebuilder.xml
Class Argument

Package class diagram package Argument
java.lang.Object
  extended by ca.infoway.messagebuilder.xml.ChoiceSupport
      extended by ca.infoway.messagebuilder.xml.Argument
All Implemented Interfaces:
Named, HasDifferences

public class Argument
extends ChoiceSupport
implements HasDifferences, Named

The specific type argument for a template parameter.

When an interaction is defined, it is composed of various specific parts (e.g. the base message part) with template parameters specified by a particular template argument. This class models the information that is specified in the template argument.

For example, the parameters for Find Candidates look like this: <mif:argumentMessage root="DEFN" section="IM" subSection="MC" domain="CI" artifact="MT" realmNamespace="CA" id="002100"> <mif:parameterModel parameterName="ControlActEvent" root="DEFN" section="IM" subSection="MF" domain="MI" artifact="MT" realmNamespace="CA" id="700751" traversalName="controlActEvent"> <mif:parameterModel parameterName="ParameterList" root="DEFN" section="AM" subSection="PR" domain="PA" artifact="MT" realmNamespace="CA" id="101103" traversalName="parameterList"/>

Each parameterModel represents one argument.

Author:
Intelliware Development

Constructor Summary
Argument()
           
 
Method Summary
 void addDifference(Difference difference)
           
 List<Argument> getArguments()
          Sub-arguments.
 List<Relationship> getChoices()
          The possible choices when an argument is defined as an abstract type.
 List<Difference> getDifferences()
          Records the differences between arguments of different release versions during regen.
 String getName()
          The name of the type that the argument defines.
 String getTemplateParameterName()
          The template parameter name.
 String getTraversalName()
          Gets the traversal name.
 boolean isChoice()
          Indicates that an argument is defined as an abstract type and has specific choices.
 void setArguments(List<Argument> arguments)
          Set the sub-arguments.
 void setDifferences(List<Difference> differences)
           
 void setName(String name)
          Set the name.
 void setTemplateParameterName(String templateParameterName)
          Sets the template parameter name.
 void setTraversalName(String traversalName)
          Sets the traversal name.
 
Methods inherited from class ca.infoway.messagebuilder.xml.ChoiceSupport
choiceOptionNamePredicate, choiceOptionTypePredicate, findChoiceOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Argument

public Argument()
Method Detail

getName

public String getName()

The name of the type that the argument defines. For example, a name might return "MCCI_MT700751CA.ControlActEvent".

Specified by:
getName in interface Named
Returns:
the type name of the argument.

setName

public void setName(String name)

Set the name.

Parameters:
name - - the new name.

getArguments

public List<Argument> getArguments()

Sub-arguments.

Arguments can, themselves, have arguments. Usually used in the case of a control act type, the argument of which is the payload.

Returns:
the sub-arguments

setArguments

public void setArguments(List<Argument> arguments)

Set the sub-arguments.

Parameters:
arguments - - sets the sub-arguments.

getTemplateParameterName

public String getTemplateParameterName()

The template parameter name. Each message part with template parameters will name the parameter (e.g. "RegisteredRole" or "Act"). This maps to the templateParameterName attribute of the parameterModel element

Returns:
the template parameter name.

setTemplateParameterName

public void setTemplateParameterName(String templateParameterName)

Sets the template parameter name.

Parameters:
templateParameterName - - the new templateParameterName

getTraversalName

public String getTraversalName()

Gets the traversal name. The traversal name is used to describe the element name when the message is rendered to XML.

Returns:
- the traversal name.

setTraversalName

public void setTraversalName(String traversalName)

Sets the traversal name.

Parameters:
traversalName - - the new traversal name.

getChoices

public List<Relationship> getChoices()

The possible choices when an argument is defined as an abstract type.

Specified by:
getChoices in class ChoiceSupport
Returns:
the list of choices.

isChoice

public boolean isChoice()

Indicates that an argument is defined as an abstract type and has specific choices.

Returns:
true if the argument is abstract and has choices; false otherwise.

getDifferences

public List<Difference> getDifferences()
Records the differences between arguments of different release versions during regen.

Specified by:
getDifferences in interface HasDifferences
Returns:
list of differences

setDifferences

public void setDifferences(List<Difference> differences)

addDifference

public void addDifference(Difference difference)
Specified by:
addDifference in interface HasDifferences


Copyright © 2013. All Rights Reserved.