class documentation
class ZMSMetadictManager(object): (source)
Manage Dublin-Core meta-dictionary attributes and their repository persistence.
| Method | del |
Remove a meta-dictionary attribute by id and persist the updated list. |
| Method | get |
Return one meta-dictionary attribute dict by id. |
| Method | get |
Return a list of meta-dictionary attribute ids. |
| Method | import |
Import one or many meta-dictionary attribute records from XML content. |
| Method | manage_change |
Handle add/edit/delete/copy/import/export/reorder actions for meta-dictionary attributes. |
| Method | move |
Move the meta-dictionary attribute with the given id to the given list position. |
| Method | provide |
Write configured meta-dictionary records into the repository export payload. |
| Method | set |
Set/add meta-attribute with specified values. |
| Method | update |
Replace local meta-dictionary records from a repository import payload. |
| Instance Variable | metas |
Undocumented |
| Method | _import |
Import a single serialized meta-dictionary attribute record. |
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:str | Attribute id. |
| Returns | |
| dict | None | Attribute mapping or None. |
Return a list of meta-dictionary attribute ids.
When meta_type is given, only ids shared with that meta type are returned.
| Parameters | |
| meta | Limit results to attributes used by this meta type. |
| Returns | |
| list | List of attribute ids. |
Write configured meta-dictionary records into the repository export payload.
| Parameters | |
| r:dict | Repository export accumulator. |
| ids:list | None | Optional 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 | |
| old | Old id |
| new | New id |
| new | Acquired |
| new | (Display-)Name |
| new | Type |
| new | Undocumented |
| new | Undocumented |
| new | Undocumented |
| new | Undocumented |
| new | Undocumented |
| new | Undocumented |
| Returns | |
| string | New id |