Skip to content

ObjectConfigService

injectable

Service managing the configuarions for object types. Configuration means that you can pick certain fields of an object type and assign them to a config object.

getDefaultConfig(objectTypeID: string): ObjectConfig
NameTypeDescription
objectTypeIDstring

Get object config for an object type. define separated areas to store/receive those configs. This way components/apps can store different object configs than the ones used accross the whole client application.

getObjectConfig(type: VirtualObjectType, bucket: string): ObjectConfig
NameTypeDescription
typeVirtualObjectType
bucketstring
getObjectConfigs$(bucket: string, includeDefaults: boolean): Observable<ObjectConfigRecord>
NameTypeDescription
bucketstring
includeDefaultsboolean
getRegisteredDefault(objectTypeId: string, bucket: string): ObjectConfig | undefined
NameTypeDescription
objectTypeIdstring
bucketstring
getResolvedObjectConfig(data: Record<string | any>, type: VirtualObjectType, bucket: string, includeDefaults: boolean): ResolvedObjectConfig
NameTypeDescription
dataRecord<string | any>
typeVirtualObjectType
bucketstring
includeDefaultsboolean
init(): Observable<any>

Register default object configs. Apps can pre-define how their objects should be rendered. separate the configs from other apps. If not provided configs will be saved for the global scope

registerDefaults(configs: ObjectConfigRecord, bucket: string): void
NameTypeDescription
configsObjectConfigRecord
bucketstring
saveObjectConfig(type: VirtualObjectType, config: ObjectConfig, bucket: string): Observable<any>
NameTypeDescription
typeVirtualObjectType
configObjectConfig
bucketstring
saveObjectConfigs(configs: Record<string | ObjectConfig | undefined>, bucket: string): Observable<any>
NameTypeDescription
configsRecord<string | ObjectConfig | undefined>
bucketstring
unregisterDefaults(configs: ObjectConfigRecord, bucket: string): void
NameTypeDescription
configsObjectConfigRecord
bucketstring