Add JavaDocs

Do using IntelliJ JavaDocs plugin. Better to have something than nothing.
This commit is contained in:
Liam Newman
2019-11-14 13:24:28 -08:00
parent f6a01551fd
commit 757b9b2118
125 changed files with 7379 additions and 251 deletions

View File

@@ -9,6 +9,8 @@ import java.net.URL;
import static org.kohsuke.github.Previews.INERTIA;
/**
* The type GHProjectCard.
*
* @author Gunnar Skjold
*/
public class GHProjectCard extends GHObject {
@@ -25,11 +27,25 @@ public class GHProjectCard extends GHObject {
return null;
}
/**
* Wrap gh project card.
*
* @param root
* the root
* @return the gh project card
*/
public GHProjectCard wrap(GitHub root) {
this.root = root;
return this;
}
/**
* Wrap gh project card.
*
* @param column
* the column
* @return the gh project card
*/
public GHProjectCard wrap(GHProjectColumn column) {
this.column = column;
this.project = column.project;
@@ -37,10 +53,22 @@ public class GHProjectCard extends GHObject {
return this;
}
/**
* Gets root.
*
* @return the root
*/
public GitHub getRoot() {
return root;
}
/**
* Gets project.
*
* @return the project
* @throws IOException
* the io exception
*/
public GHProject getProject() throws IOException {
if (project == null) {
try {
@@ -52,6 +80,13 @@ public class GHProjectCard extends GHObject {
return project;
}
/**
* Gets column.
*
* @return the column
* @throws IOException
* the io exception
*/
public GHProjectColumn getColumn() throws IOException {
if (column == null) {
try {
@@ -63,6 +98,13 @@ public class GHProjectCard extends GHObject {
return column;
}
/**
* Gets content.
*
* @return the content
* @throws IOException
* the io exception
*/
public GHIssue getContent() throws IOException {
if (StringUtils.isEmpty(content_url))
return null;
@@ -77,34 +119,80 @@ public class GHProjectCard extends GHObject {
}
}
/**
* Gets note.
*
* @return the note
*/
public String getNote() {
return note;
}
/**
* Gets creator.
*
* @return the creator
*/
public GHUser getCreator() {
return creator;
}
/**
* Gets content url.
*
* @return the content url
*/
public URL getContentUrl() {
return GitHub.parseURL(content_url);
}
/**
* Gets project url.
*
* @return the project url
*/
public URL getProjectUrl() {
return GitHub.parseURL(project_url);
}
/**
* Gets column url.
*
* @return the column url
*/
public URL getColumnUrl() {
return GitHub.parseURL(column_url);
}
/**
* Is archived boolean.
*
* @return the boolean
*/
public boolean isArchived() {
return archived;
}
/**
* Sets note.
*
* @param note
* the note
* @throws IOException
* the io exception
*/
public void setNote(String note) throws IOException {
edit("note", note);
}
/**
* Sets archived.
*
* @param archived
* the archived
* @throws IOException
* the io exception
*/
public void setArchived(boolean archived) throws IOException {
edit("archived", archived);
}
@@ -113,10 +201,21 @@ public class GHProjectCard extends GHObject {
new Requester(root).withPreview(INERTIA)._with(key, value).method("PATCH").to(getApiRoute());
}
/**
* Gets api route.
*
* @return the api route
*/
protected String getApiRoute() {
return String.format("/projects/columns/cards/%d", id);
}
/**
* Delete.
*
* @throws IOException
* the io exception
*/
public void delete() throws IOException {
new Requester(root).withPreview(INERTIA).method("DELETE").to(getApiRoute());
}