Sha256: f1bd3eba7bd7ad2ca24a1973c2873a52373d0a9457cbead8b666600bb3b92375
Contents?: true
Size: 1.7 KB
Versions: 1
Compression:
Stored size: 1.7 KB
Contents
class OEHClient::Meta::Workspace < OEHClient::Data::Node extend OEHClient::Meta::Entity # set the ONE entity URI Stem for workspace requests self.entity_uri_stem = "workspaces" ### ### ------------- Constants ### ONE_WORKSPACE_SITE_KEY = "siteKey" ### ### ------------- Attributes ### ### ### ------------- Class Methods ### def self.find_by_key(active_session, site_key, **args) # default the workspace instance NIL workspace_instance = nil # get the list of workspaces from the thinstance workspace_data = get(active_session, {:name => ONE_WORKSPACE_SITE_KEY, :value => site_key}, **args) unless (workspace_data.blank?) puts "-----] Workspace Data: #{workspace_data}" # convert the the workspace instance into a NEW instance of the OEHClient::Meta::Workspace instance workspace_instance = OEHClient::Meta::Workspace.new(workspace_data) # set the session object # workspace_instance.session = session # return the workspace instance workspace_instance end # unless workspace_data.blank? end # def self.find_by_key ### ### ------------- Instance Methods ### # retrieve the full collection of touchpoints from the curent workspace def touchpoints() touchpoint_collection = Array.new OEHClient::Meta::Touchpoint.get_collection(self.class.session, space: id).each do | touchpoint_item | touchpoint_collection << OEHClient::Meta::Touchpoint.create(self, touchpoint_item) end touchpoint_collection end # retrieve a single touchpoint from the current workspace based on the name def touchpoint(touchpoint_name) OEHClient::Meta::Touchpoint.create(self, OEHClient::Meta::Touchpoint.find_by_name(self.class.session, touchpoint_name, space: id)) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
oeh-client-2.2.9 | lib/oehclient/meta/workspace.rb |