public class Identity extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Identity.StringType |
| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE_PREFIX |
| Constructor and Description |
|---|
Identity(boolean partial)
Creates a new empty identity.
|
Identity(List<Reference> context,
String assetType,
String assetName)
Creates a new identity based on the identity characteristics provided.
|
Identity(List<Reference> context,
String assetType,
String assetName,
String rid)
Creates a new identity based on the identity characteristics provided.
|
Identity(List<Reference> context,
String assetType,
String assetName,
String rid,
boolean partial)
Creates a new identity based on the identity characteristics provided.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getAssetType()
Returns the type of the asset represented by this identity.
|
static Identity |
getFromString(String identity,
IGCRestClient igcRestClient,
Identity.StringType stringType)
Builds an Identity based on an identity string (or null if unable to construct an Identity from the
string).
|
static Identity |
getFromString(String identity,
IGCRestClient igcRestClient,
Identity.StringType stringType,
boolean warnOnNotFound)
Builds an Identity based on an identity string (or null if unable to construct an Identity from the
string).
|
String |
getName()
Returns the (display) name of the asset represented by this identity.
|
Identity |
getParentIdentity()
Returns the Identity of the parent that contains the entity identified by this Identity.
|
String |
getRid()
Returns the Repository ID (RID) of this identity (if available), or null.
|
IGCSearchConditionSet |
getSearchCriteria()
Composes the search criteria necessary to retrieve an IGC object with this identity, without relying
on its RID.
|
static void |
getSearchCriteriaForUserName(IGCSearchConditionSet igcSearchConditionSet,
String name)
Translate the provided full name into search criteria.
|
Identity |
getUltimateParentIdentity()
Returns the Identity of the ultimate parent (top-level ancestor) that contains the entity
identified by this Identity.
|
int |
hashCode() |
static int |
isIdentityString(String candidate)
Return true if the provided string appears to be an identity string (partial or complete), or false otherwise.
|
boolean |
isPartial()
Returns true if this is a partial identity, or false if it is a full identity.
|
String |
toString()
Returns a unique string representation of the identity.
|
public static final String TYPE_PREFIX
public Identity(boolean partial)
partial - true if this is only a partial identity, false otherwisepublic Identity(List<Reference> context, String assetType, String assetName)
context - the populated '_context' array from an assetassetType - the type of the assetassetName - the name of the assetpublic Identity(List<Reference> context, String assetType, String assetName, String rid)
context - the populated '_context' array from an assetassetType - the type of the assetassetName - the name of the assetrid - the Repository ID (RID) of the assetpublic Identity(List<Reference> context, String assetType, String assetName, String rid, boolean partial)
context - the populated '_context' array from an assetassetType - the type of the assetassetName - the name of the assetrid - the Repository ID (RID) of the assetpartial - true if this is only a partial identity, false otherwisepublic Identity getParentIdentity()
public Identity getUltimateParentIdentity()
public String getRid()
public String getAssetType()
public String getName()
public boolean isPartial()
public final IGCSearchConditionSet getSearchCriteria()
public static int isIdentityString(String candidate)
candidate - the string to test as an identity stringpublic static Identity getFromString(String identity, IGCRestClient igcRestClient, Identity.StringType stringType) throws IGCParsingException
identity - the string representing a qualified identityigcRestClient - connectivity to an IGC environmentstringType - the type of string from which to construct the identityIGCParsingException - if there is any issue parsing the identity stringtoString()public static Identity getFromString(String identity, IGCRestClient igcRestClient, Identity.StringType stringType, boolean warnOnNotFound) throws IGCParsingException
identity - the string representing a qualified identityigcRestClient - connectivity to an IGC environmentstringType - the type of string from which to construct the identitywarnOnNotFound - indicates whether to log a warning (true) or not (false) in case the type inferred from
the identity cannot be foundIGCParsingException - if there is any issue parsing the identity stringtoString()public static void getSearchCriteriaForUserName(IGCSearchConditionSet igcSearchConditionSet, String name)
igcSearchConditionSet - the search criteria to which to appendname - the name from which to build the criteriaCopyright © 2018–2021 ODPi. All rights reserved.