xmlBlaster 2.2.0 API

org.xmlBlaster.util.qos
Class QueryRefinementQos

java.lang.Object
  extended by org.xmlBlaster.util.qos.QueryRefinementQos
Direct Known Subclasses:
AccessFilterQos, QuerySpecQos

public abstract class QueryRefinementQos
extends java.lang.Object

Base class till helper classes such as AccessFilterQos and QuerySpecQos.

 <filter type='ContentLength' version='1.0'>
    800
 </filter>
 
This example addresses the plugin in xmlBlaster.properties file
   MimeAccessPlugin[ContentLenFilter][1.0]=org.xmlBlaster.engine.mime.demo.ContentLenFilter
 
The filter rules apply for cluster configuration as well.

See Also:
MIME based access filter plugin framework

Field Summary
static java.lang.String DEFAULT_version
          The version of the plugin
protected  Global glob
           
private static java.util.logging.Logger log
           
protected  java.lang.String logName
          the name to assign to the log of the extending class
protected  java.lang.String ME
           
protected  Query query
          The filter/query rule string and an object to hold the prepared query on demand
protected  java.lang.String tagName
          the tag name specific to the extending class
protected  java.lang.String type
          The plugin name e.g.
private  java.lang.String version
           
protected  java.lang.String versionProp
          the name of the property retrieving the version of the plugin of the extending class
 
Constructor Summary
protected QueryRefinementQos(Global glob, java.lang.String type, java.lang.String version, Query query, java.lang.String tagName, java.lang.String logName, java.lang.String versionProp)
           
protected QueryRefinementQos(Global glob, java.lang.String tagName, java.lang.String logName, java.lang.String versionProp)
           
protected QueryRefinementQos(Global glob, java.lang.String type, java.lang.String version, java.lang.String query, java.lang.String tagName, java.lang.String logName, java.lang.String versionProp)
           
 
Method Summary
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String name, java.lang.StringBuffer character)
          Handle SAX parsed end element
 Query getQuery()
          Returns the query, the syntax is depending on what your plugin supports.
 java.lang.String getType()
          Returns the plugins name.
 java.lang.String getVersion()
          Returns the plugins version.
 void setQuery(Query query)
          Set the filter query, it should fit to the protocol-type.
 void setType(java.lang.String type)
           
 void setVersion(java.lang.String version)
           
 boolean startElement(java.lang.String uri, java.lang.String localName, java.lang.String name, java.lang.StringBuffer character, org.xml.sax.Attributes attrs)
          Called for SAX filter start tag
 java.lang.String toXml()
          Dump state of this object into a XML ASCII string.
 java.lang.String toXml(java.lang.String extraOffset)
          Dump state of this object into a XML ASCII string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

protected java.lang.String ME

glob

protected final Global glob

log

private static java.util.logging.Logger log

query

protected Query query
The filter/query rule string and an object to hold the prepared query on demand


type

protected java.lang.String type
The plugin name e.g. "ContentLength"


DEFAULT_version

public static final java.lang.String DEFAULT_version
The version of the plugin

See Also:
Constant Field Values

version

private java.lang.String version

tagName

protected java.lang.String tagName
the tag name specific to the extending class


logName

protected java.lang.String logName
the name to assign to the log of the extending class


versionProp

protected java.lang.String versionProp
the name of the property retrieving the version of the plugin of the extending class

Constructor Detail

QueryRefinementQos

protected QueryRefinementQos(Global glob,
                             java.lang.String tagName,
                             java.lang.String logName,
                             java.lang.String versionProp)

QueryRefinementQos

protected QueryRefinementQos(Global glob,
                             java.lang.String type,
                             java.lang.String version,
                             java.lang.String query,
                             java.lang.String tagName,
                             java.lang.String logName,
                             java.lang.String versionProp)
Parameters:
glob - The global handle holding environment and logging objects
type - The plugin name, as used in xmlBlaster.properties e.g. "ContentLenFilter".
version - The plugin version, defaults to "1.0"
query - Your filter rule

QueryRefinementQos

protected QueryRefinementQos(Global glob,
                             java.lang.String type,
                             java.lang.String version,
                             Query query,
                             java.lang.String tagName,
                             java.lang.String logName,
                             java.lang.String versionProp)
Parameters:
glob - The global handle holding environment and logging objects
type - The plugin name, as used in xmlBlaster.properties e.g. "ContentLenFilter".
version - The plugin version, defaults to "1.0"
query - Your filter rule
Method Detail

setType

public final void setType(java.lang.String type)
Parameters:
type - The plugin name, as used in xmlBlaster.properties e.g. "ContentLenFilter".

getType

public final java.lang.String getType()
Returns the plugins name.

Returns:
e.g. "ContentLenFilter"

setVersion

public final void setVersion(java.lang.String version)
Parameters:
version - The version of the plugin, defaults to "1.0", but can anything you like.

getVersion

public final java.lang.String getVersion()
Returns the plugins version.

Returns:
e.g. "1.0"

setQuery

public final void setQuery(Query query)
Set the filter query, it should fit to the protocol-type.

Parameters:
query - The filter query, e.g. "8000" for max length of a content with "ContentLenFilter" plugin

getQuery

public final Query getQuery()
Returns the query, the syntax is depending on what your plugin supports.

Returns:
e.g. "a>12 AND b<15"

startElement

public final boolean startElement(java.lang.String uri,
                                  java.lang.String localName,
                                  java.lang.String name,
                                  java.lang.StringBuffer character,
                                  org.xml.sax.Attributes attrs)
Called for SAX filter start tag

Returns:
true if ok, false on error

endElement

public final void endElement(java.lang.String uri,
                             java.lang.String localName,
                             java.lang.String name,
                             java.lang.StringBuffer character)
Handle SAX parsed end element


toXml

public final java.lang.String toXml()
Dump state of this object into a XML ASCII string.


toXml

public final java.lang.String toXml(java.lang.String extraOffset)
Dump state of this object into a XML ASCII string.
Only none default values are dumped for performance reasons

Parameters:
extraOffset - indenting of tags for nice output
Returns:
The xml representation

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.