Class: Kaltura::KalturaRule

Inherits:
KalturaObjectBase show all
Defined in:
lib/kaltura_types.rb

Instance Attribute Summary collapse

Attributes inherited from KalturaObjectBase

#object_type, #related_objects

Instance Method Summary collapse

Methods inherited from KalturaObjectBase

#camelcase, #to_b, #to_params

Instance Attribute Details

#actionsObject

Actions to be performed by the player in case the rule is fulfilled



214
215
216
# File 'lib/kaltura_types.rb', line 214

def actions
  @actions
end

#codeObject

Code to be thrown to the player in case the rule is fulfilled



212
213
214
# File 'lib/kaltura_types.rb', line 212

def code
  @code
end

#conditionsObject

Conditions to validate the rule



216
217
218
# File 'lib/kaltura_types.rb', line 216

def conditions
  @conditions
end

#contextsObject

Indicates what contexts should be tested by this rule



218
219
220
# File 'lib/kaltura_types.rb', line 218

def contexts
  @contexts
end

#descriptionObject

Short Rule Description



206
207
208
# File 'lib/kaltura_types.rb', line 206

def description
  @description
end

#force_admin_validationObject

Indicates if we should force ks validation for admin ks users as well



222
223
224
# File 'lib/kaltura_types.rb', line 222

def force_admin_validation
  @force_admin_validation
end

#messageObject

Message to be thrown to the player in case the rule is fulfilled



210
211
212
# File 'lib/kaltura_types.rb', line 210

def message
  @message
end

#rule_dataObject

Rule Custom Data to allow saving rule specific information



208
209
210
# File 'lib/kaltura_types.rb', line 208

def rule_data
  @rule_data
end

#stop_processingObject

Indicates that this rule is enough and no need to continue checking the rest of the rules



220
221
222
# File 'lib/kaltura_types.rb', line 220

def stop_processing
  @stop_processing
end

Instance Method Details

#from_xml(xml_element) ⇒ Object



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/kaltura_types.rb', line 231

def from_xml(xml_element)
	super
	if xml_element.elements['description'] != nil
		self.description = xml_element.elements['description'].text
	end
	if xml_element.elements['ruleData'] != nil
		self.rule_data = xml_element.elements['ruleData'].text
	end
	if xml_element.elements['message'] != nil
		self.message = xml_element.elements['message'].text
	end
	if xml_element.elements['code'] != nil
		self.code = xml_element.elements['code'].text
	end
	if xml_element.elements['actions'] != nil
		self.actions = KalturaClientBase.object_from_xml(xml_element.elements['actions'], 'KalturaRuleAction')
	end
	if xml_element.elements['conditions'] != nil
		self.conditions = KalturaClientBase.object_from_xml(xml_element.elements['conditions'], 'KalturaCondition')
	end
	if xml_element.elements['contexts'] != nil
		self.contexts = KalturaClientBase.object_from_xml(xml_element.elements['contexts'], 'KalturaContextTypeHolder')
	end
	if xml_element.elements['stopProcessing'] != nil
		self.stop_processing = xml_element.elements['stopProcessing'].text
	end
	if xml_element.elements['forceAdminValidation'] != nil
		self.force_admin_validation = xml_element.elements['forceAdminValidation'].text
	end
end