|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nimbox.http.enhanced.RulesHandler
public class RulesHandler
Parses the rules from a rule file defined in configuration and returns
the skin type for matched rule. The rule files must follow a given XML schema
(rules.xsd) in order to be "translated" by Rule Handler.
If I have "IS" rule with one expression, and a matching User-Agent header is
found in the request the results are being cached.
Sample of "IS" rule
For more details, see the definition file "rules.xsd".
Field Summary |
---|
Constructor Summary | |
---|---|
RulesHandler(java.util.HashMap setting)
Default constructor. |
Method Summary | |
---|---|
void |
error(org.xml.sax.SAXParseException ex)
|
void |
fatalError(org.xml.sax.SAXParseException ex)
|
ClientProfile |
getClientProfileFromRules(javax.servlet.http.HttpServletRequest request)
Allows system to evaluate the rules defined in the rules file. |
boolean |
hasRules()
Check if this object holds any rules. |
void |
warning(org.xml.sax.SAXParseException ex)
Receive notification of a warning. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RulesHandler(java.util.HashMap setting)
setting
- The configuration set for the EnhancedDispatcher.
This method expects to find the configuration for the key
EnhancedDispatcherConstants.CONF_KEY_RULES_LOCATION in the setting
HashMap.Method Detail |
---|
public ClientProfile getClientProfileFromRules(javax.servlet.http.HttpServletRequest request)
request
- Reference to the HttpServletRequest object with all the parameters
associated with the request sent from the client.
public void warning(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
ex
- The warning information encapsulated in a SAX parse exception.
org.xml.sax.SAXException
public void error(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
public void fatalError(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
public boolean hasRules()
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.