Package de.xima.fc.prompt.mgmt.service
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'sscopeand its uniqueUUIDwithin that scope. The scope itself can be the system scope, a tenant scope, or a project scope; and is identified by itskindand an ID within that kind.- Since:
- 8.5.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()static PromptObjectIdentifierof(PromptScope scope, UUID uuid)Creates a new prompt object identifier with the given assignee and UUID.static PromptObjectIdentifierofConnectionData(PromptConnectionData data)Creates a new prompt object identifier for the given prompt connection data.static PromptObjectIdentifierofQueryData(PromptQueryData data)Creates a new prompt object identifier for the given prompt query data.PromptScopescope()Gets the assignee of the prompt object.StringtoString()Returns a machine-readable string representation of this prompt object identifier, that can be parsed back usingvalueOf(String).UUIDuuid()Gets the UUID of the prompt object.static PromptObjectIdentifiervalueOf(String value)Parses a prompt object identifier from its string representation, as returned bytoString().
-
-
-
Method Detail
-
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 usingvalueOf(String).
-
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 bytoString().- 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.
-
-