@onzag/itemize / Modules / base/Root/Module/ItemDefinition/PropertyDefinition / default
base/Root/Module/ItemDefinition/PropertyDefinition.default
The property definition class that defines how properties are to be defined
- canCacheState
- defaultIf
- enforcedValues
- globalSuperDefaultedValue
- globalSuperEnforcedValue
- hiddenIf
- invalidIf
- listeners
- originatingInstance
- parentItemDefinition
- parentModule
- policyName
- policyType
- propertyIsExtension
- rawData
- stateAppliedValue
- stateInternalValue
- stateLastCached
- stateLastCachedWithExternal
- stateLastUniqueCheck
- stateSuperEnforcedValue
- stateValue
- stateValueHasBeenManuallySet
- stateValueModified
- indexChecker
- supportedTypesStandard
- addChangeListener
- applyValue
- buildFieldsForRoleAccess
- checkAgainstRQDefinition
- checkRoleAccessFor
- checkSoftReadRoleAccessFor
- cleanState
- cleanValueFor
- clearSuperEnforced
- getAppliedValue
- getConfigValue
- getCurrentValue
- getDefaultValue
- getEnforcedValue
- getI18nDataFor
- getId
- getMaxDecimalCount
- getMaxLength
- getMinDecimalCount
- getMinLength
- getNewInstance
- getParentItemDefinition
- getParentModule
- getPointerSynchronizationProperty
- getPointerTargetItem
- getPolicyName
- getPolicyType
- getPropertyDefinitionDescription
- getQualifiedPolicyIdentifier
- getRequestFields
- getRolesWithAccessTo
- getSearchBoost
- getSpecificValidValues
- getState
- getStateNoExternalChecking
- getSubtype
- getType
- getUniqueIdentifier
- hasSpecificValidValues
- isCoercedIntoDefaultWhenNull
- isCurrentlyHidden
- isExtension
- isHidden
- isList
- isNonCaseSensitiveUnique
- isNullable
- isPointer
- isPointerList
- isPolicyPropertyDefinition
- isRangedSearchDisabled
- isRetrievalDisabled
- isRichText
- isSearchOnly
- isSearchable
- isText
- isTracked
- isUnique
- isValidValue
- isValidValueNoExternalChecking
- markAsPolicy
- mergeWithI18n
- removeChangeListener
- restoreValueFor
- setCurrentValue
- setGlobalSuperDefault
- setGlobalSuperEnforced
- setSuperEnforced
- toJSON
- checkAgainstRQDefinition
- createFileForProperty
- getQualifiedPolicyPrefix
- isValidValue
- revokeFileForProperty
• new default(rawJSON, parentModule, parentItemDefinition, isExtension, originatingInstance?): default
Builds a property definition
| Name | Type | Description |
|---|---|---|
rawJSON |
IPropertyDefinitionRawJSONDataType |
the raw json structure |
parentModule |
default |
the parent module of the property |
parentItemDefinition |
default |
the parent item definition |
isExtension |
boolean |
whether it represents a prop extension (aka null parentItemDefinition) |
originatingInstance? |
default |
usually null, but when properties are cloned, reinstantiated; this is the original instance that is attached to the root, the reason we need this is for merging functionality as it will keep itself attached to the root original property via this weak link |
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:883
• Private canCacheState: boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:865
• Private Optional defaultIf: IPropertyDefinitionRuleDataType[]
Processed rules for default from the raw data
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:775
• Private Optional enforcedValues: IPropertyDefinitionRuleDataType[]
Processed enforced values from the raw data
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:783
• Private Optional globalSuperDefaultedValue: PropertyDefinitionSupportedType | default
this applies for predefined properties basically this is the new default value
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:804
• Private Optional globalSuperEnforcedValue: PropertyDefinitionSupportedType | default
enforced values and defaulted values, this is usually set manually and it applies to includes usually with enforced property values hence the enforced value is global
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:798
hiddenIf
• Private Optional hiddenIf: default
Processed hidden conditions from the raw data
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:787
• Private Optional invalidIf: IPropertyDefinitionInvalidRuleDataType[]
Processed rules for invalid if from the raw data
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:779
• Private listeners: PropertyDefinitionListenerType[]
list of listeners
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:791
• Private originatingInstance: default
when a property is instantiated this is the original property which is directly attached to the tree
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:770
• Private parentItemDefinition: default
The parent item definition, if any, not available to extensions
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:761
• Private parentModule: default
the parent module of the property
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:757
• Private policyName: string
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:498
• Private policyType: string
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:497
• Private propertyIsExtension: boolean
Whether the property is an extension
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:765
• rawData: IPropertyDefinitionRawJSONDataType
the raw data for the property definition
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:753
• Private stateAppliedValue: Object
representing the original applied state of the class
▪ [slotId: string]: PropertyDefinitionSupportedType
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:816
• Private stateInternalValue: Object
an internal value
▪ [slotId: string]: any
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:849
• stateLastCached: Object
▪ [slotId: string]: IPropertyDefinitionState<PropertyDefinitionSupportedType>
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:866
• stateLastCachedWithExternal: Object
▪ [slotId: string]: IPropertyDefinitionState<PropertyDefinitionSupportedType>
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:869
• stateLastUniqueCheck: Object
these are caches builtin the property to be used in the client side
▪ [slotId: string]: { valid: boolean ; value: PropertyDefinitionSupportedType }
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:858
• Private stateSuperEnforcedValue: Object
this is less relevant than the single enforced and it is used when the value is applied manually during the user interaction, values are enforced
▪ [slotId: string]: { owners: any[] ; value: PropertyDefinitionSupportedType }
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:824
• Private stateValue: Object
representing the state of the class
▪ [slotId: string]: PropertyDefinitionSupportedType
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:810
• Private stateValueHasBeenManuallySet: Object
this only triggers as true when the value has been modified when it has been set by the set value function which is what is supposed to be used by the user
▪ [slotId: string]: boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:843
• Private stateValueModified: Object
refers to whether the value in the state value has been modified by any interaction, either by apply value or set value by user
▪ [slotId: string]: boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:835
▪ Static indexChecker: PropertyDefinitionCheckerFunctionType = clientSideIndexChecker
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:496
▪ Static supportedTypesStandard: PropertyDefinitionSupportedTypesStandardType = supportedTypesStandard
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:493
▸ addChangeListener(listener): void
Adds a change listener to the listener for changes note that these listeners only listens for user changes not to applied changes of the sorts
| Name | Type | Description |
|---|---|---|
listener |
PropertyDefinitionListenerType |
the listener to add |
void
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1049
▸ applyValue(id, version, value, modifiedState, doNotApplyValueInPropertyIfPropertyHasBeenManuallySet, rejectStateAppliedValue?): void
Applies the value to the property this is intended to be used for when values are loaded into this, and not meant for user input
| Name | Type | Description |
|---|---|---|
id |
string |
the id of the slot |
version |
string |
the slot version |
value |
PropertyDefinitionSupportedType |
the value |
modifiedState |
boolean |
a modified state to use |
doNotApplyValueInPropertyIfPropertyHasBeenManuallySet |
boolean |
to avoid hot updating values when the user is modifying them and an apply value has been called because it has been updated somewhere else, we use this to avoid overriding, note that the value must also not be equal, as in, it must differs; otherwise the value is applied, and manually set will go back to false as it's been used applyValue on it, it's been set now by the computer |
rejectStateAppliedValue? |
boolean |
does not make the value as a state applied, this is used by the item definition apply state function to apply a new state |
void
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1680
▸ buildFieldsForRoleAccess(action, role, userId, ownerUserId, rolesManager): Promise<IRQRequestFields>
Builds the fields for a given role and a given action and a given property
| Name | Type | Description |
|---|---|---|
action |
ItemDefinitionIOActions |
the action that the user wants to execute |
role |
string |
the role that is executing this action |
userId |
string |
the user id |
ownerUserId |
string |
the owner of the item definition for this property |
rolesManager |
ICustomRoleManager |
- |
Promise<IRQRequestFields>
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2393
▸ checkAgainstRQDefinition(v): boolean
| Name | Type |
|---|---|
v |
PropertyDefinitionSupportedType |
boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1403
▸ checkRoleAccessFor(action, role, userId, ownerUserId, rolesManager, throwError): Promise<boolean>
Checks the role access for a specific IO action to a specific role basically just returns a boolean
| Name | Type | Description |
|---|---|---|
action |
ItemDefinitionIOActions |
the action that wants to be performed |
role |
string |
the role that wants to perform that action |
userId |
string |
the user id that wants to perform the action (null is allowed for eg. GUEST_METAROLE) |
ownerUserId |
string |
the owner of the item definition (provide UNSPECFIED_OWNER when no owner is known) |
rolesManager |
ICustomRoleManager |
- |
throwError |
boolean |
whether to throw an EndpointError during failure rather than returning a boolean |
Promise<boolean>
a boolean on whether it has been granted access
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2473
▸ checkSoftReadRoleAccessFor(role, userId, ownerUserId, rolesManager): Promise<boolean>
Checks the soft read role access to a given property
| Name | Type |
|---|---|
role |
string |
userId |
string |
ownerUserId |
string |
rolesManager |
ICustomRoleManager |
Promise<boolean>
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2443
▸ cleanState(): void
void
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:936
▸ cleanValueFor(id, version): void
Frees the memory of stored values in a given slot id however it will not clear enforced values
| Name | Type | Description |
|---|---|---|
id |
string |
the slot id |
version |
string |
the slot version |
void
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1850
▸ clearSuperEnforced(id, version, owner?): void
Clears a super enforced value set in a slot id
| Name | Type | Description |
|---|---|---|
id |
string |
the slot id |
version |
string |
the slot version |
owner? |
any |
an optional owner parameter it can only be removed if the owner is the same as the original |
void
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1529
▸ getAppliedValue<T>(id, version): T
Provides the applied value for a property
| Name | Type |
|---|---|
T |
extends PropertyDefinitionSupportedType |
| Name | Type | Description |
|---|---|---|
id |
string |
the id |
version |
string |
the version |
T
the applied value
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1150
▸ getConfigValue(name): any
Provides the value of a special property if it's available they can only be of type, boolean, string, or number
| Name | Type | Description |
|---|---|---|
name |
string |
the name of that specifial property |
any
the special property value, either a boolean, number or string, or null
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2280
▸ getCurrentValue<T>(id, version): T
Provides the current value of a property (as it is) for a given slot id
| Name | Type |
|---|---|
T |
extends PropertyDefinitionSupportedType |
| Name | Type | Description |
|---|---|---|
id |
string |
the slot id |
version |
string |
- |
T
the current value
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1100
▸ getDefaultValue(): PropertyDefinitionSupportedType
Gives the default set value
PropertyDefinitionSupportedType
a property definition value, or null
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2333
▸ getEnforcedValue<T>(id, version): Object
Provides the current enforced value (if any) to a given slot id
| Name | Type |
|---|---|
T |
extends PropertyDefinitionSupportedType |
| Name | Type | Description |
|---|---|---|
id |
string |
the slot id |
version |
string |
the slot version |
Object
an object that specifies whether the value is enforced, and the value itself if true the value can be null
| Name | Type |
|---|---|
enforced |
boolean |
value? |
T |
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:958
▸ getI18nDataFor(locale): any
Returns the locale data definition, or null
| Name | Type | Description |
|---|---|---|
locale |
string |
the locale |
any
the locale data
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2342
▸ getId(): string
gives the id of this property defintion
string
the id
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1031
▸ getMaxDecimalCount(): number
Provides the max decimal count as defined, does not provide the limits as they are defined in the constant, returns null simply if it's not defined
number
a number or null
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2257
▸ getMaxLength(): number
Provides the max length as defined, or null if not available
number
a number or null
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2237
▸ getMinDecimalCount(): number
Provides the min decimal count as defined, does not provide the limits as they are defined in the constant, returns null simply if it's not defined
number
a number or null
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2267
▸ getMinLength(): number
Provides the min length as defined or null if not available
number
a number or null
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2246
▸ getNewInstance(): default
Uses the raw data to instantiate a new instance of the item definition, uses the same on state change function for state changes so it remains linked to the module
a new instance
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2024
▸ getParentItemDefinition(): default
Just gives the parent item definition
a item definition that holds this property if any
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2300
▸ getParentModule(): default
Just gives the parent module
a Module
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2292
▸ getPointerSynchronizationProperty(): default
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2222
▸ getPointerTargetItem(): default
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2214
▸ getPolicyName(): string
if this is a property definition that belongs to a policy this will return the policy name
string
the policy name
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2055
▸ getPolicyType(): string
if this is a property definition that belongs to a policy this will return the policy type
string
the policy type
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2046
▸ getPropertyDefinitionDescription(): IPropertyDefinitionSupportedType<PropertyDefinitionSupportedType>
Provides the property definition description from the supported standards
IPropertyDefinitionSupportedType<PropertyDefinitionSupportedType>
the property definition description for its type
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2087
▸ getQualifiedPolicyIdentifier(policyType, policyName): string
Provides the qualified property identifier for this specific property
| Name | Type | Description |
|---|---|---|
policyType |
string |
the policy type |
policyName |
string |
the policy name |
string
a string for the qualified policy prefix for this specific property id
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2552
▸ getRequestFields(): IRQRequestFields
Provides the request fields that are necessary and contained within this property in order to be rq requested, these come from the property description
the requested fields that are necessary
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1070
▸ getRolesWithAccessTo(action): string[]
Provides the specified roles with the access to perform an IO action to the property
| Name | Type | Description |
|---|---|---|
action |
ItemDefinitionIOActions |
the action in question, DELETE is not an allowed action because properties cannot be deleted, only the item definition as a whole is deleted so it makes no sense, and while the same can be said about creation, creation can be done with incomplete values partial creation is a thing in itemize, and a property can be protected from an arbitrary value during creation, this comes in handy for example for the role in the user item, where an user cannot assign itself an arbitrary role during the IO action of creation |
string[]
an array of string for the roles
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2368
▸ getSearchBoost(): number
number
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2154
▸ getSpecificValidValues(): PropertyDefinitionSupportedType[]
Provides the specific valid values of the given property
PropertyDefinitionSupportedType[]
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2178
▸ getState<T>(id, version): Promise<IPropertyDefinitionState<T>>
provides the current useful value for the property defintion
| Name | Type |
|---|---|
T |
extends PropertyDefinitionSupportedType |
| Name | Type | Description |
|---|---|---|
id |
string |
the id of the current item definition as stored, pass null if not stored this also represents the slot |
version |
string |
the version |
Promise<IPropertyDefinitionState<T>>
a promise for the current value state
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1262
▸ getStateNoExternalChecking<T>(id, version, emulateExternalChecking?): IPropertyDefinitionState<T>
provides the current useful value for the property defintion without doing any external checking, pass the id still as a cache of previously external checked results might apply
| Name | Type |
|---|---|
T |
extends PropertyDefinitionSupportedType |
| Name | Type | Description |
|---|---|---|
id |
string |
the id of the current item definition as stored, pass null if not stored |
version |
string |
the slot version |
emulateExternalChecking? |
boolean |
- |
the current value state
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1166
▸ getSubtype(): string
Provides the subtype of the property, if available
string
the subtype string or null
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2186
▸ getType(): PropertyDefinitionSupportedTypeName
gives the type of this property defintion
PropertyDefinitionSupportedTypeName
the type
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1039
▸ getUniqueIdentifier(id, version): string
Provides an unique identifier for a given id version combo for this given property
| Name | Type |
|---|---|
id |
string |
version |
string |
string
a string
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2072
▸ hasSpecificValidValues(): boolean
Checks whether the property has specific defined valid values
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2162
▸ isCoercedIntoDefaultWhenNull(): boolean
Tells whether the value is coerced into default when null
boolean
a booean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2317
isCurrentlyHidden
▸ isCurrentlyHidden(id, version): boolean
checks if it's currently hidden (not phantom)
| Name | Type | Description |
|---|---|---|
id |
string |
the id |
version |
string |
the version |
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1021
▸ isExtension(): boolean
Tells if the property is an extension from the propext list, they usually have priority
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2309
isHidden
▸ isHidden(): boolean
Tells whether the current property is defined as being hidden
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2119
▸ isList(): boolean
Specifies whether it represents a list form
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2170
▸ isNonCaseSensitiveUnique(): boolean
Whether the unique is not case sensitive
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2111
▸ isNullable(): boolean
Tells whether the current property is nullable
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2095
▸ isPointer(): boolean
boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2206
▸ isPointerList(): boolean
boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2210
▸ isPolicyPropertyDefinition(): boolean
Specifies whether the property definition belongs to a policy
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2063
▸ isRangedSearchDisabled(): boolean
Checks whether the property can be range searched
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2135
▸ isRetrievalDisabled(): boolean
Checks whether the property can be retrieved
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2127
▸ isRichText(): boolean
Check whether the type is text, and if it's a rich text type
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2194
▸ isSearchOnly(): boolean
Specifies if a property is used for custom searches
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2325
▸ isSearchable(): boolean
Tells if it's searchable, either by default or because of a search level
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2144
▸ isText(): boolean
boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2198
▸ isTracked(): boolean
boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2202
▸ isUnique(): boolean
Tells whether there's an unique index on it
boolean
a boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2103
▸ isValidValue(id, version, value): Promise<string>
Externally checks a valid value for this input using all its guns, this function is context aware
| Name | Type | Description |
|---|---|---|
id |
string |
the id of the item as stored (pass null if new) |
version |
string |
the slot version |
value |
PropertyDefinitionSupportedType |
the value to check |
Promise<string>
the invalid reason as a string
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1987
▸ isValidValueNoExternalChecking(id, version, value, emulateExternalChecking?): string
Checks the valid value but ignores external checking pass the value still because cache might apply of previous external checking
| Name | Type | Description |
|---|---|---|
id |
string |
the id of the item as stored (pass null if new) |
version |
string |
the slot version |
value |
PropertyDefinitionSupportedType |
the value to check |
emulateExternalChecking? |
boolean |
- |
string
the invalid reason as a string
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1926
▸ markAsPolicy(policyType, policyName): default
Marks a property definition as a policy type
| Name | Type | Description |
|---|---|---|
policyType |
string |
edit, delete, create |
policyName |
string |
the policy name |
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2034
▸ mergeWithI18n(pdef): void
Merges the raw json data locale information of this property with another of the same kind (only its language data)
| Name | Type | Description |
|---|---|---|
pdef |
IPropertyDefinitionRawJSONDataType |
the property definition raw form |
void
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2561
▸ removeChangeListener(listener): void
Removes an added listener
| Name | Type | Description |
|---|---|---|
listener |
PropertyDefinitionListenerType |
the listener to remove |
void
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1057
▸ restoreValueFor(id, version): void
Restores the value of the given slot id to the original applied value
| Name | Type | Description |
|---|---|---|
id |
string |
the slot id |
version |
string |
the version |
void
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1895
▸ setCurrentValue(id, version, newValue, internalValue): void
Sets the current value for the item, null is a valid value Specially if the item is nullable
The resulting value set might not be the same, if the item has a default null value, that is, if the value is set to that value it will be converted to null
| Name | Type | Description |
|---|---|---|
id |
string |
the slot d |
version |
string |
the slot version |
newValue |
PropertyDefinitionSupportedType |
the new value |
internalValue |
any |
the internal value |
void
Throws
an error if the value is invalid by definition
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1620
▸ setGlobalSuperDefault(value): void
Sets a super default value that superseeds any default value or values, the value might be another property definition to extract the value from
| Name | Type | Description |
|---|---|---|
value |
PropertyDefinitionSupportedType | default |
the value to default to it can be a property |
void
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1582
▸ setGlobalSuperEnforced(value): void
Sets a super enforced value that superseeds any enforced value or values and makes the field enforced, the value might be another property definition to extract the value from
| Name | Type | Description |
|---|---|---|
value |
PropertyDefinitionSupportedType | default |
the value to enforce it can be a property |
void
Throws
an error if the value is invalid
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1414
▸ setSuperEnforced(id, version, value, owner?): void
Sets a super enforced value to a given property in a given slot id, note a super enforced value won't override the global
| Name | Type | Description |
|---|---|---|
id |
string |
the slot id |
version |
string |
the slot version |
value |
PropertyDefinitionSupportedType |
the value that has tobe super enforced |
owner? |
any |
an owner parameter, if specified it can only be removed by the same owner |
void
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:1448
▸ toJSON(): IPropertyDefinitionRawJSONDataType
Gets the raw data of the property
IPropertyDefinitionRawJSONDataType
the json form
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:2542
▸ checkAgainstRQDefinition(properyDefinitionRaw, v): boolean
Performs a check agains the json definition value for a property definition
| Name | Type |
|---|---|
properyDefinitionRaw |
IPropertyDefinitionRawJSONDataType |
v |
PropertyDefinitionSupportedType |
boolean
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:535
▸ createFileForProperty(id, name, metadata, src): IRQFile
| Name | Type |
|---|---|
id |
string |
name |
string |
metadata |
string |
src |
Blob |
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:500
▸ getQualifiedPolicyPrefix(policyType, policyName): string
A static method that provides the policy prefix for a given policy name and type
| Name | Type | Description |
|---|---|---|
policyType |
string |
the policy type |
policyName |
string |
the policy name |
string
a prefixed string that represents the qualified policy
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:523
▸ isValidValue(propertyDefinitionRaw, value, checkAgainstValues): PropertyInvalidReason
Checks whether a value is valid or not using the raw data.
NOTE!!!! this function is context unaware and hence it cannot execute invalidIf conditional rule set rules
NOTE!!!!! this function is external events unaware and hence it cannot check for unique indexes
| Name | Type | Description |
|---|---|---|
propertyDefinitionRaw |
IPropertyDefinitionRawJSONDataType |
The raw json property definition data |
value |
PropertyDefinitionSupportedType |
the value to check against |
checkAgainstValues |
boolean |
if to check against its own values some properties are enums, and this checks whether to check against these enums, but for example, when checking the information on the enums during the checkers.ts process, we don't want to check that because then it will always be valid |
a boolean on whether the value is valid
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:565
▸ revokeFileForProperty(file): void
| Name | Type |
|---|---|
file |
IRQFile |
void
base/Root/Module/ItemDefinition/PropertyDefinition/index.ts:513