Class: Hyrax::Actors::AbstractActor
- Inherits:
-
Object
- Object
- Hyrax::Actors::AbstractActor
- Defined in:
- app/actors/hyrax/actors/abstract_actor.rb
Overview
‘Hyrax::Actors::AbstractActor` implements the base (no-op) case for Hyrax Actor middleware. Concrete implementations may override any or all of the three primary actions:
-
#create
-
#update
-
#destroy
Each of these should accept a ‘Hyrax::Actor::Environment` and return `true` to communicate to middleware further up the stack that execution below this point may be regarded as successful, and `false` to indicate that it has not. In the general case, returning `false` will pop out of the stack–though middleware further up may perform actions or even return `true` in response.
The ‘next_actor` attribute represents the actor immediately down in the stack from the current actor. This variable should be set as an argument to the initializer, but implementations may behave differently, e.g. to insert an actor into the stack at runtime.
In order to continue the stack actors must instantiate the next actor in the chain and call the corresponding action method.
Direct Known Subclasses
ActiveFedoraToValkyrie, AddToWorkActor, ApplyOrderActor, ApplyPermissionTemplateActor, AttachMembersActor, BaseActor, CleanupFileSetsActor, CleanupTrophiesActor, CollectionsMembershipActor, CreateWithFilesActor, CreateWithRemoteFilesActor, DefaultAdminSetActor, FeaturedWorkActor, InitializeWorkflowActor, InterpretVisibilityActor, ModelActor, NullActor, OptimisticLockValidator, TransactionalRequest, TransferRequestActor, ValkyrieToActiveFedora
Instance Attribute Summary collapse
-
#next_actor ⇒ Object
readonly
Returns the value of attribute next_actor.
Instance Method Summary collapse
-
#initialize(next_actor) ⇒ AbstractActor
constructor
A new instance of AbstractActor.
Constructor Details
#initialize(next_actor) ⇒ AbstractActor
Returns a new instance of AbstractActor.
88 89 90 |
# File 'app/actors/hyrax/actors/abstract_actor.rb', line 88 def initialize(next_actor) @next_actor = next_actor end |
Instance Attribute Details
#next_actor ⇒ Object (readonly)
Returns the value of attribute next_actor.
84 85 86 |
# File 'app/actors/hyrax/actors/abstract_actor.rb', line 84 def next_actor @next_actor end |