Class: Kaltura::KalturaMetadataProfileService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_plugins/kaltura_metadata_client_plugin.rb

Overview

Metadata Profile service

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaMetadataProfileService

Returns a new instance of KalturaMetadataProfileService.



595
596
597
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 595

def initialize(client)
	super(client)
end

Instance Method Details

#add(metadata_profile, xsd_data, views_data = KalturaNotImplemented) ⇒ Object

Allows you to add a metadata profile object and metadata profile content associated with Kaltura object type



601
602
603
604
605
606
607
608
609
610
611
612
613
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 601

def add(, xsd_data, views_data=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'metadataProfile', );
	# XSD metadata definition
	client.add_param(kparams, 'xsdData', xsd_data);
	# UI views definition
	client.add_param(kparams, 'viewsData', views_data);
	client.queue_service_action_call('metadata_metadataprofile', 'add', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#add_from_file(metadata_profile, xsd_file, views_file = KalturaNotImplemented) ⇒ Object

Allows you to add a metadata profile object and metadata profile file associated with Kaltura object type



617
618
619
620
621
622
623
624
625
626
627
628
629
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 617

def add_from_file(, xsd_file, views_file=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'metadataProfile', );
	# XSD metadata definition
	client.add_param(kparams, 'xsdFile', xsd_file);
	# UI views definition
	client.add_param(kparams, 'viewsFile', views_file);
	client.queue_service_action_call('metadata_metadataprofile', 'addFromFile', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#delete(id) ⇒ Object

Delete an existing metadata profile



687
688
689
690
691
692
693
694
695
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 687

def delete(id)
	kparams = {}
	client.add_param(kparams, 'id', id);
	client.queue_service_action_call('metadata_metadataprofile', 'delete', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get(id) ⇒ Object

Retrieve a metadata profile object by id



633
634
635
636
637
638
639
640
641
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 633

def get(id)
	kparams = {}
	client.add_param(kparams, 'id', id);
	client.queue_service_action_call('metadata_metadataprofile', 'get', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object

List metadata profile objects by filter and pager



662
663
664
665
666
667
668
669
670
671
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 662

def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'filter', filter);
	client.add_param(kparams, 'pager', pager);
	client.queue_service_action_call('metadata_metadataprofile', 'list', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#list_fields(metadata_profile_id) ⇒ Object

List metadata profile fields by metadata profile id



675
676
677
678
679
680
681
682
683
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 675

def list_fields()
	kparams = {}
	client.add_param(kparams, 'metadataProfileId', );
	client.queue_service_action_call('metadata_metadataprofile', 'listFields', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#revert(id, to_version) ⇒ Object

Update an existing metadata object definition file



699
700
701
702
703
704
705
706
707
708
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 699

def revert(id, to_version)
	kparams = {}
	client.add_param(kparams, 'id', id);
	client.add_param(kparams, 'toVersion', to_version);
	client.queue_service_action_call('metadata_metadataprofile', 'revert', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#serve(id) ⇒ Object

Serves metadata profile XSD file



754
755
756
757
758
759
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 754

def serve(id)
	kparams = {}
	client.add_param(kparams, 'id', id);
	client.queue_service_action_call('metadata_metadataprofile', 'serve', kparams);
	return client.get_serve_url();
end

#serve_view(id) ⇒ Object

Serves metadata profile view file



763
764
765
766
767
768
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 763

def serve_view(id)
	kparams = {}
	client.add_param(kparams, 'id', id);
	client.queue_service_action_call('metadata_metadataprofile', 'serveView', kparams);
	return client.get_serve_url();
end

#update(id, metadata_profile, xsd_data = KalturaNotImplemented, views_data = KalturaNotImplemented) ⇒ Object

Update an existing metadata object



645
646
647
648
649
650
651
652
653
654
655
656
657
658
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 645

def update(id, , xsd_data=KalturaNotImplemented, views_data=KalturaNotImplemented)
	kparams = {}
	client.add_param(kparams, 'id', id);
	client.add_param(kparams, 'metadataProfile', );
	# XSD metadata definition
	client.add_param(kparams, 'xsdData', xsd_data);
	# UI views definition
	client.add_param(kparams, 'viewsData', views_data);
	client.queue_service_action_call('metadata_metadataprofile', 'update', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#update_definition_from_file(id, xsd_file) ⇒ Object

Update an existing metadata object definition file



712
713
714
715
716
717
718
719
720
721
722
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 712

def update_definition_from_file(id, xsd_file)
	kparams = {}
	client.add_param(kparams, 'id', id);
	# XSD metadata definition
	client.add_param(kparams, 'xsdFile', xsd_file);
	client.queue_service_action_call('metadata_metadataprofile', 'updateDefinitionFromFile', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#update_transformation_from_file(id, xslt_file) ⇒ Object

Update an existing metadata object xslt file



740
741
742
743
744
745
746
747
748
749
750
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 740

def update_transformation_from_file(id, xslt_file)
	kparams = {}
	client.add_param(kparams, 'id', id);
	# XSLT file, will be executed on every metadata add/update
	client.add_param(kparams, 'xsltFile', xslt_file);
	client.queue_service_action_call('metadata_metadataprofile', 'updateTransformationFromFile', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#update_views_from_file(id, views_file) ⇒ Object

Update an existing metadata object views file



726
727
728
729
730
731
732
733
734
735
736
# File 'lib/kaltura_plugins/kaltura_metadata_client_plugin.rb', line 726

def update_views_from_file(id, views_file)
	kparams = {}
	client.add_param(kparams, 'id', id);
	# UI views file
	client.add_param(kparams, 'viewsFile', views_file);
	client.queue_service_action_call('metadata_metadataprofile', 'updateViewsFromFile', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end