uk.ac.soton.itinnovation.grid.gridservit.context.helpers
Class AdditionalContextHelper

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.gridservit.context.helpers.AdditionalContextHelper

public class AdditionalContextHelper
extends Object


Constructor Summary
AdditionalContextHelper()
           
 
Method Summary
static ArrayList<Element> getAdditonalHeaders()
           
static ArrayList<Element> getMultipleHeaders(ArrayList<Element> headers, QName name)
          Search through a list of headers for one with the given name.
static Element getSingleHeader(ArrayList<Element> headers, QName name)
          Search through a list of headers for one with the given name.
static Element getSingleHeader(QName name)
          Search through a list of signed headers stored in the message context for one with the given name.
static void setAdditionalHeaders(MessageContext msgContext, ArrayList<Element> headers)
          Store the additional headers for later retrieval by getAdditonalHeaders.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdditionalContextHelper

public AdditionalContextHelper()
Method Detail

getAdditonalHeaders

public static ArrayList<Element> getAdditonalHeaders()

setAdditionalHeaders

public static void setAdditionalHeaders(MessageContext msgContext,
                                        ArrayList<Element> headers)
Store the additional headers for later retrieval by getAdditonalHeaders. Note: the list is not copied.

Parameters:
msgContext - the context in which to store the list
headers - an array of headers that were signed by the client (see AuthenticatedContextHelper) in the same signature which signed the body and the resource ID (see ProcessContextHelper).

getMultipleHeaders

public static ArrayList<Element> getMultipleHeaders(ArrayList<Element> headers,
                                                    QName name)
                                             throws GridFailureException
Search through a list of headers for one with the given name.

Returns:
the single header with this name, or null if no headers match
Throws:
GridFailureException - if more than one header had this name

getSingleHeader

public static Element getSingleHeader(ArrayList<Element> headers,
                                      QName name)
                               throws GridFailureException
Search through a list of headers for one with the given name.

Returns:
the single header with this name, or null if no headers match
Throws:
GridFailureException - if more than one header had this name

getSingleHeader

public static Element getSingleHeader(QName name)
                               throws GridFailureException
Search through a list of signed headers stored in the message context for one with the given name.

Parameters:
name - the QName of the header
Returns:
the single header with this name, or null if no headers match
Throws:
GridFailureException - if more than one header had this name


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.