com.holonplatform.auth

## Interface Account.Builder

- Enclosing interface:
    Account

      public static interface Account.Builder

  Builder to create `Account` instances.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `Account` | `build()` Build Account instance
    `Account.Builder` | `credentials(Credentials credentials)` Set Account credentials as a `Credentials` object
    `Account.Builder` | `credentials(Object credentials)` Set Account credentials
    `Account.Builder` | `detail(String key, Object value)` Add (or replace if given key already exists) an Account detail
    `Account.Builder` | `details(Map<String,Object> details)` Set Account details.
    `Account.Builder` | `enabled(boolean enabled)` Set whether is enabled (default is `true`)
    `Account.Builder` | `expired(boolean expired)` Set whether has expired
    `Account.Builder` | `locked(boolean locked)` Set whether is locked
    `Account.Builder` | `permission(Permission permission)` Add a permission granted to Account
    `Account.Builder` | `permission(String permission)` Add a permission granted to Account using String representation.
    `Account.Builder` | `permissions(Collection<Permission> permissions)` Set permissions granted to Account.
    `Account.Builder` | `permissionStrings(Collection<String> permissions)` Set permissions granted to Account using String representations.
    `default Account.Builder` | `permissionStrings(String... permissions)` Set permissions granted to Account using String representations.
    `Account.Builder` | `root(boolean root)` Set whether Account is considered a `root` principal, for which permission checking is always skipped, assuming that any permission is granted.

- - ### Method Detail

    - #### root

          Account.Builder root(boolean root)

      Set whether Account is considered a `root` principal, for which permission checking is always skipped, assuming that any permission is granted.
      Parameters:
        `root` - `true` to set Account as `root` principal
      Returns:
        this

    - #### details

          Account.Builder details(Map<String,Object> details)

      Set Account details. Any previously setted detail will be discarded.
      Parameters:
        `details` - the details to set
      Returns:
        this

    - #### detail

          Account.Builder detail(String key,
                                 Object value)

      Add (or replace if given key already exists) an Account detail
      Parameters:
        `key` - Key
        `value` - Value
      Returns:
        this

    - #### permissions

          Account.Builder permissions(Collection<Permission> permissions)

      Set permissions granted to Account. Any previously setted Permission will be discarded.
      Parameters:
        `permissions` - the permissions to set
      Returns:
        this

    - #### permission

          Account.Builder permission(Permission permission)

      Add a permission granted to Account
      Parameters:
        `permission` - Permission to add
      Returns:
        this

    - #### permissionStrings

          Account.Builder permissionStrings(Collection<String> permissions)

      Set permissions granted to Account using String representations. Any previously setted Permission will be discarded.
      Parameters:
        `permissions` - the permissions strings to set
      Returns:
        this

    - #### permissionStrings

          default Account.Builder permissionStrings(String... permissions)

      Set permissions granted to Account using String representations. Any previously setted Permission will be discarded.
      Parameters:
        `permissions` - the permissions strings to set
      Returns:
        this

    - #### permission

          Account.Builder permission(String permission)

      Add a permission granted to Account using String representation.
      Parameters:
        `permission` - Permission string to add
      Returns:
        this

    - #### enabled

          Account.Builder enabled(boolean enabled)

      Set whether is enabled (default is `true`)
      Parameters:
        `enabled` - `true` if enabled
      Returns:
        this

    - #### locked

          Account.Builder locked(boolean locked)

      Set whether is locked
      Parameters:
        `locked` - `true` if locked
      Returns:
        this

    - #### expired

          Account.Builder expired(boolean expired)

      Set whether has expired
      Parameters:
        `expired` - `true` if expired
      Returns:
        this

    - #### credentials

          Account.Builder credentials(Credentials credentials)

      Set Account credentials as a `Credentials` object
      Parameters:
        `credentials` - Credentials to set
      Returns:
        this
      See Also:
        `Credentials.builder()`

    - #### credentials

          Account.Builder credentials(Object credentials)

      Set Account credentials
      Parameters:
        `credentials` - Credentials to set
      Returns:
        this

    - #### build

          Account build()

      Build Account instance
      Returns:
        Account

Copyright © 2017 The Holon Platform. All rights reserved.