Package org.eclipse.emf.cdo.server

## Class CDOServerUtil

- java.lang.Object
- - org.eclipse.emf.cdo.server.CDOServerUtil

-     public final class CDOServerUtil
      extends java.lang.Object

  Various static methods that may help with CDO `repositories` and server-side `views`.
  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `CDOServerUtil.RepositoryReadAccessValidator` | An abstract `read-access handler` that grants or denies access to single `revisions`.

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `addRepository​(org.eclipse.net4j.util.container.IManagedContainer container, IRepository repository)` |
    `static ISynchronizableRepository` | `createFailoverParticipant​(java.lang.String name, IStore store, java.util.Map<java.lang.String,​java.lang.String> props)` |
    `static ISynchronizableRepository` | `createFailoverParticipant​(java.lang.String name, IStore store, java.util.Map<java.lang.String,​java.lang.String> props, IRepositorySynchronizer synchronizer)` |
    `static ISynchronizableRepository` | `createFailoverParticipant​(java.lang.String name, IStore store, java.util.Map<java.lang.String,​java.lang.String> props, IRepositorySynchronizer synchronizer, boolean master)` |
    `static ISynchronizableRepository` | `createFailoverParticipant​(java.lang.String name, IStore store, java.util.Map<java.lang.String,​java.lang.String> props, IRepositorySynchronizer synchronizer, boolean master, boolean allowBackupCommits)` |
    `static ISynchronizableRepository` | `createOfflineClone​(java.lang.String name, IStore store, java.util.Map<java.lang.String,​java.lang.String> props, IRepositorySynchronizer synchronizer)` |
    `static IRepository` | `createRepository​(java.lang.String name, IStore store, java.util.Map<java.lang.String,​java.lang.String> props)` |
    `static IRepositorySynchronizer` | `createRepositorySynchronizer​(CDOSessionConfigurationFactory remoteSessionConfigurationFactory)` |
    `static ISessionManager` | `createSessionManager()` |
    `static void` | `execute​(ISession context, java.lang.Runnable runnable)` |
    `static void` | `execute​(CDOSession context, java.util.function.Consumer<ISession> consumer)` |
    `static IRepository` | `getRepository​(java.lang.String uuid)` |
    `static IRepository` | `getRepository​(CDOSession session)` |
    `static IRepository` | `getRepository​(org.eclipse.net4j.util.container.IManagedContainer container, java.lang.String name)` |
    `static org.w3c.dom.Element` | `getRepositoryConfig​(java.lang.String repositoryName)` |
    `static ISession` | `getServerSession​(CDOSession session)` |
    `static ISession` | `getServerSession​(CDOView view)` |
    `static ITransaction` | `getServerTransaction​(CDOTransaction transaction)` |
    `static IView` | `getServerView​(CDOView view)` |
    `static CDOView` | `openView​(ISession session, CDOBranchPoint branchPoint)` |
    `static CDOView` | `openView​(ISession session, CDOBranchPoint branchPoint, boolean legacyModeEnabled)` | Deprecated. As of 4.2 the legacy mode is always enabled, use `openView(ISession, CDOBranchPoint)`.
    `static CDOView` | `openView​(ISession session, CDOBranchPoint branchPoint, boolean legacyModeEnabled, CDORevisionProvider revisionProvider)` | Deprecated. As of 4.2 the legacy mode is always enabled, use `openView(ISession, CDOBranchPoint, CDORevisionProvider)`.
    `static CDOView` | `openView​(ISession session, CDOBranchPoint branchPoint, CDORevisionProvider revisionProvider)` |
    `static CDOView` | `openView​(IStoreAccessor.CommitContext commitContext)` |
    `static CDOView` | `openView​(IStoreAccessor.CommitContext commitContext, boolean legacyModeEnabled)` | Deprecated. As of 4.2 the legacy mode is always enabled, use `openView(IStoreAccessor.CommitContext)`.
    `static CDOView` | `openView​(IView view)` |
    `static CDOView` | `openView​(IView view, boolean legacyModeEnabled)` | Deprecated. As of 4.2 the legacy mode is always enabled, use `openView(IView)`.

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

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

