パッケージ jakarta.servlet

クラス ServletSecurityElement

java.lang.ObjectSE
jakarta.servlet.HttpConstraintElement
jakarta.servlet.ServletSecurityElement

public class ServletSecurityElement extends HttpConstraintElement
ServletSecurity アノテーション値の Java クラス表現。
導入:
Servlet 3.0
  • コンストラクターの詳細

    • ServletSecurityElement

      public ServletSecurityElement()
      デフォルトの HttpConstraintElement 値をデフォルトの Constraint 要素として使用し、HTTP メソッド固有の制約要素を使用せずにインスタンスを構築します。
    • ServletSecurityElement

      public ServletSecurityElement(HttpConstraintElement constraint)
      デフォルトの Constraint 要素を使用し、HTTP メソッド固有の制約要素を使用せずにインスタンスを構築します。
      パラメーター:
      constraint - HttpConstraintElement は、methodConstraints で表現されるもの以外のすべての HTTP メソッドに適用されます。
    • ServletSecurityElement

      public ServletSecurityElement(CollectionSE<HttpMethodConstraintElement> methodConstraints)
      デフォルトの HttpConstraintElement 値をデフォルトの Constraint 要素として使用し、HTTP メソッド固有の制約要素のコレクションを使用してインスタンスを構築します。
      パラメーター:
      methodConstraints - HTTP メソッド固有の制約要素のコレクション
      例外:
      IllegalArgumentExceptionSE - 重複するメソッド名が検出された場合
    • ServletSecurityElement

      public ServletSecurityElement(HttpConstraintElement constraint, CollectionSE<HttpMethodConstraintElement> methodConstraints)
      デフォルトの Constraint 要素と HTTP メソッド固有の制約要素のコレクションを使用してインスタンスを構築します。
      パラメーター:
      constraint - HttpConstraintElement は、methodConstraints で表現されるもの以外のすべての HTTP メソッドに適用されます。
      methodConstraints - HTTP メソッド固有の制約要素のコレクション。
      例外:
      IllegalArgumentExceptionSE - 重複するメソッド名が検出された場合
    • ServletSecurityElement

      public ServletSecurityElement(ServletSecurity annotation)
      ServletSecurity アノテーション値からインスタンスを構築します。
      パラメーター:
      annotation - アノテーション値
      例外:
      IllegalArgumentExceptionSE - 重複するメソッド名が検出された場合
  • 方法の詳細

    • getHttpMethodConstraints

      public CollectionSE<HttpMethodConstraintElement> getHttpMethodConstraints()
      HTTP メソッド固有の制約要素の(おそらく空の)コレクションを取得します。

      許可されている場合、返された Collection への変更は、この ServletSecurityElement に影響してはなりません。

      戻り値:
      HttpMethodConstraintElement オブジェクトの(おそらく空の)コレクション
    • getMethodNames

      public CollectionSE<StringSE> getMethodNames()
      HttpMethodConstraints によって指定された HTTP メソッド名のセットを取得します。

      許可されている場合、返された Collection への変更は、この ServletSecurityElement に影響してはなりません。

      戻り値:
      コレクション文字列メソッド名