Class PromptScope
java.lang.Object
de.xima.fc.prompt.mgmt.service.PromptScope
- All Implemented Interfaces:
Serializable
The scope to which a prompt object can be assigned, consisting of the kind of scope and its ID within that kind.
- Since:
- 8.5.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()id()Gets the ID of the scope.kind()Gets the kind of the scope, e.g.static PromptScopeCreates a new scope instance for the project scope.static PromptScopeofSystem()Get a scope instance for the system scope.static PromptScopeCreates a new scope instance for the tenant scope.toString()static PromptScopeParses a prompt scope from its string representation, as returned bytoString().
-
Method Details
-
equals
-
hashCode
-
id
-
kind
Gets the kind of the scope, e.g. SYSTEM or TENANT.- Returns:
- The scope kind.
-
toString
-
ofTenant
Creates a new scope instance for the tenant scope.- Parameters:
tenantId- The ID of the tenant scope.- Returns:
- The prompt scope.
-
ofProject
Creates a new scope instance for the project scope.- Parameters:
projectId- The ID of the project scope.- Returns:
- The prompt scope.
-
ofSystem
Get a scope instance for the system scope.- Returns:
- The prompt scope.
-
valueOf
Parses a prompt scope from its string representation, as returned bytoString().- Parameters:
value- The string representation.- Returns:
- The parsed prompt scope, or null when the input is null or blank.
- Throws:
IllegalArgumentException- When the input string is malformed.
-