I'm trying to write a mini plugin for the BMC Action Request System Server.
filterAPICall
public abstract List<com.bmc.arsys.api.Value> filterAPICall(ARPluginContext context,
List<com.bmc.arsys.api.Value> pInValues)
throws com.bmc.arsys.api.ARExceptionDescription copied from interface: ARFilterAPIPluggable
Given a set of input values, process it and return a list of output values. The plugin context and instance data are also provided.
Specified by:
filterAPICall in interface ARFilterAPIPluggable
Parameters:
context - Current context for this plugin call, like username etc.
pInValues - input values
Returns:
output values
Throws:
com.bmc.arsys.api.ARException
The description of com.bmc.arsys.api.Value is here: http://www.javasystemsolutions.com/documentation/thirdparty/arapiv75/com/bmc/arsys/api/Value.html
Now, here is my call:
public List<Value> filterAPICall(ARPluginContext context, List<Value> pInValues) throws ARException{
context.logMessage(pluginInfo, ARPluginContext.PLUGIN_LOG_LEVEL_INFO, "filterapiCall()");
if (pInValues.size() == 0)
return null;
ArrayList<Value> outValues = new ArrayList<Value>();
outValues.add(0, new Value(String.valueOf(InetAddresses.isInetAddress(String.valueOf(pInValues)))));
return outValues;
}
For some reason
outValues.add(0, new Value(String.valueOf(InetAddresses.isInetAddress(String.valueOf(pInValues)))));
is not working.
I've also tried:
outValues.add(0, new Value(String.valueOf(InetAddresses.isInetAddress(String.valueOf(pInValues.getValue())))));
but the compiler says:
javac IPChecker.java
IPChecker.java:30: cannot find symbol
symbol : method getValue()
location: interface java.util.List<com.bmc.arsys.api.Value>
outValues.add(0, new Value(String.valueOf(InetAddresses.isInetAddress(String.valueOf(pInValues.getValue())))));
^
1 error
Any ideas?
Thanks Thomas
You should be iterating.