Class: Mio::Model::Hotfolder
- Inherits:
-
Mio::Model
- Object
- Mio::Model
- Mio::Model::Hotfolder
- Defined in:
- lib/mio/model/hotfolder.rb
Instance Attribute Summary
Attributes inherited from Mio::Model
Instance Method Summary collapse
Methods inherited from Mio::Model
#configure, #create, field, #go, #initialize, mappings, nested, #set_enable, set_resource, #set_start, #validate
Constructor Details
This class inherits a constructor from Mio::Model
Instance Method Details
#config_hash ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/mio/model/hotfolder.rb', line 24 def config_hash # Get the s3 resource id storage = @search.find_resources_by_name(@args.storage_name).first raise Mio::Model::NoSuchResource, "Could not find #{@args.storage_name}" unless storage # Get the workflow name workflow = @search.find_workflowDefinitions_by_name(@args.workflow_name).first raise Mio::Model::NoSuchResource, "Could not find #{@args.workflow_name}" unless workflow owner = @search.find_users_by_displayName(@args.owner).first raise Mio::Model::NoSuchResource, "Could not find #{@args.owner}" unless owner { 'housekeeping-period' => 5139767606400000000, 'inactivity-timeout' => 30000000, 'storage-resources' => { 'Storage Resource' => [ {'id' => storage['id'] } ] }, 'use-md5' => false, 'workflow-definition' => { 'id' => workflow['id'] }, 'owner' => { 'id' => owner['id'] } } end |
#create_hash ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/mio/model/hotfolder.rb', line 16 def create_hash plugin = 'tv.nativ.mio.enterprise.resources.impl.capacity.folder.hotfolder.MioHotFolderResource' {name: @args.name, pluginClass: plugin, visibilityIds: @args.visibility} end |