public class SecurityChecks extends Object
public class MySecurityCheck extends AbstractSecurityCheck
{
private ISecurityCheck wrapped;
public MySecurityCheck(ISecurityCheck wrapped)
{
this.wrapped = wrapped;
}
public boolean isActionAuthorized(WaspAction action)
{
return myOwnStuff() && wrapped.isActionAuthorized(action);
}
public boolean isAuthenticated()
{
return myOwnStuff() && wrapped.isAuthenticated();
}
}
Constructor and Description |
---|
SecurityChecks() |
Modifier and Type | Method and Description |
---|---|
static ISecurityCheck |
and(ISecurityCheck[] checks)
Combines the checks in an and list of checks.
|
static ISecurityCheck |
and(ISecurityCheck check1,
ISecurityCheck check2)
Combines the checks in an and list of checks.
|
static ISecurityCheck |
or(ISecurityCheck[] checks)
Combines the checks in an or list of checks.
|
static ISecurityCheck |
or(ISecurityCheck check1,
ISecurityCheck check2)
Combines the checks in an or list of checks.
|
public static ISecurityCheck and(ISecurityCheck[] checks)
checks
- the checks to combine into a single and checkpublic static ISecurityCheck and(ISecurityCheck check1, ISecurityCheck check2)
check1
- the first of 2 checks to combine into a single and checkcheck2
- the second of 2 checks to combine into a single and checkpublic static ISecurityCheck or(ISecurityCheck[] checks)
checks
- the checks to combine into a single or checkpublic static ISecurityCheck or(ISecurityCheck check1, ISecurityCheck check2)
check1
- the first of 2 checks to combine into a single or checkcheck2
- the second of 2 checks to combine into a single or checkCopyright © 2015. All rights reserved.