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;
}
Aggregations