Adds a listener to an event type.
When an event of the type pType fires, the callback pListener will be called. This function
returns a unique string id that may be used in removeEventListenerById to allow simple
listener removal.
It is possible to add an object that will be included in the callback to avoid creating too many closures.
Calling twice addEventListener with the same parameters results in the second call to be ignored,
only unique pairs callback / object are allowed, in order to avoid calling multiple times the same
thing.
The id of the inserted callback (actually an UUID).
Adds a listener to an event type.
When an event of the type pType fires, the callback pListener will be called. This function
returns a unique string id that may be used in removeEventListenerById to allow simple
listener removal.
The id of the inserted callback (actually an UUID).
Asynchronously gets the information about the children of the specified part instance ids.
Returns a promise.
If pWorkingSet is modified during the execution, then the call is cancelled (see cancel).
Please note that in case of multiple promises running at the same time on the same ChildrenIdCardGetterInterface, the first promises will be signalled as cancelled, the last as ok, but all calls to getPartInstanceInfos after awaiting will return the same value.
part instance ids to fetch metadata from.A promise. The promise is resolved with the reason (success, cancelled, disposed, bad input). In case of success, the promise is resolved with an Array
Asynchronously gets the information about the specified part instance id and its genealogy.
Returns a promise.
Please note that in case of multiple promises running at the same time on the same IdCardGetterInterface, the first promises will be signalled as cancelled, the last as ok, but all calls to getPartInstanceInfos after awaiting will return the same value.
If pWorkingSet is modified during the execution, then the call is cancelled (see cancel).
A promise. The promise is resolved with the reason (success, cancelled, disposed, bad input). In case of success, the promise contains the requested Array
Cancels the computation of the metadata retrieving process (if any).
A ChildrenIdCardGetterInterfaceSignal.ChildrenIdCardCancelled signal is emitted if the ChildrenIdCardGetterInterface is retrieving data.
true if the DocumentIdConverterInterface was running, else false.
Gets rid of this object.
After this call, this object can no longer be used.
If the object is an InfiniteObjectDispatcherInterface, then the InfiniteObjectDispatcherInterfaceSignal.ObjectDisposed signal is emitted.
Further uses of the object (with the exception of isDisposed, getInfiniteObjectType and application id retrieval) will log a message with LogLevel.LL_UsingDisposedObject.
Tells the type of the given interface.
The type of the given interface.
Gets the last error returned by the update of the ChildrenIdCardGetterInterface.
The last error if any, or undefined if no error occurred.
Each call to retrieveChildrenIdCard is assigned a request id.
This call tels the id of the last call to retrieveChildrenIdCard.
The id of the last call to retrieveChildrenIdCard.
Gets the result of the metadata request.
The metadata content is returned if the ChildrenIdCardGetterInterface has finished computing. Use addEventListener on the event ChildrenIdCardGetterInterfaceSignal.ChildrenIdCardReady to know when the ChildrenIdCardGetterInterface is ready.
DO NOT modify this data in place, this results in undefined behavior.
part instance ids and their genealogy (the size of the array is the number of
part instance ids requested (see retrieveChildrenIdCard)), or
undefined if the ChildrenIdCardGetterInterface is computing or if the ChildrenIdCardGetterInterface is in error or cancelled.Gets the result for the id-card customization script.
As the customization script may change, the customization script types are not exposed to the Infinite api. You can get them from the @3djuump.com/client-script-3djuump-infinite package.
/**
* Sample to illustrate the use of an IdCardGetterInterface with the usage of the customization script.
*/
import { ChildrenIdCardGetterInterface, tScriptDocPool } from 'generated_files/documentation/appinfiniteapi';
// created previously
let lChildrenIdCardGetterInterface : ChildrenIdCardGetterInterface;
// ...
// ...
const lMultiHierarchy : Array<any> = [];
const lDocPool : tScriptDocPool = {};
// now retrieve the result
if(!lChildrenIdCardGetterInterface.getResultForIdCardCustomization(lMultiHierarchy, lDocPool))
{
console.log('Error while transforming data');
throw new Error('customization failed');
}
// now we can use the customization script since data is ready to be used.
true if the conversion went right.
Tells if the EventDispatcher has such a callback registered for the given event type.
true if such a listener is installed for the given type of event.
Tells if the ChildrenIdCardGetterInterface has been cancelled.
This is generally the case after calling cancel when the ChildrenIdCardGetterInterface is retrieving data.
true if the ChildrenIdCardGetterInterface is cancelled.
Tells if this object has been gotten rid off.
true if dispose has been called on this object.
Tells if the ChildrenIdCardGetterInterface is updating.
This is the case after calling retrieveChildrenIdCard.
true if the ChildrenIdCardGetterInterface is updating.
Removes a listener from an event type.
If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.
The listener function that gets removed.
The listener object that was used when addEventListener was called.
true if the callback was removed else false.
Removes a listener from an event type.
If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.
The listener function that gets removed.
true if the callback was removed else false.
Removes a listener by its id.
If no such listener is found, then the function returns false and does nothing. You must use the return value of addEventListener to actually remove the listener.
true if the callback was removed else false.
Gets the information about the children of the specified part instance ids.
The ChildrenIdCardGetterInterfaceSignal.ChildrenIdCardReady signal is fired when the
part instance ids metadata result is ready.
Returns true if the metadata procedure retrieval is started. If not, just call getLastError to get the reason why the procedure failed. For instance, pPartInstanceIds is considered as invalid input if it is empty or at least one element is out of range [1 : 2^31-1].
If pWorkingSet is modified during the execution, then the call is cancelled (see cancel).
part instance ids to fetch metadata from.true if the retrieval procedure has begun.
Gets the information about the children of the specified part instance id.
The event ChildrenIdCardGetterInterfaceSignal.ChildrenIdCardReady is fired when the
part instance id metadata result is ready.
Returns true if the metadata procedure retrieval is started. If not, just call getLastError to
get the reason why the procedure failed. For instance, pPartInstanceIds is considered as invalid input if it is empty
or at least one element is out of range [1 - 2^31-1].
If pWorkingSet is modified during the execution, then the call is cancelled (see cancel).
part instance id to fetch metadata from.true if the retrieval procedure has begun.
Gets the information about the specified part instance id and its genealogy.
The event IdCardGetterInterfaceSignal.IdCardReady is fired when the
part instance id metadata result is ready.
If pWorkingSet is modified during the execution, then the call is cancelled (see cancel).
Returns true if the metadata procedure retrieval is started. If not, just call getLastError to
get the reason why the procedure failed. For instance, pPartInstanceIds is considered as invalid input if it is empty
or at least one element is out of range [1 - 2^31-1].
true if the retrieval procedure has begun.
The ChildrenIdCardGetterInterface interface is used to retrieve information about the children of a
part instance(and not ageometric instance id), such as the metadata of the childrenparts, link, the list of children attached document, ....The
metadata documentsand general information about the children can be retrieved by knowing thepart instance idof the parent to retrieve. Such documents are usually requested after an id-card request.The ChildrenIdCardGetterInterface interfaces are created through the DataSessionInterface.createChildrenIdCardGetter method.
The list of signals the ChildrenIdCardGetterInterface may trigger is available in the ChildrenIdCardGetterInterfaceSignal enumeration.
The metadata retrieval procedure is triggered through the retrieveChildrenIdCard methods. The result is not available right away, but the event ChildrenIdCardGetterInterfaceSignal.ChildrenIdCardReady is triggered when the result of the ChildrenIdCardGetterInterface is available. The result is available through the getPartInstanceInfos function.
Warning : there may be cases when the getPartInstanceInfos is not available such as when the ChildrenIdCardGetterInterface is updating, i.e. when isRunning returns true, or when the ChildrenIdCardGetterInterface has been cancelled, i.e. when isCancelled returns true.
An ChildrenIdCardGetterInterface may be interrupted (cancelled) when the ChildrenIdCardGetterInterface is updating and cancel is called. In such cases, the ChildrenIdCardGetterInterfaceSignal.ChildrenIdCardCancelled signal is fired, and shortly after, ChildrenIdCardGetterInterfaceSignal.ChildrenIdCardReady signal is fired, but getPartInstanceInfos will return undefined. Just call retrieveChildrenIdCard with another (or the same)
part instance idsto trigger a new retrieval.If you call multiple times retrieveChildrenIdCard before receiving the ChildrenIdCardGetterInterfaceSignal.ChildrenIdCardReady, only one ChildrenIdCardGetterInterfaceSignal.ChildrenIdCardReady will be sent with the content of the last call to retrieveChildrenIdCard.
The developer may process the results of an id card retrieval with the following code :
or asynchronously :
Please make sure the destination browser supports promises before using async calls.
See