Class Role.Builder

java.lang.Object
org.openwms.core.uaa.impl.Role.Builder
Enclosing class:
Role

public static class Role.Builder extends Object
A builder class to construct Role instances.
Author:
Heiko Scherrer
  • Field Details Link icon

    • role Link icon

      private final Role role
  • Constructor Details Link icon

    • Builder Link icon

      public Builder(String name)
      Create a new Builder.
      Parameters:
      name - The name of the Role
      Throws:
      IllegalArgumentException - when name is null or empty
  • Method Details Link icon

    • withDescription Link icon

      public Role.Builder withDescription(String description)
      Add a description text to the Role.
      Parameters:
      description - as String
      Returns:
      the builder instance
    • asImmutable Link icon

      public Role.Builder asImmutable()
      Set the Role to be immutable.
      Returns:
      the builder instance
    • build Link icon

      public Role build()
      Finally build and return the Role instance.
      Returns:
      the constructed Role