class Jamf::MacApplication

This is just a stub for now.

Constants

CATEGORY_DATA_TYPE

How is the category stored in the API data?

CATEGORY_SUBSET

Where is the Category in the API JSON?

OBJECT_HISTORY_OBJECT_TYPE

the object type for this object in the object history table. See {APIObject#add_object_history_entry}

RSRC_BASE

The base for REST resources of this class

RSRC_LIST_KEY

the hash key used for the JSON list output of all objects in the JSS

RSRC_OBJECT_KEY

The hash key used for the JSON object output. It’s also used in various error messages

SCOPE_TARGET_KEY

See Jamf::Scopable

SITE_SUBSET

Where is the Site data in the API JSON?

Attributes

bundle_id[R]

@return [String]

free?[R]

@return [Boolean]

is_free[R]

@return [Boolean]

url[R]

@return [String]

version[R]

@return [String]

Public Class Methods

new(**args) click to toggle source

Constructor

Calls superclass method Jamf::APIObject::new
   # File lib/jamf/api/classic/api_objects/mac_application.rb
85 def initialize(**args)
86   super
87   general = @init_data[:general]
88   @version = general[:version]
89   @is_free = general[:is_free]
90   @bundle_id = general[:bundle_id]
91   @url = general[:url]
92 end

Public Instance Methods

reinstall_button_text() click to toggle source

Override reinstall_button_text getter

    # File lib/jamf/api/classic/api_objects/mac_application.rb
109 def reinstall_button_text
110   raise Jamf::UnsupportedError, 'MacApplications do not have separate text for reinstall buttons. Please use install_button_text.'
111 end
reinstall_button_text=(_new) click to toggle source

Override reinstall_button_text setter

    # File lib/jamf/api/classic/api_objects/mac_application.rb
114 def reinstall_button_text=(_new)
115   raise Jamf::UnsupportedError, 'MacApplications do not have separate text for reinstall buttons. Please use install_button_text.'
116 end
self_service_display_name() click to toggle source

Override self_service_display_name getter

    # File lib/jamf/api/classic/api_objects/mac_application.rb
 99 def self_service_display_name
100   raise Jamf::UnsupportedError, 'MacApplications do not have separate display names. Please use the object name.'
101 end
self_service_display_name=(_newname) click to toggle source

Override self_service_display_name setter

    # File lib/jamf/api/classic/api_objects/mac_application.rb
104 def self_service_display_name=(_newname)
105   raise Jamf::UnsupportedError, 'MacApplications do not have separate display names. Please use the object name.'
106 end
upload(_type, _local_file) click to toggle source

Alas, SSvc icons are not uploadable via the API for mac apps

    # File lib/jamf/api/classic/api_objects/mac_application.rb
120 def upload(_type, _local_file)
121   raise Jamf::UnsupportedError, 'The Classic API does not support uploading icons for MacApplications. Please use the Web UI'
122 end

Private Instance Methods

rest_xml() click to toggle source

Return the xml for creating or updating this script in the JSS

    # File lib/jamf/api/classic/api_objects/mac_application.rb
130 def rest_xml
131   doc = REXML::Document.new Jamf::Connection::XML_HEADER
132   obj = doc.add_element RSRC_OBJECT_KEY.to_s
133 
134   general = obj.add_element('general')
135 
136   general.add_element('version').text = @version
137   general.add_element('is_free').text = @is_free.to_s
138   general.add_element('bundle_id').text = @bundle_id
139   general.add_element('url').text = @url
140 
141   obj << @scope.scope_xml
142 
143   add_self_service_xml doc
144   add_category_to_xml doc
145   add_site_to_xml doc
146   add_vpp_xml doc
147 
148   doc.to_s
149 
150 end