|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.lib.security.AbsPermissionManager org.ow2.jonas.web.base.lib.PermissionManager
public class PermissionManager
Defines a PermissionManager class which will manage JACC permissions for a web-app.
Constructor Summary | |
---|---|
PermissionManager(WebContainerDeploymentDesc webContainerDeploymentDesc,
String contextId,
boolean remove)
Default Constructor. |
Method Summary | |
---|---|
boolean |
checkWebResourcePermission(HttpServletRequest request,
String principalName,
String[] roles)
Check the security for a given HttpServletRequest. |
boolean |
checkWebRoleRefPermission(HttpServletRequest request,
String servletName,
String principalName,
String[] roles,
String roleName)
Check the security for a given HttpServletRequest. |
boolean |
checkWebUserDataPermission(HttpServletRequest request,
String principalName,
String[] roles)
Check the security for a given HttpServletRequest. |
protected void |
resetDeploymentDesc()
Reset Deployment Descriptor. |
protected void |
translateSecurityConstraintElements()
3.1.3.1 Translating security-constraint elements The paragraphs of this section describe the translation of security-constraints into WebResourcePermission and WebUserDataPermission objects constructed using qualified URL pattern names. |
void |
translateServletDeploymentDescriptor()
3.1.3.Translating Servlet Deployment Descriptors A reference to a PolicyConfiguration object must be obtained by calling the getPolicyConfiguration method on the PolicyConfigurationFactory implementation class of the provider configured into the container. |
protected void |
translateServletSecurityRoleRef()
3.1.3.2 Translating Servlet security-role-ref Elements For each security-role-ref appearing in the deployment descriptor a corresponding WebRoleRefPermission must be added to the corresponding role. |
Methods inherited from class org.ow2.jonas.lib.security.AbsPermissionManager |
---|
commit, delete, getContextId, getPolicy, getPolicyConfiguration, setContextId, setPolicy, setPolicyConfiguration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PermissionManager(WebContainerDeploymentDesc webContainerDeploymentDesc, String contextId, boolean remove) throws PermissionManagerException
webContainerDeploymentDesc
- EJB deployment DescriptorcontextId
- context ID used for PolicyContextremove
- - remove the policy context when creating a new one.
PermissionManagerException
- if permissions can't be setMethod Detail |
---|
public void translateServletDeploymentDescriptor() throws PermissionManagerException
PermissionManagerException
- if permissions can't be setprotected void translateSecurityConstraintElements() throws PermissionManagerException
PermissionManagerException
- if permissions can't be setprotected void translateServletSecurityRoleRef() throws PermissionManagerException
PermissionManagerException
- if permissions can't be setpublic boolean checkWebUserDataPermission(HttpServletRequest request, String principalName, String[] roles)
request
- the http servlet requestprincipalName
- name of the principalroles
- array of roles for this permission
public boolean checkWebResourcePermission(HttpServletRequest request, String principalName, String[] roles)
request
- the http servlet requestprincipalName
- name of the principalroles
- array of roles for this permission
public boolean checkWebRoleRefPermission(HttpServletRequest request, String servletName, String principalName, String[] roles, String roleName)
request
- the http servlet requestservletName
- Name of the servletprincipalName
- name of the principalroles
- array of roles for this permissionroleName
- name of the role
protected void resetDeploymentDesc()
resetDeploymentDesc
in class AbsPermissionManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |