Search in sources :

Example 1 with SServiceMethod

use of org.bimserver.interfaces.objects.SServiceMethod in project BIMserver by opensourceBIM.

the class MetaServiceImpl method getServiceMethods.

@Override
public List<SServiceMethod> getServiceMethods(String serviceInterfaceName) throws ServerException, UserException {
    List<SServiceMethod> sServiceMethods = new ArrayList<SServiceMethod>();
    SService sService = getBimServer().getServicesMap().getByName(serviceInterfaceName);
    if (sService == null) {
        throw new UserException("Service \"" + serviceInterfaceName + "\" not found");
    }
    for (SMethod sMethod : sService.getMethods()) {
        SServiceMethod sServiceMethod = convertMethod(sMethod);
        sServiceMethods.add(sServiceMethod);
    }
    return sServiceMethods;
}
Also used : SServiceMethod(org.bimserver.interfaces.objects.SServiceMethod) ArrayList(java.util.ArrayList) UserException(org.bimserver.shared.exceptions.UserException) SMethod(org.bimserver.shared.meta.SMethod) SService(org.bimserver.shared.meta.SService)

Example 2 with SServiceMethod

use of org.bimserver.interfaces.objects.SServiceMethod in project BIMserver by opensourceBIM.

the class MetaServiceImpl method convertMethod.

private SServiceMethod convertMethod(SMethod sMethod) {
    SServiceMethod sServiceMethod = new SServiceMethod();
    sServiceMethod.setName(sMethod.getName());
    sServiceMethod.setDoc(sMethod.getDoc());
    sServiceMethod.setReturnDoc(sMethod.getReturnDoc());
    // sServiceMethod.setReturnType(sMethod.getReturnType().getName());
    return sServiceMethod;
}
Also used : SServiceMethod(org.bimserver.interfaces.objects.SServiceMethod)

Aggregations

SServiceMethod (org.bimserver.interfaces.objects.SServiceMethod)2 ArrayList (java.util.ArrayList)1 UserException (org.bimserver.shared.exceptions.UserException)1 SMethod (org.bimserver.shared.meta.SMethod)1 SService (org.bimserver.shared.meta.SService)1