IAttributeLoader
Handles the loading of the attribute metadata.
export interface IAttributeLoader
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
Registers a callback that will be fired when the attribute load was canceled. Returns unsubscribe function, that will unregister it. | |||
Registers a callback that will be fired when error is thrown during the attribute load. Returns unsubscribe function, that will unregister it. | |||
Registers a callback that will be fired when the attribute load starts. Returns unsubscribe function, that will unregister it, once called. Multiple callbacks can be registered by this function. | |||
Registers a callback that will be fired when the attribute load is successfuly completed. Returns unsubscribe function, that will unregister it. |
Methods
Method | Description |
|---|---|
Cancels the running attribute load, if any. | |
Returns the loaded attribute. | |
Returns error, if it was thrown during the attribute filter load, undefined otherwise. | |
Returns the current status of the attribute filter load. | |
Loads the metadata object for the attribute, that is used in the attribute filter. |
Property details
IAttributeLoader.onLoadAttributeCancelproperty
Registers a callback that will be fired when the attribute load was canceled. Returns unsubscribe function, that will unregister it.
onLoadAttributeCancel: CallbackRegistration<OnLoadAttributeCancelCallbackPayload>;
Remarks
Multiple callbacks can be registered by this function.
IAttributeLoader.onLoadAttributeErrorproperty
Registers a callback that will be fired when error is thrown during the attribute load. Returns unsubscribe function, that will unregister it.
onLoadAttributeError: CallbackRegistration<OnLoadAttributeErrorCallbackPayload>;
Remarks
Multiple callbacks can be registered by this function.
IAttributeLoader.onLoadAttributeStartproperty
Registers a callback that will be fired when the attribute load starts. Returns unsubscribe function, that will unregister it, once called.
Multiple callbacks can be registered by this function.
onLoadAttributeStart: CallbackRegistration<OnLoadAttributeStartCallbackPayload>;
IAttributeLoader.onLoadAttributeSuccessproperty
Registers a callback that will be fired when the attribute load is successfuly completed. Returns unsubscribe function, that will unregister it.
onLoadAttributeSuccess: CallbackRegistration<OnLoadAttributeSuccessCallbackPayload>;
Remarks
Multiple callbacks can be registered by this function.
Method details
IAttributeLoader.cancelAttributeLoad()method
Cancels the running attribute load, if any.
cancelAttributeLoad(): void;
Returns
void
IAttributeLoader.getAttribute()method
Returns the loaded attribute.
getAttribute(): IAttributeMetadataObject | undefined;
Returns
IAttributeMetadataObject | undefined
Remarks
Returns undefined, if the attribute is not loaded yet.
IAttributeLoader.getAttributeError()method
Returns error, if it was thrown during the attribute filter load, undefined otherwise.
getAttributeError(): GoodDataSdkError | undefined;
Returns
GoodDataSdkError | undefined
IAttributeLoader.getAttributeStatus()method
Returns the current status of the attribute filter load.
getAttributeStatus(): AsyncOperationStatus;
Returns
IAttributeLoader.loadAttribute()method
Loads the metadata object for the attribute, that is used in the attribute filter.
loadAttribute(correlation?: Correlation): void;
Parameters
Parameter | Type | Description |
|---|---|---|
correlation | (Optional) correlation that will be included in all callbacks fired by this method |
Returns
void
Remarks
Cancels the running attribute filter load, if any, and starts it again.
You can provide a correlation that will be included in the payload of all callbacks fired as a result of calling this method.