|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.buildtools.maven2.plugin.builder.model.WebConfigMeta
public class WebConfigMeta
Field Summary | |
---|---|
protected Map |
_webConfigParameters
|
Constructor Summary | |
---|---|
WebConfigMeta()
Constructor. |
Method Summary | |
---|---|
void |
addWebConfigParam(WebConfigParamMeta wcp)
|
static void |
addXmlRules(org.apache.commons.digester.Digester digester,
String prefix)
Add digester rules to repopulate an instance of this type from an xml file. |
String |
getModelId()
Indicates which "group" of metadata this class belongs to. |
WebConfigParamMeta |
getWebConfigParam(String name)
|
Collection |
getWebConfigParametersList()
|
protected void |
merge(ClassMeta other)
Merge any inheritable data from the specified "other" instance into the metadata held by this instance. |
void |
setModelId(String modelId)
|
Iterator |
webConfigParameters()
|
int |
webConfigParametersSize()
|
protected void |
writeXml(XmlWriter out)
Write the properties of this instance out as xml. |
protected void |
writeXmlComplex(XmlWriter out)
See documentation for writeXml and writeXmlSimple methods. |
protected void |
writeXmlSimple(XmlWriter out)
Write this model out as xml. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map _webConfigParameters
Constructor Detail |
---|
public WebConfigMeta()
Method Detail |
---|
public static void addXmlRules(org.apache.commons.digester.Digester digester, String prefix)
protected void writeXml(XmlWriter out)
The name of the xml element that is created to hold the properties was specified when the constructor was called.
Subclasses that want to output their own properties should not override this method. Instead, they should override writeXmlSimple (and in rare cases writeXmlComplex).
Having two write methods (writeXmlSimple/writeXmlComplex) gives some basic control over the order in which data is written to xml, in order to make the generated xml look nice. Any properties written in writeXmlSimple will appear in the output file before properties written by writeXmlComplex. Therefore, properties which are "easily read" should be written out in a writeXmlSimple method. Data which has large CDATA blocks, or complicated nested structure should be written out in a writeXmlComplex method so that the "simple" stuff can be easily read and is not buried in the middle of the harder-to-read output.
protected void writeXmlSimple(XmlWriter out)
Subclasses that wish to write out properties as xml should override this method, call the super implementation, then call methods on the XmlWriter object to output their data.
protected void writeXmlComplex(XmlWriter out)
protected void merge(ClassMeta other)
public String getModelId()
Projects can inherit metadata from other projects, in which case all the ClassMeta objects end up in one big collection. But for some purposes it is necessary to iterate over the objects belonging to only one project (eg when generating components). This return value can be tested to check which "group" (project) a particular instance belongs to.
public void setModelId(String modelId)
public void addWebConfigParam(WebConfigParamMeta wcp)
addWebConfigParam
in interface WebConfigParamHolder
public int webConfigParametersSize()
public WebConfigParamMeta getWebConfigParam(String name)
getWebConfigParam
in interface WebConfigParamHolder
public Iterator webConfigParameters()
webConfigParameters
in interface WebConfigParamHolder
public Collection getWebConfigParametersList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |