|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.izforge.izpack.panels.userinput.field.Config
public class Config
User input configuration.
| Constructor Summary | |
|---|---|
Config(String path,
Resources resources,
InstallData installData,
ObjectFactory factory,
Messages messages)
Constructs a Config. |
|
| Method Summary | |
|---|---|
Alignment |
getAlignment(IXMLElement element,
String name,
Alignment defaultValue)
Returns the named alignment value, replacing any variables present. |
String |
getAttribute(IXMLElement element,
String name)
Returns the named attribute value. |
String |
getAttribute(IXMLElement element,
String name,
boolean optional)
Returns the named attribute value. |
boolean |
getBoolean(IXMLElement element,
String name,
boolean defaultValue)
Returns the named attribute as an integer. |
Boolean |
getBooleanOrNull(IXMLElement element,
String name)
Returns the named attribute as an integer in a three-state logic. |
String |
getContext(IXMLElement element)
Returns the context of an element, for error reporting purposes. |
IXMLElement |
getElement(IXMLElement parent,
String name)
Returns the named element. |
ObjectFactory |
getFactory()
Returns a factory for creating configuration items. |
int |
getInt(IXMLElement element,
String name,
int defaultValue)
Returns the named attribute as an integer. |
String |
getLocalString(String value)
Returns a localised version of a string. |
String |
getPath()
Returns the configuration file path. |
String |
getRawString(IXMLElement element,
String name,
String defaultValue)
Returns the named attribute value without replacing any variables present. |
IXMLElement |
getRoot()
Returns the root element. |
String |
getString(IXMLElement element,
String name,
String defaultValue)
Returns the named attribute value, replacing any variables present. |
String |
getText(IXMLElement element)
Extracts the text from an element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Config(String path,
Resources resources,
InstallData installData,
ObjectFactory factory,
Messages messages)
Config.
path - the resource pathresources - the resourcesinstallData - the installation datafactory - the factorymessages - the messages| Method Detail |
|---|
public String getPath()
public IXMLElement getRoot()
public IXMLElement getElement(IXMLElement parent,
String name)
parent - the parent elementname - the element name
IzPackException - if the element is not found
public String getAttribute(IXMLElement element,
String name)
element - the elementname - the attribute name
IzPackException - if the attribute is not found
public String getAttribute(IXMLElement element,
String name,
boolean optional)
element - the elementname - the attribute nameoptional - flag to allow null to be returned if attribute is optional
IzPackException - if the attribute is not found and attribute is required
public String getString(IXMLElement element,
String name,
String defaultValue)
element - the elementname - the attribute namedefaultValue - the default value if the attribute isn't set
public String getRawString(IXMLElement element,
String name,
String defaultValue)
element - the elementname - the attribute namedefaultValue - the default value if the attribute isn't set
public String getLocalString(String value)
value - the string value
value, or value if there is no localised version
public int getInt(IXMLElement element,
String name,
int defaultValue)
element - the element namename - the attribute namedefaultValue - the value to return if the attribute isn't set or is invalid
defaultValue if it isn't set or is invalid
public boolean getBoolean(IXMLElement element,
String name,
boolean defaultValue)
element - the element namename - the attribute namedefaultValue - the value to return if the attribute isn't set or is invalid
defaultValue if it isn't set or is invalid
public Boolean getBooleanOrNull(IXMLElement element,
String name)
element - the element namename - the attribute name
null if it isn't set or is invalidpublic String getText(IXMLElement element)
id attribute; or
txt.
element - the element from which to extract the text
null if none can be found
public Alignment getAlignment(IXMLElement element,
String name,
Alignment defaultValue)
element - the elementname - the attribute namedefaultValue - the default value if the attribute isn't set or is invalid
defaultValue if it isn't set or is invalidpublic String getContext(IXMLElement element)
element - the element
public ObjectFactory getFactory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||