use of org.bimserver.plugins.objectidms.ObjectIDMPlugin in project BIMserver by opensourceBIM.
the class PluginServiceImpl method getAllObjectIDMPluginDescriptors.
@Override
public List<SObjectIDMPluginDescriptor> getAllObjectIDMPluginDescriptors() throws UserException {
requireRealUserAuthentication();
Collection<ObjectIDMPlugin> allObjectIDMs = getBimServer().getPluginManager().getAllObjectIDMPlugins(true).values();
List<SObjectIDMPluginDescriptor> descriptors = new ArrayList<SObjectIDMPluginDescriptor>();
for (ObjectIDMPlugin ObjectIDMPlugin : allObjectIDMs) {
SObjectIDMPluginDescriptor descriptor = new SObjectIDMPluginDescriptor();
descriptor.setClassName(ObjectIDMPlugin.getClass().getName());
descriptors.add(descriptor);
}
return descriptors;
}
use of org.bimserver.plugins.objectidms.ObjectIDMPlugin in project BIMserver by opensourceBIM.
the class LongDownloadAction method init.
public void init(Thread thread) {
super.init(thread);
if (getBimServer().getServerSettingsCache().getServerSettings().getCacheOutputFiles() && getBimServer().getDiskCacheManager().contains(downloadParameters)) {
return;
}
ObjectIDM objectIDM = null;
if (downloadParameters.getUseObjectIDM()) {
session = getBimServer().getDatabase().createSession();
try {
SerializerPluginConfiguration serializerPluginConfiguration = session.get(StorePackage.eINSTANCE.getSerializerPluginConfiguration(), downloadParameters.getSerializerOid(), OldQuery.getDefault());
if (serializerPluginConfiguration != null) {
ObjectIDMPluginConfiguration objectIdm = serializerPluginConfiguration.getObjectIDM();
if (objectIdm != null) {
ObjectIDMPlugin objectIDMPlugin = getBimServer().getPluginManager().getObjectIDMByName(objectIdm.getPluginDescriptor().getPluginClassName(), true);
if (objectIDMPlugin != null) {
objectIDM = objectIDMPlugin.getObjectIDM(new PluginConfiguration());
}
}
}
} catch (BimserverDatabaseException e) {
LOGGER.error("", e);
} finally {
session.close();
}
}
session = getBimServer().getDatabase().createSession();
switch(downloadParameters.getDownloadType()) {
case DOWNLOAD_BY_NEW_JSON_QUERY:
action = new DownloadByNewJsonQueryDatabaseAction(getBimServer(), session, accessMethod, downloadParameters.getRoids(), downloadParameters.getJsonQuery(), downloadParameters.getSerializerOid(), getAuthorization());
break;
case DOWNLOAD_PROJECTS:
action = new DownloadProjectsDatabaseAction(getBimServer(), session, accessMethod, downloadParameters.getRoids(), downloadParameters.getSerializerOid(), getAuthorization(), objectIDM);
break;
case DOWNLOAD_COMPARE:
action = new DownloadCompareDatabaseAction(getBimServer(), session, accessMethod, downloadParameters.getRoids(), downloadParameters.getModelCompareIdentifier(), downloadParameters.getCompareType(), getAuthorization(), objectIDM);
break;
}
action.addProgressListener(this);
}
Aggregations