public interface IGuidProvider
Please see createNewGuid(EObject)
for details about the format.
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<? super IGuidProvider> |
COMPARATOR
Used for sorting extensions by priority.
|
static java.lang.String |
EXTENSION_POINT_ID
Extension point ID.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createNewGuid(EObject element)
Implementations must create a new GUID.
|
java.lang.String |
getLabel() |
int |
getPriority() |
boolean |
isValidGuid(java.lang.String guid)
In some cases, a GUID must be checked for validity, because the EA may use some special GUIDs.
|
static final java.lang.String EXTENSION_POINT_ID
static final java.util.Comparator<? super IGuidProvider> COMPARATOR
java.lang.String createNewGuid(EObject element)
element
is set, then the GUID is used for that particular
element. If element == null
, then the GUID is used for a database entry that does not represent a
model element in the first place, e.g. tagged values or additional properties stored in table t_xref
.
Please note that the behavior of the EA may be undefined if the GUID does not comply to the EA standard format
which is apparently the Microsoft GUID format:
Wikipedia - GUID.
So make sure to test your implementation properly before going in production with your own GUID provider.
element
- The element for which the GUID should be generated or null
, if the GUID should not be
generated for a particular model element.java.lang.String getLabel()
null
, otherwise it will not be used!int getPriority()
boolean isValidGuid(java.lang.String guid)
In case the GUID points to a built-in primitive type, its name is stored as GUID, e.g.
boolean
, UnlimitedNatural
or unsigned int
, depending on the language that
is selected on the parent element. Example: {EAINT000-B653-4f3c-A010-30205D67F5F5}
.
There may also be other cases in the future, for which the GUID column is exploited, not only primitive type
names.
guid
, whether it is a valid GUID in their context. Maybe
the GUID was even created from within the EA, so it is probably a good idea to return
DefaultGuidProvider.isValidGuid(guid)
instead of just returning false
. Otherwise types
may not be resolved correctly.
To check that your implementation is compatible with the rest of the YAKINDU EA-Brige, you should also run the
test suite with your implementation of IGuidProvider
!
guid
- A GUID that should be checked for validity.true
, if the GUID is a valid example in the context of this GUID provider;
false
otherwise.Copyright (c) 2015 itemis AG, and others. All rights reserved.