Interface EffectorInstanceManager
@PublicApi
public interface EffectorInstanceManager
Effector instance manager is responsible for CRUD operations on persistent
effector instances.-
Method Summary
Modifier and TypeMethodDescriptionlongCreates a new effector instance and returns its ID.voiddeleteEffectorInstance(long id) Deletes an effector instance with the given ID.getEffectorInstance(long id) Returns an effector instance by its ID.voidupdateEffectorInstance(long id, String moduleKey, Map<String, Object> parameters, Long owningStructure) Updates an effector instance with the given ID.
-
Method Details
-
createEffectorInstance
long createEffectorInstance(@NotNull String moduleKey, @Nullable Map<String, Object> parameters, @Nullable Long owningStructure) throws StructureExceptionCreates a new effector instance and returns its ID.- Parameters:
moduleKey- the module key of theEffectorparameters- effector-specific parametersowningStructure- the ID of the structure this instance will be installed into, if applicable. It's always safe to passnullhere, Structure will set this parameter when needed.- Returns:
- the ID of the created instance
- Throws:
StructureException- if an effector instance cannot be created
-
getEffectorInstance
Returns an effector instance by its ID.- Parameters:
id- instance ID- Returns:
- the corresponding effector instance
- Throws:
StructureException- if an effector instance with this ID does not exist or cannot be returned
-
updateEffectorInstance
void updateEffectorInstance(long id, @NotNull String moduleKey, @Nullable Map<String, Object> parameters, @Nullable Long owningStructure) throws StructureExceptionUpdates an effector instance with the given ID.- Parameters:
id- instance IDmoduleKey- the module key of theEffectorparameters- effector-specific parametersowningStructure- the ID of the structure this instance will be installed into, if applicable.- Throws:
StructureException- if an effector instance with this ID does not exist or cannot be updated
-
deleteEffectorInstance
Deletes an effector instance with the given ID.- Parameters:
id- instance ID- Throws:
StructureException- if an effector instance cannot be deleted
-