MatrixBerryCore
Public Member Functions | Protected Attributes | Private Attributes | List of all members
mxberry::conf::AdaptiveConfRepoManager Class Reference

UDAPTIVECONFREPOMANAGER is an extension of the plain ConfRepoManager that introduces a separation between template configurations and plain configurations. Template configuration is like default configurations that is used in place of a plain configurations when the plain configuration is not found for a given name. If template configuration for the same name is not found as well, the class throws an exception. Such a behavior is useful when the application runs on a new environemnt/computer as it leads to an automatic deployment of application configuration. More...

Inheritance diagram for mxberry::conf::AdaptiveConfRepoManager:
Inheritance graph
[legend]
Collaboration diagram for mxberry::conf::AdaptiveConfRepoManager:
Collaboration graph
[legend]

Public Member Functions

function getTemplateBranchKey (in self)
 
function setConfPatchRepo (in self, in confPatchRepo)
 SET. More...
 
function AdaptiveConfRepoManager (in varargin)
 
function selectConf (in self, in confName, in varargin)
 SELECTCONF - selects the specified plain configuration. If the one does not exist it is created from the template configuration. If the latter does not exist an exception is thrown. More...
 
function updateAll (in self, in areAllBranchesUpdated)
 UPDATEALL - updates both templates and plain configurations. More...
 
function getBranchKeyList (in self, in isTemplateBranchIncluded)
 
function updateConfTemplate (in self, in confName)
 UPDATECONFTEMPLATE - updates template configuration. More...
 
function getConf (in self, in confName)
 GETCONF - returns a configuration by its name. In case the specified configuration is not found , the class tries to create one from a template. More...
 
function editConfTemplate (in self, in confName)
 EDITCONFTEMPLATE - opens the specified template configuration for editing using a default editor. More...
 
function deployConfTemplate (in self, in inpConfName, in varargin)
 DEPLOYCONFTEMPLATE - deploys (i.e. transforms templates to plain configurations) the specified onfiguration(s)) More...
 
function getTemplateRepo (in self)
 
- Public Member Functions inherited from mxberry::conf::ConfRepoManager
function ConfRepoManager (in varargin)
 CONFREPOMANAGER is the class constructor with the following parameters. More...
 
function createInstance (in self, in varargin)
 CREATEINSTANCE - returns an object of the same class by calling a default constructor (with no arameters) More...
 
- Public Member Functions inherited from mxberry::conf::ConfRepoManagerAnyStorage
function getStorageBranchKey (in self)
 
function getStorageLocation (in self)
 
function getStorageLocationRoot (in self)
 
function isCachedConf (in self, in confName)
 ISCACHEDCONF checks if the configuration with a given name is cached. More...
 
function putConfToCache (in self, in varargin)
 
function putConfToCacheAndSelect (in self, in varargin)
 
function putConfToStorage (in self, in confName, in SConfData, in metaData)
 
function getCopy (in self)
 
function isConfSelected (in self, in confName)
 ISCONFSELECTED - checks if the specified configuration selected. More...
 
function storeCachedConf (in self, in confName)
 
function flushCache (in self)
 FLUSHCACHE - flushes all the cached information. More...
 
function getLastConfVersion (in self)
 
function ConfRepoManagerAnyStorage (in storage, in varargin)
 CONFREPOMANAGER is the class constructor with the following parameters. More...
 
function editConf (in self, in confName)
 EDITCONF - opens the default system editor for the configuration specified by name. More...
 
function selectConf (in self, in confName, in varargin)
 SELECTCONF - selects the configuration specified by name Only one configuration can be selected at any time. A selected configuration is used for parameters reading/storing. More...
 
function isParam (in self, in paramName)
 ISPARAM - checks if the specified parameter name corresponds to the existing parameter for the currently selected configuration. More...
 
function getParam (in self, in paramName, in varargin)
 GETPARAM - extracts a value for a parameter specified by name. More...
 
function setParam (in self, in paramName, in paramValue, in varargin)
 SETPARAM - assigns the specified value to a parameter specified by its name. More...
 
function putConf (in self, in confName, in SConf, in varargin)
 PUTCONF - puts the configuration structure into the storage. More...
 
function getConf (in self, in confName)
 GETCONF - extracts the configuration structure and its meta data by name, the returned configuration is automatically updated up to the latest version. More...
 
function copyConf (in self, in fromConfName, in toConfName)
 COPYCONF - copies a configuration to another configuration. More...
 
function copyConfFile (in self, in destFolderName, in varargin)
 COPYCONFFILE - copies a configuration file to a specified file. More...
 
function removeAll (in self)
 REMOVEALL - removes all the configurations from the storage. More...
 
function getConfNameList (in self)
 GETCONFNAMELIST - returns a name list of all configurations residing in the storage. More...
 
function getCurConfName (in self)
 GETCURCONFNAME - returns a name of currently selected configuration. More...
 
