info.magnolia.cms.security.auth.callback
Class CompositeCallback

java.lang.Object
  extended by info.magnolia.cms.security.auth.callback.CompositeCallback
All Implemented Interfaces:
HttpClientCallback

public class CompositeCallback
extends Object
implements HttpClientCallback

A simple "composite" callback that delegates to other callbacks based on rules (a list of PatternDelegate).

It can be used to configured different callbacks for different urls, see this sample configuration for an example:

 + clientCallback
    + patterns
      + admin
        + delegate
          - class      info.magnolia.cms.security.auth.callback.FormClientCallback
          - loginForm  /mgnl-resources/loginForm/login.html
          - realmName  Magnolia
        - class        info.magnolia.cms.util.UrlPatternDelegate
        - url          /.magnolia*
      + public
        + delegate
          - class      info.magnolia.cms.security.auth.callback.FormClientCallback
          - loginForm  /mgnl-resources/public-login.html
          - realmName  Magnolia
        - class        info.magnolia.cms.util.UrlPatternDelegate
        - url          /*
    - class            info.magnolia.cms.security.auth.callback.CompositeCallback
 

Version:
$Id: CompositeCallback.java 41137 2011-01-06 18:19:25Z gjoseph $
Author:
fgiust

Constructor Summary
CompositeCallback()
           
 
Method Summary
 void addPattern(PatternDelegate pattern)
          Adds a new PatternDelegate.
 PatternDelegate[] getPatterns()
           
 void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Delegates the processing to the first matching Callback in patterns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeCallback

public CompositeCallback()
Method Detail

handle

public void handle(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
Delegates the processing to the first matching Callback in patterns.

Specified by:
handle in interface HttpClientCallback
Parameters:
request - HttpServletRequest
response - HttpServletResponse

getPatterns

public PatternDelegate[] getPatterns()
Returns:
array of configured PatternDelegate.

addPattern

public void addPattern(PatternDelegate pattern)
Adds a new PatternDelegate. Used by Content2Bean .

Parameters:
pattern - PatternDelegate instance


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.