public abstract class AbstractWingElement extends 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(ContentHandler contentHandler,
NamespaceSupport namespaces,
Namespace namespace,
String name)
Send the SAX events to end this element.
|
protected void |
endElement(ContentHandler contentHandler,
NamespaceSupport namespaces,
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,
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,
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,
String message)
Check to make sure the parameter is not null or an empty string.
|
protected void |
require(String parameter,
String message)
Check to make sure the parameter is not null or an empty string.
|
protected void |
requireFalse(boolean test,
String message)
Check to make sure that the boolean test value is false.
|
protected void |
requireTrue(boolean test,
String message)
Check to make sure that the boolean test value is true.
|
protected void |
restrict(String parameter,
String[] options,
String message)
Check to make sure that the parameter is a member of one of the options.
|
protected void |
sendCharacters(ContentHandler contentHandler,
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(ContentHandler contentHandler,
NamespaceSupport namespaces,
Namespace namespace,
String name,
AttributeMap attributes)
Send the SAX events to start this element.
|
protected void |
startElement(ContentHandler contentHandler,
NamespaceSupport namespaces,
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(String parameter, 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, String message) throws WingInvalidArgument
parameter - A non null and none empty stringmessage - The exception message thrown if parameter is invalid.WingInvalidArgumentprotected void restrict(String parameter, String[] options, 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,
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,
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,
String message)
throws WingInvalidArgument
test - A false value.message - The exception message thrown if "test" is invalid.WingInvalidArgumentprotected void requireTrue(boolean test,
String message)
throws WingInvalidArgument
test - A true value.message - The exception message thrown if "test" is invalid.WingInvalidArgumentprotected void startElement(ContentHandler contentHandler, NamespaceSupport namespaces, String name, AttributeMap attributes) throws 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.SAXExceptionprotected void startElement(ContentHandler contentHandler, NamespaceSupport namespaces, Namespace namespace, String name, AttributeMap attributes) throws 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 elementSAXExceptionprotected void sendCharacters(ContentHandler contentHandler, String characters) throws SAXException
contentHandler - (Required) The registered contentHandler where SAX events
should be routed too.characters - (May be null) Characters to send.SAXExceptionprotected void endElement(ContentHandler contentHandler, NamespaceSupport namespaces, String name) throws 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.SAXExceptionprotected void endElement(ContentHandler contentHandler, NamespaceSupport namespaces, Namespace namespace, String name) throws 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.SAXExceptionpublic void dispose()
dispose in interface WingElementCopyright © 2016 DuraSpace. All Rights Reserved.