Package com.enonic.xp.context

## Class ContextBuilder

- java.lang.Object
- - com.enonic.xp.context.ContextBuilder

-     @PublicApi
      public final class ContextBuilder
      extends Object

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ContextBuilder` | `attribute​(String key, Object value)` |
    `<T> ContextBuilder` | `attribute​(T value)` |
    `ContextBuilder` | `authInfo​(AuthenticationInfo value)` |
    `ContextBuilder` | `branch​(Branch value)` |
    `ContextBuilder` | `branch​(String value)` |
    `Context` | `build()` |
    `static ContextBuilder` | `copyOf​(Context context)` |
    `static ContextBuilder` | `create()` |
    `ContextBuilder` | `detachSession()` | Deprecated.
    `static ContextBuilder` | `from​(Context parent)` |
    `ContextBuilder` | `repositoryId​(RepositoryId value)` |
    `ContextBuilder` | `repositoryId​(String value)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### repositoryId

          public ContextBuilder repositoryId​(String value)

    - #### repositoryId

          public ContextBuilder repositoryId​(RepositoryId value)

    - #### branch

          public ContextBuilder branch​(String value)

    - #### branch

          public ContextBuilder branch​(Branch value)

    - #### authInfo

          public ContextBuilder authInfo​(AuthenticationInfo value)

    - #### attribute

          public ContextBuilder attribute​(String key,
                                          Object value)

    - #### attribute

          public <T> ContextBuilder attribute​(T value)

    - #### detachSession

          @Deprecated
          public ContextBuilder detachSession()

      Deprecated.

    - #### build

          public Context build()

    - #### create

          public static ContextBuilder create()

    - #### from

          public static ContextBuilder from​(Context parent)

    - #### copyOf

          public static ContextBuilder copyOf​(Context context)