Class AbstractHttpSecurable
- java.lang.Object
-
- net.officefloor.web.security.build.AbstractHttpSecurable
-
- All Implemented Interfaces:
HttpSecurable
,HttpSecurableBuilder
public abstract class AbstractHttpSecurable extends java.lang.Object implements HttpSecurable, HttpSecurableBuilder
Abstract
HttpSecurable
implementation to be configured asHttpSecurableBuilder
.This is useful to extend for configuration items requiring to be configured HTTP secure.
- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description AbstractHttpSecurable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRequiredRole(java.lang.String requiredRole)
Adds to listing of required roles that must have all for access.void
addRole(java.lang.String anyRole)
Adds to listing of roles that must have at least one for access.java.lang.String[]
getAnyRoles()
Obtains the list of roles that must have at least one for access.java.lang.String
getHttpSecurityName()
Obtains the name for theHttpSecurity
to use.java.lang.String[]
getRequiredRoles()
Obtains the list of roles that must have all for access.void
setHttpSecurityName(java.lang.String httpSecurityName)
Specifies the particularHttpSecurity
.
-
-
-
Method Detail
-
getHttpSecurityName
public java.lang.String getHttpSecurityName()
Description copied from interface:HttpSecurable
- Specified by:
getHttpSecurityName
in interfaceHttpSecurable
- Returns:
- Name of
HttpSecurity
ornull
for genericHttpSecurity
.
-
getAnyRoles
public java.lang.String[] getAnyRoles()
Description copied from interface:HttpSecurable
Obtains the list of roles that must have at least one for access.
Empty/
null
list means needs only be authenticated.- Specified by:
getAnyRoles
in interfaceHttpSecurable
- Returns:
- List of any roles.
-
getRequiredRoles
public java.lang.String[] getRequiredRoles()
Description copied from interface:HttpSecurable
Obtains the list of roles that must have all for access.
Empty/
null
list means needs only be authenticated.- Specified by:
getRequiredRoles
in interfaceHttpSecurable
- Returns:
- List of required roles.
-
setHttpSecurityName
public void setHttpSecurityName(java.lang.String httpSecurityName)
Description copied from interface:HttpSecurableBuilder
Specifies the particularHttpSecurity
.- Specified by:
setHttpSecurityName
in interfaceHttpSecurableBuilder
- Parameters:
httpSecurityName
- Name of theHttpSecurity
to use.
-
addRole
public void addRole(java.lang.String anyRole)
Description copied from interface:HttpSecurableBuilder
Adds to listing of roles that must have at least one for access.- Specified by:
addRole
in interfaceHttpSecurableBuilder
- Parameters:
anyRole
- Any role.
-
addRequiredRole
public void addRequiredRole(java.lang.String requiredRole)
Description copied from interface:HttpSecurableBuilder
Adds to listing of required roles that must have all for access.- Specified by:
addRequiredRole
in interfaceHttpSecurableBuilder
- Parameters:
requiredRole
- Required roles.
-
-