Package jadex.bpmn
Class BpmnFactory
- java.lang.Object
-
- jadex.bridge.service.BasicService
-
- jadex.bpmn.BpmnFactory
-
- All Implemented Interfaces:
IInternalService,IService,IBootstrapFactory,IComponentFactory
public class BpmnFactory extends BasicService implements IComponentFactory, IBootstrapFactory
Factory for loading bpmn processes.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Collection<IComponentFeatureFactory>BPMN_FEATURESprotected java.util.Collection<IComponentFeatureFactory>featuresThe standard + micro component features.static java.lang.StringFILETYPE_BPMNLEGACYPROCESSThe bpmn legacy process file type.static java.lang.StringFILETYPE_BPMNPROCESSThe bpmn process file type.static java.lang.String[]FILETYPESThe supported component types (file extensions).protected java.util.Map<java.lang.String,java.lang.Object>fpropertiesThe properties.protected static LazyResourceICONThe image icon.protected ILibraryServicelibserviceThe library service.protected ILibraryServiceListenerlibservicelistenerThe library service listenerprotected BpmnModelLoaderloaderThe model loaderstatic java.util.Collection<IComponentFeatureFactory>NOPLATFORM_DEFAULT_FEATURESThe default component features.protected IInternalAccessproviderThe provider.-
Fields inherited from class jadex.bridge.service.BasicService
DEFAULT_SYSTEM_SECURITY, idcnt, impltype, internalaccess, providerid, shutdowned, sid, started, type
-
Fields inherited from interface jadex.bridge.service.IService
EMPTY_SERVICES
-
-
Constructor Summary
Constructors Constructor Description BpmnFactory(IInternalAccess provider, java.util.Map<java.lang.String,java.lang.Object> properties)Create a new BpmnProcessService.BpmnFactory(java.lang.String providerid)Create a new factory for startup.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getComponentAnnotationTypes()IFuture<java.util.Collection<IComponentFeatureFactory>>getComponentFeatures(IModelInfo model, java.lang.Object pojo)Get the component features for a model.IFuture<java.lang.String>getComponentType(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)Get the component type of a model.IFuture<byte[]>getComponentTypeIcon(java.lang.String type)Get a default icon for a file type.java.lang.String[]getComponentTypes()Get the names of ADF file types supported by this factory.java.util.Map<java.lang.String,java.lang.Object>getProperties(java.lang.String type)Get the properties.IFuture<java.lang.Boolean>isLoadable(java.lang.String model, java.lang.Object pojo, java.lang.String[] imports, IResourceIdentifier rid)Test if a model can be loaded by the factory.IFuture<java.lang.Boolean>isStartable(java.lang.String model, java.lang.Object pojo, java.lang.String[] imports, IResourceIdentifier rid)Test if a model is startable (e.g.IFuture<IModelInfo>loadModel(java.lang.String model, java.lang.Object pojo, java.lang.String[] imports, IResourceIdentifier rid)Load a model.voidsetFeatures(java.util.Collection<IComponentFeatureFactory> features)Set the features.IFuture<java.lang.Void>shutdownService()Shutdown the service.IFuture<java.lang.Void>startService()Start the service.IFuture<java.lang.Void>startService(IInternalAccess component, IResourceIdentifier rid)Start the service.-
Methods inherited from class jadex.bridge.service.BasicService
createServiceIdentifier, createServiceIdentifier, equals, generateServiceName, getInterfaceType, getInternalAccess, getInvokeMethod, getMethodInfos, getMethodTimeout, getPropertyMap, getProviderId, getSecurityLevel, getServiceId, hashCode, initNFProperties, invokeMethod, isUnrestricted, isValid, setComponentAccess, setPropertyMap, setServiceIdentifier, toString
-
-
-
-
Field Detail
-
NOPLATFORM_DEFAULT_FEATURES
public static final java.util.Collection<IComponentFeatureFactory> NOPLATFORM_DEFAULT_FEATURES
The default component features.
-
FILETYPES
public static final java.lang.String[] FILETYPES
The supported component types (file extensions). Convention used by platform config panel.
-
FILETYPE_BPMNPROCESS
public static final java.lang.String FILETYPE_BPMNPROCESS
The bpmn process file type.- See Also:
- Constant Field Values
-
FILETYPE_BPMNLEGACYPROCESS
public static final java.lang.String FILETYPE_BPMNLEGACYPROCESS
The bpmn legacy process file type.- See Also:
- Constant Field Values
-
ICON
protected static final LazyResource ICON
The image icon.
-
BPMN_FEATURES
public static final java.util.Collection<IComponentFeatureFactory> BPMN_FEATURES
-
provider
protected IInternalAccess provider
The provider.
-
loader
protected BpmnModelLoader loader
The model loader
-
libservice
protected ILibraryService libservice
The library service.
-
libservicelistener
protected ILibraryServiceListener libservicelistener
The library service listener
-
fproperties
protected java.util.Map<java.lang.String,java.lang.Object> fproperties
The properties.
-
features
protected java.util.Collection<IComponentFeatureFactory> features
The standard + micro component features.
-
-
Constructor Detail
-
BpmnFactory
public BpmnFactory(java.lang.String providerid)
Create a new factory for startup.- Parameters:
platform- The platform.
-
BpmnFactory
public BpmnFactory(IInternalAccess provider, java.util.Map<java.lang.String,java.lang.Object> properties)
Create a new BpmnProcessService.
-
-
Method Detail
-
startService
public IFuture<java.lang.Void> startService(IInternalAccess component, IResourceIdentifier rid)
Start the service.- Specified by:
startServicein interfaceIBootstrapFactory- Parameters:
component- The component.rid- The resource identifier.
-
startService
public IFuture<java.lang.Void> startService()
Start the service.- Specified by:
startServicein interfaceIInternalService- Overrides:
startServicein classBasicService- Returns:
- A future that is done when the service has completed starting.
-
shutdownService
public IFuture<java.lang.Void> shutdownService()
Shutdown the service.- Specified by:
shutdownServicein interfaceIInternalService- Overrides:
shutdownServicein classBasicService- Parameters:
listener- The listener.- Returns:
- A future that is done when the service has completed its shutdown.
-
setFeatures
public void setFeatures(java.util.Collection<IComponentFeatureFactory> features)
Set the features.- Parameters:
features- The features to set.
-
loadModel
public IFuture<IModelInfo> loadModel(java.lang.String model, java.lang.Object pojo, java.lang.String[] imports, IResourceIdentifier rid)
Load a model.- Specified by:
loadModelin interfaceIComponentFactory- Parameters:
model- The model (e.g. file name).The- imports (if any).- Returns:
- The loaded model.
-
isLoadable
public IFuture<java.lang.Boolean> isLoadable(java.lang.String model, java.lang.Object pojo, java.lang.String[] imports, IResourceIdentifier rid)
Test if a model can be loaded by the factory.- Specified by:
isLoadablein interfaceIComponentFactory- Parameters:
model- The model (e.g. file name).The- imports (if any).- Returns:
- True, if model can be loaded.
-
isStartable
public IFuture<java.lang.Boolean> isStartable(java.lang.String model, java.lang.Object pojo, java.lang.String[] imports, IResourceIdentifier rid)
Test if a model is startable (e.g. an component).- Specified by:
isStartablein interfaceIComponentFactory- Parameters:
model- The model (e.g. file name).The- imports (if any).- Returns:
- True, if startable (and loadable).
-
getComponentTypes
public java.lang.String[] getComponentTypes()
Get the names of ADF file types supported by this factory.- Specified by:
getComponentTypesin interfaceIComponentFactory
-
getComponentAnnotationTypes
public java.lang.String[] getComponentAnnotationTypes()
- Specified by:
getComponentAnnotationTypesin interfaceIComponentFactory
-
getComponentTypeIcon
public IFuture<byte[]> getComponentTypeIcon(java.lang.String type)
Get a default icon for a file type.- Specified by:
getComponentTypeIconin interfaceIComponentFactory
-
getComponentType
public IFuture<java.lang.String> getComponentType(java.lang.String model, java.lang.String[] imports, IResourceIdentifier rid)
Get the component type of a model.- Specified by:
getComponentTypein interfaceIComponentFactory- Parameters:
model- The model (e.g. file name).The- imports (if any).
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties(java.lang.String type)
Get the properties. Arbitrary properties that can e.g. be used to define kernel-specific settings to configure tools.- Specified by:
getPropertiesin interfaceIComponentFactory- Parameters:
type- The component type.- Returns:
- The properties or null, if the component type is not supported by this factory.
-
getComponentFeatures
public IFuture<java.util.Collection<IComponentFeatureFactory>> getComponentFeatures(IModelInfo model, java.lang.Object pojo)
Get the component features for a model.- Specified by:
getComponentFeaturesin interfaceIComponentFactory- Parameters:
model- The component model.- Returns:
- The component features.
-
-