Search in sources :

Example 1 with SPluginType

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

the class GetAllPluginDescriptorsDatabaseAction method execute.

@Override
public List<SPluginDescriptor> execute() throws UserException, BimserverLockConflictException, BimserverDatabaseException, ServerException {
    IfcModelInterface allOfType = getDatabaseSession().getAllOfType(StorePackage.eINSTANCE.getPluginDescriptor(), OldQuery.getDefault());
    List<SPluginDescriptor> result = new ArrayList<SPluginDescriptor>();
    for (PluginDescriptor pluginDescriptor : allOfType.getAll(PluginDescriptor.class)) {
        SPluginType encounteredType = bimServer.getPluginManager().getPluginTypeFromClass(pluginDescriptor.getPluginInterfaceClassName());
        if (encounteredType.equals(pluginType)) {
            result.add(bimServer.getSConverter().convertToSObject(pluginDescriptor));
        }
    }
    return result;
}
Also used : SPluginDescriptor(org.bimserver.interfaces.objects.SPluginDescriptor) PluginDescriptor(org.bimserver.models.store.PluginDescriptor) SPluginDescriptor(org.bimserver.interfaces.objects.SPluginDescriptor) IfcModelInterface(org.bimserver.emf.IfcModelInterface) SPluginType(org.bimserver.interfaces.objects.SPluginType) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 IfcModelInterface (org.bimserver.emf.IfcModelInterface)1 SPluginDescriptor (org.bimserver.interfaces.objects.SPluginDescriptor)1 SPluginType (org.bimserver.interfaces.objects.SPluginType)1 PluginDescriptor (org.bimserver.models.store.PluginDescriptor)1