public class PageSet
extends dom.DOMDocument
Modifier and Type | Field and Description |
---|---|
static short |
ClassId |
Constructor and Description |
---|
PageSet(java.lang.String sMsiteURI)
Create empty PageSet from a Microsite.
|
PageSet(java.lang.String sMsiteURI,
boolean bValidateXML)
Create empty PageSet from a Microsite
|
PageSet(java.lang.String sMsiteURI,
java.lang.String sPageSetURI)
Create PageSet from a Microsite and load data from an XML file.
|
PageSet(java.lang.String sMsiteURI,
java.lang.String sPageSetURI,
boolean bValidateXML)
Create PageSet from a Microsite and load data from an XML file.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addBlock(java.lang.String sFilePath,
java.lang.String sPageGUID,
java.lang.String sBlockXML)
Add block at the end of a Page
|
java.util.Vector<Page> |
addresses()
Get Addresses for this PageSet
|
Page |
buildPageForEdit(java.lang.String sPageGUID,
java.lang.String sBasePath,
java.lang.String sOutputPath,
java.lang.String sCtrlPath,
java.lang.String sMenuPath,
java.lang.String sIntegradorPath,
java.lang.String sSelPageOptions,
java.util.Properties oEnvironmentProps,
java.util.Properties oUserProps) |
java.util.Vector |
buildSite(java.lang.String sBasePath,
java.lang.String sOutputPath,
java.util.Properties oEnvironmentProps,
java.util.Properties oUserProps)
Generate XSL Transformation output for PageSet.
|
void |
buildSiteForEdit(java.lang.String sBasePath,
java.lang.String sOutputPath,
java.lang.String sCtrlPath,
java.lang.String sMenuPath,
java.lang.String sIntegradorPath,
java.lang.String sSelPageOptions,
java.util.Properties oEnvironmentProps,
java.util.Properties oUserProps)
Generate XSL Transformation output with editing layers for PageSet.
|
java.lang.String |
catalog()
GUID of Catalog associated to this PageSet
|
java.lang.String |
company()
GUID of Company associated to this PageSet
|
static java.lang.String |
getMicrositeGUID(java.lang.String sPageSetURI)
Get base Microsite GUID from a PageSet XML file.
|
java.lang.String |
guid()
Get PageSet <guid> value
|
javax.xml.transform.TransformerException |
lastException()
Last TransformerException raised by buildSite() or buildSiteForEdit()
|
static void |
main(java.lang.String[] argv) |
static void |
mergeCompanyInfo(JDCConnection oConn,
java.lang.String sFilePath,
java.lang.String sCompanyGUID)
Merge Company addresses, catalog and other information into a PageSet XML file
Addresses are readed from k_addresses table and appended to the XML file after the <pages> node.
|
Microsite |
microsite() |
Page |
page(java.lang.String sPageId)
Get a Page from this PageSet
|
java.util.Vector<Page> |
pages()
Get pages for this PageSet
|
static void |
removeBlock(java.lang.String sFilePath,
java.lang.String sPageGUID,
java.lang.String sBlockId)
Remove Block
Block is searched by an internal XPath expression:
pageset/pages/page[@guid='sPageGUID']/blocks/block[@id='sBlockId'] |
static void |
removePage(java.lang.String sFilePath,
java.lang.String sPageGUID)
Remove Page from PageSet
Page is searched by an internal XPath expression:
pageset/pages/page[@guid='sPageGUID'] |
static void |
removePageByTitle(java.lang.String sFilePath,
java.lang.String sPageGUIDAttr)
Remove a Page searching it by title
Page is searched by an internal XPath expression:
pageset/pages/page[guid = 'sPageTitle'] |
void |
save(java.lang.String sFilePath) |
filterChildsByName, getAttribute, getDocument, getFirstElement, getNamesSpaces, getNextElement, getRootElement, getRootNode, getTextValue, getValidation, getWriterEncoding, parseStream, parseURI, parseURI, print, print, seekChildByAttr, seekChildByName, setAttribute, setNamesSpaces, setValidation
public static final short ClassId
public PageSet(java.lang.String sMsiteURI) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.io.FileNotFoundException, java.lang.Exception
sMsiteURI
- Microsite XML file URIjava.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.io.FileNotFoundException
java.lang.Exception
public PageSet(java.lang.String sMsiteURI, boolean bValidateXML) throws java.lang.ClassNotFoundException, java.lang.Exception, java.lang.IllegalAccessException, java.io.FileNotFoundException
sMsiteURI
- Microsite XML file URI
(for example file:///opt/knowgate/storage/xslt/templates/Comtemporary.xml)bValidateXML
- true if XML validation with W3C schemas is to be done,
false is no validation is to be done.java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.io.FileNotFoundException
java.lang.Exception
public PageSet(java.lang.String sMsiteURI, java.lang.String sPageSetURI) throws java.lang.ClassNotFoundException, java.lang.Exception, java.lang.IllegalAccessException, java.io.FileNotFoundException
sMsiteURI
- Microsite XML file URIsPageSetURI
- PageSet XML file URI
(for example file:///opt/knowgate/storage/domains/1026/workareas/f7f055ca39854673b17518ec5f87de3b/apps/Mailwire/data/Newsletter01.xml)java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.Exception
java.io.FileNotFoundException
public PageSet(java.lang.String sMsiteURI, java.lang.String sPageSetURI, boolean bValidateXML) throws java.lang.ClassNotFoundException, java.lang.Exception, java.lang.IllegalAccessException, java.io.FileNotFoundException
sMsiteURI
- Microsite XML file URIsPageSetURI
- PageSet XML file URIbValidateXML
- true if XML validation with W3C schemas is to be done,
false is no validation is to be done.java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.Exception
java.io.FileNotFoundException
public java.lang.String guid()
public javax.xml.transform.TransformerException lastException()
public Microsite microsite()
public java.lang.String catalog() throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public java.lang.String company() throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public Page page(java.lang.String sPageId) throws org.w3c.dom.DOMException, java.lang.NullPointerException
sPageId
- GUID of page to be retrievedorg.w3c.dom.DOMException
- If java.lang.NullPointerException
- If sPageId is nullpublic java.util.Vector<Page> pages() throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
- If public java.util.Vector<Page> addresses() throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
- If public java.util.Vector buildSite(java.lang.String sBasePath, java.lang.String sOutputPath, java.util.Properties oEnvironmentProps, java.util.Properties oUserProps) throws java.io.FileNotFoundException, java.io.IOException, org.w3c.dom.DOMException, javax.xml.transform.TransformerException, javax.xml.transform.TransformerConfigurationException
Generate XSL Transformation output for PageSet.
sBasePath
- Path to directory containing XSL stylesheetssOutputPath
- Path to output directory where generated files shall be saved.oEnvironmentProps
- Environment PropertiesoUserProps
- User Propertiesjava.io.IOException
javax.xml.transform.TransformerException
javax.xml.transform.TransformerConfigurationException
java.io.FileNotFoundException
org.w3c.dom.DOMException
public Page buildPageForEdit(java.lang.String sPageGUID, java.lang.String sBasePath, java.lang.String sOutputPath, java.lang.String sCtrlPath, java.lang.String sMenuPath, java.lang.String sIntegradorPath, java.lang.String sSelPageOptions, java.util.Properties oEnvironmentProps, java.util.Properties oUserProps) throws java.io.FileNotFoundException, java.io.IOException, org.w3c.dom.DOMException, javax.xml.transform.TransformerException, javax.xml.transform.TransformerConfigurationException, java.net.MalformedURLException
java.io.FileNotFoundException
java.io.IOException
org.w3c.dom.DOMException
javax.xml.transform.TransformerException
javax.xml.transform.TransformerConfigurationException
java.net.MalformedURLException
public void buildSiteForEdit(java.lang.String sBasePath, java.lang.String sOutputPath, java.lang.String sCtrlPath, java.lang.String sMenuPath, java.lang.String sIntegradorPath, java.lang.String sSelPageOptions, java.util.Properties oEnvironmentProps, java.util.Properties oUserProps) throws java.io.IOException, org.w3c.dom.DOMException, javax.xml.transform.TransformerException, javax.xml.transform.TransformerConfigurationException, java.net.MalformedURLException
Generate XSL Transformation output with editing layers for PageSet.
sBasePath
- Path to directory containing XSL stylesheetssOutputPath
- Path to output directory where generated files shall be saved.sCtrlPath
- Path to source code of the edition layer (tipically /includes/integrador_ctrl.inc file)sMenuPath
- Path to dynamic page that generates the block list (tipically /webbuilder/wb_mnuintegrador.jsp)sIntegradorPath
- Path to JavaScript functions of edition layer (tipically integrador.js)sSelPageOptions
- If this is a single Page PageSet this parameter must be "",
else it is a list of available pages in HTML format.oEnvironmentProps
- Environment properties to be replaced at templatedoUserProps
- User Properties to be replaced at templatedjava.io.IOException
org.w3c.dom.DOMException
javax.xml.transform.TransformerException
javax.xml.transform.TransformerConfigurationException
java.lang.NullPointerException
java.net.MalformedURLException
public java.lang.String addBlock(java.lang.String sFilePath, java.lang.String sPageGUID, java.lang.String sBlockXML) throws java.lang.IllegalAccessException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.NumberFormatException, java.io.UTFDataFormatException, java.lang.Exception
Add block at the end of a Page
sFilePath
- Path to PageSet XML filesPageGUID
- <Page> GUID attributesBlockXML
- XML of Block to be addedjava.lang.IllegalAccessException
java.io.IOException
java.lang.ClassNotFoundException
java.lang.NumberFormatException
- If Identifier attribute java.io.UTFDataFormatException
java.lang.Exception
public void save(java.lang.String sFilePath) throws java.io.IOException
java.io.IOException
public static void mergeCompanyInfo(JDCConnection oConn, java.lang.String sFilePath, java.lang.String sCompanyGUID) throws java.sql.SQLException, java.io.IOException
Merge Company addresses, catalog and other information into a PageSet XML file
Addresses are readed from k_addresses table and appended to the XML file after the <pages> node.
oConn
- JDBC database connectionsFilePath
- Complete path to the PageSet XML data filesCompanyGUID
- GUID of Company which addresses are to be merged into the PageSet XML filejava.sql.SQLException
java.io.IOException
public static void removePage(java.lang.String sFilePath, java.lang.String sPageGUID) throws java.io.IOException
Remove Page from PageSet
Page is searched by an internal XPath expression:sFilePath
- Path to PageSet XML filesPageGUID
- <Page> GUID attributejava.io.IOException
public static void removePageByTitle(java.lang.String sFilePath, java.lang.String sPageGUIDAttr) throws java.io.IOException
Remove a Page searching it by title
Page is searched by an internal XPath expression:sFilePath
- Path to PageSet XML filesPageGUIDAttr
- Page GUIDjava.io.IOException
public static void removeBlock(java.lang.String sFilePath, java.lang.String sPageGUID, java.lang.String sBlockId) throws java.io.IOException
Remove Block
Block is searched by an internal XPath expression:sFilePath
- Path to PageSet XML filesPageGUID
- <Page> GUID attributesBlockId
- id attribute of Block to be removedjava.io.IOException
public static java.lang.String getMicrositeGUID(java.lang.String sPageSetURI) throws java.io.FileNotFoundException, java.io.IOException
Get base Microsite GUID from a PageSet XML file.
GUID is obtained directly from raw text reading without parsing the input file.
sPageSetURI
- Path to PageSet XML filejava.io.FileNotFoundException
java.io.IOException
public static void main(java.lang.String[] argv) throws java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.lang.Exception
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.Exception