public abstract class AbstractService extends ServicePlugin
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractService.ProgressType |
class |
AbstractService.RunningService |
| Constructor and Description |
|---|
AbstractService() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addRequiredRights(ServiceDescriptor serviceDescriptor) |
PluginContext |
getPluginContext() |
AbstractService.ProgressType |
getProgressType()
Should return whether this service can report progress (as a percentage) or not
|
ObjectDefinition |
getSettingsDefinition() |
void |
init(PluginContext pluginContext)
Initialize this plugin
|
abstract void |
newRevision(AbstractService.RunningService runningService,
BimServerClientInterface bimServerClientInterface,
long poid,
long roid,
String userToken,
long soid,
SObjectType settings)
This method gets called when there is a new revision
|
void |
register(long uoid,
SInternalServicePluginConfiguration internalService,
PluginConfiguration pluginConfiguration)
This will start an instance of the ServicePlugin with the settings for a specific user
|
void |
unregister(SInternalServicePluginConfiguration internalService) |
getLocalBimServerClientInterface, getPluginType, getServiceInterface, registerNewExtendedDataOnProjectHandler, registerNewExtendedDataOnRevisionHandler, registerNewRevisionHandler, unregisterNewRevisionHandlerpublic void init(PluginContext pluginContext) throws PluginException
Plugininit in interface Plugininit in class ServicePluginpluginContext - The context of the plugin, you can store this object as a field and use it laterPluginException - When the init method throws a PluginException, this will always disable the pluginpublic PluginContext getPluginContext()
getPluginContext in class ServicePluginpublic ObjectDefinition getSettingsDefinition()
public abstract void newRevision(AbstractService.RunningService runningService, BimServerClientInterface bimServerClientInterface, long poid, long roid, String userToken, long soid, SObjectType settings) throws Exception
runningService - A reference to the RunningService, you can use it to update the progress if you know itbimServerClientInterface - A client with the proper authorization on this or a remote BIMserver to fetch the revision, and write extended data topoid - ProjectID of the projectroid - RevisionID of the new revisionuserToken - Optional token, unused at the momentsoid - ServiceIDsettings - Optional settings a user might have given in the InternalService settingsExceptionpublic AbstractService.ProgressType getProgressType()
public abstract void addRequiredRights(ServiceDescriptor serviceDescriptor)
public void register(long uoid,
SInternalServicePluginConfiguration internalService,
PluginConfiguration pluginConfiguration)
ServicePluginregister in class ServicePluginpublic void unregister(SInternalServicePluginConfiguration internalService)
unregister in class ServicePluginCopyright © 2018 OpenSource BIM. All rights reserved.