public class SecurityConstraint extends Object
SecurityConstraint securityConstraint = new SecurityConstraint();
securityConstraint.setWebResourceCollection(webResources);
securityConstraint.setAuthConstraint("ADMINISTRATORS");
securityConstraint.setUserDataConstraint(TransportGuarantee.CONFIDENTIAL);
WebResourceCollection| Constructor and Description |
|---|
SecurityConstraint()
Create an instance of SecurityConstraint
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getAuthConstraint()
Gets the roles authorized to access the URL patterns and HTTP methods
|
TransportGuarantee |
getDataConstraint()
Gets the transport guarantee requirements for this SecurityConstraint
|
Set<WebResourceCollection> |
getWebResourceCollection()
Gets the web resource collection for this security constraint
|
void |
setAuthConstraint(String... roleNames)
Sets the roles authorized to access the URL patterns and HTTP methods
|
void |
setUserDataConstraint(TransportGuarantee tg)
Sets the requirement that the constrained requests be received
over a protected transport layer connection.
|
void |
setWebResourceCollection(Set<WebResourceCollection> webResourceCollection)
Sets the web resource collection associated with this
security constrint
|
String |
toString()
Returns a formatted string of the state.
|
public SecurityConstraint()
public void setWebResourceCollection(Set<WebResourceCollection> webResourceCollection)
webResourceCollection - the web resource collection
for this constraint definitionWebResourceCollectionpublic Set<WebResourceCollection> getWebResourceCollection()
WebResourceCollectionpublic void setAuthConstraint(String... roleNames)
roleNames - the roles authorized to access the url patterns
and HTTP methods.public void setUserDataConstraint(TransportGuarantee tg)
tg - the transport guarnteeTransportGuaranteepublic String[] getAuthConstraint()
public TransportGuarantee getDataConstraint()
TransportGuaranteeCopyright © 2017. All rights reserved.