Hi,
The listResources(String type,String parentFolder, String ancestorFolder) doe not appear in the JasperServer-iReport-plugin jar in either 2.0.1 or 3.00 jar download.And also if I try to use the method by copying manually the addArgument method got replaced with the setArgument and accepts only list as the parameter.So can you please tell if I can get a different route for this to call the setArgument method in the com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.Request; API
I would really aprecite for a quick response.......
req.addArgument(Argument.LIST_RESOURCES);
req.addArgument(Argument.RESOURCE_TYPE, type);
protected List listResources(String type,
String parentFolder, String ancestorFolder) throws Exception
{
Request req = new Request();
req.setOperationName(Request.OPERATION_LIST);
req.setLocale(getServer().getLocale());
req.addArgument(Argument.LIST_RESOURCES);
req.addArgument(Argument.RESOURCE_TYPE, type);
if (parentFolder != null) {
req.addArgument(Argument.PARENT_DIRECTORY, parentFolder);
} else if (ancestorFolder != null) {
req.addArgument(Argument.START_FROM_DIRECTORY, ancestorFolder);
}
StringWriter xmlStringWriter = new StringWriter();
Marshaller.marshal(req, xmlStringWriter);
return list(xmlStringWriter.toString());
}