Class RemoteProject
Normally this will represent a project coming from one of the JIRA servers that we have an app link with. However, because it can be useful to create a list with both local and remote projects, one can construct an instance of this class that represents a local project.
This class is considered experimental while RemoteProjectService is still being developed.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRemoteProject(long id, String key, String name, String description, RemoteUser leadUser, String url, com.atlassian.applinks.api.ApplicationLink applicationLink, RemoteAvatar avatar) -
Method Summary
Modifier and TypeMethodDescriptionstatic RemoteProjectfrom(com.atlassian.applinks.api.ApplicationLink applicationLink, JSONObject jsonObject) static RemoteProjectBuild a Network project instance from a local Project.com.atlassian.applinks.api.ApplicationLinkReturns the AppLink for the server that this remote project lives on.Returns the URL for the "Browse Project" page of this project.Returns the description for the underlying project, or null if the description was not supplied in the JSON response.longgetId()getKey()Returns the Project Lead for this project.getName()Returns the Base URL for the server that this project lives on.getUrl()Returns the configured "URL" value for this project.
-
Constructor Details
-
RemoteProject
public RemoteProject(long id, String key, String name, String description, RemoteUser leadUser, String url, com.atlassian.applinks.api.ApplicationLink applicationLink, RemoteAvatar avatar)
-
-
Method Details
-
getId
public long getId() -
getKey
-
getName
-
getDescription
Returns the description for the underlying project, or null if the description was not supplied in the JSON response.An empty String is returned if the project has a blank description. A null return value indicates that the description was not returned over the wire, and should be treated as an "unknown" value.
- Returns:
- the description for the underlying project, or null if the description was not supplied in the JSON response.
-
getLeadUser
Returns the Project Lead for this project.In the REST API for JIRA 6.1, this value is returned when getting a single project, but not when getting all projects, so this value can sometimes be null even if the underlying project has a lead. Developers should treat a null value as "unknown".
- Returns:
- the Project Lead for this project.
-
getUrl
Returns the configured "URL" value for this project.In the REST API for JIRA 6.1, this value is returned when getting a single project, but not when getting all projects, so this value can sometimes be null even if the underlying project has a URL specified. Consumers should treat a null value as "unknown".
- Returns:
- the configured "URL" value for this project, or null if not known.
-
getApplicationLink
@Nullable public com.atlassian.applinks.api.ApplicationLink getApplicationLink()Returns the AppLink for the server that this remote project lives on.Will return null if the project is representing a local project on this server.
- Returns:
- the AppLink for the server that this remote project lives on, or null for a local project.
-
getAvatar
-
getBrowseProjectUrl
Returns the URL for the "Browse Project" page of this project.- Returns:
- the URL for the "Browse Project" page of this project.
-
getServerBaseUrl
Returns the Base URL for the server that this project lives on.- Returns:
- the Base URL for the server that this project lives on.
-
from
Build a Network project instance from a local Project.- Parameters:
project- the local project- Returns:
- a NetworkProject instance representing the given local project.
-
from
@Nonnull public static RemoteProject from(com.atlassian.applinks.api.ApplicationLink applicationLink, JSONObject jsonObject) throws JSONException - Throws:
JSONException
-