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

    • role

      private final Role role
  • Constructor Details

    • Builder

      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

    • withDescription

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

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

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