com.atlassian.seraph.service
Class WebworkService
java.lang.Object
com.atlassian.seraph.service.WebworkService
- All Implemented Interfaces:
- Initable, SecurityService, java.io.Serializable
public class WebworkService
- extends java.lang.Object
- implements SecurityService
Configures Seraph based on WebWork 1.x configuration file actions.xml.
Takes two optional init parameters:
- action.extension (default: "action")
- The extension of action URLs which are intercepted by this service. If this parameter is not specified, the default is the WebWork default
'action'. (This should match your servlet mapping in web.xml.)
- actions.xml.file (default: "actions")
- The location on the classpath of your actions.xml file (WebWork 1.x style). If this parameter is not specified, the default is the WebWork 1.x
default 'actions'. (This should match the value configured for 'webwork.configuration.xml' in webwork.properties.)
In actions.xml (or other actions XML file, as specified by the init-param) specify roles required per action or command:
<action name="project.ViewProject" alias="ViewProject" roles-required="RoleFoo, RoleBar">
or
<command name="Delete" alias="DeleteProject" roles-required="RoleBat">
Roles can be separated by commas and spaces.
- See Also:
- Serialized Form
|
Method Summary |
void |
destroy()
|
java.util.Set<java.lang.String> |
getRequiredRoles(javax.servlet.http.HttpServletRequest request)
|
void |
init(java.util.Map<java.lang.String,java.lang.String> params,
SecurityConfig config)
Initialise the configuration object with the given "init-params". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebworkService
public WebworkService()
init
public void init(java.util.Map<java.lang.String,java.lang.String> params,
SecurityConfig config)
- Description copied from interface:
Initable
- Initialise the configuration object with the given "init-params".
- Specified by:
init in interface Initable
- Parameters:
params - The map of "init-params" extracted from the Seraph config file. This is guaranteed not null.config - The Seraph SecurityConfig class that is initialising the config objects. This object will only be partially initialised at this time.
destroy
public void destroy()
- Specified by:
destroy in interface SecurityService
getRequiredRoles
public java.util.Set<java.lang.String> getRequiredRoles(javax.servlet.http.HttpServletRequest request)
- Specified by:
getRequiredRoles in interface SecurityService
Copyright © 2012 Atlassian. All Rights Reserved.