org.openwms.core.domain.system.usermanagement
Class Role.Builder

java.lang.Object
  extended by org.openwms.core.domain.system.usermanagement.Role.Builder
Enclosing class:
Role

public static class Role.Builder
extends Object

A builder class to construct Role instances.

Since:
0.1
Version:
$Revision: 1595 $
Author:
Heiko Scherrer

Constructor Summary
Role.Builder(String name)
          Create a new Builder.
 
Method Summary
 Role build()
          Finally build and return the Role instance.
 Role.Builder setImmutable(Boolean immutable)
          Set the Role to be immutable.
 Role.Builder withDescription(String description)
          Add a description text to the Role.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Role.Builder

public Role.Builder(String name)
Create a new Builder.

Parameters:
name - The name of the Role
Throws:
IllegalArgumentException - when name is null or empty
Method Detail

withDescription

public Role.Builder withDescription(String description)
Add a description text to the Role.

Parameters:
description - as String
Returns:
the builder instance

setImmutable

public Role.Builder setImmutable(Boolean immutable)
Set the Role to be immutable.

Parameters:
immutable - true if immutable, otherwise false
Returns:
the builder instance

build

public Role build()
Finally build and return the Role instance.

Returns:
the constructed Role


Copyright © 2005-2011 openwms.org. All Rights Reserved.