Package javax.servlet
Class HttpConstraintElement
- java.lang.Object
- 
- javax.servlet.HttpConstraintElement
 
- 
- Direct Known Subclasses:
- HttpMethodConstraintElement,- ServletSecurityElement
 
 public class HttpConstraintElement extends java.lang.ObjectEquivalent ofHttpConstraintfor programmatic configuration of security constraints.- Since:
- Servlet 3.0
 
- 
- 
Constructor SummaryConstructors Constructor Description HttpConstraintElement()Default constraint is permit with no transport guarantee.HttpConstraintElement(ServletSecurity.EmptyRoleSemantic emptyRoleSemantic)Construct a constraint with an empty role semantic.HttpConstraintElement(ServletSecurity.EmptyRoleSemantic emptyRoleSemantic, ServletSecurity.TransportGuarantee transportGuarantee, java.lang.String... rolesAllowed)Construct a constraint with an empty role semantic, a transport guarantee and roles.HttpConstraintElement(ServletSecurity.TransportGuarantee transportGuarantee, java.lang.String... rolesAllowed)Construct a constraint with a transport guarantee and roles.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ServletSecurity.EmptyRoleSemanticgetEmptyRoleSemantic()TODOjava.lang.String[]getRolesAllowed()TODOServletSecurity.TransportGuaranteegetTransportGuarantee()TODO
 
- 
- 
- 
Constructor Detail- 
HttpConstraintElementpublic HttpConstraintElement() Default constraint is permit with no transport guarantee.
 - 
HttpConstraintElementpublic HttpConstraintElement(ServletSecurity.EmptyRoleSemantic emptyRoleSemantic) Construct a constraint with an empty role semantic. Typically used withServletSecurity.EmptyRoleSemantic.DENY.- Parameters:
- emptyRoleSemantic- The empty role semantic to apply to the newly created constraint
 
 - 
HttpConstraintElementpublic HttpConstraintElement(ServletSecurity.TransportGuarantee transportGuarantee, java.lang.String... rolesAllowed) Construct a constraint with a transport guarantee and roles.- Parameters:
- transportGuarantee- The transport guarantee to apply to the newly created constraint
- rolesAllowed- The roles to associate with the newly created constraint
 
 - 
HttpConstraintElementpublic HttpConstraintElement(ServletSecurity.EmptyRoleSemantic emptyRoleSemantic, ServletSecurity.TransportGuarantee transportGuarantee, java.lang.String... rolesAllowed) Construct a constraint with an empty role semantic, a transport guarantee and roles.- Parameters:
- emptyRoleSemantic- The empty role semantic to apply to the newly created constraint
- transportGuarantee- The transport guarantee to apply to the newly created constraint
- rolesAllowed- The roles to associate with the newly created constraint
- Throws:
- java.lang.IllegalArgumentException- if roles are specified when DENY is used
 
 
- 
 - 
Method Detail- 
getEmptyRoleSemanticpublic ServletSecurity.EmptyRoleSemantic getEmptyRoleSemantic() TODO- Returns:
- TODO
 
 - 
getTransportGuaranteepublic ServletSecurity.TransportGuarantee getTransportGuarantee() TODO- Returns:
- TODO
 
 - 
getRolesAllowedpublic java.lang.String[] getRolesAllowed() TODO- Returns:
- TODO
 
 
- 
 
-