|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.directwebremoting.impl.DefaultAccessControl
public class 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. |
void |
assertGeneralDisplayable(java.lang.String scriptName,
MethodDeclaration method)
Check the method for accessibility at 'compile-time' (i.e. |
void |
assertGeneralExecutionIsPossible(java.lang.String scriptName,
MethodDeclaration method)
Check the method for accessibility at runtime, and return an error message if anything is wrong. |
void |
assertMethodDisplayable(java.lang.Class<?> clazz,
java.lang.reflect.Method method)
Complementing checks for a remoted Java class and method. |
void |
assertMethodExecutionIsPossible(java.lang.Class<?> clazz,
java.lang.reflect.Method method)
Complementing checks for a remoted Java class and method. |
void |
setExposeInternals(boolean exposeInternals)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultAccessControl()
| Method Detail |
|---|
public void assertGeneralExecutionIsPossible(java.lang.String scriptName,
MethodDeclaration method)
throws java.lang.SecurityException
AccessControlSee notes on getReasonToNotDisplay(). This method should
duplicate the tests made by that method.
This is not a great because 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.
assertGeneralExecutionIsPossible in interface AccessControlscriptName - The Javascript name of the classmethod - A logical method declaration
java.lang.SecurityException - If the given method is disallowedAccessControl.assertGeneralDisplayable(String, MethodDeclaration)
public void assertMethodExecutionIsPossible(java.lang.Class<?> clazz,
java.lang.reflect.Method method)
throws java.lang.SecurityException
AccessControl
assertMethodExecutionIsPossible in interface AccessControlclazz - An actual Java classmethod - An actual reflected Java method
java.lang.SecurityExceptionAccessControl.assertGeneralExecutionIsPossible(String, MethodDeclaration)
public void assertGeneralDisplayable(java.lang.String scriptName,
MethodDeclaration method)
throws java.lang.SecurityException
AccessControlThis 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 because 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.
assertGeneralDisplayable in interface AccessControlscriptName - The Javascript name of the classmethod - A logical method declaration
java.lang.SecurityException - If the given method is disallowedAccessControl.assertGeneralExecutionIsPossible(String, MethodDeclaration)
public void assertMethodDisplayable(java.lang.Class<?> clazz,
java.lang.reflect.Method method)
throws java.lang.SecurityException
AccessControl
assertMethodDisplayable in interface AccessControlclazz - An actual Java classmethod - An actual reflected Java method
java.lang.SecurityExceptionAccessControl.assertGeneralDisplayable(String, MethodDeclaration)
public void addRoleRestriction(java.lang.String scriptName,
java.lang.String methodName,
java.lang.String role)
AccessControl
addRoleRestriction in interface AccessControlscriptName - 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 methodName
public void addIncludeRule(java.lang.String scriptName,
java.lang.String methodName)
AccessControl
addIncludeRule in interface AccessControlscriptName - 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 AccessControlscriptName - The name of the creator to JavascriptmethodName - The name of the method (without brackets)AccessControl.addIncludeRule(String, String)public void setExposeInternals(boolean exposeInternals)
exposeInternals - the exposeInternals to set
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||