|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.admin.rest.provider.ProviderUtil
org.glassfish.admin.rest.readers.InputObject
public abstract class InputObject
| Field Summary | |
|---|---|
protected java.util.Map |
map
|
| Fields inherited from class org.glassfish.admin.rest.provider.ProviderUtil |
|---|
KEY_CHILD_RESOURCE, KEY_CHILD_RESOURCES, KEY_COMMAND, KEY_COMMANDS, KEY_ENTITY, KEY_METHODS |
| Constructor Summary | |
|---|---|
InputObject()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
get(java.lang.String key)
Get the value object associated with a key. |
boolean |
getBoolean(java.lang.String key)
Get the boolean value associated with a key. |
double |
getDouble(java.lang.String key)
Get the double value associated with a key. |
int |
getInt(java.lang.String key)
Get the int value associated with a key. |
long |
getLong(java.lang.String key)
Get the long value associated with a key. |
java.lang.String |
getString(java.lang.String key)
Get the string associated with a key. |
boolean |
has(java.lang.String key)
Determine if the InputObject contains a specific key. |
abstract java.util.Map |
initializeMap()
Get the map of key-value pairs represented by this object. |
boolean |
isNull(java.lang.String key)
Determine if the value associated with the key is null or if there is no value. |
java.util.Iterator |
keys()
Get an enumeration of the keys of the InputObject. |
int |
length()
Get the number of keys stored in the InputObject. |
InputObject |
put(java.lang.String key,
java.lang.Object value)
Put a key/value pair in this object, but only if the key and the value are both non-null, and only if there is not already a member with that name. |
InputObject |
putMap(java.lang.String key,
java.util.Map value)
|
static java.lang.Object |
stringToValue(java.lang.String s)
Try to convert a string into a number, boolean, or null. |
| Methods inherited from class org.glassfish.admin.rest.provider.ProviderUtil |
|---|
getElementLink, getEndXmlElement, getHint, getHtmlForComponent, getHtmlHeader, getHtmlRepresentationForAttributes, getHtmlRespresentationsForCommand, getJsonForMethodMetaData, getJsonForMethodMetaData, getStartXmlElement, getStatistic, getStatistics, getStringMap, getXmlForMethodMetaData, jsonValue, quote, readAsString, slashToDash |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map map
| Constructor Detail |
|---|
public InputObject()
| Method Detail |
|---|
public abstract java.util.Map initializeMap()
throws InputException
InputException
public java.lang.Object get(java.lang.String key)
throws InputException
key - A key string.
InputException - if the key is not found.
public boolean getBoolean(java.lang.String key)
throws InputException
key - A key string.
InputException - if the value is not a Boolean or the String "true" or "false".
public double getDouble(java.lang.String key)
throws InputException
key - A key string.
InputException - if the key is not found or
if the value is not a Number object and cannot be converted to a number.
public int getInt(java.lang.String key)
throws InputException
key - A key string.
InputException - if the key is not found or if the value cannot
be converted to an integer.
public long getLong(java.lang.String key)
throws InputException
key - A key string.
InputException - if the key is not found or if the value cannot
be converted to a long.
public java.lang.String getString(java.lang.String key)
throws InputException
key - A key string.
InputException - if the key is not found.public boolean has(java.lang.String key)
key - A key string.
public boolean isNull(java.lang.String key)
key - A key string.
public java.util.Iterator keys()
public int length()
public static java.lang.Object stringToValue(java.lang.String s)
s - A String.
public InputObject put(java.lang.String key,
java.lang.Object value)
throws InputException
key - value. - It should be of one of these types: Boolean, Double,
Integer, Long, String, or null.
InputException - if the key is a duplicate
public InputObject putMap(java.lang.String key,
java.util.Map value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||