Package org.openwms.core.uaa.impl
Class Role.Builder
java.lang.Object
org.openwms.core.uaa.impl.Role.Builder
- Enclosing class:
Role
A builder class to construct Role instances.
- Author:
- Heiko Scherrer
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSet the Role to be immutable.build()
Finally build and return the Role instance.withDescription
(String description) Add a description text to the Role.
-
Field Details
-
role
-
-
Constructor Details
-
Builder
Create a new Builder.- Parameters:
name
- The name of the Role- Throws:
IllegalArgumentException
- when name is null or empty
-
-
Method Details
-
withDescription
Add a description text to the Role.- Parameters:
description
- as String- Returns:
- the builder instance
-
asImmutable
Set the Role to be immutable.- Returns:
- the builder instance
-
build
Finally build and return the Role instance.- Returns:
- the constructed Role
-