Interface EffectorInstanceManager


@PublicApi public interface EffectorInstanceManager
Effector instance manager is responsible for CRUD operations on persistent effector instances.
  • Method Details

    • createEffectorInstance

      long createEffectorInstance(@NotNull String moduleKey, @Nullable Map<String,Object> parameters, @Nullable Long owningStructure) throws StructureException
      Creates a new effector instance and returns its ID.
      Parameters:
      moduleKey - the module key of the Effector
      parameters - effector-specific parameters
      owningStructure - the ID of the structure this instance will be installed into, if applicable. It's always safe to pass null here, Structure will set this parameter when needed.
      Returns:
      the ID of the created instance
      Throws:
      StructureException - if an effector instance cannot be created
    • getEffectorInstance

      @NotNull EffectorInstance getEffectorInstance(long id) throws StructureException
      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 StructureException
      Updates an effector instance with the given ID.
      Parameters:
      id - instance ID
      moduleKey - the module key of the Effector
      parameters - effector-specific parameters
      owningStructure - 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

      void deleteEffectorInstance(long id) throws StructureException
      Deletes an effector instance with the given ID.
      Parameters:
      id - instance ID
      Throws:
      StructureException - if an effector instance cannot be deleted