Package application :: Module Parcel :: Class Manager
[hide private]
[frames] | no frames]

Class Manager

source code

             object --+            
                      |            
chandlerdb.item.c.CItem --+        
                          |        
  repository.item.Item.Item --+    
                              |    
                    schema.Item --+
                                  |
                                 Manager

To use the parcel manager, retrieve an instance of it by using the class method get():
   import application
   mgr = application.Parcel.Manager.get(view, path=parcelSearchPath)
   mgr.loadParcels()
if "path" is not passed in, it will use os.path.join(Globals.chandlerDirectory, "parcels").

Nested Classes [hide private]

Inherited from schema.Item: __metaclass__

Instance Methods [hide private]
 
__syncParcel(self, pkg)
Synchronize the specified parcel's Python schema with self.repo
source code
 
findPlugins(self)
Yield top-level parcels
source code
 
loadParcels(self, namespaces=<Locale: en_US>)
Load parcel items into the repository.
source code

Inherited from schema.Item: __init__

Inherited from repository.item.Item.Item: _repr_, addFreeValue, addValue, check, clone, copy, delete, dir, find, findPath, findUUID, getACL, getAttributeValue, getFirstChild, getFreeValue, getItemChild, getItemCloud, getLastChild, getNextChild, getPreviousChild, getValue, getVersion, hasAttributeAspect, hasChild, hasChildren, hasKey, hasValue, hashItem, isAttributeDirty, isItemOf, isRemote, iterAttributeNames, iterAttributeValues, iterChildren, iterChildrenKeys, mixinKinds, move, placeChild, printItem, refCount, removeACL, removeAttributeValue, removeFreeValue, removeValue, rename, setACL, setAttributeValue, setFreeValue, setPinned, setValue, unloadItem, unwatchCollection, unwatchItem, unwatchKind, walk, watchCollection, watchItem, watchKind

Inherited from chandlerdb.item.c.CItem: __delattr__, __getattribute__, __getitem__, __new__, __repr__, __setattr__, getAttributeAspect, getDirty, getLocalAttributeValue, hasLocalAttributeValue, hasTrueAttributeValue, isDeferred, isDeferring, isDeferringOrDeleting, isDeleted, isDeleting, isDirty, isLive, isMutating, isMutatingOrDeleting, isNew, isPinned, isSchema, isStale, isWatched, setDirty

Inherited from object: __hash__, __reduce__, __reduce_ex__, __str__

Class Methods [hide private]
 
get(cls, view, path=<Locale: en_US>)
Class method for getting an instance of the parcel manager.
source code

Inherited from schema.Item: getDefaultParent, getKind, iterItems

Class Variables [hide private]
  path = <Descriptor path of <class 'application.Parcel.Manager'>>

Inherited from schema.Item: __all_ivs__, __default_path__, __setup__

Inherited from chandlerdb.item.c.CItem: ADIRTY, CDIRTY, CONTAINER, CORESCHEMA, DEFERRED, DEFERRING, DELETED, DELETING, DIRTY, FDIRTY, IDXMONITOR, KDIRTY, MERGED, MUTATING, NDIRTY, NEW, NODIRTY, PINNED, P_WATCHED, RAW, RDIRTY, SAVEMASK, SCHEMA, STALE, SYSMONITOR, SYSMONONLY, TOINDEX, T_WATCHED, VDIRTY, VRDIRTY, WATCHED, WITHSCHEMA

Properties [hide private]

Inherited from chandlerdb.item.c.CItem: c, itsKind, itsName, itsParent, itsPath, itsRef, itsRefs, itsRoot, itsStatus, itsUUID, itsValues, itsVersion, itsView

Inherited from object: __class__

Method Details [hide private]

get(cls, view, path=<Locale: en_US>)
Class Method

source code 

Class method for getting an instance of the parcel manager.

If there is a manager item already already in this repository, that will be returned. Otherwise one will be created.
Parameters:
  • view (repository.persistence.RepositoryView) - The repository view object to load items into.
  • path (list) - The search path for finding parcels. This is a list of absolute directory paths; when loading parcels, each directory in the search path will be used as a starting point for recursively finding parcel.xml files.
Returns:
parcel manager object

__syncParcel(self, pkg)

source code 

Synchronize the specified parcel's Python schema with self.repo

This will import the corresponding Python module and synchronize its schema with the repository. If the imported module has a parent module that has not yet been synchronized, this method will load the parent parcel, thereby synchronizing the parent module first.

loadParcels(self, namespaces=<Locale: en_US>)

source code 

Load parcel items into the repository.

The namespaces passed in via the namespaces parameter (a list) are then loaded into the repository. If that parameter is None, then all parcels are loaded.
Parameters:
  • namespaces (list of strings) - The list of namespaces to load