public abstract class AbstractModuleFacet extends AbstractXmlResourceFacet
Collection
of
Modules
they wish to inherit to
modules
.Modifier and Type | Field and Description |
---|---|
protected Collection<ModuleVault.Module> |
modules
A collection of GWT modules to inherit in this project.
|
protected String |
xPathRootExpression |
xmlParserFactory, xPathFactory
MAIN_PROFILE
Constructor and Description |
---|
AbstractModuleFacet() |
Modifier and Type | Method and Description |
---|---|
protected Collection<Node> |
generateInsertElements(Collection<ModuleVault.Module> modules,
Document doc)
|
protected Map<XPathExpression,Collection<Node>> |
getElementsToInsert(XPath xPath,
ElementFactory elemFactory)
Get DOM nodes to write to an XML configuration file.
|
File |
getModuleFile() |
protected String |
getRelPath()
Get the relative path of XML file to be configured by this facet.
|
protected Map<XPathExpression,Node> |
getRemovalMap(XPath xPath,
ElementFactory elemFactory)
Return a map of xpath expressions of nodes to be replaced to their
replacements, used when this facet is uninstalled.
|
protected Map<XPathExpression,Node> |
getReplacements(XPath xPath,
ElementFactory elemFactory)
Get a Map of nodes to be replaced in an XML configuration file.
|
getElementsToVerify, getResFile, install, isInstalled, uninstall
addDependenciesToProfile, error, getDependency, getDependency, getProject, hasDependency, hasProvidedDependency, warning
equals, getFaceted, hashCode, setFaceted
protected Collection<ModuleVault.Module> modules
protected final String xPathRootExpression
protected Collection<Node> generateInsertElements(Collection<ModuleVault.Module> modules, Document doc) throws ParserConfigurationException
modules
- The modules to generate Elements
for.doc
- Used to generate the Elements
.ParserConfigurationException
protected Map<XPathExpression,Node> getRemovalMap(XPath xPath, ElementFactory elemFactory)
AbstractXmlResourceFacet
getRemovalMap
in class AbstractXmlResourceFacet
xPath
- Used to generate XPathExpressions
.elemFactory
- Used to generate Nodes
.protected Map<XPathExpression,Collection<Node>> getElementsToInsert(XPath xPath, ElementFactory elemFactory) throws ParserConfigurationException, XPathExpressionException
AbstractXmlResourceFacet
getElementsToInsert
in class AbstractXmlResourceFacet
xPath
- Used to generate xpath expressions for finding nodes to add
children to.elemFactory
- The returned nodes should be created with this.XPathExpressions
(for finding
parent nodes), to collections of Nodes
to add as
children.ParserConfigurationException
XPathExpressionException
protected Map<XPathExpression,Node> getReplacements(XPath xPath, ElementFactory elemFactory) throws ParserConfigurationException
AbstractXmlResourceFacet
getReplacements
in class AbstractXmlResourceFacet
xPath
- Used to generate xpath expressions for finding nodes to replace.elemFactory
- The returned nodes should be created with this.XPathExpressions
(for finding
nodes to replace), to replacement Nodes
to add as
children.ParserConfigurationException
public File getModuleFile()
protected String getRelPath()
AbstractXmlResourceFacet
getRelPath
in class AbstractXmlResourceFacet
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.