Package comodit_client :: Package api :: Module settings :: Class HasSettings

Class HasSettings


Super class for entities having settings.

Instance Methods
SettingCollection
settings(self)
Instantiates settings collection.
 
add_setting(self, key, value)
 
add_simple_setting(self, key, value)
Adds a simple setting to local list of settings.
 
add_link_setting(self, key, link, default)
Adds a link setting to local list of settings.
 
add_property_setting(self, key, prop)
Adds a property setting to local list of settings.
Setting
get_setting(self, key)
Fetches a setting.

Inherited from entity.Entity: __init__, create, delete, dump, load, refresh, rename, show, update

Inherited from util.json_wrapper.JsonWrapper: dump_json, get_json, get_real_json, load_json, print_json, set_json

Inherited from object: __long__, __native__, __nonzero__, __unicode__, next

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
list of Setting settings_f
The local list of settings.

Inherited from entity.Entity: client, description, identifier, label, name, url, uuid

Inherited from object: __class__

Method Details

settings(self)

 

Instantiates settings collection.

Returns: SettingCollection
Settings collection.

add_simple_setting(self, key, value)

 

Adds a simple setting to local list of settings. Note that this list is considered only at creation time. For later modifications, collection must be used.

Parameters:
  • key (string) - The setting's key.

add_link_setting(self, key, link, default)

 

Adds a link setting to local list of settings. Note that this list is considered only at creation time. For later modifications, collection must be used.

Parameters:
  • key (string) - The setting's key.

add_property_setting(self, key, prop)

 

Adds a property setting to local list of settings. Note that this list is considered only at creation time. For later modifications, collection must be used.

Parameters:
  • key (string) - The setting's key.

get_setting(self, key)

 

Fetches a setting.

Parameters:
  • key (string) - The setting's key.
Returns: Setting
The setting.

Property Details

settings_f

The local list of settings.

Get Method:
unreachable.settings_f(self) - The local list of settings.
Set Method:
unreachable.settings_f(self, settings) - Sets the local list of settings.
Type:
list of Setting