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 String
baseIdentifier
protected String
identifier
protected String
name
protected String
vault
protected String
version
-
Constructor Summary
Constructors Modifier Constructor Description protected
ObjectIdentifier()
Constructor.protected
ObjectIdentifier(String collection, String identifier)
Constructor.protected
ObjectIdentifier(String vault, String collection, String name)
Constructor.protected
ObjectIdentifier(String vault, String collection, String name, String version)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
baseIdentifier()
protected String
getFullAuthority(URI uri)
Gets full authority for a URL by appending port to the url authority.String
identifier()
protected static boolean
isObjectIdentifier(String collection, String identifier)
Verifies whether the identifier belongs to a key vault object.String
name()
String
toString()
String
vault()
protected static String
verifyNonEmpty(String value, String argName)
Verifies a value is null or empty.String
version()
-
-
-
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.
-
-