|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.jasig.portal.car.DatabaseTagHandler
public class DatabaseTagHandler
Processes the database tag looking for two element that should each contain a file path suitable for loading via classloader.findResource(). The "tables" tag should point to a file having the appropriate format for creating tables in the portal's database using DbLoader and hence should be structured identically to uPortal's default data structure definition file tables.xml. The "data" tag is optional but if included should point to file having the appropriate format for loading with DbLoader the tables created by tables.xml and hence should be structured identically to uPortal's default data set file data.xml.
Field Summary | |
---|---|
private java.lang.StringBuffer |
chars
|
private boolean |
CREATE_SCRPT_DFLT
|
private boolean |
CREATE_TBL_DFLT
|
private boolean |
createScript
|
private boolean |
createTables
|
private ParsingContext |
ctx
|
private java.lang.String |
data
|
private boolean |
DROP_TBL_DFLT
|
private boolean |
dropTables
|
private static org.apache.commons.logging.Log |
log
|
private boolean |
POP_TBL_DFLT
|
private boolean |
populateTables
|
private java.lang.String |
tables
|
Constructor Summary | |
---|---|
DatabaseTagHandler(ParsingContext ctx)
Construct a DatabaseHandler that receives events from parsing a channel archive deployment descriptor but only for any contained database elements and their children. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
Handle the characters event to capture textual content for elements. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Handle the closing element event. |
private boolean |
getBoolean(java.lang.String string,
boolean deflt)
|
private void |
loadDatabase()
Load the database using DbLoader. |
private void |
resetValues()
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Handle start element events. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private boolean CREATE_SCRPT_DFLT
private boolean POP_TBL_DFLT
private boolean CREATE_TBL_DFLT
private boolean DROP_TBL_DFLT
private boolean createScript
private boolean populateTables
private boolean createTables
private boolean dropTables
private ParsingContext ctx
private java.lang.String tables
private java.lang.String data
private java.lang.StringBuffer chars
Constructor Detail |
---|
DatabaseTagHandler(ParsingContext ctx)
ctx
- Method Detail |
---|
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
private boolean getBoolean(java.lang.String string, boolean deflt)
string
-
private void resetValues()
private void loadDatabase()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |