com.sap.ecm.api

## Interface EcmService

-     public interface EcmService

  Connects to a repository specified by `uniqueName`.
  See Also:
    `EcmFactory`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Session` | `connect(String uniqueName, String key)` Connects to a key-secured repository specified by `uniqueName`.
    `Session` | `connect(String uniqueName, String key, String destination)` Connects to a key-secured repository specified by `uniqueName` using a special destination.
    `Session` | `connect(String uniqueName, String key, String destination, Map<String,String> openCmisProperties)` Connects to a key-secured repository specified by `uniqueName` using a special destination and optional OpenCMIS parameters.
    `Session` | `connect(String uniqueName, String key, String destination, Map<String,String> openCmisProperties, List<String> additionalPrincipals)` Connects to a key-secured repository specified by `uniqueName` using a special destination and optional OpenCMIS parameters.
    `Session` | `connectForTenant(String uniqueName, String key, String tenantId, String user)` Connects to a key-secured repository specified by `uniqueName` with the given `tenant` and `user` using a special destination.
    `Session` | `connectForTenant(String uniqueName, String key, String tenantId, String user, Map<String,String> openCmisProperties)` Connects to a key-secured repository specified by `uniqueName` with the given `tenant` and `user` using a special destination and optional OpenCMIS parameters.
    `Session` | `connectForTenant(String uniqueName, String key, String tenantId, String user, Map<String,String> openCmisProperties, List<String> additionalPrincipals)` Connects to a key-secured repository specified by `uniqueName` with the given `tenant` and `user` using a special destination and optional OpenCMIS parameters.
    `Session` | `connectForUser(String uniqueName, String key, String user)` Connects to a key-secured repository specified by `uniqueName` with the given `user`.
    `Session` | `connectForUser(String uniqueName, String key, String destination, String user)` Connects to a key-secured repository specified by `uniqueName` with the given `user` using a special destination.
    `Session` | `connectForUser(String uniqueName, String key, String destination, String user, Map<String,String> openCmisProperties)` Connects to a key-secured repository specified by `uniqueName` with the given `user` using a special destination and optional OpenCMIS parameters.
    `Session` | `connectForUser(String uniqueName, String key, String destination, String user, Map<String,String> openCmisProperties, List<String> additionalPrincipals)` Connects to a key-secured repository specified by `uniqueName` with the given `user` using a special destination and optional OpenCMIS parameters.
    `String` | `createRepository(RepositoryOptions options)` Creates a new repository in the Document Service with the given options.
    `String` | `createRepository(RepositoryOptions options, String destination)` Creates a new repository in the Document Service with the given options and a destination.
    `void` | `deleteRepository(String uniqueName, String repositoryKey)` Deletes a repository for the current consuming account.
    `void` | `deleteRepository(String uniqueName, String repositoryKey, String destination)` Deletes a repository for the current consuming account.

- - ### Method Detail

    - #### connect

          Session connect(String uniqueName,
                        String key)
                          throws ServiceException,
                                 CmisObjectNotFoundException

      Connects to a key-secured repository specified by `uniqueName`. The `key` will be used to verify access to this repository.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
      See Also:
        `EcmFactory.connect(String, String)`

    - #### connect

          Session connect(String uniqueName,
                        String key,
                        String destination)
                          throws ServiceException,
                                 CmisObjectNotFoundException

      Connects to a key-secured repository specified by `uniqueName` using a special destination. The `key` will be used to verify access to this repository.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
      See Also:
        `EcmFactory.connect(String, String, String)`

    - #### connect

          Session connect(String uniqueName,
                        String key,
                        String destination,
                        Map<String,String> openCmisProperties)
                          throws ServiceException,
                                 CmisObjectNotFoundException

      Connects to a key-secured repository specified by `uniqueName` using a special destination and optional OpenCMIS parameters. The `key` will be used to verify access to this repository.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
      See Also:
        `EcmFactory.connect(String, String, String, Map)`

    - #### connect

          Session connect(String uniqueName,
                        String key,
                        String destination,
                        Map<String,String> openCmisProperties,
                        List<String> additionalPrincipals)
                          throws ServiceException,
                                 CmisObjectNotFoundException

      Connects to a key-secured repository specified by `uniqueName` using a special destination and optional OpenCMIS parameters. The `key` will be used to verify access to this repository. `additionalPrincipals` is a list of additional principals.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
      See Also:
        `EcmFactory.connect(String, String, String, Map, List)`

    - #### connectForUser

          Session connectForUser(String uniqueName,
                               String key,
                               String user)
                                 throws ServiceException,
                                        CmisObjectNotFoundException

      Connects to a key-secured repository specified by `uniqueName` with the given `user`. The `key` will be used to verify access to this repository.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
      See Also:
        `EcmFactory.connectForUser(String, String, String)`

    - #### connectForUser

          Session connectForUser(String uniqueName,
                               String key,
                               String destination,
                               String user)
                                 throws ServiceException,
                                        CmisObjectNotFoundException

      Connects to a key-secured repository specified by `uniqueName` with the given `user` using a special destination. The `key` will be used to verify access to this repository.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
      See Also:
        `EcmFactory.connectForUser(String, String, String, String)`

    - #### connectForUser

          Session connectForUser(String uniqueName,
                               String key,
                               String destination,
                               String user,
                               Map<String,String> openCmisProperties)
                                 throws ServiceException,
                                        CmisObjectNotFoundException

      Connects to a key-secured repository specified by `uniqueName` with the given `user` using a special destination and optional OpenCMIS parameters. The `key` will be used to verify access to this repository.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
      See Also:
        `EcmFactory.connectForUser(String, String, String, String, Map)`

    - #### connectForUser

          Session connectForUser(String uniqueName,
                               String key,
                               String destination,
                               String user,
                               Map<String,String> openCmisProperties,
                               List<String> additionalPrincipals)
                                 throws ServiceException,
                                        CmisObjectNotFoundException

      Connects to a key-secured repository specified by `uniqueName` with the given `user` using a special destination and optional OpenCMIS parameters. The `key` will be used to verify access to this repository. `additionalPrincipals` is a list of additional principals.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
      See Also:
        `EcmFactory.connectForUser(String, String, String, String, Map, List)`

    - #### connectForTenant

          Session connectForTenant(String uniqueName,
                                 String key,
                                 String tenantId,
                                 String user)
                                   throws ServiceException,
                                          CmisObjectNotFoundException

      Connects to a key-secured repository specified by `uniqueName` with the given `tenant` and `user` using a special destination. The `key` will be used to verify access to this repository.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
      See Also:
        `EcmFactory.connectForTenant(String, String, String, String)`

    - #### connectForTenant

          Session connectForTenant(String uniqueName,
                                 String key,
                                 String tenantId,
                                 String user,
                                 Map<String,String> openCmisProperties)
                                   throws ServiceException,
                                          CmisObjectNotFoundException

      Connects to a key-secured repository specified by `uniqueName` with the given `tenant` and `user` using a special destination and optional OpenCMIS parameters. The `key` will be used to verify access to this repository.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
      See Also:
        `EcmFactory.connectForTenant(String, String, String, String, Map)`

    - #### connectForTenant

          Session connectForTenant(String uniqueName,
                                 String key,
                                 String tenantId,
                                 String user,
                                 Map<String,String> openCmisProperties,
                                 List<String> additionalPrincipals)
                                   throws ServiceException,
                                          CmisObjectNotFoundException

      Connects to a key-secured repository specified by `uniqueName` with the given `tenant` and `user` using a special destination and optional OpenCMIS parameters. The `key` will be used to verify access to this repository. `additionalPrincipals` is a list of additional principals.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
      See Also:
        `EcmFactory.connectForTenant(String, String, String, String, Map, List)`

    - #### createRepository

          String createRepository(RepositoryOptions options)
                                  throws ServiceException,
                                         RepositoryAlreadyExistsException

      Creates a new repository in the Document Service with the given options.
      Throws:
        `ServiceException`
        `RepositoryAlreadyExistsException`
      See Also:
        `EcmFactory.createRepository(RepositoryOptions)`

    - #### createRepository

          String createRepository(RepositoryOptions options,
                                String destination)
                                  throws ServiceException,
                                         RepositoryAlreadyExistsException

      Creates a new repository in the Document Service with the given options and a destination.
      Throws:
        `ServiceException`
        `RepositoryAlreadyExistsException`
      See Also:
        `EcmFactory.createRepository(RepositoryOptions, String)`

    - #### deleteRepository

          void deleteRepository(String uniqueName,
                              String repositoryKey)
                                throws ServiceException,
                                       CmisObjectNotFoundException,
                                       RepositoryNotEmptyException

      Deletes a repository for the current consuming account. It can only be deleted if it does not contain any data.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
        `RepositoryNotEmptyException`
      See Also:
        `EcmFactory.deleteRepository(String, String)`

    - #### deleteRepository

          void deleteRepository(String uniqueName,
                              String repositoryKey,
                              String destination)
                                throws ServiceException,
                                       CmisObjectNotFoundException,
                                       RepositoryNotEmptyException

      Deletes a repository for the current consuming account. It can only be deleted if it does not contain any data.
      Throws:
        `ServiceException`
        `CmisObjectNotFoundException`
        `RepositoryNotEmptyException`
      See Also:
        `EcmFactory.deleteRepository(String, String, String)`

Copyright © 2016 SAP. All Rights Reserved.