Interface ProjectApi
-
- All Known Implementing Classes:
ProjectApi.NotImplemented
public interface ProjectApi
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ProjectApi.ListDashboardsRequest
static class
ProjectApi.ListLabelsRequest
static class
ProjectApi.ListRefsRequest<T extends RefInfo>
static class
ProjectApi.NotImplemented
A default implementation which allows source compatibility when adding new methods to the interface.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProjectAccessInfo
access()
ProjectAccessInfo
access(ProjectAccessInput p)
ChangeInfo
accessChange(ProjectAccessInput p)
BranchApi
branch(String ref)
Look up a branch by refname.ProjectApi.ListRefsRequest<BranchInfo>
branches()
CheckProjectResultInfo
check(CheckProjectInput in)
AccessCheckInfo
checkAccess(AccessCheckInput in)
ChildProjectApi
child(String name)
List<ProjectInfo>
children()
List<ProjectInfo>
children(boolean recursive)
List<ProjectInfo>
children(int limit)
CommitApi
commit(String commit)
Lookup a commit by itsObjectId
string.ConfigInfo
config()
ConfigInfo
config(ConfigInput in)
ProjectApi
create()
ProjectApi
create(ProjectInput in)
DashboardApi
dashboard(String name)
Lookup a dashboard by its name.ProjectApi.ListDashboardsRequest
dashboards()
DashboardApi
defaultDashboard()
Get the project's default dashboard.void
defaultDashboard(String name)
Set the project's default dashboard.void
deleteBranches(DeleteBranchesInput in)
void
deleteTags(DeleteTagsInput in)
String
description()
void
description(DescriptionInput in)
ProjectInfo
get()
String
head()
Get the name of the branch to whichHEAD
points.void
head(String head)
Set the project'sHEAD
.void
index(boolean indexChildren)
Reindex the project and children in caseindexChildren
is specified.void
indexChanges()
Reindexes all changes of the project.LabelApi
label(String labelName)
ProjectApi.ListLabelsRequest
labels()
void
labels(BatchLabelInput input)
Adds, updates and deletes label definitions in a batch.String
parent()
Get the name of the project's parent.void
parent(String parent)
Set the project's parent.void
removeDefaultDashboard()
Remove the project's default dashboard.TagApi
tag(String ref)
Look up a tag by refname.ProjectApi.ListRefsRequest<TagInfo>
tags()
-
-
-
Method Detail
-
create
ProjectApi create() throws RestApiException
- Throws:
RestApiException
-
create
ProjectApi create(ProjectInput in) throws RestApiException
- Throws:
RestApiException
-
get
ProjectInfo get() throws RestApiException
- Throws:
RestApiException
-
description
String description() throws RestApiException
- Throws:
RestApiException
-
description
void description(DescriptionInput in) throws RestApiException
- Throws:
RestApiException
-
access
ProjectAccessInfo access() throws RestApiException
- Throws:
RestApiException
-
access
ProjectAccessInfo access(ProjectAccessInput p) throws RestApiException
- Throws:
RestApiException
-
accessChange
ChangeInfo accessChange(ProjectAccessInput p) throws RestApiException
- Throws:
RestApiException
-
checkAccess
AccessCheckInfo checkAccess(AccessCheckInput in) throws RestApiException
- Throws:
RestApiException
-
check
CheckProjectResultInfo check(CheckProjectInput in) throws RestApiException
- Throws:
RestApiException
-
config
ConfigInfo config() throws RestApiException
- Throws:
RestApiException
-
config
ConfigInfo config(ConfigInput in) throws RestApiException
- Throws:
RestApiException
-
branches
ProjectApi.ListRefsRequest<BranchInfo> branches()
-
tags
ProjectApi.ListRefsRequest<TagInfo> tags()
-
deleteBranches
void deleteBranches(DeleteBranchesInput in) throws RestApiException
- Throws:
RestApiException
-
deleteTags
void deleteTags(DeleteTagsInput in) throws RestApiException
- Throws:
RestApiException
-
children
List<ProjectInfo> children() throws RestApiException
- Throws:
RestApiException
-
children
List<ProjectInfo> children(boolean recursive) throws RestApiException
- Throws:
RestApiException
-
children
List<ProjectInfo> children(int limit) throws RestApiException
- Throws:
RestApiException
-
child
ChildProjectApi child(String name) throws RestApiException
- Throws:
RestApiException
-
branch
BranchApi branch(String ref) throws RestApiException
Look up a branch by refname.Note: This method eagerly reads the branch. Methods that mutate the branch do not necessarily re-read the branch. Therefore, calling a getter method on an instance after calling a mutation method on that same instance is not guaranteed to reflect the mutation. It is not recommended to store references to
BranchApi
instances.- Parameters:
ref
- branch name, with or without "refs/heads/" prefix.- Returns:
- API for accessing the branch.
- Throws:
RestApiException
- if a problem occurred reading the project.
-
tag
TagApi tag(String ref) throws RestApiException
Look up a tag by refname.- Parameters:
ref
- tag name, with or without "refs/tags/" prefix.- Returns:
- API for accessing the tag.
- Throws:
RestApiException
- if a problem occurred reading the project.
-
commit
CommitApi commit(String commit) throws RestApiException
Lookup a commit by itsObjectId
string.- Parameters:
commit
- theObjectId
string.- Returns:
- API for accessing the commit.
- Throws:
RestApiException
-
dashboard
DashboardApi dashboard(String name) throws RestApiException
Lookup a dashboard by its name.- Parameters:
name
- the name.- Returns:
- API for accessing the dashboard.
- Throws:
RestApiException
-
defaultDashboard
DashboardApi defaultDashboard() throws RestApiException
Get the project's default dashboard.- Returns:
- API for accessing the dashboard.
- Throws:
RestApiException
-
defaultDashboard
void defaultDashboard(String name) throws RestApiException
Set the project's default dashboard.- Parameters:
name
- the dashboard to set as default.- Throws:
RestApiException
-
removeDefaultDashboard
void removeDefaultDashboard() throws RestApiException
Remove the project's default dashboard.- Throws:
RestApiException
-
dashboards
ProjectApi.ListDashboardsRequest dashboards() throws RestApiException
- Throws:
RestApiException
-
head
String head() throws RestApiException
Get the name of the branch to whichHEAD
points.- Throws:
RestApiException
-
head
void head(String head) throws RestApiException
Set the project'sHEAD
.- Parameters:
head
- the HEAD- Throws:
RestApiException
-
parent
String parent() throws RestApiException
Get the name of the project's parent.- Throws:
RestApiException
-
parent
void parent(String parent) throws RestApiException
Set the project's parent.- Parameters:
parent
- the parent- Throws:
RestApiException
-
index
void index(boolean indexChildren) throws RestApiException
Reindex the project and children in caseindexChildren
is specified.- Parameters:
indexChildren
- decides if children should be indexed recursively- Throws:
RestApiException
-
indexChanges
void indexChanges() throws RestApiException
Reindexes all changes of the project.- Throws:
RestApiException
-
labels
ProjectApi.ListLabelsRequest labels() throws RestApiException
- Throws:
RestApiException
-
label
LabelApi label(String labelName) throws RestApiException
- Throws:
RestApiException
-
labels
void labels(BatchLabelInput input) throws RestApiException
Adds, updates and deletes label definitions in a batch.- Parameters:
input
- input that describes additions, updates and deletions of label definitions- Throws:
RestApiException
-
-