Class ApplicationKey

java.lang.Object
com.atlassian.application.api.ApplicationKey
All Implemented Interfaces:
Serializable

public final class ApplicationKey extends Object implements Serializable
Represents the identifier to an Application. An ApplicationKey must match the the regular expression [a-zA-Z.]+. It is case-preserving but not case-sensitive. For example, ApplicationKey.valueOf("ABC").equals(ApplicationKey.valueOf("aBc")) evaluates to true.
Since:
1.0
See Also:
  • Method Details

    • value

      @Nonnull public String value()
      Return the String key used to create the ApplicationKey.
      Returns:
      the String key used to create the ApplicationKey.
    • equals

      public boolean equals(Object x)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • valueOf

      public static ApplicationKey valueOf(String key)
      Create a new ApplicationKey. The passed key must match the regex [a-zA-Z.]+.
      Parameters:
      key - the string for the ApplicationKey.
      Returns:
      the new ApplicationKey
      Throws:
      IllegalArgumentException - if key is invalid.
    • isValid

      public static boolean isValid(@Nullable String key)
      Indicate if the passed key is valid.
      Parameters:
      key - the key to check.
      Returns:
      true if the passed key is valid.