public class AdviceContext extends AbstractContext
Context
containing information which should be returned to the user in some
appropriate form to the user. For example, it could be contained within the body of the response
or otherwise added to the headers returned.data
Constructor and Description |
---|
AdviceContext(Context parent,
Collection<String> restrictedAdviceNames)
Creates a new AdviceContext with the provided parent.
|
AdviceContext(JsonValue savedContext,
ClassLoader classLoader)
Restore from JSON representation.
|
Modifier and Type | Method and Description |
---|---|
Map<String,List<String>> |
getAdvices()
Returns the advices contained within this context.
|
void |
putAdvice(String adviceName,
String... advices)
Adds advice to the context, which can be retrieved and later returned to the user.
|
asContext, containsContext, containsContext, getContext, getContextName, getId, getParent, getRootId, isRootContext, toJsonValue, toString
public AdviceContext(Context parent, Collection<String> restrictedAdviceNames)
parent
- The parent context.restrictedAdviceNames
- The restricted advice names.public AdviceContext(JsonValue savedContext, ClassLoader classLoader)
savedContext
- The JSON representation from which this context's attributes
should be parsed.classLoader
- The ClassLoader which can properly resolve the persisted class-name.Copyright © 2010-2018, ForgeRock All Rights Reserved.