DE EN EN (Google)

Objecttype

Objecttypes are defined in the user schema, but main objecttypes can also have some properties attached to them that can be changed without having any impact in the data model. This type is used for that.

Attributes

Name Description
_basetype Name of the base type (string, r): objecttype
_acl ACL (array of acl entries, rw, optional)
_private_tags Allow private tags to be set (boolean, rw, optional): defaults to false
_tags Tags (array of tag entries, rw, optional)
_maskfilters Tag filters to be applied for each mask (see below, optional)
_columnfilters Column filters (list of objects, rw, optional)
internal_name internal name, has to be unique for each object type (string, rw, optional)
tagfilter tag filter
who list of target users, as in ACL entry
columns list of column IDs
system_fields object with column names of system fields as boolean values (rw, optional)
_transitions Transitions (array of transitions, rw, optional)
_private_transitions Private transitions flag (bool, rw, optional): defaults to false
_standard_masks mask order to use for this objecttype (non-empty array of integer, optional, rw): ref mask.mask_id. If set to null, the standard mask is derived from the datamodel.
_export_asset_filenames per-field configuration of export filename, see below.
objecttype Objecttype attributes:
_id Objecttype ID (integer, unique, r*): ref table definition.table_id
_version Objecttype database version (integer, rw): detect and prevent concurrent updates.
name Objecttype name (string, unique, r): ref table definition.name
contact Contact (user (contact), optional, rw)
mapping_image_export Export mapping image to be used for this objecttype (integer/string, optional, rw): either an ID or “none”
mapping_image_import Import mapping image to be used for this objecttype (integer/string, optional, rw): either an ID or “none”
mapping_dc_export Dublin Core mapping to be used for this objecttype (integer/string, optional, rw): either an ID or “none”
description Objecttype description (l10n, optional, rw)
show_in_collections Flag to save whether this Objecttype will be shown in the quick access panel of the search in the frontend (boolean, optional, rw, defaults to false)
show_in_facet_grouping Flag to save whether this Objecttype will be shown as a linked Objecttype in the filter tree in the frontend (boolean, optional, rw, defaults to false)
custom_data Custom JSON data, can contain any additional data for this objecttype. Assets can be referenced using the suffix :eas_file (JSON object, optional, rw)

Remarks:

Assets in custom_data

Assets can be included in the custom_data JSON object at any key. The asset information can be stored directly, if it is known.

The asset can also be referenced using only the Asset ID, and the server will find the asset and include the asset information automatically. This is done on saving custom data. The JSON is enriched before it is saved in the database.

This can be triggered by using any key with the suffix :eas_file. The value at these keys must be a JSON map and contain the asset ID _id as an integer value. Multiple keys with the suffix can be used anywhere in the custom data.

Example:

{
    "objecttype": {
        "custom_data": {
            "name": "Test Asset",
            "asset:eas_file": {
                "_id": 98765
            }
        }
    }
}

The server reads the _id in the object asset:eas_file and looks for an asset with this ID in the database. If this asset is found, the value of asset:eas_file is replaced with the asset information:

{
    "objecttype": {
        "custom_data": {
            "name": "Test Asset",
            "asset:eas_file": {
                "_id": 98765,
                "class": "image",
                "class_extension": "image.jpg",
                "class_version_extension": [
                    "image.original.jpg"
                ],
                "class_version_status": [
                    "image.original.done"
                ],
                "compiled": "jpg image, 2560 x 1920 @ 24 bit, 2.35 MB",
                "date_created": "2006-06-17T18:38:32Z",
                "date_inserted": "2019-11-27T12:34:37+01:00",
                "date_uploaded": "2019-11-27T12:34:37+01:00",
                "eas_parent_id": null,
                "extension": "jpg",
                "filesize": 2459891,
                "original_filename": "test.jpg",
                "original_filename_basename": "test",
                "original_filepath": "files/test.jpg",
                "pages_allowed": false,
                "preferred": true,
                "status": "done",
                "technical_metadata": {
                    "dpi": 72,
                    "height": 1920,
                    "width": 2560
                },
                "versions": {
                    "original": {
                        "_download_allowed": true,
                        "aspect_ratio": 1.3329999446868896,
                        "class": "image",
                        "compiled": "jpg image, 2560 x 1920 @ 24 bit, 2.35 MB",
                        "date_created": "2006-06-17T18:38:32Z",
                        "download_url": "https://.../eas/partitions/1/0/0/44/e225208209bad2fbbd74dd3d9ddd7dac5f0acad0/image/jpeg/test.jpg",
                        "dpi": 72,
                        "extension": "jpg",
                        "filesize": 2459891,
                        "has_more_jobs": false,
                        "height": 1920,
                        "status": "done",
                        "url": "https://.../partitions-inline/1/0/0/44/e225208209bad2fbbd74dd3d9ddd7dac5f0acad0/image/jpeg",
                        "width": 2560
                    }
                }
            }
        }
    }
}

If no asset with the ID can be found, the request will cause an API Error. Also, if the value of any *:eas_file key is not an object, or if *:eas_file._id is missing or is no valid integer, an API Error is caused.

Mask filters

For each mask except the standard mask, a tag filter can be specified. When indexing objects, the newest version which fulfills the tag filter is used (no tag filter means that the current version will be used). That means that the user can control which version of an object can be found with a certain mask. It is possible for an object not to be indexed at all for a particular mask.

The attribute _maskfilters is a map from mask IDs to tag filters, like this:

{
    "objecttype": {
        ...
    },
    "_maskfilters": {
            "4": {            // tag filter for mask 4
                "tagfilter": {
                    "all": [ 1, 2 ],
                    "not": [ 5 ]
                }
            },
            "10": {           // tag filter for mask 10
                "tagfilter": {
                    "any": [ 1, 2, 3 ]
                }
            }
        }                     // other masks do not have a tag filter and will therefore use the current version
    }
}

Export filename templates

_export_asset_filenames is an object containing a localized filename template per asset field:

{
    "objecttype": {
        ...
    },
    "_export_asset_filenames": {
        "bilder.asset": {
            "de-DE": "%_export.name% - %bilder.name% - Bild %_asset.id%",
            "en-US": "%_export.name% - %bilder.name% - Image %_asset.id%"
        },
        "bilder._nested:bilder__documents.file": {
            "de-DE": "%_export.name% - %bilder.name% - Anhang %_asset.id%",
            "en-US": "%_export.name% - %bilder.name% - Attachment %_asset.id%"
        }
    }
}

The given template only specifies the filename base, the file extension is automatically added. The variables replaced (%...%) include fields from object record (e.g. %bilder.name%) and some special fields (e.g. %_export.name%). The following special fields are recognized:

Variable Description
%_asset.id% EAS asset ID
%_asset.class% asset file class
%_asset.extension% asset extension
%_asset.original_filename% base of original filename of asset (without extension)
%_asset.technical_metadata.height% height of asset
%_asset.technical_metadata.max_dimension% bigger value of width and height
%_asset.technical_metadata.width% width of asset
%_asset.version% version name of asset
%_export.name% name of export
%_global_object_id% global object ID of record
%_system.easydb.name% name (ID) of easydb
%_system_object_id% system object ID of record