Package com.microsoft.azure.keyvault
Class ObjectIdentifier
- java.lang.Object
-
- com.microsoft.azure.keyvault.ObjectIdentifier
-
- Direct Known Subclasses:
CertificateIdentifier,CertificateOperationIdentifier,IssuerIdentifier,KeyIdentifier,SecretIdentifier
public class ObjectIdentifier extends Object
The key vault object identifier.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringbaseIdentifierprotected Stringidentifierprotected Stringnameprotected Stringvaultprotected Stringversion
-
Constructor Summary
Constructors Modifier Constructor Description protectedObjectIdentifier()Constructor.protectedObjectIdentifier(String collection, String identifier)Constructor.protectedObjectIdentifier(String vault, String collection, String name)Constructor.protectedObjectIdentifier(String vault, String collection, String name, String version)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbaseIdentifier()protected StringgetFullAuthority(URI uri)Gets full authority for a URL by appending port to the url authority.Stringidentifier()protected static booleanisObjectIdentifier(String collection, String identifier)Verifies whether the identifier belongs to a key vault object.Stringname()StringtoString()Stringvault()protected static StringverifyNonEmpty(String value, String argName)Verifies a value is null or empty.Stringversion()
-
-
-
Constructor Detail
-
ObjectIdentifier
protected ObjectIdentifier()
Constructor.
-
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 Detail
-
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.
-
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.
-
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.
-
baseIdentifier
public String baseIdentifier()
- Returns:
- The base identifier for an object, does not include the object version.
-
identifier
public String identifier()
- Returns:
- The identifier for an object, includes the objects version.
-
name
public String name()
- Returns:
- The name of the object.
-
vault
public String vault()
- Returns:
- The vault containing the object.
-
version
public String version()
- Returns:
- The version of the object.
-
-