javax.servlet

## Class ServletSecurityElement

- java.lang.Object
- - javax.servlet.HttpConstraintElement
  - - javax.servlet.ServletSecurityElement

-     public class ServletSecurityElement
      extends HttpConstraintElement

  Since:
    Servlet 3.0 TODO SERVLET3 - Add comments

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServletSecurityElement()` Use default HttpConstraint.
    `ServletSecurityElement(java.util.Collection<HttpMethodConstraintElement> httpMethodConstraints)` Use specific constraints for specified methods and default HttpConstraintElement for all other methods.
    `ServletSecurityElement(HttpConstraintElement httpConstraintElement)` Use specified HttpConstraintElement.
    `ServletSecurityElement(HttpConstraintElement httpConstraintElement, java.util.Collection<HttpMethodConstraintElement> httpMethodConstraints)` Use specified HttpConstraintElement as default and specific constraints for specified methods.
    `ServletSecurityElement(ServletSecurity annotation)` Create from an annotation.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Collection<HttpMethodConstraintElement>` | `getHttpMethodConstraints()`
    `java.util.Collection<java.lang.String>` | `getMethodNames()`

    - ### Methods inherited from class javax.servlet.HttpConstraintElement

      `getEmptyRoleSemantic, getRolesAllowed, getTransportGuarantee`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ServletSecurityElement

          public ServletSecurityElement()

      Use default HttpConstraint.

    - #### ServletSecurityElement

          public ServletSecurityElement(HttpConstraintElement httpConstraintElement)

      Use specified HttpConstraintElement.
      Parameters:
        `httpConstraintElement` - The constraint

    - #### ServletSecurityElement

          public ServletSecurityElement(java.util.Collection<HttpMethodConstraintElement> httpMethodConstraints)

      Use specific constraints for specified methods and default HttpConstraintElement for all other methods.
      Parameters:
        `httpMethodConstraints` - Method constraints
      Throws:
        `java.lang.IllegalArgumentException` - if a method name is specified more than once

    - #### ServletSecurityElement

          public ServletSecurityElement(HttpConstraintElement httpConstraintElement,
                                java.util.Collection<HttpMethodConstraintElement> httpMethodConstraints)

      Use specified HttpConstraintElement as default and specific constraints for specified methods.
      Parameters:
        `httpConstraintElement` - Default constraint
        `httpMethodConstraints` - Method constraints
      Throws:
        `java.lang.IllegalArgumentException` - if a method name is specified more than

    - #### ServletSecurityElement

          public ServletSecurityElement(ServletSecurity annotation)

      Create from an annotation.
      Parameters:
        `annotation` - Annotation to use as the basis for the new instance
      Throws:
        `java.lang.IllegalArgumentException` - if a method name is specified more than

  - ### Method Detail

    - #### getHttpMethodConstraints

          public java.util.Collection<HttpMethodConstraintElement> getHttpMethodConstraints()

    - #### getMethodNames

          public java.util.Collection<java.lang.String> getMethodNames()

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.