public class AdviceContext extends org.forgerock.services.context.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.Constructor and Description |
---|
AdviceContext(org.forgerock.services.context.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.
|
public AdviceContext(org.forgerock.services.context.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.public Map<String,List<String>> getAdvices()
Copyright 2010-2017 ForgeRock AS.