Skip to content

SystemService

injectable

Providing system definitions.

fetchResources(id: string): Observable<literal type>
NameTypeDescription
idstring
filterVisibleTags(objectTypeId: string, tagsValue: Array<Array<any>>): Array<Array<any>>
NameTypeDescription
objectTypeIdstring
tagsValueArray<Array<any>>

Get the base document type all documents belong to

getBaseDocumentType(withLabel: boolean): ObjectType
NameTypeDescription
withLabelboolean

Get the base folder type all folders belong to

getBaseFolderType(withLabel: boolean): ObjectType
NameTypeDescription
withLabelboolean

Get the base object type all dms objects belong to

getBaseType(): ObjectType

Extract classifications from object type fields classification string. This string may contain more than one classification entry.

Classification is a comma separated string that may contain additional properties related to on classification entry. Example:

id:reference[system:folder], email

getClassifications(classifications: string[]): Map<string, ClassificationEntry>
NameTypeDescription
classificationsstring[]

Generates an internal type for a given object type field. Adding this to a form element or object type field enables us to render forms based on object type fields in a more performant way. Otherwise we would have to evaluate the conditions for every form element on every digest cycle.

getInternalFormElementType(type: string, classifications: string[]): ObjectTypeFieldInternalType
NameTypeDescription
typestring
classificationsstring[]
getLocalizedDescription(id: string): string
NameTypeDescription
idstring
getLocalizedLabel(id: string): string
NameTypeDescription
idstring
getLocalizedResource(key: string): string
NameTypeDescription
keystring

Get a particular object type

getObjectType(objectTypeId: string, withLabel: boolean): GenericObjectType | undefined
NameTypeDescription
objectTypeIdstring
withLabelboolean
getObjectTypeField(id: string): ObjectTypeField | undefined
NameTypeDescription
idstring

Get the form model of an object type.

getObjectTypeForm(objectTypeId: string, situation: string): Observable<any>
NameTypeDescription
objectTypeIdstring
situationstring

Fetch a collection of form models.

getObjectTypeForms(objectTypeIDs: string[], situation: string): Observable<Record<string, any>>
NameTypeDescription
objectTypeIDsstring[]
situationstring

Get the icon for an object type. This will return an SVG as a string.

getObjectTypeIcon(objectTypeId: string, fallback: string): Observable<string>
NameTypeDescription
objectTypeIdstring
fallbackstring

Get the URI of an object type icon.

getObjectTypeIconUri(objectTypeId: string, fallback: string): string
NameTypeDescription
objectTypeIdstring
fallbackstring

Get all object types

getObjectTypes(withLabels: boolean, situation: "search" | "create"): GenericObjectType[]
NameTypeDescription
withLabelsboolean
situation"search" | "create"
getRelationship(id: string, withLabel: boolean): Relationship | undefined
NameTypeDescription
idstring
withLabelboolean

Get a list of classifications for a given object type including the classifications of its static secondary object types

getResolvedClassifications(objectTypeId: string): string[]
NameTypeDescription
objectTypeIdstring

Get the resolved object tags

getResolvedTags(objectTypeId: string): literal type[]
NameTypeDescription
objectTypeIdstring

Get the resolved object type with all fields ( including fields from related secondary types )

getResolvedType(objectTypeId: string): literal type
NameTypeDescription
objectTypeIdstring

Get a particular secondary object type

getSecondaryObjectType(objectTypeId: string, withLabel: boolean): SecondaryObjectType | undefined
NameTypeDescription
objectTypeIdstring
withLabelboolean

Get all secondary object types

getSecondaryObjectTypes(withLabels: boolean, situation: "search" | "create"): SecondaryObjectType[]
NameTypeDescription
withLabelsboolean
situation"search" | "create"

Fetches the backends system definition and updates system$ Observable. Subscribe to the system$ observable instead of calling this function, otherwise you’ll trigger fetching the system definition every time.

getSystemDefinition(authData: AuthData): Observable<boolean>
NameTypeDescription
authDataAuthData

Visible tags are defined by a classification on the object type (e.g. ‘tag[tenkolibri:process,1,2,3]’).

The example will only return tags with the name ‘tenkolibri:process’ and values of either 1, 2 or 3. All other tags will be ignored.

for that tag (if values is emoty all values are allowed)

getVisibleTags(objectTypeId: string): literal type
NameTypeDescription
objectTypeIdstring

Determine whether or not the given object type field is a system field

isSystemProperty(field: ObjectTypeField): boolean
NameTypeDescription
fieldObjectTypeField
setPermissions(p: ObjectTypePermissions): void
NameTypeDescription
pObjectTypePermissions

Create the schema from the servers schema response

setSchema(schemaResponse: SchemaResponse, localizedResource: Localization): void
NameTypeDescription
schemaResponseSchemaResponse
localizedResourceLocalization
toFormElement(field: ObjectTypeField): any
NameTypeDescription
fieldObjectTypeField
updateAuthData(data: Partial<AuthData>): any
NameTypeDescription
dataPartial<AuthData>
updateLocalizations(iso: string): Observable<any>
NameTypeDescription
isostring