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 triggers a request to "translate" the given metadata document id to the corresponding couple {part instance id,geometric instance id}.
The server will try to find all part instances that are linked to the given document in the given WorkingSetInterface.
A promised is returned, that is either rejected in case of an error, or resolved with the corresponding DocumentIdConverterResultInterface.
Due to performance limitation, if the number of part instances exceeded 1000, the converter returns an error.
Returns a promise.
Please note that in case of multiple promises running at the same time on the same DocumentIdConverterInterface, the first promises will be signalled as cancelled, the last as ok, but all calls to getConversionResult after awaiting will return the same value.
If pWorkingSetContext is modified during the execution, then the call is cancelled (see cancel).
part metadata document ids to fetch data from.link metadata document ids to fetch data from.instance metadata document ids to fetch data from.A promise. The promise is resolved with the reason (success, cancelled, disposed, bad input). In case of success, the promise contains the conversion result.
Cancels the computation of the conversion process (if any).
A DocumentIdConverterInterfaceSignal.DocumentIdConverterCancelled signal is emitted if the DocumentIdConverterInterface is retrieving data.
true if the DocumentIdConverterInterface was running, else false.
Triggers a request to "translate" the given metadata document id to the corresponding couple {part instance id,geometric instance id}.
The server will try to find all part instances that are linked to the given document in the given WorkingSetInterface.
An event DocumentIdConverterInterfaceSignal.DocumentIdConverterReady is fired when the translation is finished, use getLastError() to check if it was correctly performed.
Due to performance limitation, if the number of part instances exceeded 1000, the converter return an error.
Returns true if the "conversion" is started. If not, just call getLastError to get the reason why the procedure failed.
If pWorkingSetContext is modified during the execution, then the call is cancelled (see cancel).
part metadata document ids to fetch data from.link metadata document ids to fetch data from.instance metadata document ids to fetch data from.true if the conversion process has started, just wait for DocumentIdConverterInterfaceSignal.DocumentIdConverterReady.
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.
Gets the result of the last convert call of the metadata document id.
A DocumentIdConverterResultInterface is returned if the DocumentIdConverterInterface has finished computing. Use addEventListener on the event DocumentIdConverterInterfaceSignal.DocumentIdConverterReady to know when the DocumentIdConverterInterface is ready.
DO NOT modify this data in place, this results in undefined behavior.
Tells the type of the given interface.
The type of the given interface.
Gets the last error returned by the convert call of the DocumentIdConverterInterface.
The last error (if any, or undefined if no error occurred).
The id of the last call to convert.
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 DocumentIdConverterInterface has been cancelled.
This is generally the case after calling cancel when the DocumentIdConverterInterface is retrieving data.
true if the DocumentIdConverterInterface is cancelled.
Tells if this object has been gotten rid off.
true if dispose has been called on this object.
Tells if the DocumentIdConverterInterface is converting data.
This is the case after calling convert.
true if the DocumentIdConverterInterface is converting.
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.
The DocumentIdConverterInterface interface is used to get the
part instance idsandgeometric instance idsthat are linked to a given document (referenced by itsmetadata document id).The
metadata document idis retrieved from a SearchDocumentResultInterface after a successful call to a search request (see Search).The DocumentIdConverterInterface interfaces are created through the DataSessionInterface.createDocumentIdConverter method.
The list of signals the DocumentIdConverterInterface may trigger is available in the DocumentIdConverterInterfaceSignal enumeration.
The conversion mechanism is triggered through the convert method. The result is not available right away, but the event DocumentIdConverterInterfaceSignal.DocumentIdConverterReady is triggered when the result of the DocumentIdConverterInterface is available. The result is available through the getConversionResult function.
Warning : there may be cases when the getConversionResult is not available such as when the DocumentIdConverterInterface is fetching data, i.e. when isRunning returns true, or when the DocumentIdConverterInterface has been cancelled, i.e. when isCancelled returns true.
A DocumentIdConverterInterface may be interrupted (cancelled) when the DocumentIdConverterInterface is fetching data and cancel is called. In such cases, the DocumentIdConverterInterfaceSignal.DocumentIdConverterCancelled signal is fired, and shortly after, DocumentIdConverterInterfaceSignal.DocumentIdConverterReady signal is fired, but getConversionResult will return undefined. Just call convert with another (or the same)
metadata document idto trigger a new retrieval.If you call multiple times convert before receiving the DocumentIdConverterInterfaceSignal.DocumentIdConverterReady, only one DocumentIdConverterInterfaceSignal.DocumentIdConverterReady will be sent with the content of the last call to convert.
Or asynchronously :
Please make sure the destination browser supports promises before using async calls.
See