use of org.bimserver.interfaces.objects.SServiceParameter in project BIMserver by opensourceBIM.
the class MetaServiceImpl method getServiceMethodParameters.
@Override
public List<SServiceParameter> getServiceMethodParameters(String serviceInterfaceName, String serviceMethodName) throws ServerException, UserException {
List<SServiceParameter> sServiceParameters = new ArrayList<SServiceParameter>();
SService serviceInterface = getBimServer().getServicesMap().getByName(serviceInterfaceName);
if (serviceInterface == null) {
throw new UserException("Service \"" + serviceInterfaceName + "\" not found");
}
SMethod sMethod = serviceInterface.getSMethod(serviceMethodName);
if (sMethod == null) {
throw new UserException("Method \"" + serviceMethodName + "\" not found in \"" + serviceInterfaceName + "\"");
}
for (SParameter sParameter : sMethod.getParameters()) {
SServiceParameter sServiceParameter = new SServiceParameter();
sServiceParameter.setName(sParameter.getName());
sServiceParameter.setDoc(sParameter.getDoc());
sServiceParameter.setType(createSServiceType(sParameter.getType(), false));
sServiceParameter.setGenericType(createSServiceType(sParameter.getGenericType(), false));
sServiceParameters.add(sServiceParameter);
}
return sServiceParameters;
}
Aggregations