class OEHClient::Meta::Workspace

Constants

ONE_WORKSPACE_SITE_KEY

————- Constants

Public Class Methods

find_by_key(active_session, site_key, **args) click to toggle source

————- Class Methods

# File lib/oehclient/meta/workspace.rb, line 22
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

Public Instance Methods

touchpoint(touchpoint_name) click to toggle source

retrieve a single touchpoint from the current workspace based on the name

# File lib/oehclient/meta/workspace.rb, line 53
def touchpoint(touchpoint_name)
        OEHClient::Meta::Touchpoint.create(self, OEHClient::Meta::Touchpoint.find_by_name(self.class.session, touchpoint_name, space: id))
end
touchpoints() click to toggle source

retrieve the full collection of touchpoints from the curent workspace

# File lib/oehclient/meta/workspace.rb, line 44
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