Class PathService

  extended by com.atlassian.seraph.service.PathService
All Implemented Interfaces:
Initable, SecurityService, Serializable

public class PathService
extends Object
implements SecurityService

Configures Seraph to require certain roles to access certain URL paths.

Single init-param 'config.file' which is the location of the XML config file. Default value is '/seraph-paths.xml' (loaded from classpath - usually in /WEB-INF/classes)

Here's a sample of the XML config file. Path names must be unique

     <path name="admin">
     <path name="secured">

See Also:
Serialized Form

Constructor Summary
Method Summary
 void destroy()
 Set<String> getRequiredRoles(javax.servlet.http.HttpServletRequest request)
 Set<String> getRequiredRoles(String servletPath)
 void init(Map<String,String> params, SecurityConfig config)
          Init the service - configure it from the config file
protected  String[] parseRoles(String roleNames)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public PathService()
Method Detail


public void init(Map<String,String> params,
                 SecurityConfig config)
Init the service - configure it from the config file

Specified by:
init in interface Initable
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.


protected String[] parseRoles(String roleNames)


public void destroy()
Specified by:
destroy in interface SecurityService


public Set<String> getRequiredRoles(javax.servlet.http.HttpServletRequest request)
Specified by:
getRequiredRoles in interface SecurityService


public Set<String> getRequiredRoles(String servletPath)

Copyright © 2013 Atlassian. All Rights Reserved.