function getCurConf (in self)
 GETCURCONF - returns the currently selected configuration. More...
 
function isConf (in self, in confName)
 ISCONF - checks if the specified name corresponds to existing configuration from the storage. More...
 
function removeConf (in self, in confName)
 REMOVECONF - removes the specified configuartion from the storage by name. More...
 
function setConfPatchRepo (in self, in confPatchRepo)
 SETCONFPATCHREPO - sets the configuration version tracker. More...
 
function updateConf (in self, in confName)
 UPDATECONF - updates the specified configuration up to the latest version. More...
 
function updateAll (in self)
 UPDATEALL - updates all the configurations in the repository up to the latest version. More...
 
- Public Member Functions inherited from mxberry::core::obj::HandleObjectCloner
function ismember (in leftObjVec, in rightObjVec, in varargin)
 
function unique (in inpObjVec, in varargin)
 
function sort (in inpObjVec)
 
function ne (in varargin)
 
function eq (in varargin)
 EQ - same as isEqualElem from below with a few exceptions: 1) doesn't have reportStr output 2) only supports "asHandle" property. More...
 
function le (in varargin)
 LE - "<=" operator defined based on the 3rd output of isEqualElem method described below and it. More...
 
function ge (in varargin)
 GE - ">=" operator defined based on the 3rd output of isEqualElem method described below and it. More...
 
function lt (in varargin)
 LT - "<" operator defined based on the 3rd output of isEqualElem method described below and it. More...
 
function gt (in varargin)
 GT - ">" operator defined based on the 3rd output of isEqualElem method described below and it. More...
 
function isequal (in varargin)
 ISEQUAL - same as isEqual but without reportStr output. More...
 
function isequaln (in varargin)
 ISEQUALN - same as isEqual but without reportStr output. More...
 
function isequalwithequalnans (in varargin)
 ISEQUALNWITHEQUALNANS - same as isEqual but without reportStr output. More...
 
function isEqual (in varargin)
 ISEQUAL compares objects and returns true if they are found equal. More...
 
function isEqualElem (in selfArr, in otherArr, in varargin)
 ISEQUALELEM returns true if HandleObjectCloner objects are equal and false otherwise. More...
 
function clone (in self, in varargin)
 CLONE - creates a copy of a specified object via calling a copy constructor for the object class. More...
 
function createInstance (in self, in varargin)
 CREATEINSTANCE - returns an object of the same class by calling a default constructor (with no parameters) More...
 
function checkIsHandleIsBlob (in isAsHandle, in isAsBlob)
 
- Public Member Functions inherited from mxberry::core::obj::ReflectionHelper
function ReflectionHelper (in valBox)
 

Protected Attributes

Constant Property DEFAULT_TEMPLATE_STORAGE_BRANCH_KEY ='_templates'
 
Property templateStorageBranchKey
 

Private Attributes

Property templateRepoMgr
 

Additional Inherited Members

- Public Attributes inherited from mxberry::conf::ConfRepoManager
Constant Property DEFAULT_STORAGE_BRANCH_KEY ='_default'
 
- Protected Member Functions inherited from mxberry::conf::ConfRepoManagerAnyStorage
function getCachedConfNames (in self)
 
function updateAllInternal (in self)
 
function getConfNameListInternal (in self)
 GETCONFNAMELISTINTERNAL - an internal implementation of getConfNameList. More...
 
function updateConfInternal (in self, in confName)
 UPDATECONFINTERNAL - an internal implementation of updateConf. More...
 
function updateConfStructInternal (in self, in SConf, in confVersion, in metaData)
 UPDATESCONFSTRUCTINTERNAL - updates configuration structure up to the latest version. More...
 
function getConfInternal (in self, in confName)
 GETCONFINTERNAL - an internal imlpementation of getConf that is used within the class to separate interface from its internal implementation. More...
 
function putConfInternal (in self, in confName, in SConf, in confVersion, in metaData)
 PUTCONFINTERNAL - an internal implementation of putConf. More...
 
function cacheAndSelectConf (in self, in confName, in SConf, in metaData)
 CACHECONF - chaches the specified configuration and makes it current. More...
 
function cacheConf (in self, in confName, in SConf, in metaData)
 
function getCachedConf (in self, in confName)
 GETCACHEDCONF - returns a cached configuration by its name; exception is thrown if the requested configuration is not found. More...
 
function reCacheCurConf (in self)
 RECACHECURCONF rehaches the current configuration. More...
 
function initCache (in self)
 INITCACHE initializes the cache. More...
 
- Protected Member Functions inherited from mxberry::core::obj::HandleObjectCloner
function blobComparisonHook (in self)
 
function setComparisonMode (in self, in comparisonMode)
 
function getComparisonMode (in self)
 
function getHandleClonerIsEqualPropCheckCMat (in self, in propNameList)
 
