Class: JSS::RestrictedSoftware
- Includes:
- Scopable
- Defined in:
- lib/jss/api_object/restricted_software.rb,
lib/jss.rb
Overview
Restricted Software in the JSS.
This class only supports showing of object data.
Constant Summary collapse
- RSRC_BASE =
The base for REST resources of this class
"restrictedsoftware"- RSRC_LIST_KEY =
the hash key used for the JSON list output of all objects in the JSS
:restricted_software- RSRC_OBJECT_KEY =
The hash key used for the JSON object output. It’s also used in various error messages
:restricted_software- VALID_DATA_KEYS =
these keys, as well as :id and :name, are present in valid API JSON data for this class
[:scope]
- SCOPE_TARGET_KEY =
Our scopes deal with computers
:computers
Instance Attribute Summary collapse
-
#delete_executable ⇒ Boolean
readonly
Whether to delete the executable.
-
#display_message ⇒ String
readonly
Message displayed to the user.
-
#kill_process ⇒ Boolean
readonly
Whether to kill the running process.
-
#match_exact_process_name ⇒ Boolean
readonly
Whether to return match exact process name.
-
#process_name ⇒ String
readonly
The process name.
-
#scope ⇒ Object
included
from Scopable
Attribtues.
-
#send_notification ⇒ Boolean
readonly
Whether to send a notification.
-
#site ⇒ Hash
readonly
The :name and :id of the site for this machine.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ RestrictedSoftware
constructor
Instance Methods.
-
#parse_scope ⇒ void
included
from Scopable
private
Call this during initialization of objects that have a scope and the scope instance will be created from @init_data.
-
#should_update ⇒ void
included
from Scopable
When the scope changes, it calls this to tell us that an update is needed.
-
#update ⇒ Object
included
from Scopable
A wrapper around the update method, to try catching RestClient::Conflict 409 errors when we couldn’t verify all ldap users/groups due to lack of ldap connections.
Constructor Details
#initialize(args = {}) ⇒ RestrictedSoftware
Instance Methods
74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/jss/api_object/restricted_software.rb', line 74 def initialize(args = {}) super args, [] @process_name = @init_data[:general][:process_name] @match_exact_process_name = @init_data[:general][:match_exact_process_name] @send_notification = @init_data[:general][:send_notification] @kill_process = @init_data[:general][:kill_process] @delete_executable = @init_data[:general][:delete_executable] @display_message = @init_data[:general][:display_message] @site = JSS::APIObject.get_name(@init_data[:general][:site]) end |
Instance Attribute Details
#delete_executable ⇒ Boolean (readonly)
Returns whether to delete the executable.
62 63 64 |
# File 'lib/jss/api_object/restricted_software.rb', line 62 def delete_executable @delete_executable end |
#display_message ⇒ String (readonly)
Returns message displayed to the user.
65 66 67 |
# File 'lib/jss/api_object/restricted_software.rb', line 65 def @display_message end |
#kill_process ⇒ Boolean (readonly)
Returns whether to kill the running process.
59 60 61 |
# File 'lib/jss/api_object/restricted_software.rb', line 59 def kill_process @kill_process end |
#match_exact_process_name ⇒ Boolean (readonly)
Returns whether to return match exact process name.
53 54 55 |
# File 'lib/jss/api_object/restricted_software.rb', line 53 def match_exact_process_name @match_exact_process_name end |
#process_name ⇒ String (readonly)
Returns the process name.
50 51 52 |
# File 'lib/jss/api_object/restricted_software.rb', line 50 def process_name @process_name end |
#scope ⇒ Object Originally defined in module Scopable
Attribtues
#send_notification ⇒ Boolean (readonly)
Returns whether to send a notification.
56 57 58 |
# File 'lib/jss/api_object/restricted_software.rb', line 56 def send_notification @send_notification end |
#site ⇒ Hash (readonly)
Returns the :name and :id of the site for this machine.
68 69 70 |
# File 'lib/jss/api_object/restricted_software.rb', line 68 def site @site end |
Instance Method Details
#parse_scope ⇒ void Originally defined in module Scopable
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Call this during initialization of objects that have a scope and the scope instance will be created from @init_data
#should_update ⇒ void Originally defined in module Scopable
This method returns an undefined value.
When the scope changes, it calls this to tell us that an update is needed.
#update ⇒ Object Originally defined in module Scopable
A wrapper around the update method, to try catching RestClient::Conflict 409 errors when we couldn’t verify all ldap users/groups due to lack of ldap connections