Class ObjectIdentifier

    • Field Detail

      • vault

        protected String vault
      • version

        protected String version
      • baseIdentifier

        protected String baseIdentifier
      • identifier

        protected String identifier
    • 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.
      • ObjectIdentifier

        protected ObjectIdentifier​(String collection,
                                   String identifier)
        Constructor.
        Parameters:
        collection - the object collection name. e.g. 'keys', 'secrets' and 'certificates'.
        identifier - the object identifier.
    • 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.