Sha256: ed5dc144fa90d178110df0548e30d617053e846f248674c474d886fa34cce65a

Contents?: true

Size: 1.67 KB

Versions: 14

Compression:

Stored size: 1.67 KB

Contents

class OEHClient::Meta::Touchpoint < OEHClient::Data::Node
	include OEHClient::Meta::WorkspaceEntity

	# tell the workspace entity module how to reference within ONE
	self.entity_uri_stem 	= "touchpoints"

	# create a new instance of the class using the data set and assig the workspace
	def self.create(workspace, data)
		# create from the past data structure
		touchpoint_instance	 			= OEHClient::Meta::Touchpoint.new(data)
		# assign the local workspace object
		touchpoint_instance.workspace 	= workspace
		# return the instance
		touchpoint_instance
	end # self.create

	# retrieve the full collection of touchpoints from the curent workspace
	def interactions()
		# initialize the collection array
		interaction_collection 	= Array.new
		# retrieve the collection from ONE using the workspace reference and current touchpoint
		OEHClient::Meta::Interaction.get_collection(self.class.session, space: workspace.id, params: {:site => id}).each do | interaction_item |
			# create the instance of the interaction and add it to the collection
			interaction_collection << OEHClient::Meta::Interaction.create(workspace, interaction_item)
		end
		# return the collection to calling process
		interaction_collection
	end # end def interactions

	# retrieve a single touchpoint from the current workspace based on the name
	def interaction(interaction_name)
		# create and return the instance of an interaction based on the name, current workspace, and current touchpoint
		OEHClient::Meta::Interaction.create(workspace, OEHClient::Meta::Interaction.find_by_name(self.class.session, interaction_name, space: workspace.id, params: {:site => id}))
	end # def interaction

end # class OEHClient::Meta::Touchpoint

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
oeh-client-2.2.9 lib/oehclient/meta/touchpoint.rb
oeh-client-2.2.8 lib/oehclient/meta/touchpoint.rb
oeh-client-2.2.7 lib/oehclient/meta/touchpoint.rb
oeh-client-2.2.6 lib/oehclient/meta/touchpoint.rb
oeh-client-2.2.5 lib/oehclient/meta/touchpoint.rb
oeh-client-2.2.4 lib/oehclient/meta/touchpoint.rb
oeh-client-2.2.3 lib/oehclient/meta/touchpoint.rb
oeh-client-2.2.1 lib/oehclient/meta/touchpoint.rb
oeh-client-2.2.0 lib/oehclient/meta/touchpoint.rb
oeh-client-2.1.0 lib/oehclient/meta/touchpoint.rb
oeh-client-2.0.3 lib/oehclient/meta/touchpoint.rb
oeh-client-2.0.2 lib/oehclient/meta/touchpoint.rb
oeh-client-2.0.1 lib/oehclient/meta/touchpoint.rb
oeh-client-1.1.0 lib/oehclient/meta/touchpoint.rb