Interface RepositoryService


@Path("/repository") @Consumes({"application/xml","application/json"}) @Produces({"application/xml","application/json"}) public interface RepositoryService
Provides access to the XL Deploy repository.
  • Method Summary

    Modifier and Type
    Method
    Description
    candidateValues(String propertyName, String namePattern, String idPattern, long page, long resultPerPage, com.xebialabs.deployit.plugin.api.udm.ConfigurationItem ci)
    Find candidate values for a property of a ConfigurationItem.
    com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
    construct(com.xebialabs.deployit.plugin.api.reflect.Type type)
    Composes CI prototype filled in with default values.
    com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
    copy(String ID, String newLocation)
    Copy a configuration item in the repository.
    com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
    create(String ID, ArtifactAndData artifactAndData)
    Creates a new artifact CI with data.
    com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
    create(String ID, com.xebialabs.deployit.plugin.api.udm.ConfigurationItem configurationItem)
    Creates a new configuration item.
    List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
    create(List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> configurationItems)
    Creates multiple configuration items.
    void
    Deletes a configuration item.
    void
    Deletes multiple configuration items from the repository.
    Checks if a configuration item exists.
    Checks if CI is a secure CI
    com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
    move(String ID, String newLocation)
    Moves a configuration item in the repository.
    query(com.xebialabs.deployit.plugin.api.reflect.Type type, String parent, String ancestor, String namePattern, org.joda.time.DateTime lastModifiedBefore, org.joda.time.DateTime lastModifiedAfter, long page, long resultPerPage)
    Retrieves configuration items by way of a query.
    queryV2(com.xebialabs.deployit.plugin.api.reflect.Type type, String parent, String ancestor, String namePattern, String idPattern, org.joda.time.DateTime lastModifiedBefore, org.joda.time.DateTime lastModifiedAfter, long page, long resultPerPage)
    Retrieves configuration items by way of a query.
    queryV3(com.xebialabs.deployit.plugin.api.reflect.Type type, String parent, String ancestor, String namePattern, String idPattern, org.joda.time.DateTime lastModifiedBefore, org.joda.time.DateTime lastModifiedAfter, long page, long resultPerPage, com.xebialabs.deployit.engine.api.dto.ConfigurationItemProperties properties)
     
    queryV3Extended(com.xebialabs.deployit.plugin.api.reflect.Type type, String parent, String ancestor, String namePattern, String idPattern, org.joda.time.DateTime lastModifiedBefore, org.joda.time.DateTime lastModifiedAfter, long page, long resultPerPage, com.xebialabs.deployit.engine.api.dto.ConfigurationItemProperties properties)
     
    com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
    Reads a configuration item from the repository.
    List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
    Reads multiple configuration items from the repository.
    com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
    Reads a configuration item from the repository.
    com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
    rename(String ID, String newName)
    Changes the name of a configuration item in the repository.
    com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
    update(String ID, ArtifactAndData artifactAndData)
    Modifies an artifact (upload new data) and returns the updated artifact if the the update was successful
    com.xebialabs.deployit.plugin.api.udm.ConfigurationItem
    update(String ID, com.xebialabs.deployit.plugin.api.udm.ConfigurationItem configurationItem)
    Modifies a configuration item and returns the updated CI if the the update was successful
    List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
    update(List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> configurationItems)
    Modifies multiple configuration items.
    List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
    validate(List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> cis)
    Validate the configuration items, returning any validation errors found.
  • Method Details

    • construct

      @GET @Path("ci/new") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem construct(@QueryParam("type") com.xebialabs.deployit.plugin.api.reflect.Type type)
      Composes CI prototype filled in with default values.
      Parameters:
      type - the type of the CI
      Returns:
      the CI prototype filled with default values, or a 404 error code if not found.
      Permission:
      login
    • read

      @GET @Path("ci/{ID:.+}") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem read(@PathParam("ID") String ID)
      Reads a configuration item from the repository.
      Parameters:
      ID - the ID of the CI
      Returns:
      the CI, or a 404 error code if not found.
      Permission:
      read
    • readByReferenceId

      @GET @Path("ci/id/{referenceId:.+}") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem readByReferenceId(@PathParam("referenceId") String referenceId)
      Reads a configuration item from the repository.
      Parameters:
      referenceId - the referenceId of the CI
      Returns:
      the CI, or a 404 error code if not found.
      Permission:
      read
    • create

      @POST @Path("ci/{ID:.+}") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem create(@PathParam("ID") String ID, com.xebialabs.deployit.plugin.api.udm.ConfigurationItem configurationItem)
      Creates a new configuration item.
      Parameters:
      ID - the ID/path of the new CI.
      configurationItem - the data of the CI.
      Returns:
      the newly created CI
      Permission:
      repo#edit
    • create

      @POST @Path("ci/{ID:.+}") @Consumes("multipart/form-data") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem create(@PathParam("ID") String ID, ArtifactAndData artifactAndData)
      Creates a new artifact CI with data.
      Parameters:
      ID - the ID/path of the new artifact.
      artifactAndData - the data of the artifact.
      Returns:
      the newly created artifact
      Permission:
      repo#edit
    • update

      @PUT @Path("ci/{ID:.+}") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem update(@PathParam("ID") String ID, com.xebialabs.deployit.plugin.api.udm.ConfigurationItem configurationItem)
      Modifies a configuration item and returns the updated CI if the the update was successful
      Parameters:
      ID - the ID of the CI to modify.
      configurationItem - the new data of the CI.
      Returns:
      the updated CI if update was successful
      RestDetails:
      otherwise returns a 409 error code if the CI has been updated on the server and you are sending modifications on an old version.
      Permission:
      repo#edit
      ApiDetails:
      otherwise throws a RuntimeException if the CI has been updated on the server and you are sending modifications on an old version.
    • update

      @PUT @Path("ci/{ID:.+}") @Consumes("multipart/form-data") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem update(@PathParam("ID") String ID, ArtifactAndData artifactAndData)
      Modifies an artifact (upload new data) and returns the updated artifact if the the update was successful
      Parameters:
      ID - the ID of the artifact to modify.
      artifactAndData - the new data of the artifact.
      Returns:
      the updated artifact if update was successful
      RestDetails:
      otherwise returns a 409 error code if the CI has been updated on the server and you are sending modifications on an old version.
      Permission:
      repo#edit
      ApiDetails:
      otherwise throws a RuntimeException if the CI has been updated on the server and you are sending modifications on an old version.
    • delete

      @DELETE @Path("ci/{ID:.+}") void delete(@PathParam("ID") String ID)
      Deletes a configuration item.
      Parameters:
      ID - the ID of the CI to delete.
      Permission:
      repo#edit, import#remove
    • deleteList

      @POST @Path("cis/delete") void deleteList(List<String> ids)
      Deletes multiple configuration items from the repository.
      Parameters:
      ids - the ids of the CIs
      Permission:
      repo#edit, import#remove
    • read

      @POST @Path("cis/read") List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> read(List<String> ids)
      Reads multiple configuration items from the repository.
      Parameters:
      ids - the ids of the CIs
      Returns:
      the CIs
      RestDetails:
      Returns a 404 error code if one of them was not found.
      Permission:
      read
      ApiDetails:
      Throws RuntimeException if one of them was not found.
    • create

      @POST @Path("cis") List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> create(List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> configurationItems)
      Creates multiple configuration items.
      Parameters:
      configurationItems - the data of the CIs.
      Returns:
      the newly created CIs
      Permission:
      repo#edit
    • update

      @PUT @Path("cis") List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> update(List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> configurationItems)
      Modifies multiple configuration items.
      Parameters:
      configurationItems - the new data of the CIs.
      Returns:
      the updated CIs if the update was successful
      RestDetails:
      Returns 409 error code if one of the CIs has been updated on the server and you are sending modifications on an old version.
      Permission:
      repo#edit
      ApiDetails:
      Throws RuntimeException if one of the CIs has been updated on the server and you are sending modifications on an old version.
    • exists

      @GET @Path("exists/{ID:.+}") Boolean exists(@PathParam("ID") String ID)
      Checks if a configuration item exists.
      Parameters:
      ID - the ID of the CI to check
      Returns:
      true if the CI exists, false if not.
    • move

      @POST @Path("move/{ID:.+}") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem move(@PathParam("ID") String ID, @QueryParam("newId") String newLocation)
      Moves a configuration item in the repository.
      Parameters:
      ID - the ID of the CI to move
      newLocation - the new ID of the CI, reflecting the path in the repository.
      Returns:
      the moved CI
      Permission:
      repo#edit
    • copy

      @POST @Path("copy/{ID:.+}") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem copy(@PathParam("ID") String ID, @QueryParam("newId") String newLocation)
      Copy a configuration item in the repository. The item as well as all its children are copied to the new location. The parent reflected in the new location, must be of the same type as that of the parent of the item being copied.
      Parameters:
      ID - the ID of the CI to copy
      newLocation - the new ID of the copied CI, reflecting the path in the repository.
      Returns:
      the copied CI
      Permission:
      repo#edit
    • rename

      @POST @Path("rename/{ID:.+}") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem rename(@PathParam("ID") String ID, @QueryParam("newName") String newName)
      Changes the name of a configuration item in the repository.
      Parameters:
      ID - the ID of the CI to rename
      newName - the new name.
      Returns:
      the renamed CI
      Permission:
      repo#edit
    • query

      @GET @Path("query") List<ConfigurationItemId> query(@QueryParam("type") com.xebialabs.deployit.plugin.api.reflect.Type type, @QueryParam("parent") String parent, @QueryParam("ancestor") String ancestor, @QueryParam("namePattern") String namePattern, @QueryParam("lastModifiedBefore") org.joda.time.DateTime lastModifiedBefore, @QueryParam("lastModifiedAfter") org.joda.time.DateTime lastModifiedAfter, @QueryParam("page") long page, @QueryParam("resultsPerPage") long resultPerPage)
      Retrieves configuration items by way of a query. All parameters are optional.
      Parameters:
      type - the type of the CI
      parent - the parent ID of the CI. If set, only the direct children of this CI are searched.
      ancestor - the ancestor ID of the CI. If set, only the subtree of this CI is searched.
      namePattern - a search pattern for the name. This is like the SQL "LIKE" pattern: the character '%' represents any string of zero or more characters, and the character '_' (underscore) represents any single character. Any literal use of these two characters must be escaped with a backslash ('\'). Consequently, any literal instance of a backslash must also be escaped, resulting in a double backslash ('\\').
      lastModifiedBefore - look for CIs modified before this date.
      lastModifiedAfter - look for CIs modified after this date.
      page - the desired page, in case of a paged query.
      resultPerPage - the page size, or -1 for no paging.
      Returns:
      a list of references to CIs
    • queryV2

      @GET @Path("v2/query") List<ConfigurationItemId> queryV2(@QueryParam("type") com.xebialabs.deployit.plugin.api.reflect.Type type, @QueryParam("parent") String parent, @QueryParam("ancestor") String ancestor, @QueryParam("namePattern") String namePattern, @QueryParam("idPattern") String idPattern, @QueryParam("lastModifiedBefore") org.joda.time.DateTime lastModifiedBefore, @QueryParam("lastModifiedAfter") org.joda.time.DateTime lastModifiedAfter, @QueryParam("page") long page, @QueryParam("resultsPerPage") long resultPerPage)
      Retrieves configuration items by way of a query. All parameters are optional.
      Parameters:
      type - the type of the CI
      parent - the parent ID of the CI. If set, only the direct children of this CI are searched.
      ancestor - the ancestor ID of the CI. If set, only the subtree of this CI is searched.
      namePattern - a search pattern for the name. This is like the SQL "LIKE" pattern: the character '%' represents any string of zero or more characters, and the character '_' (underscore) represents any single character. Any literal use of these two characters must be escaped with a backslash ('\'). Consequently, any literal instance of a backslash must also be escaped, resulting in a double backslash ('\\').
      idPattern - a search pattern for the id. This is like the SQL "LIKE" pattern: the character '%' represents any string of zero or more characters, and the character '_' (underscore) represents any single character. Any literal use of these two characters must be escaped with a backslash ('\'). Consequently, any literal instance of a backslash must also be escaped, resulting in a double backslash ('\\').
      lastModifiedBefore - look for CIs modified before this date.
      lastModifiedAfter - look for CIs modified after this date.
      page - the desired page, in case of a paged query.
      resultPerPage - the page size, or -1 for no paging.
      Returns:
      a list of references to CIs
    • queryV3

      @GET @Path("v3/query") List<ConfigurationItemId> queryV3(@QueryParam("type") com.xebialabs.deployit.plugin.api.reflect.Type type, @QueryParam("parent") String parent, @QueryParam("ancestor") String ancestor, @QueryParam("namePattern") String namePattern, @QueryParam("idPattern") String idPattern, @QueryParam("lastModifiedBefore") org.joda.time.DateTime lastModifiedBefore, @QueryParam("lastModifiedAfter") org.joda.time.DateTime lastModifiedAfter, @QueryParam("page") long page, @QueryParam("resultsPerPage") long resultPerPage, @QueryParam("properties") com.xebialabs.deployit.engine.api.dto.ConfigurationItemProperties properties)
    • queryV3Extended

      @GET @Path("v3/query-extended") List<ConfigurationItemIdAndReferenceId> queryV3Extended(@QueryParam("type") com.xebialabs.deployit.plugin.api.reflect.Type type, @QueryParam("parent") String parent, @QueryParam("ancestor") String ancestor, @QueryParam("namePattern") String namePattern, @QueryParam("idPattern") String idPattern, @QueryParam("lastModifiedBefore") org.joda.time.DateTime lastModifiedBefore, @QueryParam("lastModifiedAfter") org.joda.time.DateTime lastModifiedAfter, @QueryParam("page") long page, @QueryParam("resultsPerPage") long resultPerPage, @QueryParam("properties") com.xebialabs.deployit.engine.api.dto.ConfigurationItemProperties properties)
    • candidateValues

      @POST @Path("candidate-values") List<ConfigurationItemId> candidateValues(@QueryParam("propertyName") String propertyName, @QueryParam("namePattern") String namePattern, @QueryParam("idPattern") String idPattern, @QueryParam("page") long page, @QueryParam("resultsPerPage") long resultPerPage, com.xebialabs.deployit.plugin.api.udm.ConfigurationItem ci)
      Find candidate values for a property of a ConfigurationItem.
      Parameters:
      propertyName - the property name of the ConfigurationItem for which to find candidate values
      namePattern - a search pattern for the name. This is like the SQL "LIKE" pattern: the character '%' represents any string of zero or more characters, and the character '_' (underscore) represents any single character. Any literal use of these two characters must be escaped with a backslash ('\'). Consequently, any literal instance of a backslash must also be escaped, resulting in a double backslash ('\\').
      idPattern - a search pattern for the id. This is like the SQL "LIKE" pattern: the character '%' represents any string of zero or more characters, and the character '_' (underscore) represents any single character. Any literal use of these two characters must be escaped with a backslash ('\'). Consequently, any literal instance of a backslash must also be escaped, resulting in a double backslash ('\\'). * @param page the desired page, in case of a paged query.
      resultPerPage - the page size, or -1 for no paging.
      ci - The ConfigurationItem for which to find the candidate values
      Returns:
      a list of references to CIs
    • validate

      @POST @Path("validate") List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> validate(@LimitCiTreeDepth(0) List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> cis)
      Validate the configuration items, returning any validation errors found.
      Parameters:
      cis - The list of configuration items to valdiate.
      Returns:
      The validated configuration items, including any validation messages.
    • isSecure

      @GET @Path("is-secure/{ID:.+}") Boolean isSecure(@PathParam("ID") String id)
      Checks if CI is a secure CI
      Parameters:
      id - id of the CI to check
      Returns:
      true if the CI is a secure CI, false if not.