class documentation

class ZMSMetadictManager(object): (source)

View In Hierarchy

Manage Dublin-Core meta-dictionary attributes and their repository persistence.

Method delMetadictAttr Remove a meta-dictionary attribute by id and persist the updated list.
Method getMetadictAttr Return one meta-dictionary attribute dict by id.
Method getMetadictAttrs Return a list of meta-dictionary attribute ids.
Method importMetadictXml Import one or many meta-dictionary attribute records from XML content.
Method manage_changeMetaProperties Handle add/edit/delete/copy/import/export/reorder actions for meta-dictionary attributes.
Method moveMetadictAttr Move the meta-dictionary attribute with the given id to the given list position.
Method provideRepositoryMetas Write configured meta-dictionary records into the repository export payload.
Method setMetadictAttr Set/add meta-attribute with specified values.
Method updateRepositoryMetas Replace local meta-dictionary records from a repository import payload.
Instance Variable metas Undocumented
Method _importMetadictXml Import a single serialized meta-dictionary attribute record.
def delMetadictAttr(self, id): (source)

Remove a meta-dictionary attribute by id and persist the updated list.

def getMetadictAttr(self, key): (source)

Return one meta-dictionary attribute dict by id.

Attributes configured as acquired are resolved transparently from the portal master. Returns None when the key is not found.

Parameters
key:strAttribute id.
Returns
dict | NoneAttribute mapping or None.
def getMetadictAttrs(self, meta_type=None): (source)

Return a list of meta-dictionary attribute ids.

When meta_type is given, only ids shared with that meta type are returned.

Parameters
meta_type:str | NoneLimit results to attributes used by this meta type.
Returns
listList of attribute ids.
def importMetadictXml(self, xml): (source)

Import one or many meta-dictionary attribute records from XML content.

def manage_changeMetaProperties(self, btn, lang, REQUEST, RESPONSE=None): (source)

Handle add/edit/delete/copy/import/export/reorder actions for meta-dictionary attributes.

def moveMetadictAttr(self, attr, pos): (source)

Move the meta-dictionary attribute with the given id to the given list position.

def provideRepositoryMetas(self, r, ids=None): (source)

Write configured meta-dictionary records into the repository export payload.

Parameters
r:dictRepository export accumulator.
ids:list | NoneOptional subset of repository keys to export.
def setMetadictAttr(self, oldId, newId, newAcquired, newName='', newType='', newMandatory=0, newMultilang=1, newRepetitive=0, newCustom='', newKeys=[], newDefault=''): (source)

Set/add meta-attribute with specified values.

Parameters
oldId:stringOld id
newId:stringNew id
newAcquired:int: 0 or 1Acquired
newName:string(Display-)Name
newType:stringType
newMandatoryUndocumented
newMultilangUndocumented
newRepetitiveUndocumented
newCustomUndocumented
newKeysUndocumented
newDefaultUndocumented
Returns
stringNew id
def updateRepositoryMetas(self, r): (source)

Replace local meta-dictionary records from a repository import payload.

Parameters
r:dictImported repository payload.
Returns
strImported record id.

Undocumented

def _importMetadictXml(self, item): (source)

Import a single serialized meta-dictionary attribute record.