|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ltd.getahead.dwr.impl.DefaultAccessControl
Control who should be accessing which methods on which classes.
Constructor Summary | |
DefaultAccessControl()
|
Method Summary | |
void |
addExcludeRule(java.lang.String scriptName,
java.lang.String methodName)
Add an exclude rule. |
void |
addIncludeRule(java.lang.String scriptName,
java.lang.String methodName)
Add an include rule. |
void |
addRoleRestriction(java.lang.String scriptName,
java.lang.String methodName,
java.lang.String role)
J2EE role based security allows us to restrict methods to only being used by people in certain roles. |
java.lang.String |
getReasonToNotDisplay(javax.servlet.http.HttpServletRequest req,
Creator creator,
java.lang.String className,
java.lang.reflect.Method method)
Check the method for accessibility at 'compile-time' (i.e. |
java.lang.String |
getReasonToNotExecute(javax.servlet.http.HttpServletRequest req,
Creator creator,
java.lang.String className,
java.lang.reflect.Method method)
Check the method for accessibility at runtime, and return an error message if anything is wrong. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultAccessControl()
Method Detail |
public java.lang.String getReasonToNotExecute(javax.servlet.http.HttpServletRequest req, Creator creator, java.lang.String className, java.lang.reflect.Method method)
AccessControl
See notes on getReasonToNotDisplay()
. This method should
duplicate the tests made by this method.
This is not a great becuase it mixes 2 bits of information in the same variable (is it wrong, and what is wrong) but without multi-value returns in Java this seems like the most simple implementation.
getReasonToNotExecute
in interface AccessControl
req
- The request from which we work out rolescreator
- Where does the method come from?className
- The Javascript name of the classmethod
- What is the method to execute?
AccessControl.getReasonToNotDisplay(HttpServletRequest, Creator, String, Method)
public java.lang.String getReasonToNotDisplay(javax.servlet.http.HttpServletRequest req, Creator creator, java.lang.String className, java.lang.reflect.Method method)
AccessControl
This method is similar to getReasonToNotExecute()
except
that there may be checks (like security checks) that we wish to make only
at runtime in case the situation changes between 'compile-time' and
runtime.
This is not a great becuase it mixes 2 bits of information in the same variable (is it wrong, and what is wrong) but without multi-value returns in Java this seems like the most simple implementation.
getReasonToNotDisplay
in interface AccessControl
req
- The request from which we work out rolescreator
- Where does the method come from?className
- The Javascript name of the classmethod
- What is the method to execute?
AccessControl.getReasonToNotExecute(HttpServletRequest, Creator, String, Method)
public void addRoleRestriction(java.lang.String scriptName, java.lang.String methodName, java.lang.String role)
AccessControl
addRoleRestriction
in interface AccessControl
scriptName
- The name of the creator to JavascriptmethodName
- The name of the method (without brackets)role
- The new role name to add to the list for the given scriptName and methodNamepublic void addIncludeRule(java.lang.String scriptName, java.lang.String methodName)
AccessControl
addIncludeRule
in interface AccessControl
scriptName
- The name of the creator to JavascriptmethodName
- The name of the method (without brackets)public void addExcludeRule(java.lang.String scriptName, java.lang.String methodName)
AccessControl
addExcludeRule
in interface AccessControl
scriptName
- The name of the creator to JavascriptmethodName
- The name of the method (without brackets)AccessControl.addIncludeRule(String, String)
|
Copyright ? 2005 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |