Replacing the content of the "View" perspective in the detail view
Released: Extension point
You can replace the content of the View perspective for the detail view for an item (e.g. a document or dossier) so that you can display your own preview under certain conditions.
The app that you want to provide such an extension must return an HTTP response in JSON format under the dmsobjectextensions
link relation. This response must provide the following information for each extension point of the View perspective:
Extension point context:
DmsObjectDetailsPreview
Activation condition for displaying your preview.
The URL for the preview that you want to display when the user opens the View perspective in the detail view and meets your predefined activation conditions. Specify a relative link that is called from DMSApp using
HTTP GET
.
Any context action can also be created via HTTP POST request
for the URL /dms/extensions
in the DMSApp. The request must be made by a user with administration rights only. If the request response is successful, the extension is stored in the DMSApp and you get a location
URLin the response header. Via the location
URL, a user with administration rights can also delete the extension in the DMSApp. To do this, an HTTP DELETE
requestmust be sent to the Location
URLvalue.
Example
The example shows how you arrange the HTTP response of the dmsobjectextensions
link relation to add an extension for the DmsObjectDetailsPreview
extension point. You define different properties for each extension.
{ "extensions": [ { "id": "myapp.viewer", "activationConditions": [{ "propertyId": "dmsobject.mainblob.content_type", "operator": "or", "values": [ "text/plain", "application/pdf" ] }], "context": "DmsObjectDetailsPreview", "uriTemplate": "/myapp/preview?layer0={dmsobject.mainblob.content_url}" }] }
Property | Properties of a contained object | Description |
---|---|---|
| - | Specifies the unique technical name used to differentiate the extension from other extensions. |
| For each extension, the application notifies you of which activation conditions are used to display the extension of the View perspective. These activation conditions are reported by the application in advance. If the activation conditions were not reported in advance, DMSApp would have to query other apps with a network request at a later time when the user is viewing an item. The waiting time for the user would then increase significantly if an app only responds to this request with a delay. An extension is displayed if all the sub-conditions are met. If the list of activation conditions does not contain an entry, the extension is generally active. You specify the activation conditions as an array. | |
| Specifies the ID of the property that is tested for the activation condition. The available values are described in more detail below. | |
| The operator specifies how a sub-condition is evaluated. The following operator is available: or: An notOr: A | |
| Specifies the values in the form of an array that is compared with the value of the | |
| - | Specifies the extension point to which you want to add the extension. Enter the following value for extensions of the View perspective in the detail view:
|
| - | In the NoteUsing a placeholder in the host part of the URL is not permitted for security reasons and leads to an error. |
While defining extensions that replace the content of the View perspective, you can use the following values in the following areas:
Defining activation conditions for the
propertyId
propertyDefining placeholders in the
uriTemplate
property
Topic | Value | Description |
---|---|---|
Repository |
| ID of the repository as specified in the d.ecs repo app. You can find the repository ID in the detail section of the d.3 repositories feature ( In the chapter Determining a repository, you can learn how to determine the ID for a repository with the program. |
User |
| Activation condition: ID of a d.3 user group (maximum of eight characters) of which the user that is currently logged in is a member. Placeholder |
| Activation condition: GUID of an identity provider app user group of which the user that is currently logged in is a member. Placeholder | |
Property for the item |
| Editor of the item. |
| Owner of the item. | |
| File name for the item. | |
| File type for the item. | |
| Document number of the item. | |
| Creation date of the item. | |
| File size of the item. | |
| Document status of the item. Possible values:
| |
| Variant number of the item. | |
| Access date for the item. | |
| Remarks about the item. | |
| Alteration date of the item. | |
| Title for the item. | |
| Item category ID. | |
| UUID of the item category. | |
| Color marking for the item. | |
| Activation condition: A document class ID for the item. Placeholder | |
| Document ID of the item. | |
| Unique ID for the display version for the DMSApp. | |
| Unique ID for the current version for the DMSApp. | |
| The item type. Possible values:
| |
| For the If the d.3 property is a multi-value property, the placeholder will be replaced by the first or the first filled value of the property (depending on the d.3 repository configuration). If there are multiple values for the multi-value property, three dots (...) are added to the value returned. | |
| For the NoteWe strongly recommend using the advanced property ID ( If the d.3 property is a multi-value property, the placeholder will be replaced by the first or the first filled value of the property (depending on the d.3 repository configuration). If there are multiple values for the multi-value property, three dots (...) are added to the value returned. | |
| Relative URL of the item. | |
Original file for the item |
| MIME type of the original file (e.g. |
| (Obsolete) Absolute URL of the original file. If the user does not have the authorization to export the document, then this parameter is empty. | |
| Relative URL of the original file. If the user does not have the authorization to export the document, then this parameter is empty. | |
| ID of the original file if the user has the right to export the original file. | |
Dependent files for the item |
| List of the IDs of dependent files if the user has the right to export the dependent file. |
| (Obsolete) Absolute URL of the dependent file with the ID from | |
| Relative URL of the dependent file with the ID from |