Class PrivilegeDTO.Builder
java.lang.Object
org.apache.gravitino.dto.authorization.PrivilegeDTO.Builder
- Enclosing class:
- PrivilegeDTO
Builder for
PrivilegeDTO
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds an instance of PrivilegeDTO using the builder's properties.withCondition
(Privilege.Condition condition) Sets the condition of the privilege.withName
(Privilege.Name name) Sets the name of the privilege.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withName
Sets the name of the privilege.- Parameters:
name
- The name of the privilege.- Returns:
- The builder instance.
-
withCondition
Sets the condition of the privilege.- Parameters:
condition
- The condition of the privilege.- Returns:
- The builder instance.
-
build
Builds an instance of PrivilegeDTO using the builder's properties.- Returns:
- An instance of PrivilegeDTO.
- Throws:
IllegalArgumentException
- If the name or condition are not set.
-