Package com.xebialabs.deployit.plugin.api.services

## Interface Repository

- All Superinterfaces:
    `ReadOnlyRepository`

      public interface Repository
      extends ReadOnlyRepository

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `<T extends ConfigurationItem> void` | `create​(T... entity)` |
    `<T extends ConfigurationItem> void` | `createOrUpdate​(T... entity)` |
    `void` | `delete​(java.lang.String... id)` |
    `boolean` | `exists​(java.lang.String id)` |
    `void` | `move​(java.lang.String id, java.lang.String newId)` |
    `<T extends ConfigurationItem> T` | `read​(java.lang.String id)` | Returns an item by given id.
    `<T extends ConfigurationItem> java.util.List<T>` | `read​(java.util.List<java.lang.String> ids, java.lang.Integer depth)` |
    `void` | `rename​(java.lang.String id, java.lang.String newName)` |
    `<T extends ConfigurationItem> java.util.List<T>` | `search​(Type type)` | Search for all `ConfigurationItem`s of the specified `Type`.
    `<T extends ConfigurationItem> java.util.List<T>` | `search​(Type type, java.lang.String parent)` | Search for all `ConfigurationItem`s of the specified `Type` under a parent node
    `<T extends ConfigurationItem> void` | `update​(T... entity)` |

- - ### Method Detail

    - #### exists

          boolean exists​(java.lang.String id)

    - #### read

          <T extends ConfigurationItem> T read​(java.lang.String id)

      Returns an item by given id. Throws a `RuntimeException` when there is no such item in repository.
      Specified by:
        `read` in interface `ReadOnlyRepository`
      Parameters:
        `id` - The id of the `ConfigurationItem` to read.
      Returns:
        The read `ConfigurationItem`

    - #### read

          <T extends ConfigurationItem> java.util.List<T> read​(java.util.List<java.lang.String> ids,
                                                               java.lang.Integer depth)

    - #### create

          <T extends ConfigurationItem> void create​(T... entity)

    - #### update

          <T extends ConfigurationItem> void update​(T... entity)

    - #### createOrUpdate

          <T extends ConfigurationItem> void createOrUpdate​(T... entity)

    - #### delete

          void delete​(java.lang.String... id)

    - #### move

          void move​(java.lang.String id,
                    java.lang.String newId)

    - #### rename

          void rename​(java.lang.String id,
                      java.lang.String newName)

    - #### search

          <T extends ConfigurationItem> java.util.List<T> search​(Type type)

      Search for all `ConfigurationItem`s of the specified `Type`.
      Specified by:
        `search` in interface `ReadOnlyRepository`
      Parameters:
        `type` - The `Type` of the `ConfigurationItem`s to search for.
      Returns:
        A `List` of `ConfigurationItem`s of the `Type` passed in.

    - #### search

          <T extends ConfigurationItem> java.util.List<T> search​(Type type,
                                                                 java.lang.String parent)

      Search for all `ConfigurationItem`s of the specified `Type` under a parent node
      Specified by:
        `search` in interface `ReadOnlyRepository`
      Parameters:
        `type` - The `Type` of the `ConfigurationItem`s to search for.
        `parent` - The id of the parent node under which to search.
      Returns:
        A `List` of `ConfigurationItem`s of the `Type` which are located under the parent node.