function parseEqScalarProps (in self, in eqPropCheckCMat, in propListToParse)
 
function isEqualScalarInternal (in self, in otherObj, in varargin)
 
- Static Protected Member Functions inherited from mxberry::conf::ConfRepoManagerAnyStorage
static function getConfVersionFromMetaData (in metaData)
 
static function putConfVersionToMetaData (in metaData, in confVersion)
 

Detailed Description

UDAPTIVECONFREPOMANAGER is an extension of the plain ConfRepoManager that introduces a separation between template configurations and plain configurations. Template configuration is like default configurations that is used in place of a plain configurations when the plain configuration is not found for a given name. If template configuration for the same name is not found as well, the class throws an exception. Such a behavior is useful when the application runs on a new environemnt/computer as it leads to an automatic deployment of application configuration.

Author
Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om

Definition at line 19 of file AdaptiveConfRepoManager.m.

Constructor & Destructor Documentation

◆ AdaptiveConfRepoManager()

function mxberry::conf::AdaptiveConfRepoManager::AdaptiveConfRepoManager ( in  varargin)

Member Function Documentation

◆ deployConfTemplate()

function mxberry::conf::AdaptiveConfRepoManager::deployConfTemplate ( in  self,
in  inpConfName,
in  varargin 
)

DEPLOYCONFTEMPLATE - deploys (i.e. transforms templates to plain configurations) the specified onfiguration(s))

*  Input:
*    regular:
*        self: the object itself
*        inpConfName: char[1,] configuration name, can be '*'
*           which means "all configurations"
* 
*    properties:
*        overwrite: logical[1,1] - if true, the template(s)
*           is(are) copied over the plain configurations if the
*           latter exist(s)
*                (false by default)
*        forceUpdate: logical[1,1] - if true, the configuration
*           is updated even if it is already exists for the
*           local computer
*                (false by default)
* 

◆ editConfTemplate()

function mxberry::conf::AdaptiveConfRepoManager::editConfTemplate ( in  self,
in  confName 
)

EDITCONFTEMPLATE - opens the specified template configuration for editing using a default editor.

◆ getBranchKeyList()

function mxberry::conf::AdaptiveConfRepoManager::getBranchKeyList ( in  self,
in  isTemplateBranchIncluded 
)

◆ getConf()

function mxberry::conf::AdaptiveConfRepoManager::getConf ( in  self,
in  confName 
)

GETCONF - returns a configuration by its name. In case the specified configuration is not found , the class tries to create one from a template.

◆ getTemplateBranchKey()

function mxberry::conf::AdaptiveConfRepoManager::getTemplateBranchKey ( in  self)

◆ getTemplateRepo()

function mxberry::conf::AdaptiveConfRepoManager::getTemplateRepo ( in  self)

◆ selectConf()

function mxberry::conf::AdaptiveConfRepoManager::selectConf ( in  self,
in  confName,
in  varargin 
)

SELECTCONF - selects the specified plain configuration. If the one does not exist it is created from the template configuration. If the latter does not exist an exception is thrown.

*  Input:
*    regular:
*        self: the object itself
*        confName: char[1,] - configuration name
* 
*    properties:
*        reloadIfSelected: logical[1,1] - if false
*            configuration is loaded from disk only if it
*            wasn't selected previously.
* 

◆ setConfPatchRepo()

function mxberry::conf::AdaptiveConfRepoManager::setConfPatchRepo ( in  self,
in  confPatchRepo 
)

SET.

◆ updateAll()

function mxberry::conf::AdaptiveConfRepoManager::updateAll ( in  self,
in  areAllBranchesUpdated 
)

UPDATEALL - updates both templates and plain configurations.

*  Input:
*    regular:
*        self: mxberry.conf.AdaptiveConfRepoManager[1,1]
*        areAllBranchesUpdated: logical[1,1] - if true, all
*            branches are updated, not just a branch that
*            corresponds to a current host. (false by default)
* 

◆ updateConfTemplate()

function mxberry::conf::AdaptiveConfRepoManager::updateConfTemplate ( in  self,
in  confName 
)

UPDATECONFTEMPLATE - updates template configuration.

Member Data Documentation

◆ DEFAULT_TEMPLATE_STORAGE_BRANCH_KEY

Constant Property mxberry::conf::AdaptiveConfRepoManager::DEFAULT_TEMPLATE_STORAGE_BRANCH_KEY ='_templates'
protected

Definition at line 24 of file AdaptiveConfRepoManager.m.

◆ templateRepoMgr

Property mxberry::conf::AdaptiveConfRepoManager::templateRepoMgr
private

Definition at line 28 of file AdaptiveConfRepoManager.m.

◆ templateStorageBranchKey

Property mxberry::conf::AdaptiveConfRepoManager::templateStorageBranchKey
protected

Definition at line 32 of file AdaptiveConfRepoManager.m.


The documentation for this class was generated from the following file: