Class PromptObjectIdentifier

java.lang.Object
de.xima.fc.prompt.mgmt.service.PromptObjectIdentifier
All Implemented Interfaces:
Serializable

public final class PromptObjectIdentifier extends Object implements Serializable
The identifier of a prompt object, i.e. a prompt connection or a prompt query. A prompt object is identified uniquely by this prompt object identifier that consists of the object's scope and its unique UUID within that scope. The scope itself can be the system scope, a tenant scope, or a project scope; and is identified by its kind and an ID within that kind.
Since:
8.5.0
See Also:
  • Method Details

    • equals

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

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

      public PromptScope scope()
      Gets the assignee of the prompt object.
      Returns:
      The assignee.
    • toString

      public String toString()
      Returns a machine-readable string representation of this prompt object identifier, that can be parsed back using valueOf(String).
      Overrides:
      toString in class Object
      Returns:
      The string representation.
    • uuid

      public UUID uuid()
      Gets the UUID of the prompt object.
      Returns:
      The UUID.
    • of

      public static PromptObjectIdentifier of(PromptScope scope, UUID uuid)
      Creates a new prompt object identifier with the given assignee and UUID.
      Parameters:
      scope - The scope to which the prompt object assigned.
      uuid - The UUID of the prompt object.
      Returns:
      The prompt object identifier.
    • ofConnectionData

      public static PromptObjectIdentifier ofConnectionData(PromptConnectionData data)
      Creates a new prompt object identifier for the given prompt connection data.
      Parameters:
      data - The prompt connection data.
      Returns:
      The prompt object identifier.
    • ofQueryData

      public static PromptObjectIdentifier ofQueryData(PromptQueryData data)
      Creates a new prompt object identifier for the given prompt query data.
      Parameters:
      data - The prompt query data.
      Returns:
      The prompt object identifier.
    • valueOf

      public static PromptObjectIdentifier valueOf(String value)
      Parses a prompt object identifier from its string representation, as returned by toString().
      Parameters:
      value - The string representation.
      Returns:
      The prompt object identifier, or null if the value is null or blank.
      Throws:
      IllegalArgumentException - If the value is not in the correct format.