use of org.bimserver.interfaces.objects.SPluginDescriptor in project BIMserver by opensourceBIM.
the class SerializerFactory method getAllServicePluginDescriptors.
public List<SPluginDescriptor> getAllServicePluginDescriptors() {
List<SPluginDescriptor> descriptors = new ArrayList<SPluginDescriptor>();
for (ServicePlugin servicePlugin : pluginManager.getAllServicePlugins(true).values()) {
SPluginDescriptor descriptor = new SPluginDescriptor();
descriptor.setPluginClassName(servicePlugin.getClass().getName());
descriptors.add(descriptor);
}
return descriptors;
}
use of org.bimserver.interfaces.objects.SPluginDescriptor in project BIMserver by opensourceBIM.
the class ServiceImpl method getQueryEngineExampleKeys.
@Override
public List<String> getQueryEngineExampleKeys(Long qeid) throws ServerException, UserException {
requireRealUserAuthentication();
SQueryEnginePluginConfiguration queryEngineById = getQueryEngineById(qeid);
SPluginDescriptor pluginDescriptor = getServiceMap().getPluginInterface().getPluginDescriptor(queryEngineById.getPluginDescriptorId());
QueryEnginePlugin queryEngine = getBimServer().getPluginManager().getQueryEngine(pluginDescriptor.getPluginClassName(), true);
return new ArrayList<String>(queryEngine.getExampleKeys());
}
use of org.bimserver.interfaces.objects.SPluginDescriptor in project BIMserver by opensourceBIM.
the class ServiceImpl method getQueryEngineExample.
@Override
public String getQueryEngineExample(Long qeid, String key) throws ServerException, UserException {
requireRealUserAuthentication();
SQueryEnginePluginConfiguration queryEngineById = getQueryEngineById(qeid);
SPluginDescriptor pluginDescriptor = getServiceMap().getPluginInterface().getPluginDescriptor(queryEngineById.getPluginDescriptorId());
QueryEnginePlugin queryEngine = getBimServer().getPluginManager().getQueryEngine(pluginDescriptor.getPluginClassName(), true);
return queryEngine.getExample(key);
}
use of org.bimserver.interfaces.objects.SPluginDescriptor in project BIMserver by opensourceBIM.
the class AdminServiceImpl method getAllPlugins.
@Override
public List<SPluginDescriptor> getAllPlugins() throws UserException, ServerException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession(OperationType.READ_ONLY);
try {
List<SPluginDescriptor> convertToSListPluginDescriptor = getBimServer().getSConverter().convertToSListPluginDescriptor(session.getAllOfType(StorePackage.eINSTANCE.getPluginDescriptor(), PluginDescriptor.class, OldQuery.getDefault()));
Collections.sort(convertToSListPluginDescriptor, new SPluginDescriptorComparator());
return convertToSListPluginDescriptor;
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
use of org.bimserver.interfaces.objects.SPluginDescriptor 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