public class Config
extends java.lang.Object
| Constructor and Description |
|---|
Config()
Constructs a Config.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addAttrName(java.lang.String name)
Adds an attribute name.
|
void |
addItemsDef(ItemsDef itemsDef)
Adds
ItemsDef with the specified ID. |
UIDef |
createMode(java.lang.String id,
java.lang.String... refs)
Creates the mode
UIDef. |
UIDef |
define(java.lang.String id)
Creates
UIDef, and adds this UIDef in definitions library. |
UIDef |
define(java.lang.String id,
java.lang.String... refs)
Creates
UIDef, and adds this UIDef in definitions library. |
UIDef |
define(java.lang.String id,
UIDef... defs)
Creates
UIDef, and adds this UIDef in definitions library. |
java.util.Collection<ItemsDef> |
getAllItemsDef()
Returns all
Item in enumerations library. |
java.util.Collection<UIDef> |
getAllUIDefs()
Returns all
UIDef in the definitions library. |
UIDef |
getDefinedUIDef(java.lang.String id)
Returns
UIDef in definitions library. |
UIDef |
getMode(java.lang.String id)
Returns the mode
UIDef. |
java.util.List<UIDef> |
getModes()
Returns the mode list which contains
UIDef. |
boolean |
hasDefinedUIDef(java.lang.String id)
Returns true if the specified
UIDef ID exists. |
boolean |
hasItemsDef(java.lang.String id) |
static boolean |
isAttrName(java.lang.String name)
Returns true if this specified name is an attribute name.
|
JSONObject |
mergedJSON()
Gets the Config JSONObject for UI.
|
static Config |
parse(JSONObject json)
Returns the Config.
|
void |
removeMode(java.lang.String id)
Removes the mode
UIDef. |
java.lang.Object |
toJSON()
Gets the Config JSONObject.
|
public static void addAttrName(java.lang.String name)
name - The attribute namepublic static boolean isAttrName(java.lang.String name)
name - The attribute namepublic UIDef define(java.lang.String id)
UIDef, and adds this UIDef in definitions library.id - The IDjava.lang.RuntimeException - when this ID existspublic UIDef define(java.lang.String id, java.lang.String... refs)
UIDef, and adds this UIDef in definitions library.id - The IDrefs - The reference object IDjava.lang.RuntimeException - when this ID existspublic UIDef define(java.lang.String id, UIDef... defs)
UIDef, and adds this UIDef in definitions library.id - The iddefs - The reference objectsjava.lang.RuntimeException - when this ID existspublic UIDef getDefinedUIDef(java.lang.String id)
UIDef in definitions library.id - The IDpublic boolean hasDefinedUIDef(java.lang.String id)
UIDef ID exists.id - The IDpublic UIDef createMode(java.lang.String id, java.lang.String... refs)
UIDef.id - The IDrefs - The reference object IDpublic UIDef getMode(java.lang.String id)
UIDef.id - The IDpublic void removeMode(java.lang.String id)
UIDef.id - The IDpublic java.util.List<UIDef> getModes()
UIDef.public java.util.Collection<UIDef> getAllUIDefs()
UIDef in the definitions library.public boolean hasItemsDef(java.lang.String id)
public void addItemsDef(ItemsDef itemsDef)
ItemsDef with the specified ID.itemsDef - Item.ItemsDefpublic java.util.Collection<ItemsDef> getAllItemsDef()
Item in enumerations library.public java.lang.Object toJSON()
public JSONObject mergedJSON()
public static Config parse(JSONObject json)
json - The Config JSONObject