public class AuthorizationMessageSource extends Object implements IAuthorizationMessageSource
IErrorMessageSource
to store variables which van be used in the message to
provide more detail.Constructor and Description |
---|
AuthorizationMessageSource()
Constructs a new AuthorizationErrorMessageSource without any variables.
|
AuthorizationMessageSource(Map<String,Object> vars)
Constructs a new AuthorizationErrorMessageSource with the specified initial variables
|
Modifier and Type | Method and Description |
---|---|
void |
addVariable(String name,
Object value)
Adds, or overwrites a previously associated variable with that name, to this resource.
|
org.apache.wicket.Component |
getComponent()
Returns the source component of the authorization denied situation.
|
String |
getMessage(String key,
Map<String,Object> vars) |
protected Map<String,Object> |
mergeVariables(Map<String,Object> map)
Merges this variables with a new set of variables in a new
Map . |
void |
setComponent(org.apache.wicket.Component component)
Sets component where the authorization denied originates from.
|
public AuthorizationMessageSource()
public final String getMessage(String key, Map<String,Object> vars)
getMessage
in interface org.apache.wicket.validation.IErrorMessageSource
IErrorMessageSource.getMessage(java.lang.String, java.util.Map)
public final org.apache.wicket.Component getComponent()
IAuthorizationMessageSource
getComponent
in interface IAuthorizationMessageSource
IAuthorizationMessageSource.getComponent()
public final void setComponent(org.apache.wicket.Component component)
IAuthorizationMessageSource
null
.setComponent
in interface IAuthorizationMessageSource
component
- componentIAuthorizationMessageSource.setComponent(org.apache.wicket.Component)
public final void addVariable(String name, Object value)
IAuthorizationMessageSource
addVariable
in interface IAuthorizationMessageSource
name
- variable namevalue
- variable valueIAuthorizationMessageSource.addVariable(java.lang.String,
java.lang.Object)
protected final Map<String,Object> mergeVariables(Map<String,Object> map)
Map
. The extra variables
overwrite the pre-existing variables.map
- extra variablesCopyright © 2015. All rights reserved.