public void addAttribute(String alias,String typeUri,String value) throws MessageException {
  if (alias.indexOf(',') > -1 || alias.indexOf('.') > -1 || alias.indexOf(':') > -1 || alias.indexOf('\n') > -1)   throw new MessageException("Characters [.,:\\n] are not allowed in attribute aliases: " + alias);
  int count=getCount(alias);
  String index="";
switch (count) {
case 0:
    _parameters.set(new Parameter("type." + alias,typeUri));
  break;
case 1:
_parameters.set(new Parameter("value." + alias + ".1",getParameterValue("value." + alias)));
_parameters.removeParameters("value." + alias);
index=".2";
break;
default :
index="." + Integer.toString(count + 1);
}
_parameters.set(new Parameter("value." + alias + index,value));
setCount(alias,++count);
if (DEBUG) _log.debug("Added new attribute to AX payload; type: " + typeUri + " alias: "+ alias+ " count: "+ count);
}

public void addAttribute ( String alias , String typeUri , String value ) throws MessageException { if ( alias . indexOf ( ',' ) > - 1 || alias . indexOf ( '.' ) > - 1 || alias . indexOf ( ':' ) > - 1 || alias . indexOf ( '\n' ) > - 1 ) throw new MessageException ( "Characters [.,:\\n] are not allowed in attribute aliases: " + alias ) ; int count = getCount ( alias ) ; String index = "" ; switch ( count ) { case 0 : _parameters . set ( new Parameter ( "type." + alias , typeUri ) ) ; break ; case 1 : _parameters . set ( new Parameter ( "value." + alias + ".1" , getParameterValue ( "value." + alias ) ) ) ; _parameters . removeParameters ( "value." + alias ) ; index = ".2" ; break ; default : index = "." + Integer . toString ( count + 1 ) ; } _parameters . set ( new Parameter ( "value." + alias + index , value ) ) ; setCount ( alias , ++ count ) ; if ( DEBUG ) _log . debug ( "Added new attribute to AX payload; type: " + typeUri + " alias: " + alias + " count: " + count ) ; }
adds an attribute to the attribute payload .
