public abstract class AbstractWingElement extends java.lang.Object implements WingElement
| Modifier and Type | Field and Description |
|---|---|
protected WingContext |
context
The current context this element is operating under.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractWingElement()
Construct a new WingElement without access to the current wing Context.
|
protected |
AbstractWingElement(WingContext context)
Construct a new WingElement.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Dispose
|
protected void |
endElement(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.helpers.NamespaceSupport namespaces,
Namespace namespace,
java.lang.String name)
Send the SAX events to end this element.
|
protected void |
endElement(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.helpers.NamespaceSupport namespaces,
java.lang.String name)
Send the SAX events to end this element.
|
protected WingContext |
getWingContext()
Return the currently registered wing context.
|
protected void |
greater(int parameter,
int greater,
java.lang.String message)
Check to make sure that the parameter is GREATER THAN (note: not equal
to) the given greater variable.
|
protected void |
lesser(int parameter,
int lesser,
java.lang.String message)
Check to make sure that the parameter is LESS THAN (note: not equal to)
the given lesser variable.
|
protected void |
require(Message parameter,
java.lang.String message)
Check to make sure the parameter is not null or an empty string.
|
protected void |
require(java.lang.String parameter,
java.lang.String message)
Check to make sure the parameter is not null or an empty string.
|
protected void |
requireFalse(boolean test,
java.lang.String message)
Check to make sure that the boolean test value is false.
|
protected void |
requireTrue(boolean test,
java.lang.String message)
Check to make sure that the boolean test value is true.
|
protected void |
restrict(java.lang.String parameter,
java.lang.String[] options,
java.lang.String message)
Check to make sure that the parameter is a member of one of the options.
|
protected void |
sendCharacters(org.xml.sax.ContentHandler contentHandler,
java.lang.String characters)
Send the SAX event for these plain characters, not wrapped in any
elements.
|
protected void |
setWingContext(WingContext context)
Set the WingContext, note there are potential side effects of changing
the WingContext once it has been used.
|
protected void |
startElement(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.helpers.NamespaceSupport namespaces,
Namespace namespace,
java.lang.String name,
AttributeMap attributes)
Send the SAX events to start this element.
|
protected void |
startElement(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.helpers.NamespaceSupport namespaces,
java.lang.String name,
AttributeMap attributes)
Send the SAX event to start this element.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoSAXprotected WingContext context
protected AbstractWingElement(WingContext context)
context - (Required) The context this element is contained in.protected AbstractWingElement()
protected WingContext getWingContext()
protected void setWingContext(WingContext context)
context - The new WingContext.protected void require(java.lang.String parameter,
java.lang.String message)
throws WingInvalidArgument
parameter - A non null and none empty stringmessage - The exception message thrown if parameter is invalid.WingInvalidArgumentprotected void require(Message parameter, java.lang.String message) throws WingInvalidArgument
parameter - A non null and none empty stringmessage - The exception message thrown if parameter is invalid.WingInvalidArgumentprotected void restrict(java.lang.String parameter,
java.lang.String[] options,
java.lang.String message)
throws WingInvalidArgument
parameter - A null string, or a member of the options array.options - A list of possible values for the parameter.message - The exception message thrown if the parameter is invalid.WingInvalidArgumentprotected void greater(int parameter,
int greater,
java.lang.String message)
throws WingInvalidArgument
parameter - An int who's value is greater than greater.greater - An int who's value is lesser that greater.message - The exception message thrown if the parameter is invalid.WingInvalidArgumentprotected void lesser(int parameter,
int lesser,
java.lang.String message)
throws WingInvalidArgument
parameter - An int who's value is less than lesser.lesser - An int who's value is greater that lesser.message - The exception message thrown if the parameter is invalid.WingInvalidArgumentprotected void requireFalse(boolean test,
java.lang.String message)
throws WingInvalidArgument
test - A false value.message - The exception message thrown if "test" is invalid.WingInvalidArgumentprotected void requireTrue(boolean test,
java.lang.String message)
throws WingInvalidArgument
test - A true value.message - The exception message thrown if "test" is invalid.WingInvalidArgumentprotected void startElement(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.helpers.NamespaceSupport namespaces,
java.lang.String name,
AttributeMap attributes)
throws org.xml.sax.SAXException
contentHandler - (Required) The registered contentHandler where SAX events
should be routed too.namespaces - (Required) SAX Helper class to keep track of namespaces able
to determine the correct prefix for a given namespace URI.name - (Required) The element's localNameattributes - (May be null) Attributes for this element.org.xml.sax.SAXExceptionprotected void startElement(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.helpers.NamespaceSupport namespaces,
Namespace namespace,
java.lang.String name,
AttributeMap attributes)
throws org.xml.sax.SAXException
contentHandler - (Required) The registered contentHandler where SAX events
should be routed too.namespaces - (Required) SAX Helper class to keep track of namespaces able
to determine the correct prefix for a given namespace URI.namespace - (Required) The namespace of this element.name - (Required) The local name of this element.attributes - (May be null) Attributes for this elementorg.xml.sax.SAXExceptionprotected void sendCharacters(org.xml.sax.ContentHandler contentHandler,
java.lang.String characters)
throws org.xml.sax.SAXException
contentHandler - (Required) The registered contentHandler where SAX events
should be routed too.characters - (May be null) Characters to send.org.xml.sax.SAXExceptionprotected void endElement(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.helpers.NamespaceSupport namespaces,
java.lang.String name)
throws org.xml.sax.SAXException
contentHandler - (Required) The registered contentHandler where SAX events
should be routed too.namespaces - (Required) SAX Helper class to keep track of namespaces able
to determine the correct prefix for a given namespace URI.name - (Required) The localName of this element.org.xml.sax.SAXExceptionprotected void endElement(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.helpers.NamespaceSupport namespaces,
Namespace namespace,
java.lang.String name)
throws org.xml.sax.SAXException
contentHandler - (Required) The registered contentHandler where SAX events
should be routed too.namespaces - (Required) SAX Helper class to keep track of namespaces able
to determine the correct prefix for a given namespace URI.namespace - (Required) The namespace of this element.name - (Required) The local name of this element.org.xml.sax.SAXExceptionpublic void dispose()
dispose in interface WingElementCopyright © 2014 DuraSpace. All Rights Reserved.