Class RestFormatData

java.lang.Object
org.opencastproject.runtimeinfo.rest.RestFormatData

public final class RestFormatData extends Object
Represents an output format for a REST endpoint.
  • Field Details

  • Constructor Details

    • RestFormatData

      public RestFormatData(String name) throws IllegalArgumentException
      Constructor that accepts a format name and finds the format's corresponding default URL and description. Currently only JSON and XML have a default URL.
      Parameters:
      name - the format name, the value should be a constant from javax.ws.rs.core.MediaType or ExtendedMediaType (org.opencastproject.util.doc.rest.ExtendedMediaType).
      Throws:
      IllegalArgumentException - when name is null
  • Method Details

    • toString

      public String toString()
      Return a string representation of this object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this object
    • getName

      public String getName()
      Return the name of this format.
      Returns:
      the name of this format
    • getUrl

      public String getUrl()
      Return the default URL of this format.
      Returns:
      the default URL of this format.