Class ProvidedObjectManagerImpl
java.lang.Object
org.processmining.framework.providedobjects.impl.ProvidedObjectManagerImpl
- All Implemented Interfaces:
ProvidedObjectManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changeProvidedObjectObject
(ProvidedObjectID id, Object newObject) void
clear()
<T> ProvidedObjectID
createProvidedObject
(String label, T object, Class<? super T> type, PluginContext context) This method creates a new providedObjectID.<T> ProvidedObjectID
createProvidedObject
(String label, T object, PluginContext context) This method creates a new providedObjectID.createProvidedObjects
(PluginContext context) This method creates a list of new providedObjectIDs for each object in the PluginExecutionResult of the context.void
getProvidedObjectObject
(ProvidedObjectID id, boolean waitIfFuture) returns the provided object identified by this ID.Returns all provided Object IDs known to the framework.boolean
void
providedObjectNameChanged
(ProvidedObjectID objectID) void
providedObjectObjectChanged
(ProvidedObjectID objectID) void
relabelProvidedObject
(ProvidedObjectID id, String label) void
setEnabled
(boolean enabled)
-
Constructor Details
-
ProvidedObjectManagerImpl
public ProvidedObjectManagerImpl()
-
-
Method Details
-
getProvidedObjectLifeCylceListeners
- Specified by:
getProvidedObjectLifeCylceListeners
in interfaceProvidedObjectManager
-
createProvidedObject
Description copied from interface:ProvidedObjectManager
This method creates a new providedObjectID. The context passed to this method should refer to the PluginContext of which the ProMFuture object is the result, i.e. this.getProvidedObjectObject(createProvidedObject( String name, PluginContext context)) = context.getFutureResult(); The object will be wrapped in a ProMFuture, and a new childContext is created for this ProMFuture Note that no type is provided with this method. Instead, the framework will use the type of the given object, or if an @SubstitutionType annotation was used on the object's class definition, the substitution type is used.- Specified by:
createProvidedObject
in interfaceProvidedObjectManager
- Parameters:
label
- The label of the providedObject identified by the returned ProvidedObjectID (can be retrieved with getProvidedObjectLabel()object
- the object to be wrapped in a new ProMFuture.- Returns:
- a globally new id, identifying the providedObject
-
createProvidedObject
public <T> ProvidedObjectID createProvidedObject(String label, T object, Class<? super T> type, PluginContext context) Description copied from interface:ProvidedObjectManager
This method creates a new providedObjectID. The context passed to this method should refer to the PluginContext of which the ProMFuture object is the result, i.e. this.getProvidedObjectObject(createProvidedObject( String name, PluginContext context)) = context.getFutureResult(); The object will be wrapped in a ProMFuture, and a new childContext is created for this ProMFuture- Specified by:
createProvidedObject
in interfaceProvidedObjectManager
- Parameters:
label
- The label of the providedObject identified by the returned ProvidedObjectID (can be retrieved with getProvidedObjectLabel()object
- the object to be wrapped in a new ProMFuture.type
- the type of the object,- Returns:
- a globally new id, identifying the providedObject
-
createProvidedObjects
Description copied from interface:ProvidedObjectManager
This method creates a list of new providedObjectIDs for each object in the PluginExecutionResult of the context.- Specified by:
createProvidedObjects
in interfaceProvidedObjectManager
- Parameters:
context
- The context of which this providedObject will be the result- Returns:
- a list of globally new ids, identifying the providedObjects
-
getProvidedObjectObject
public Object getProvidedObjectObject(ProvidedObjectID id, boolean waitIfFuture) throws ProvidedObjectDeletedException Description copied from interface:ProvidedObjectManager
returns the provided object identified by this ID. Do not use this method if not necessary, as the providedObject might not exist in memory locally.- Specified by:
getProvidedObjectObject
in interfaceProvidedObjectManager
waitIfFuture
- TODO- Returns:
- Throws:
ProvidedObjectDeletedException
-
getProvidedObjectLabel
- Specified by:
getProvidedObjectLabel
in interfaceProvidedObjectManager
- Throws:
ProvidedObjectDeletedException
-
getProvidedObjectType
public Class<? extends Object> getProvidedObjectType(ProvidedObjectID id) throws ProvidedObjectDeletedException - Specified by:
getProvidedObjectType
in interfaceProvidedObjectManager
- Throws:
ProvidedObjectDeletedException
-
changeProvidedObjectObject
public void changeProvidedObjectObject(ProvidedObjectID id, Object newObject) throws ProvidedObjectDeletedException - Specified by:
changeProvidedObjectObject
in interfaceProvidedObjectManager
- Throws:
ProvidedObjectDeletedException
-
deleteProvidedObject
- Specified by:
deleteProvidedObject
in interfaceProvidedObjectManager
- Throws:
ProvidedObjectDeletedException
-
getProvidedObjects
Description copied from interface:ProvidedObjectManager
Returns all provided Object IDs known to the framework. The list is ordered in order of Arrival, i.e. the first objectID added to the framework is returned first.- Specified by:
getProvidedObjects
in interfaceProvidedObjectManager
- Returns:
-
relabelProvidedObject
public void relabelProvidedObject(ProvidedObjectID id, String label) throws ProvidedObjectDeletedException - Specified by:
relabelProvidedObject
in interfaceProvidedObjectManager
- Throws:
ProvidedObjectDeletedException
-
providedObjectNameChanged
-
providedObjectObjectChanged
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabled
in interfaceProvidedObjectManager
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceProvidedObjectManager
-
clear
public void clear()- Specified by:
clear
in interfaceProvidedObjectManager
-