ecm.portfolio
The ecm.portfolio namespace manages portfolios (German "Mappen"). A portfolio is a
cross-user collection of DMS objects, comparable to a favourites list or a working folder.
It can be handed over to a recipient and restricted to a single object type.
| Method | Description |
|---|---|
Find portfolios by creator, recipient, subject, creation time or object type. |
|
Read a single portfolio by its ID. |
|
Resolve the favourites portfolio of a user. |
|
Create a portfolio, optionally with initial content. |
|
Delete a portfolio by its ID. |
|
Delete a portfolio addressed by recipient and subject. |
|
Put objects into a portfolio, optionally replacing its current content. |
|
Remove individual objects from a portfolio. |
|
Remove all objects from a portfolio, keeping the portfolio itself. |
1. Return types
ECMPortfolio describes a portfolio, ECMPortfolioObject one of its members.
| Field | Type | Description |
|---|---|---|
|
|
Portfolio ID assigned by the server. |
|
|
Creation time in installation wall clock, see Installation timezone. |
|
|
Login name of the creator. |
|
|
Login name of the recipient; empty for a portfolio that was not handed over. |
|
|
Title of the portfolio. The backing column holds 32 characters. |
|
|
Object type the portfolio is restricted to, otherwise |
|
|
Member objects, each with |
2. Passing objects
Wherever portfolio members are expected, three notations are accepted: an
ECMPortfolioObject, an (id, type_id) pair, and a typed model instance, whose
system.id and system.type_id are read.
from ecmind_blue_client.ecm import ECMPortfolioObject
doc = ecm.dms.get(Unittest_DMS_Document, 83)
ecm.portfolio.add_objects(portfolio, [doc]) # model instance
ecm.portfolio.add_objects(portfolio, [(83, 262144)]) # pair
ecm.portfolio.add_objects(portfolio, [ECMPortfolioObject(83, 262144)]) # data class
3. Limits of the server API
-
Subject, recipient and object type of an existing portfolio cannot be changed.
dms.ModPortfolioonly touches the member list, so renaming means deleting and creating anew. -
There is no job that reads exactly one portfolio; get() is a search restricted to one ID.
-
The five jobs know no permission model for portfolios.
4. Alternative via system fields
The assignment of objects to portfolios lives in the mdrel table and is also visible through
the system fields MDMAP_ID, MDOBJ_ID and MDOBJTYPE. To find out which portfolios hold a
given document, going through those may be quicker than searching portfolios and scanning their
member lists.