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

# Interface Repository

All Superinterfaces:
  `ReadOnlyRepository`

public interface Repository extends ReadOnlyRepository

- ## Method Summary

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

- ## Method Details

  - ### exists

    boolean exists(String id)

  - ### read

    <T extends ConfigurationItem> T read(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> List<T> read(List<String> ids, 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(String... id)

  - ### move

    void move(String id, String newId)

  - ### rename

    void rename(String id, String newName)

  - ### search

    <T extends ConfigurationItem> 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> List<T> search(Type type, 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.