Search in sources :

Example 1 with SServiceInterface

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

the class MetaServiceImpl method getServiceInterfaces.

@Override
public List<SServiceInterface> getServiceInterfaces() throws ServerException, UserException {
    List<SServiceInterface> sServiceInterfaces = new ArrayList<SServiceInterface>();
    for (String name : getBimServer().getServicesMap().keySetName()) {
        SServiceInterface sServiceInterface = convertServiceInterface(name);
        sServiceInterfaces.add(sServiceInterface);
    }
    Collections.sort(sServiceInterfaces, new Comparator<SServiceInterface>() {

        @Override
        public int compare(SServiceInterface o1, SServiceInterface o2) {
            return o1.getName().compareTo(o2.getName());
        }
    });
    return sServiceInterfaces;
}
Also used : SServiceInterface(org.bimserver.interfaces.objects.SServiceInterface) ArrayList(java.util.ArrayList)

Example 2 with SServiceInterface

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

the class MetaServiceImpl method convertServiceInterface.

private SServiceInterface convertServiceInterface(String name) {
    SServiceInterface sServiceInterface = new SServiceInterface();
    SService byName = getBimServer().getServicesMap().getByName(name);
    sServiceInterface.setName(name);
    sServiceInterface.setNameSpace(byName.getNameSpace());
    sServiceInterface.setSimpleName(byName.getSimpleName());
    return sServiceInterface;
}
Also used : SServiceInterface(org.bimserver.interfaces.objects.SServiceInterface) SService(org.bimserver.shared.meta.SService)

Aggregations

SServiceInterface (org.bimserver.interfaces.objects.SServiceInterface)2 ArrayList (java.util.ArrayList)1 SService (org.bimserver.shared.meta.SService)1