Class RestFormatData
- java.lang.Object
-
- org.opencastproject.runtimeinfo.rest.RestFormatData
-
public final class RestFormatData extends Object
Represents an output format for a REST endpoint.
-
-
Constructor Summary
Constructors Constructor Description RestFormatData(String name)Constructor that accepts a format name and finds the format's corresponding default URL and description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Return the name of this format.StringgetUrl()Return the default URL of this format.StringtoString()Return a string representation of this object.
-
-
-
Field Detail
-
JSON_URL
public static final String JSON_URL
Default URL for the JSON format.- See Also:
- Constant Field Values
-
XML_URL
public static final String XML_URL
Default URL for the XML format.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
toString
public String toString()
Return 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.
-
-