|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.springlayout.web.security.AbstractPageAccessResolver
public abstract class AbstractPageAccessResolver
Constructor Summary | |
---|---|
AbstractPageAccessResolver()
|
Method Summary | |
---|---|
protected java.util.List |
defineReadOnlyFields(javax.servlet.http.HttpServletRequest request,
java.lang.Object object)
Default implementation that defines no fields as readonly. |
protected abstract AccessLevel |
getPageAccessLevel(javax.servlet.http.HttpServletRequest request,
java.lang.Object object)
Implement method to get the page access level for the current page |
protected abstract PageFunctionStateMap |
getPageFunctionPermissions(javax.servlet.http.HttpServletRequest request,
java.lang.Object object,
boolean editMode)
Implement this method to return a map of PageFunctionState s
for the current page with the following structure: String
functionName:PageFunctionState. |
PageFunctionState |
getPageFunctionState(java.lang.String functionName)
Looks up the pageFunction map from the request and queries it for the function name requested returning a page function state. |
void |
initialisePageAccess(javax.servlet.http.HttpServletRequest request,
java.lang.Object object)
Firstly determines the maximum access allowed for the current user in the current context, by calling getPageAccessLevel ,
downgrading the access where necessary. |
protected boolean |
isFormSubmission(javax.servlet.http.HttpServletRequest request)
Tests if a post or a get |
boolean |
isRunOnFormSubmission()
|
void |
setPageFunctionState(java.lang.String functionName,
PageFunctionState pageFunctionState)
set the page function state |
void |
setRunOnFormSubmission(boolean runOnFormSubmission)
Set whether the pageAccessResolver should run on formSubmission. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractPageAccessResolver()
Method Detail |
---|
public void setRunOnFormSubmission(boolean runOnFormSubmission)
runOnFormSubmission
- the runOnFormSubmission to setpublic boolean isRunOnFormSubmission()
isRunOnFormSubmission
in interface PageAccessResolver
public void initialisePageAccess(javax.servlet.http.HttpServletRequest request, java.lang.Object object)
getPageAccessLevel
,
downgrading the access where necessary. Secondly based on the outcome of
this, initialises a page function map by calling
getPageFunctionPermissions
and stores functions against
PageFunctionStates in the request for later reference via the
getPageFunctionState
method.
initialisePageAccess
in interface PageAccessResolver
request
- the current requestobject
- the current command objectnet.sf.springlayout.web.security.PageAccessResolver#initialisePageFunctions(javax.servlet.http.HttpServletRequest,
java.lang.Object)
protected abstract PageFunctionStateMap getPageFunctionPermissions(javax.servlet.http.HttpServletRequest request, java.lang.Object object, boolean editMode)
PageFunctionState
s
for the current page with the following structure: String
functionName:PageFunctionState.
request
- the current requestobject
- the current command objecteditMode
- are we opening in edit mode
public PageFunctionState getPageFunctionState(java.lang.String functionName)
getPageFunctionState
in interface PageAccessResolver
fucntionName
- the name of the function to get a state for
net.sf.springlayout.web.security.PageAccessResolver#getPageFunctionState(javax.servlet.http.HttpServletRequest,
java.lang.String)
public void setPageFunctionState(java.lang.String functionName, PageFunctionState pageFunctionState)
functionName
- pageFunctionState
- protected java.util.List defineReadOnlyFields(javax.servlet.http.HttpServletRequest request, java.lang.Object object)
request
- object
-
protected abstract AccessLevel getPageAccessLevel(javax.servlet.http.HttpServletRequest request, java.lang.Object object)
the
- current requestobject
- the current command object
protected boolean isFormSubmission(javax.servlet.http.HttpServletRequest request)
request
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |