Oracle Entitlements Server for Java API Reference

com.bea.security
Class SimpleResponseContextCollector

java.lang.Object
  |
  +--com.bea.security.ResponseContextCollector
        |
        +--com.bea.security.SimpleResponseContextCollector

public class SimpleResponseContextCollector
extends ResponseContextCollector

The SimpleResponseContextCollector is a simple implementation of the ResponseContextCollector abstract base class. It may be used to collect extended decisions from the authorization service. See ResponseContextCollector further details.

Author:
Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.

Fields inherited from class com.bea.security.ResponseContextCollector
CONTEXT_ATTR_NAME, CONTEXT_ATTR_NAMESPACE, CONTEXT_ATTR_UNQUALIFIED_NAME
 
Constructor Summary
SimpleResponseContextCollector()
          Create a SimpleResponseContextCollector object.
 
Method Summary
 void appendContext(AppContext context)
          Add a response context to the collector.
 void clear()
          Clears the contents of the collector so that it may be reused.
 AppContext[] getContexts()
          Get an array of all response AppContext in the collector.
 AppContext getMergedContexts()
          Get a single response AppContext which contains a merged set of the data from all the response AppContexts in in the collector.
static AppContextElement makeContextElement()
          Constructs an AppContextElement containing a ResponseContextCollector, and the appropriate name and namespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleResponseContextCollector

public SimpleResponseContextCollector()
Create a SimpleResponseContextCollector object.
Method Detail

makeContextElement

public static AppContextElement makeContextElement()
Constructs an AppContextElement containing a ResponseContextCollector, and the appropriate name and namespace. This AppContextElement may be added to the request context of an authorization call to obtain extended decision data.

Returns:
Returns an AppContextElement with name and namespace filled in, as well as a value containing an initialized SimpleResponseContextCollector object.

appendContext

public void appendContext(AppContext context)
Add a response context to the collector.

Parameters:
context - a AppContext object to be added to the collector.
Overrides:
appendContext in class ResponseContextCollector

getContexts

public AppContext[] getContexts()
Get an array of all response AppContext in the collector.

Returns:
an array of AppContext objects held within the collector.
Overrides:
getContexts in class ResponseContextCollector

clear

public void clear()
Clears the contents of the collector so that it may be reused.

getMergedContexts

public AppContext getMergedContexts()
Get a single response AppContext which contains a merged set of the data from all the response AppContexts in in the collector. If two contexts contain elements which identical keys, the values will be combined into a Collection. If the conflicting elements are themselves collections then the elements of each will be joined into a single collection.

Returns:
single merged context.