|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectechopoint.util.StyleMerger
public class StyleMerger
StyleMerger
is an Component which alllows you to merge two
xml style definitions into a single one, which can then be loaded by echo.
We use it in the following way:
Our application has a default style which is used for normal installations
If we build special versions of our application to a customer, we then
add a second stylesheet with only the modifications for that client.
On system startup we then merge the two XML styles into one and then load
the resulting one.
Constructor Summary | |
---|---|
StyleMerger()
|
Method Summary | |
---|---|
protected static org.jdom.Element |
findStyleDefinition(org.jdom.Element rootNode,
String styleName)
Sear this tree for a matching style |
protected static String |
makeStyleName(org.jdom.Element style)
Make up a stylename which respects all attributes to uniquely identify a style. |
protected static void |
mergeStyle(org.jdom.Element targetStyle,
org.jdom.Element partialStyle)
Merge two styles. |
protected static org.jdom.Document |
mergeStyles(org.jdom.Document doc1,
org.jdom.Document doc2)
Merge the two docs and return the merged one. |
static void |
mergeXMLStyles(InputStream mainStyles,
InputStream patchStyles,
OutputStream out)
|
static void |
mergeXMLStyles(Reader mainStyles,
Reader patchStyles,
Writer out)
|
static void |
mergeXMLStyles(String baseStylesFile,
String patchStylesFile,
String outFile)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StyleMerger()
Method Detail |
---|
public static void mergeXMLStyles(String baseStylesFile, String patchStylesFile, String outFile) throws IOException, org.jdom.JDOMException
baseStylesFile
- File with default stylespatchStylesFile
- File which contains the styles to be added/patchedoutFile
- File with the merged styles
IOException
org.jdom.JDOMException
public static void mergeXMLStyles(Reader mainStyles, Reader patchStyles, Writer out) throws IOException, org.jdom.JDOMException
mainStyles
- Reader with with default stylespatchStyles
- Reader which contains the styles to be added/patchedout
- Output with the merged styles
IOException
org.jdom.JDOMException
public static void mergeXMLStyles(InputStream mainStyles, InputStream patchStyles, OutputStream out) throws IOException, org.jdom.JDOMException
mainStyles
- Stream with with default stylespatchStyles
- Stream which contains the styles to be added/patchedout
- Output with the merged styles
IOException
org.jdom.JDOMException
protected static org.jdom.Document mergeStyles(org.jdom.Document doc1, org.jdom.Document doc2)
doc1
- doc2
-
protected static String makeStyleName(org.jdom.Element style)
style
-
protected static org.jdom.Element findStyleDefinition(org.jdom.Element rootNode, String styleName)
rootNode
- styleName
-
protected static void mergeStyle(org.jdom.Element targetStyle, org.jdom.Element partialStyle)
targetStyle
- partialStyle
-
|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |