Package org.kohsuke.github
Class GHLicense
- java.lang.Object
-
- org.kohsuke.github.GHObject
-
- org.kohsuke.github.GHLicense
-
public class GHLicense extends GHObject
The GitHub Preview API's license information- Author:
- Duncan Dickinson
- See Also:
GitHub#getLicense(String),GHRepository#getLicense(), https://developer.github.com/v3/licenses/
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringbodyprotected Stringcategoryprotected Stringdescriptionprotected Booleanfeaturedprotected List<String>forbiddenprotected Stringhtml_urlprotected Stringimplementationprotected Stringkeyprotected Stringnameprotected List<String>permittedprotected List<String>required-
Fields inherited from class org.kohsuke.github.GHObject
created_at, id, responseHeaderFields, updated_at, url
-
-
Constructor Summary
Constructors Constructor Description GHLicense()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetBody()Gets body.StringgetCategory()Gets category.StringgetDescription()Gets description.List<String>getForbidden()Gets forbidden.URLgetHtmlUrl()Gets html url.StringgetImplementation()Gets implementation.StringgetKey()Gets key.StringgetName()Gets name.List<String>getPermitted()Gets permitted.List<String>getRequired()Gets required.URLgetUrl()Gets url.inthashCode()BooleanisFeatured()Featured licenses are bold in the new repository drop-downprotected voidpopulate()Fully populate the data by retrieving missing data.-
Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getResponseHeaderFields, getUpdatedAt, toString
-
-
-
-
Method Detail
-
getKey
public String getKey()
Gets key.- Returns:
- a mnemonic for the license
-
getName
public String getName()
Gets name.- Returns:
- the license name
-
getUrl
@WithBridgeMethods(value=java.lang.String.class, adapterMethod="urlToString") public URL getUrl()
Description copied from class:GHObjectGets url.
-
isFeatured
public Boolean isFeatured() throws IOException
Featured licenses are bold in the new repository drop-down- Returns:
- True if the license is featured, false otherwise
- Throws:
IOException- the io exception
-
getHtmlUrl
public URL getHtmlUrl() throws IOException
Description copied from class:GHObjectGets html url.- Specified by:
getHtmlUrlin classGHObject- Returns:
- URL of this object for humans, which renders some HTML.
- Throws:
IOException- on error
-
getDescription
public String getDescription() throws IOException
Gets description.- Returns:
- the description
- Throws:
IOException- the io exception
-
getCategory
public String getCategory() throws IOException
Gets category.- Returns:
- the category
- Throws:
IOException- the io exception
-
getImplementation
public String getImplementation() throws IOException
Gets implementation.- Returns:
- the implementation
- Throws:
IOException- the io exception
-
getRequired
public List<String> getRequired() throws IOException
Gets required.- Returns:
- the required
- Throws:
IOException- the io exception
-
getPermitted
public List<String> getPermitted() throws IOException
Gets permitted.- Returns:
- the permitted
- Throws:
IOException- the io exception
-
getForbidden
public List<String> getForbidden() throws IOException
Gets forbidden.- Returns:
- the forbidden
- Throws:
IOException- the io exception
-
getBody
public String getBody() throws IOException
Gets body.- Returns:
- the body
- Throws:
IOException- the io exception
-
populate
protected void populate() throws IOExceptionFully populate the data by retrieving missing data.Depending on the original API call where this object is created, it may not contain everything.
- Throws:
IOException- the io exception
-
-