다음을 통해 공유


ObjectIdentifier Class

  • java.lang.Object
    • com.microsoft.azure.keyvault.ObjectIdentifier

public class ObjectIdentifier

The key vault object identifier.

Field Summary

Modifier and Type Field and Description
String baseIdentifier
String identifier
String name
String vault
String version

Constructor Summary

Constructor Description
ObjectIdentifier()

Constructor.

ObjectIdentifier(String collection, String identifier)

Constructor.

ObjectIdentifier(String vault, String collection, String name)

Constructor.

ObjectIdentifier(String vault, String collection, String name, String version)

Constructor.

Method Summary

Modifier and Type Method and Description
String baseIdentifier()
String getFullAuthority(URI uri)

Gets full authority for a URL by appending port to the url authority.

String identifier()
boolean isObjectIdentifier(String collection, String identifier)

Verifies whether the identifier belongs to a key vault object.

String name()
String toString()
String vault()
String verifyNonEmpty(String value, String argName)

Verifies a value is null or empty. Returns the value if non-empty and throws exception if empty.

String version()

Field Details

baseIdentifier

protected String baseIdentifier

identifier

protected String identifier

name

protected String name

vault

protected String vault

version

protected String version

Constructor Details

ObjectIdentifier

protected ObjectIdentifier()

Constructor.

ObjectIdentifier

protected ObjectIdentifier(String collection, String identifier)

Constructor.

Parameters:

collection - the object collection name. e.g. 'keys', 'secrets' and 'certificates'.
identifier - the object identifier.

ObjectIdentifier

protected ObjectIdentifier(String vault, String collection, String name)

Constructor.

Parameters:

vault - the vault url.
collection - the object collection name. e.g. 'keys', 'secrets' and 'certificates'.
name - the object name.

ObjectIdentifier

protected ObjectIdentifier(String vault, String collection, String name, String version)

Constructor.

Parameters:

vault - the vault url.
collection - the object collection name. e.g. 'keys', 'secrets' and 'certificates'.
name - the object name.
version - the object version.

Method Details

baseIdentifier

public String baseIdentifier()

Returns:

The base identifier for an object, does not include the object version.

getFullAuthority

protected String getFullAuthority(URI uri)

Gets full authority for a URL by appending port to the url authority.

Parameters:

uri - the URL to get the full authority for.

Returns:

the full authority.

identifier

public String identifier()

Returns:

The identifier for an object, includes the objects version.

isObjectIdentifier

protected static boolean isObjectIdentifier(String collection, String identifier)

Verifies whether the identifier belongs to a key vault object.

Parameters:

collection - the object collection e.g. 'keys', 'secrets' and 'certificates'.
identifier - the key vault object identifier.

Returns:

true if the identifier belongs to a key vault object. False otherwise.

name

public String name()

Returns:

The name of the object.

toString

public String toString()

vault

public String vault()

Returns:

The vault containing the object.

verifyNonEmpty

protected static String verifyNonEmpty(String value, String argName)

Verifies a value is null or empty. Returns the value if non-empty and throws exception if empty.

Parameters:

value - the value to verify.
argName - the name of the value.

Returns:

Returns the value if non-empty.

version

public String version()

Returns:

The version of the object.

Applies to