Object type administration (IRPCObjectTypesAdmin)
Administers object types and value lists: reads their full definitions, adds, modifies, converts and removes them, and manages value list items with administrator rights.
Use this interface to add, remove and modify object types and their contents. This interface is intended to be used with administrative value list operations as well. Value lists are just seen as simple object types.
| gRPC service | MFiles.IRPCObjectTypesAdmin |
|---|---|
| Book and level | Administration API, specialized |
| Methods | 18 |
| Proto file | mfiles/IRPCObjectTypesAdmin.proto |
Overview
This is the administrator's side of IRPCObjectTypes and IRPCValueLists. M-Files Admin and administrative tools call it; ordinary applications read the structure with the Vault API instead.
| Vault API (read side) | This service | |
|---|---|---|
| Data | ValueList: names, flags, the caller's permissions | ValueListAdmin: the same plus external database connection, column mappings, automatic permissions, aliases |
| Rights | none | read_all_metadata_structure to read, change_metadata_structure to write |
| Calls | GetObjectTypes, GetValueLists | GetObjectTypeDefs, GetValueListDefs |
- Session and rights. Every method requires a vault session. Reads need the vault right
read_all_metadata_structure; writes needchange_metadata_structureandlicense_allows_modifications. The vault role full control grants them. A normal user gets "Access denied." (gRPC statusUNKNOWN, error codes 0x800407E4 and 0x800400A9). Connecting an object type to an external database also needs the server rightrun_code(see ModifyObjectType). - Read the definitions: GetObjectTypeDefs, GetValueListDefs, GetObjectTypeDef.
- Change the definitions: AddObjectType, ModifyObjectType, ConvertValueListToObjectType, RemoveObjectType. Read the current definition first, change it, and send the whole ValueListAdmin back.
- External object types (items read from an external database or connector): ParseSQLSelectStatement, RefreshExternalObjectTypeColumnMappings, GetExternalObjectTypePlugins, GetExternalObjectTypePluginConnectionInfo.
- Value list items (not objects of real object types):
AddObjectTypeItem,
UpdateObjectTypeItem,
RemoveObjectTypeItem,
ChangeObjectTypeItemPermissions,
ChangeObjectTypeItemIcon,
ChangeObjectTypeItemAutomaticPermissionsForObjects.
Users without administrator rights use the
...FromClientmethods of IRPCValueLists instead. Classes (list 1) and class groups (list 2) are not items here: use IRPCPropertyDefsAdmin and IRPCDocClassGroupsAdmin.
Metadata structure version. Adding, modifying, converting and removing an object type or value list
increments the vault's metadata structure version by one when the change commits, so clients that cache
the structure reload it (see
Metadata structure version and caching). These methods do
not send the mfiles-metadata-version-bin trailer themselves; read the new value
with GetMetadataStructureVersion or from
the trailer of the next call. Changing value list items does not change the metadata structure version,
except permission changes on items of structure lists such as classes. Changes that update the
metadata structure version fail while the vault is being archived or restored.
Methods
| Method | Summary | Facts |
|---|---|---|
| AddObjectType | Creates a new object type or value list. | admin session |
| AddObjectTypeItem | Adds an item to a value list as an administrator. | admin session |
| AreAutomaticPermissionsUsed | Tells whether any item uses automatic permissions, in one object type or value list or in all of them. | admin session idempotent |
| ChangeObjectTypeItemAutomaticPermissionsForObjects | Sets or clears the automatic permissions that an item (a value list item or an object) gives to the objects that refer to it. | admin session idempotent |
| ChangeObjectTypeItemIcon | Sets or clears the icon of a value list item. | admin session idempotent |
| ChangeObjectTypeItemPermissions | Replaces the permissions (ACL) of a value list item. | admin session idempotent |
| ConvertValueListToObjectType | Converts a value list, and the lists that own it or that it owns, into real object types. | admin session |
| GetExternalObjectTypePluginConnectionInfo | Gets the configuration domain and status message of a connector for one object type. | admin session |
| GetExternalObjectTypePlugins | Lists the installed connectors (vault applications) that can provide the items of external object types. | admin session |
| GetObjectTypeDef | Gets the full administrative definition of one object type or value list. | admin session |
| GetObjectTypeDefs | Gets the full administrative definitions of all real object types. | admin session idempotent |
| GetValueListDefs | Gets the full administrative definitions of all object types and value lists. | admin session idempotent |
| ModifyObjectType | Saves a changed definition of an object type or value list. | admin session idempotent |
| ParseSQLSelectStatement | Connects to an external database and returns the source table and columns of a SELECT statement, to set up the column mappings of an external object type. | admin session idempotent |
| RefreshExternalObjectTypeColumnMappings | Re-reads the columns of an external object type's SELECT statement, merges them with the existing column mappings, and saves the object type. | admin session |
| RemoveObjectType | Removes an object type or value list together with its items, classes and dependent views. | admin session |
| RemoveObjectTypeItem | Deletes an item of a value list as an administrator. | admin session |
| UpdateObjectTypeItem | Updates an item of a value list (for example its name, parent or owner) as an administrator. | admin session idempotent |