Class ProviderUtil
- java.lang.Object
-
- org.glassfish.admin.rest.provider.ProviderUtil
-
- Direct Known Subclasses:
InputObject,XmlHashMapProvider
public class ProviderUtil extends Object
- Author:
- Pajeshwar Patil, Ludovic Champenois ludo@dev.java.net
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEY_CHILD_RESOURCEstatic StringKEY_CHILD_RESOURCESstatic StringKEY_COMMANDstatic StringKEY_COMMANDSstatic StringKEY_ENTITYstatic StringKEY_METHODS
-
Constructor Summary
Constructors Constructor Description ProviderUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetElementLink(jakarta.ws.rs.core.UriInfo uriInfo, String elementName)protected static StringgetEndXmlElement(String name)protected static StringgetHint(jakarta.ws.rs.core.UriInfo uriInfo, String mediaType)Method to get the hint to display in case module monitoring levels are OFFprotected static StringgetHtmlForComponent(String component, String heading, String result)static StringgetHtmlHeader(String baseUri)protected static StringgetHtmlRepresentationForAttributes(ConfigBean proxy, jakarta.ws.rs.core.UriInfo uriInfo)protected static StringgetHtmlRespresentationsForCommand(MethodMetaData methodMetaData, String commandMethod, String commandDisplayName, jakarta.ws.rs.core.UriInfo uriInfo)protected static jakarta.json.JsonArraygetJsonForMethodMetaData(OptionsResult metaData)protected static StringgetJsonForMethodMetaData(OptionsResult metaData, String indent)protected static StringgetStartXmlElement(String name)static Map<String,Object>getStatistic(org.glassfish.external.statistics.Statistic statistic)static MapgetStatistics(org.glassfish.external.statistics.Statistic statistic)static HashMap<String,String>getStringMap(Map<String,Object> map)Converts a map of <String, Object> to a map of <String, String>protected static StringgetXmlForMethodMetaData(OptionsResult metaData, String indent)static StringjsonValue(Object value)static Stringquote(String string)Produce a string in double quotes with backslash sequences in all the right places.protected static StringreadAsString(InputStream in)protected static StringslashToDash(String string)
-
-
-
Field Detail
-
KEY_CHILD_RESOURCE
public static final String KEY_CHILD_RESOURCE
- See Also:
- Constant Field Values
-
KEY_CHILD_RESOURCES
public static final String KEY_CHILD_RESOURCES
- See Also:
- Constant Field Values
-
KEY_COMMAND
public static final String KEY_COMMAND
- See Also:
- Constant Field Values
-
KEY_COMMANDS
public static final String KEY_COMMANDS
- See Also:
- Constant Field Values
-
KEY_ENTITY
public static final String KEY_ENTITY
- See Also:
- Constant Field Values
-
KEY_METHODS
public static final String KEY_METHODS
- See Also:
- Constant Field Values
-
-
Method Detail
-
quote
public static String quote(String string)
Produce a string in double quotes with backslash sequences in all the right places.
-
readAsString
protected static String readAsString(InputStream in) throws IOException
- Throws:
IOException
-
getElementLink
public static String getElementLink(jakarta.ws.rs.core.UriInfo uriInfo, String elementName)
-
getStatistics
public static Map getStatistics(org.glassfish.external.statistics.Statistic statistic) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
-
getStatistic
public static Map<String,Object> getStatistic(org.glassfish.external.statistics.Statistic statistic)
-
getStringMap
public static HashMap<String,String> getStringMap(Map<String,Object> map)
Converts a map of <String, Object> to a map of <String, String>- Parameters:
map- The map to convert- Returns:
- the resulting map
-
getHtmlRepresentationForAttributes
protected static String getHtmlRepresentationForAttributes(ConfigBean proxy, jakarta.ws.rs.core.UriInfo uriInfo)
-
getHtmlRespresentationsForCommand
protected static String getHtmlRespresentationsForCommand(MethodMetaData methodMetaData, String commandMethod, String commandDisplayName, jakarta.ws.rs.core.UriInfo uriInfo)
-
getHtmlForComponent
protected static String getHtmlForComponent(String component, String heading, String result)
-
getHint
protected static String getHint(jakarta.ws.rs.core.UriInfo uriInfo, String mediaType)
Method to get the hint to display in case module monitoring levels are OFF- Parameters:
uriInfo- the uri context object of the input requestmediaType- the media type of the input request- Returns:
- a hit to display when module monitoring levels are all OFF
-
getJsonForMethodMetaData
protected static jakarta.json.JsonArray getJsonForMethodMetaData(OptionsResult metaData) throws jakarta.json.JsonException
- Throws:
jakarta.json.JsonException
-
getJsonForMethodMetaData
protected static String getJsonForMethodMetaData(OptionsResult metaData, String indent)
-
getXmlForMethodMetaData
protected static String getXmlForMethodMetaData(OptionsResult metaData, String indent)
-
-