|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.XMLFilterImpl nbi.xmlsec.biocase.protocol.filter.ProtocolFilter nbi.xmlsec.biocase.protocol.filter.RequestFilter
The RequestFilter parses and evaluates requests of the BioCASE protocol. It consists of two internal filters working together:
HeaderFilter
parsed the BioCASE header. The
OperationTypeFilter
parses the request's scan or
search operation type. The request may be retrieved with the method
getRequest()
.
Field Summary | |
static String |
ACTION_REQUEST_CAPABILITIES
PDP Action capabilities |
static String |
ACTION_REQUEST_SCAN
PDP Action scan |
static String |
ACTION_REQUEST_SEARCH
PDP Action search |
(package private) HeaderFilter |
headerFilter
Subfilter for the header |
static String |
LN_ROOT
Local name of the root element request |
(package private) OperationTypeFilter |
opTypeFilter
Subfilter for the request type |
(package private) Request |
request
Request to be evaluated |
static String |
RESOURCE_ANY
PDP Resource any |
(package private) static int |
trackMode
Track mode for the filter stack |
Fields inherited from class nbi.xmlsec.biocase.protocol.filter.ProtocolFilter |
elementStack, filterMode, FILTERMODE_FILTER, FILTERMODE_NONE, FILTERMODE_PARSER, filterRoot, logger, PROT_URI_13, PROT_URI_20 |
Fields inherited from class org.xml.sax.helpers.XMLFilterImpl |
|
Constructor Summary | |
RequestFilter(String protocolURI,
int filterMode)
Inits the filter instance. |
|
RequestFilter(XMLReader parent,
String protocolURI,
int filterMode)
Inits the filter instance with specified parent. |
Method Summary | |
private boolean |
evaluateRequest(String action,
String resource)
Evaluates request access for a given resource and action. |
protected PDPFilterParameter |
getParameter()
Gets the parameter of this filter. |
Request |
getRequest()
Gets the request |
(package private) boolean |
isCapabilitiesRequest()
Checks, if the parsed header signals a capabilities request. |
(package private) boolean |
isScanRequest()
Checks, if the parsed header signals a scan request. |
(package private) boolean |
isSearchRequest()
Checks, if the parsed header signals a search request. |
protected nbi.xml.sax.SAXElement |
parseComplete(nbi.xml.sax.SAXElement element)
Evaluates the access conditions, when PDPFilterParameter set. |
protected nbi.xml.sax.SAXElement |
parseElement(nbi.xml.sax.SAXElement element)
Registers and sets the parameters for the OperationTypeFilter. |
protected nbi.xml.sax.SAXElement |
parseInit(nbi.xml.sax.SAXElement element)
Registers the subfilter for the header. |
Methods inherited from class nbi.xmlsec.biocase.protocol.filter.ProtocolFilter |
characters, checkFilterParameter, endElement, filterCharacters, filterElement, getFilterMode, getFilterParameter, getProtocolURI, isParsingComplete, registerSubFilter, setFilterParameter, setProtocolURI, startElement, unregisterSubFilter |
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl |
endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, 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 |
public static final String LN_ROOT
request
public static final String ACTION_REQUEST_CAPABILITIES
capabilities
public static final String ACTION_REQUEST_SCAN
scan
public static final String ACTION_REQUEST_SEARCH
search
public static final String RESOURCE_ANY
any
static final int trackMode
HeaderFilter headerFilter
OperationTypeFilter opTypeFilter
Request request
Constructor Detail |
public RequestFilter(String protocolURI, int filterMode)
protocolURI
- protocol version URI of this filter.filterMode
- filterMode of this filter
ProtocolFilter.filterMode
.public RequestFilter(XMLReader parent, String protocolURI, int filterMode)
parent
- parent reader.protocolURI
- protocol version URI of this filter.filterMode
- filterMode of this filter
ProtocolFilter.filterMode
.Method Detail |
protected nbi.xml.sax.SAXElement parseInit(nbi.xml.sax.SAXElement element) throws SAXException
parseInit
in class ProtocolFilter
element
- The element of the startElement event (contains no value).
SAXException
- If any parsing error occurs.ProtocolFilter.parseInit(SAXElement)
protected nbi.xml.sax.SAXElement parseElement(nbi.xml.sax.SAXElement element) throws SAXException
parseElement
in class ProtocolFilter
element
- The element corresponding to the endElement event.
SAXException
- If any parsing error occurs.ProtocolFilter.parseElement(SAXElement)
protected nbi.xml.sax.SAXElement parseComplete(nbi.xml.sax.SAXElement element) throws SAXException
PDPFilterParameter
set. This must be done
here, when the request has been completely parsed.
parseComplete
in class ProtocolFilter
element
- The complete root element (including the value).
SAXException
- If any parsing error occurs.ProtocolFilter.parseComplete(SAXElement)
boolean isCapabilitiesRequest()
boolean isScanRequest()
boolean isSearchRequest()
private boolean evaluateRequest(String action, String resource)
action
- The action to be evaluated.resource
- The resource to be evaluated.
true
,if access is permitted, false
otherwise.protected PDPFilterParameter getParameter()
public Request getRequest()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |