Interface RepositoryService
-
@Path("/repository") @Consumes({"application/xml","application/json"}) @Produces({"application/xml","application/json"}) public interface RepositoryServiceProvides access to the XL Deploy repository.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<ConfigurationItemId>candidateValues(java.lang.String propertyName, java.lang.String namePattern, java.lang.String idPattern, long page, long resultPerPage, com.xebialabs.deployit.plugin.api.udm.ConfigurationItem ci)Find candidate values for a property of aConfigurationItem.com.xebialabs.deployit.plugin.api.udm.ConfigurationItemconstruct(com.xebialabs.deployit.plugin.api.reflect.Type type)Composes CI prototype filled in with default values.com.xebialabs.deployit.plugin.api.udm.ConfigurationItemcopy(java.lang.String ID, java.lang.String newLocation)Copy a configuration item in the repository.com.xebialabs.deployit.plugin.api.udm.ConfigurationItemcreate(java.lang.String ID, ArtifactAndData artifactAndData)Creates a new artifact CI with data.com.xebialabs.deployit.plugin.api.udm.ConfigurationItemcreate(java.lang.String ID, com.xebialabs.deployit.plugin.api.udm.ConfigurationItem configurationItem)Creates a new configuration item.java.util.List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>create(java.util.List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> configurationItems)Creates multiple configuration items.voiddelete(java.lang.String ID)Deletes a configuration item.voiddeleteList(java.util.List<java.lang.String> ids)Deletes multiple configuration items from the repository.java.lang.Booleanexists(java.lang.String ID)Checks if a configuration item exists.java.lang.BooleanisSecure(java.lang.String id)Checks if CI is a secure CIcom.xebialabs.deployit.plugin.api.udm.ConfigurationItemmove(java.lang.String ID, java.lang.String newLocation)Moves a configuration item in the repository.java.util.List<ConfigurationItemId>query(com.xebialabs.deployit.plugin.api.reflect.Type type, java.lang.String parent, java.lang.String ancestor, java.lang.String namePattern, org.joda.time.DateTime lastModifiedBefore, org.joda.time.DateTime lastModifiedAfter, long page, long resultPerPage)Retrieves configuration items by way of a query.java.util.List<ConfigurationItemId>queryV2(com.xebialabs.deployit.plugin.api.reflect.Type type, java.lang.String parent, java.lang.String ancestor, java.lang.String namePattern, java.lang.String idPattern, org.joda.time.DateTime lastModifiedBefore, org.joda.time.DateTime lastModifiedAfter, long page, long resultPerPage)Retrieves configuration items by way of a query.java.util.List<ConfigurationItemId>queryV3(com.xebialabs.deployit.plugin.api.reflect.Type type, java.lang.String parent, java.lang.String ancestor, java.lang.String namePattern, java.lang.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.ConfigurationItemread(java.lang.String ID)Reads a configuration item from the repository.java.util.List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>read(java.util.List<java.lang.String> ids)Reads multiple configuration items from the repository.com.xebialabs.deployit.plugin.api.udm.ConfigurationItemrename(java.lang.String ID, java.lang.String newName)Changes the name of a configuration item in the repository.com.xebialabs.deployit.plugin.api.udm.ConfigurationItemupdate(java.lang.String ID, ArtifactAndData artifactAndData)Modifies an artifact (upload new data) and returns the updated artifact if the the update was successfulcom.xebialabs.deployit.plugin.api.udm.ConfigurationItemupdate(java.lang.String ID, com.xebialabs.deployit.plugin.api.udm.ConfigurationItem configurationItem)Modifies a configuration item and returns the updated CI if the the update was successfuljava.util.List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>update(java.util.List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> configurationItems)Modifies multiple configuration items.java.util.List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>validate(java.util.List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> cis)Validate the configuration items, returning any validation errors found.
-
-
-
Method Detail
-
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
404error code if not found. - Permission:
- login
-
read
@GET @Path("ci/{ID:.+}") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem read(@PathParam("ID") java.lang.String ID)Reads a configuration item from the repository.- Parameters:
ID- the ID of the CI- Returns:
- the CI, or a
404error code if not found. - Permission:
- read
-
create
@POST @Path("ci/{ID:.+}") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem create(@PathParam("ID") java.lang.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") java.lang.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") java.lang.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
409error 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
RuntimeExceptionif 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") java.lang.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
409error 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
RuntimeExceptionif 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") java.lang.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(java.util.List<java.lang.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") java.util.List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> read(java.util.List<java.lang.String> ids)Reads multiple configuration items from the repository.- Parameters:
ids- the ids of the CIs- Returns:
- the CIs
- RestDetails:
- Returns a
404error code if one of them was not found. - Permission:
- read
- ApiDetails:
- Throws
RuntimeExceptionif one of them was not found.
-
create
@POST @Path("cis") java.util.List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> create(java.util.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") java.util.List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> update(java.util.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
409error 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
RuntimeExceptionif one of the CIs has been updated on the server and you are sending modifications on an old version.
-
exists
@GET @Path("exists/{ID:.+}") java.lang.Boolean exists(@PathParam("ID") java.lang.String ID)Checks if a configuration item exists.- Parameters:
ID- the ID of the CI to check- Returns:
trueif the CI exists,falseif not.
-
move
@POST @Path("move/{ID:.+}") com.xebialabs.deployit.plugin.api.udm.ConfigurationItem move(@PathParam("ID") java.lang.String ID, @QueryParam("newId") java.lang.String newLocation)Moves a configuration item in the repository.- Parameters:
ID- the ID of the CI to movenewLocation- 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") java.lang.String ID, @QueryParam("newId") java.lang.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 copynewLocation- 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") java.lang.String ID, @QueryParam("newName") java.lang.String newName)Changes the name of a configuration item in the repository.- Parameters:
ID- the ID of the CI to renamenewName- the new name.- Returns:
- the renamed CI
- Permission:
- repo#edit
-
query
@GET @Path("query") java.util.List<ConfigurationItemId> query(@QueryParam("type") com.xebialabs.deployit.plugin.api.reflect.Type type, @QueryParam("parent") java.lang.String parent, @QueryParam("ancestor") java.lang.String ancestor, @QueryParam("namePattern") java.lang.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 CIparent- 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-1for no paging.- Returns:
- a list of references to CIs
-
queryV2
@GET @Path("v2/query") java.util.List<ConfigurationItemId> queryV2(@QueryParam("type") com.xebialabs.deployit.plugin.api.reflect.Type type, @QueryParam("parent") java.lang.String parent, @QueryParam("ancestor") java.lang.String ancestor, @QueryParam("namePattern") java.lang.String namePattern, @QueryParam("idPattern") java.lang.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 CIparent- 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-1for no paging.- Returns:
- a list of references to CIs
-
queryV3
@GET @Path("v3/query") java.util.List<ConfigurationItemId> queryV3(@QueryParam("type") com.xebialabs.deployit.plugin.api.reflect.Type type, @QueryParam("parent") java.lang.String parent, @QueryParam("ancestor") java.lang.String ancestor, @QueryParam("namePattern") java.lang.String namePattern, @QueryParam("idPattern") java.lang.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") java.util.List<ConfigurationItemId> candidateValues(@QueryParam("propertyName") java.lang.String propertyName, @QueryParam("namePattern") java.lang.String namePattern, @QueryParam("idPattern") java.lang.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 aConfigurationItem.- Parameters:
propertyName- the property name of theConfigurationItemfor which to find candidate valuesnamePattern- 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-1for no paging.ci- TheConfigurationItemfor which to find the candidate values- Returns:
- a list of references to CIs
-
validate
@POST @Path("validate") java.util.List<com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> validate(@LimitCiTreeDepth(0) java.util.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:.+}") java.lang.Boolean isSecure(@PathParam("ID") java.lang.String id)Checks if CI is a secure CI- Parameters:
id- id of the CI to check- Returns:
trueif the CI is a secure CI,falseif not.
-
-