Class: FileStore::ObserverAction
- Inherits:
-
Object
- Object
- FileStore::ObserverAction
- Defined in:
- lib/filestore/observer.rb
Overview
Class FileStore::ObserverAction is used to encapsulate information describing actions occurring in an observed subject
Constant Summary collapse
- TYPE_DEFAULT =
"DEFAULT"
- TYPE_DAV_ADD =
"WEBDAV_ADD_FILE"
- TYPE_DAV_REMOVE =
"WEBDAV_REMOVE_FILE"
- TYPE_STORE_ADD =
"STORE_ADD_FILE"
- TYPE_STORE_REMOVE =
"STORE_REMOVE_FILE"
- TYPE_STORE_GET =
"STORE_GET_FILE"
- TYPE_DAV_GET =
"WEBDAV_GET_FILE"
- TYPE_STORE_RESTORE =
"STORE_RESTORE_FILE"
- TYPE_STORE_SHUTDOWN =
"STORE_SHUTDOWN"
- TYPE_MSTORE_CREATE =
"MSTORE_CREATE_TENANT"
- TYPE_MSTORE_ADD =
"MSTORE_ADD_FILE"
- TYPE_MSTORE_REMOVE =
"MSTORE_REMOVE_TENANT"
- TYPE_META_ADD =
"META_ADD_FILE"
- TYPE_META_REMOVE =
"META_REMOVE_FILE"
- TYPE_META_RESTORE =
"META_RESTORE_FILE"
- TYPE_META_SHUTDOWN =
"META_SHUTDOWN"
- TYPE_DAV_SHUTDOWN =
"DAV_SHUTDOWN"
Instance Attribute Summary collapse
-
#message ⇒ Object
Attribute accessors for instance variable containing a message providing useful information.
-
#objects ⇒ Object
Attribute accessors for instance variable containing references to affected objects.
-
#type ⇒ Object
Attribute accessors for instance variable defining the type of action.
Instance Method Summary collapse
-
#initialize(type = TYPE_DEFAULT, objects = [], message = "") ⇒ ObserverAction
constructor
A new instance of ObserverAction.
- #to_s ⇒ Object
Constructor Details
#initialize(type = TYPE_DEFAULT, objects = [], message = "") ⇒ ObserverAction
Returns a new instance of ObserverAction.
46 47 48 49 50 |
# File 'lib/filestore/observer.rb', line 46 def initialize(type = TYPE_DEFAULT, objects = [], = "") @type = type @objects = objects @message = end |
Instance Attribute Details
#message ⇒ Object
Attribute accessors for instance variable containing a message providing useful information
44 45 46 |
# File 'lib/filestore/observer.rb', line 44 def @message end |
#objects ⇒ Object
Attribute accessors for instance variable containing references to affected objects
39 40 41 |
# File 'lib/filestore/observer.rb', line 39 def objects @objects end |
#type ⇒ Object
Attribute accessors for instance variable defining the type of action
34 35 36 |
# File 'lib/filestore/observer.rb', line 34 def type @type end |
Instance Method Details
#to_s ⇒ Object
52 53 54 |
# File 'lib/filestore/observer.rb', line 52 def to_s return "(ActionType) #{@type} || (Objects) #{@objects} || (Message) #{@message}" end |