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:
  • Field Details

    • forbidden

      protected List<String> forbidden
      The forbidden.
    • htmlUrl

      protected String htmlUrl
      The body.
    • description

      protected String description
      The body.
    • category

      protected String category
      The body.
    • implementation

      protected String implementation
      The body.
    • body

      protected String body
      The body.
    • key

      protected String key
      The name.
    • name

      protected String name
      The name.
    • spdxId

      protected String spdxId
      The name.
    • permitted

      protected List<String> permitted
      The permitted.
    • required

      protected List<String> required
      The required.
  • Constructor Details

    • GHLicense

      public GHLicense()
      Create default GHLicense instance
  • Method Details

    • equals

      public boolean equals(Object o)
      Equals.
      Overrides:
      equals in class Object
      Parameters:
      o - the o
      Returns:
      true, if successful
    • getBody

      public String getBody() throws IOException
      Gets body.
      Returns:
      the body
      Throws:
      IOException - the io exception
    • getCategory

      public String getCategory() throws IOException
      Gets category.
      Returns:
      the category
      Throws:
      IOException - the io exception
    • getDescription

      public String getDescription() throws IOException
      Gets description.
      Returns:
      the description
      Throws:
      IOException - the io exception
    • getForbidden

      public List<String> getForbidden() throws IOException
      Gets forbidden.
      Returns:
      the forbidden
      Throws:
      IOException - the io exception
    • getHtmlUrl

      public URL getHtmlUrl() throws IOException
      Gets the html url.
      Returns:
      the html url
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getImplementation

      public String getImplementation() throws IOException
      Gets implementation.
      Returns:
      the implementation
      Throws:
      IOException - the io exception
    • getKey

      public String getKey()
      Gets key.
      Returns:
      a mnemonic for the license
    • getName

      public String getName()
      Gets name.
      Returns:
      the license name
    • getPermitted

      public List<String> getPermitted() throws IOException
      Gets permitted.
      Returns:
      the permitted
      Throws:
      IOException - the io exception
    • getRequired

      public List<String> getRequired() throws IOException
      Gets required.
      Returns:
      the required
      Throws:
      IOException - the io exception
    • getSpdxId

      public String getSpdxId()
      Gets SPDX ID.
      Returns:
      the spdx id
    • hashCode

      public int hashCode()
      Hash code.
      Overrides:
      hashCode in class Object
      Returns:
      the int
    • 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
    • populate

      protected void populate() throws IOException
      Fully 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