Package com.xebialabs.xlrelease.api.v1
Interface FolderApi
- All Superinterfaces:
ApiService
@Path("/api/v1/folders")
@Produces("application/json")
@Consumes("application/json")
public interface FolderApi
extends ApiService
Operations on folders.
-
Field Summary
FieldsFields inherited from interface com.xebialabs.xlrelease.api.ApiService
DEFAULT_RESULTS_PER_PAGE, DEFAULT_RESULTS_PER_PAGE_STRING, DEPTH, ORDER_BY, PAGE, PAGE_IS_OFFSET, RESULTS_PER_PAGE, ROLE_IDS_DATA -
Method Summary
Modifier and TypeMethodDescriptioncom.xebialabs.xlrelease.domain.folder.FolderAdds a new folder inside the specified folder.com.xebialabs.xlrelease.domain.variables.VariablecreateVariable(String folderId, com.xebialabs.xlrelease.api.v1.forms.Variable variable) Adds a folder variable.voidDeletes the specified folder and all the contents inside.voiddeleteVariable(String folderId, String variableId) Deletes a folder variable.com.xebialabs.xlrelease.domain.folder.FolderFinds a folder from a given path.com.xebialabs.xlrelease.domain.folder.FolderReturns the specified folder with default depth.com.xebialabs.xlrelease.domain.folder.FolderReturns the specified folder.Returns possible permissions.List<com.xebialabs.xlrelease.api.v1.views.TeamView>Returns folder effective teams.List<com.xebialabs.xlrelease.domain.Release>getTemplates(String folderId) Returns the templates for the given folder with default pagination and depth.default List<com.xebialabs.xlrelease.domain.Release>getTemplates(String folderId, Long page, Long resultPerPage, Integer depth) Returns the templates for the given folder.List<com.xebialabs.xlrelease.domain.Release>Returns the list of release or workflow templates for the given folder.com.xebialabs.xlrelease.domain.variables.VariablegetVariable(String folderId, String variableId) Returns the folder variable for the given identifier.booleanisFolderOwner(String folderId) List<com.xebialabs.xlrelease.domain.folder.Folder>list(String parentId, Long page, Long resultPerPage, Integer depth, Boolean decorateWithPermissions) Lists the folders inside a given folder.default List<com.xebialabs.xlrelease.domain.folder.Folder>listRoot()Returns a list of all folders directly under the root directory.List<com.xebialabs.xlrelease.domain.folder.Folder>Returns a list of folders from the root directory.List<com.xebialabs.xlrelease.domain.variables.Variable>listVariables(String folderId, boolean folderOnly) Returns folder variables list.listVariableValues(String folderId, boolean folderOnly) Returns folder variables list with replaced variable values.voidMove a folder to another folder.voidmoveTemplate(String folderId, String templateId) Move a template to another folder without merging permissions.voidmoveTemplate(String folderId, String templateId, Boolean mergeTeams) Move a template to another folder.voidRename a folder.List<com.xebialabs.xlrelease.domain.Release>searchReleases(String folderId, com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters) Returns the releases started from this folder with default pagination and depth.List<com.xebialabs.xlrelease.domain.Release>searchReleases(String folderId, Long page, Long resultPerPage, Integer depth, com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters) Returns the releases started from this folder.default StringList<com.xebialabs.xlrelease.api.v1.views.TeamView>Set teams of the folder.com.xebialabs.xlrelease.domain.variables.VariableupdateVariable(String folderId, com.xebialabs.xlrelease.domain.variables.Variable variable) Updates properties of a folder variable by its ID.com.xebialabs.xlrelease.domain.variables.VariableupdateVariable(String folderId, String variableId, com.xebialabs.xlrelease.domain.variables.Variable variable)
-
Field Details
-
EXPRESSION_FOLDER_ID
- See Also:
-
-
Method Details
-
serviceName
- Specified by:
serviceNamein interfaceApiService
-
listRoot
@GET @Path("/list") List<com.xebialabs.xlrelease.domain.folder.Folder> listRoot(@QueryParam("page") Long page, @QueryParam("resultsPerPage") Long resultPerPage, @QueryParam("depth") Integer depth, @QueryParam("permissions") Boolean decorateWithPermissions) Returns a list of folders from the root directory.- Parameters:
page- the page of results to return. Defaults at 0 if page set to nullresultPerPage- the number of results per page. Defaults at 50 if set to nulldepth- the depth to search for. Defaults at 1 if set to nulldecorateWithPermissions- the boolean to decorate the folders with the effective permissions. Defaults to false if set to null- Returns:
- a list of the folders
-
listRoot
Returns a list of all folders directly under the root directory.- Returns:
- a list of the folders
-
list
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/list") List<com.xebialabs.xlrelease.domain.folder.Folder> list(@PathParam("folderId") String parentId, @QueryParam("page") Long page, @QueryParam("resultsPerPage") Long resultPerPage, @QueryParam("depth") Integer depth, @QueryParam("permissions") Boolean decorateWithPermissions) Lists the folders inside a given folder.- Parameters:
parentId- the parent folder to retrieve frompage- the page of results to return. Defaults at 0resultPerPage- the number of results per page. Defaults at 50depth- the depth to search for. Defaults at 1- Returns:
- the list of folders beneath a given folder
-
find
@GET @Path("/find") com.xebialabs.xlrelease.domain.folder.Folder find(@QueryParam("byPath") String path, @QueryParam("depth") Integer depth) Finds a folder from a given path.- Parameters:
path- the path for the folder to search ondepth- the depth to search for. Defaults at 1- Returns:
- the folder found in the path
-
getFolder
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}") com.xebialabs.xlrelease.domain.folder.Folder getFolder(@PathParam("folderId") String folderId, @QueryParam("depth") Integer depth) Returns the specified folder.- Parameters:
folderId- the id of the folderdepth- the depth to search for. Defaults at 1- Returns:
- the specified folder
-
getFolder
Returns the specified folder with default depth.- Parameters:
folderId- the folder id- Returns:
- the given folder
-
getTemplates
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/templates") List<com.xebialabs.xlrelease.domain.Release> getTemplates(@PathParam("folderId") String folderId, @DefaultValue("RELEASE") @QueryParam("kind") String kind, @QueryParam("page") Long page, @QueryParam("resultsPerPage") Long resultPerPage, @QueryParam("depth") Integer depth) Returns the list of release or workflow templates for the given folder.- Parameters:
folderId- the id of the folderkind- the kind of template. Default value is release.page- the page of results to return. Defaults at 0resultPerPage- the number of results per page. Defaults at 50depth- the (optional) depth to search for; defaults at 1- Returns:
- the list of templates in the folder
-
getTemplates
default List<com.xebialabs.xlrelease.domain.Release> getTemplates(String folderId, Long page, Long resultPerPage, Integer depth) Returns the templates for the given folder.- Parameters:
folderId- the id of the folderpage- the page of results to return. Defaults at 0resultPerPage- the number of results per page. Defaults at 50depth- the (optional) depth to search for; defaults at 1- Returns:
- the list of templates in the folder
-
getTemplates
Returns the templates for the given folder with default pagination and depth.- Parameters:
folderId- the folder id- Returns:
- the list of templates in the folder
-
searchReleases
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/releases") List<com.xebialabs.xlrelease.domain.Release> searchReleases(@PathParam("folderId") String folderId, @QueryParam("page") Long page, @QueryParam("numberbypage") Long resultPerPage, @QueryParam("depth") Integer depth, com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters) Returns the releases started from this folder.- Parameters:
folderId- the id of the folderpage- the page of results to return. Defaults at 0resultPerPage- the number of results per page. Defaults at 50depth- the depth to search forreleasesFilters- releaseFilter to filter the release search- Returns:
- the list of releases
-
searchReleases
List<com.xebialabs.xlrelease.domain.Release> searchReleases(String folderId, com.xebialabs.xlrelease.api.v1.forms.ReleasesFilters releasesFilters) Returns the releases started from this folder with default pagination and depth.- Parameters:
folderId- the folder idreleasesFilters- the releaseFilters to filter the release search on- Returns:
- the list of releases in a folder
-
moveTemplate
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/templates/{templateId:.*Release[^/]*}") void moveTemplate(@PathParam("folderId") String folderId, @PathParam("templateId") String templateId, @QueryParam("mergePermissions") Boolean mergeTeams) Move a template to another folder.- Parameters:
folderId- the target folder the template will be moved totemplateId- the id of the template to be moved
-
moveTemplate
Move a template to another folder without merging permissions.- Parameters:
folderId- the id of the parent foldertemplateId- the id of the template to be moved
-
addFolder
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}") com.xebialabs.xlrelease.domain.folder.Folder addFolder(@PathParam("folderId") String parentId, com.xebialabs.xlrelease.domain.folder.Folder folder) Adds a new folder inside the specified folder.- Parameters:
parentId- the id of the folder to create the folder infolder- the folder to create the new folder in- Returns:
- the newly created folder
-
delete
@DELETE @Path("/{folderId:.*(Folder[^/]*|Applications)}") void delete(@PathParam("folderId") String folderId) Deletes the specified folder and all the contents inside.- Parameters:
folderId- the id of the folder to delete
-
move
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/move") void move(@PathParam("folderId") String folderId, @QueryParam("newParentId") String newParentId) Move a folder to another folder.- Parameters:
folderId- the id of the folder to movenewParentId- the id of the parent folder the folder will be moved under
-
rename
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/rename") void rename(@PathParam("folderId") String folderId, @QueryParam("newName") String newName) Rename a folder.- Parameters:
folderId- the id of the folder to renamenewName- the new name of the folder
-
getPermissions
Returns possible permissions.- Returns:
- list of permissions for folders, templates and releases
-
getTeams
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/teams") List<com.xebialabs.xlrelease.api.v1.views.TeamView> getTeams(@PathParam("folderId") String folderId) Returns folder effective teams.- Parameters:
folderId- the id of the folder- Returns:
- list of effective teams
-
setTeams
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/teams") List<com.xebialabs.xlrelease.api.v1.views.TeamView> setTeams(@PathParam("folderId") String folderId, List<com.xebialabs.xlrelease.api.v1.views.TeamView> teamDtos) Set teams of the folder.If teams were previously inherited they will be detached after the update. To use inherited teams on a folder submit empty list of teams.
- Parameters:
folderId- the identifier of the folder- Returns:
- a list of updated teams
-
isFolderOwner
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/folderOwner") boolean isFolderOwner(@PathParam("folderId") String folderId) -
listVariables
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/variables") List<com.xebialabs.xlrelease.domain.variables.Variable> listVariables(@PathParam("folderId") String folderId, @QueryParam("folderOnly") boolean folderOnly) Returns folder variables list.- Parameters:
folderId- the folder identifier.folderOnly- filter if you only want to get information from your parentId. (optional)- Returns:
- variables list.
-
listVariableValues
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/variableValues") Map<String,String> listVariableValues(@PathParam("folderId") String folderId, @QueryParam("folderOnly") boolean folderOnly) Returns folder variables list with replaced variable values.- Parameters:
folderId- the folder identifier.folderOnly- filter if you only want to get information from your parentId. (optional)- Returns:
- variables list.
-
createVariable
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/variables") com.xebialabs.xlrelease.domain.variables.Variable createVariable(@PathParam("folderId") String folderId, com.xebialabs.xlrelease.api.v1.forms.Variable variable) Adds a folder variable.- Parameters:
folderId- the folder identifier.variable- the folder variable to add.- Returns:
- the added folder variable.
-
getVariable
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/{variableId:.*Variable[^/]*}") com.xebialabs.xlrelease.domain.variables.Variable getVariable(@PathParam("folderId") String folderId, @PathParam("variableId") String variableId) Returns the folder variable for the given identifier.- Parameters:
folderId- the folder identifier.variableId- the variable identifier.- Returns:
- the variable.
-
updateVariable
-
updateVariable
com.xebialabs.xlrelease.domain.variables.Variable updateVariable(String folderId, com.xebialabs.xlrelease.domain.variables.Variable variable) Updates properties of a folder variable by its ID.- Parameters:
folderId- the folder identifier.variable- the variable to update.- Returns:
- the updated variable.
-
deleteVariable
@DELETE @Path("/{folderId:.*(Folder[^/]*|Applications)}/{variableId:.*Variable[^/]*}") void deleteVariable(@PathParam("folderId") String folderId, @PathParam("variableId") String variableId) Deletes a folder variable.- Parameters:
folderId- the folder identifier.variableId- the variable identifier.
-