public class AmbiguousIdHelper extends Object
This class provides utilities for ambiguous Id manipulation.
Constructor and Description |
---|
AmbiguousIdHelper(WorkObjectService workObjectService) |
Modifier and Type | Method and Description |
---|---|
Optional<WorkObject> |
findWorkObjectForAmbiguousId(String ambiguousId,
SearchScope searchScope)
Finds the model corresponding to the given model ID value, supporting legacy
model references as well as the default global ID.
|
String |
getGlobalIdByAmbiguousId(String ambiguousId)
Get global ID from ambiguous ID
|
Optional<String> |
getGlobalIdOptional(String ambiguousId)
Gets the optional work object global ID for the given ambiguous ID.
|
WorkObject |
getWorkObjectForAmbiguousId(String modelReference,
SearchScope searchScope)
Gets the model corresponding to the given model ID value, supporting legacy
model references as well as the default global ID.
|
String |
getWorkObjectIdByAmbiguousId(String ambiguousId)
Get workObjectId from ambiguousId
|
WorkObject |
getWorkObjectWithSystemModelVariableByAmbiguousId(String ambiguousId)
Find work object by ambiguous Id with only CloudVariables.SYSTEM_MODEL variable set
|
public AmbiguousIdHelper(WorkObjectService workObjectService)
public Optional<String> getGlobalIdOptional(String ambiguousId)
Gets the optional work object global ID for the given ambiguous ID.
ambiguousId
- the ambiguous IDpublic WorkObject getWorkObjectForAmbiguousId(String modelReference, SearchScope searchScope)
Gets the model corresponding to the given model ID value, supporting legacy model references as well as the default global ID.
ATTENTION: The returned work object just contains the fields and has no variables or candidate links populated.
modelReference
- the model reference valuesearchScope
- the search scopeEntityNotFoundException
- if the model could not be foundpublic Optional<WorkObject> findWorkObjectForAmbiguousId(String ambiguousId, SearchScope searchScope)
Finds the model corresponding to the given model ID value, supporting legacy model references as well as the default global ID.
ambiguousId
- the model reference valuesearchScope
- the search scopenull
if the model could not be foundpublic WorkObject getWorkObjectWithSystemModelVariableByAmbiguousId(String ambiguousId)
Find work object by ambiguous Id with only CloudVariables.SYSTEM_MODEL variable set
ambiguousId
- ambiguous Id of the workobject to retrieveOneException
- with IMPORT_FAILED message in the case when workobject was not found.public String getWorkObjectIdByAmbiguousId(String ambiguousId)
Get workObjectId from ambiguousId
ambiguousId
- ambiguous id which is used as a parentCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.