Package sabayon :: Module userprofile :: Class SourceDelegate
[hide private]
[frames] | no frames]

Class SourceDelegate

source code


An abstract base class for helper classes which can be used to intercept and modify changes from a given configuration source.

Instance Methods [hide private]
  __init__(self, delegate_name, source, namespace_section)
Construct a SourceDelegate object.
  get_name(self)
Returns the configuration delegate's name.
  get_path_description(self, path)
Returns a human readable description for @path.
  handle_change(self, change)
Inspect a ProfileChange.
  commit_change(self, change, mandatory=False)
Commit a change to profile.
  start_monitoring(self)
Start monitoring for configuration changes.
  stop_monitoring(self)
Stop monitoring for configuration changes.
  sync_changes(self)
Save all committed changes to disk.
  set_enforce_mandatory(self, enforce)
Temporary make mandatory setting non-mandatory.
  apply(self, is_sabayon_session)
Apply profile to the current user's environment.

Method Details [hide private]

__init__(self, delegate_name, source, namespace_section)
(Constructor)

source code 
Construct a SourceDelegate object.

get_name(self)

source code 
Returns the configuration delegate's name.

get_path_description(self, path)

source code 
Returns a human readable description for @path. @path must have been previously added by the delegate to the #ProfileStorage.

handle_change(self, change)

source code 
Inspect a ProfileChange. Return #True if the change should not be passed on any further (i.e. #True == 'handled') and return #False if the change should be passed on unmodified.

commit_change(self, change, mandatory=False)

source code 

Commit a change to profile.

mandatory: whether the change should be committed such that it overrides the user's value.

start_monitoring(self)

source code 
Start monitoring for configuration changes.

stop_monitoring(self)

source code 
Stop monitoring for configuration changes.

sync_changes(self)

source code 
Save all committed changes to disk.

set_enforce_mandatory(self, enforce)

source code 
Temporary make mandatory setting non-mandatory.

apply(self, is_sabayon_session)

source code 
Apply profile to the current user's environment.