- - ### Method Detail

    - #### openView

          public static CDOView openView​(ISession session,
                                         CDOBranchPoint branchPoint,
                                         CDORevisionProvider revisionProvider)

      Since:
        4.2

    - #### openView

          public static CDOView openView​(ISession session,
                                         CDOBranchPoint branchPoint)

      Since:
        4.2

    - #### openView

          public static CDOView openView​(IView view)

      Since:
        4.2

    - #### openView

          public static CDOView openView​(IStoreAccessor.CommitContext commitContext)

      Since:
        4.2

    - #### openView

          @Deprecated
          public static CDOView openView​(ISession session,
                                         CDOBranchPoint branchPoint,
                                         boolean legacyModeEnabled,
                                         CDORevisionProvider revisionProvider)

      Deprecated.
      As of 4.2 the legacy mode is always enabled, use `openView(ISession, CDOBranchPoint, CDORevisionProvider)`.
      Since:
        4.0

    - #### openView

          @Deprecated
          public static CDOView openView​(ISession session,
                                         CDOBranchPoint branchPoint,
                                         boolean legacyModeEnabled)

      Deprecated.
      As of 4.2 the legacy mode is always enabled, use `openView(ISession, CDOBranchPoint)`.
      Since:
        4.0

    - #### openView

          @Deprecated
          public static CDOView openView​(IView view,
                                         boolean legacyModeEnabled)

      Deprecated.
      As of 4.2 the legacy mode is always enabled, use `openView(IView)`.
      Since:
        4.0

    - #### openView

          @Deprecated
          public static CDOView openView​(IStoreAccessor.CommitContext commitContext,
                                         boolean legacyModeEnabled)

      Deprecated.
      As of 4.2 the legacy mode is always enabled, use `openView(IStoreAccessor.CommitContext)`.
      Since:
        4.0

    - #### getServerTransaction

          public static ITransaction getServerTransaction​(CDOTransaction transaction)

      Since:
        4.13

    - #### getServerView

          public static IView getServerView​(CDOView view)

      Since:
        4.13

    - #### getServerSession

          public static ISession getServerSession​(CDOView view)

      Since:
        4.11

    - #### getServerSession

          public static ISession getServerSession​(CDOSession session)

      Since:
        4.13

    - #### createSessionManager

          public static ISessionManager createSessionManager()

      Since:
        3.0

    - #### createRepository

          public static IRepository createRepository​(java.lang.String name,
                                                     IStore store,
                                                     java.util.Map<java.lang.String,​java.lang.String> props)

    - #### createRepositorySynchronizer

          public static IRepositorySynchronizer createRepositorySynchronizer​(CDOSessionConfigurationFactory remoteSessionConfigurationFactory)

      Since:
        3.0

    - #### createOfflineClone

          public static ISynchronizableRepository createOfflineClone​(java.lang.String name,
                                                                     IStore store,
                                                                     java.util.Map<java.lang.String,​java.lang.String> props,
                                                                     IRepositorySynchronizer synchronizer)

      Since:
        3.0

    - #### createFailoverParticipant

          public static ISynchronizableRepository createFailoverParticipant​(java.lang.String name,
                                                                            IStore store,
                                                                            java.util.Map<java.lang.String,​java.lang.String> props,
                                                                            IRepositorySynchronizer synchronizer,
                                                                            boolean master,
                                                                            boolean allowBackupCommits)

      Since:
        4.0

    - #### createFailoverParticipant

          public static ISynchronizableRepository createFailoverParticipant​(java.lang.String name,
                                                                            IStore store,
                                                                            java.util.Map<java.lang.String,​java.lang.String> props,
                                                                            IRepositorySynchronizer synchronizer,
                                                                            boolean master)

      Since:
        3.0

    - #### createFailoverParticipant

          public static ISynchronizableRepository createFailoverParticipant​(java.lang.String name,
                                                                            IStore store,
                                                                            java.util.Map<java.lang.String,​java.lang.String> props,
                                                                            IRepositorySynchronizer synchronizer)

      Since:
        4.0

    - #### createFailoverParticipant

          public static ISynchronizableRepository createFailoverParticipant​(java.lang.String name,
                                                                            IStore store,
                                                                            java.util.Map<java.lang.String,​java.lang.String> props)

      Since:
        4.0

    - #### addRepository

          public static void addRepository​(org.eclipse.net4j.util.container.IManagedContainer container,
                                           IRepository repository)

    - #### getRepository

          public static IRepository getRepository​(org.eclipse.net4j.util.container.IManagedContainer container,
                                                  java.lang.String name)

    - #### getRepository

          public static IRepository getRepository​(java.lang.String uuid)

      Since:
        4.13

    - #### getRepository

          public static IRepository getRepository​(CDOSession session)

      Since:
        4.13

    - #### getRepositoryConfig

          public static org.w3c.dom.Element getRepositoryConfig​(java.lang.String repositoryName)
                                                         throws javax.xml.parsers.ParserConfigurationException,
                                                                org.xml.sax.SAXException,
                                                                java.io.IOException

      Throws:
        `javax.xml.parsers.ParserConfigurationException`
        `org.xml.sax.SAXException`
        `java.io.IOException`

    - #### execute

          public static void execute​(ISession context,
                                     java.lang.Runnable runnable)

      Since:
        4.13

    - #### execute

          public static void execute​(CDOSession context,
                                     java.util.function.Consumer<ISession> consumer)

      Since:
        4.13