public final class SecureComponentHelper extends Object
ISecurityCheck,
ISecureComponent,
ISecureModel| Modifier and Type | Field and Description |
|---|---|
static String |
PATH_SEPARATOR
String used to concatenate the parts that make up alias.
|
| Constructor and Description |
|---|
SecureComponentHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
alias(Class<?> class1)
Builds an alias for a class.
|
static String |
alias(org.apache.wicket.Component component)
Builds a 'unique' name for the component.
|
static String |
containerAlias(org.apache.wicket.MarkupContainer container)
Builds an alias string for
MarkupContainers. |
static String[] |
containerAliasses(org.apache.wicket.Component component)
Builds a set of aliases for this component.
|
static ISecurityCheck |
getSecurityCheck(org.apache.wicket.Component component)
The security check placed on the component or null.
|
static boolean |
hasSecureModel(org.apache.wicket.Component component)
Checks if the component has a
ISecureModel. |
static boolean |
isActionAuthorized(org.apache.wicket.Component component,
String action)
|
static boolean |
isActionAuthorized(org.apache.wicket.Component component,
WaspAction action)
|
static boolean |
isAuthenticated(org.apache.wicket.Component component)
Default implementation for
ISecureComponent.isAuthenticated(). |
static org.apache.wicket.Component |
setSecurityCheck(org.apache.wicket.Component component,
ISecurityCheck securityCheck)
Places a security check on a component.
|
public static final String PATH_SEPARATOR
public static ISecurityCheck getSecurityCheck(org.apache.wicket.Component component)
ISecurityCheck.component - if null, null will be returnedpublic static org.apache.wicket.Component setSecurityCheck(org.apache.wicket.Component component,
ISecurityCheck securityCheck)
ISecurityCheck.component - securityCheck - public static boolean hasSecureModel(org.apache.wicket.Component component)
ISecureModel.component - public static boolean isActionAuthorized(org.apache.wicket.Component component,
String action)
ISecureComponent.isActionAuthorized(String) and
WaspAuthorizationStrategy.isActionAuthorized(Component, org.apache.wicket.authorization.Action)
. First tries to use the ISecurityCheck from the component if that is not available
it tries the ISecureModel if neither is present the action is authorized on the
component.component - the component to checkaction - the required action(s)ISecureComponent.isActionAuthorized(String),
ISecurityCheck,
ISecureModelpublic static boolean isActionAuthorized(org.apache.wicket.Component component,
WaspAction action)
ISecureComponent.isActionAuthorized(WaspAction) and
WaspAuthorizationStrategy.isActionAuthorized(Component, org.apache.wicket.authorization.Action)
. First tries to use the ISecurityCheck from the component if that is not available
it tries the ISecureModel if neither is present the action is authorized on the
component.component - the component to checkaction - the required action(s)ISecureComponent.isActionAuthorized(WaspAction),
ISecurityCheck,
ISecureModelpublic static boolean isAuthenticated(org.apache.wicket.Component component)
ISecureComponent.isAuthenticated(). First tries to use the
ISecurityCheck from the component if that is not available it tries the
ISecureModel if neither is present the user is authenticated if
WaspAuthorizationStrategy.isUserAuthenticated() returns true.component - the component to checkISecureComponent.isAuthenticated(),
ISecurityCheck,
ISecureModelpublic static String alias(org.apache.wicket.Component component)
component - SecurityException - if the component is null, or if the page of the component is not available.public static String alias(Class<?> class1)
class1 - public static String containerAlias(org.apache.wicket.MarkupContainer container)
MarkupContainers.container - public static String[] containerAliasses(org.apache.wicket.Component component)
component - Copyright © 2015. All rights reserved.