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 [email protected]
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEY_CHILD_RESOURCE
static String
KEY_CHILD_RESOURCES
static String
KEY_COMMAND
static String
KEY_COMMANDS
static String
KEY_ENTITY
static String
KEY_METHODS
-
Constructor Summary
Constructors Constructor Description ProviderUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getElementLink(jakarta.ws.rs.core.UriInfo uriInfo, String elementName)
protected static String
getEndXmlElement(String name)
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 OFFprotected static String
getHtmlForComponent(String component, String heading, String result)
static String
getHtmlHeader(String baseUri)
protected static String
getHtmlRepresentationForAttributes(ConfigBean proxy, jakarta.ws.rs.core.UriInfo uriInfo)
protected static String
getHtmlRespresentationsForCommand(MethodMetaData methodMetaData, String commandMethod, String commandDisplayName, jakarta.ws.rs.core.UriInfo uriInfo)
protected static jakarta.json.JsonArray
getJsonForMethodMetaData(OptionsResult metaData)
protected static String
getJsonForMethodMetaData(OptionsResult metaData, String indent)
protected static String
getStartXmlElement(String name)
static Map<String,Object>
getStatistic(org.glassfish.external.statistics.Statistic statistic)
static Map
getStatistics(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 String
getXmlForMethodMetaData(OptionsResult metaData, String indent)
static String
jsonValue(Object value)
static String
quote(String string)
Produce a string in double quotes with backslash sequences in all the right places.protected static String
readAsString(InputStream in)
protected static String
slashToDash(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)
-
-