public class HttpConstraintElement extends Object
HttpConstraintアノテーションの値を表現するJavaクラスです。| コンストラクタと説明 |
|---|
HttpConstraintElement()
デフォルトのHTTP制約属性を生成します。
|
HttpConstraintElement(ServletSecurity.EmptyRoleSemantic semantic)
EmptyRoleSemantic.DENYを確立するための簡便なコンストラクタです。
|
HttpConstraintElement(ServletSecurity.EmptyRoleSemantic semantic,
ServletSecurity.TransportGuarantee guarantee,
String... roleNames)
getEmptyRoleSemanticとgetRolesAllowed、getTransportGuaranteeのすべてを確立するためのコンストラクタです。
|
HttpConstraintElement(ServletSecurity.TransportGuarantee guarantee,
String... roleNames)
空でないgetRolesAllowedと/もしくはTransportGuarantee.CONFIDENTIALを確立するためのコンストラクタです。
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
ServletSecurity.EmptyRoleSemantic |
getEmptyRoleSemantic()
デフォルトの認可セマンティックを取得します。
|
String[] |
getRolesAllowed()
権限のあるロールの名前を取得します。
|
ServletSecurity.TransportGuarantee |
getTransportGuarantee()
トランスポート層での接続で満たす必要のあるデータ保護要件(SSL/TLSが必要かどうか)を取得します。
|
public HttpConstraintElement()
public HttpConstraintElement(ServletSecurity.EmptyRoleSemantic semantic)
semantic - EmptyRoleSemantic.DENY である必要があるセマンティックpublic HttpConstraintElement(ServletSecurity.TransportGuarantee guarantee, String... roleNames)
guarantee - TransportGuarantee.NONEもしくはTransportGuarantee.CONFIDENTIALroleNames - アクセスが許容されるロールの名前public HttpConstraintElement(ServletSecurity.EmptyRoleSemantic semantic, ServletSecurity.TransportGuarantee guarantee, String... roleNames)
semantic - EmptyRoleSemantic.DENYもしくはEmptyRoleSemantic.PERMITguarantee - TransportGuarantee.NONEもしくはTransportGuarantee.CONFIDENTIALroleNames - アクセスが許可されるロールの名前、そのセマンティックが存在しない場合はEmptyRoleSemantic.DENYpublic ServletSecurity.EmptyRoleSemantic getEmptyRoleSemantic()
この値はgetRolesAllowedが空でない配列を返すときは意味がないので、
getRolesAllowedに空でない配列が指定されているときは指定しないでください。
getRolesAllowedが空の(長さがゼロの)配列を返すときに適用されるServletSecurity.EmptyRoleSemanticpublic ServletSecurity.TransportGuarantee getTransportGuarantee()
ServletSecurity.TransportGuaranteepublic String[] getRolesAllowed()
getRolesAllowedに現れる重複したロール名に意味はなく、破棄されることがあります。 文字列"*"はロール名として特別な意味を持ちません。(getRolesAllowedで存在する必要があります)
getEmptyRoleSemantic()によって返される値に依存することを意味します。
その値がDENYで、getRolesAllowedが空の配列を返す場合、
認証状況と身元とは無関係にアクセスが拒否されます。
逆に、その値がPERMITの場合、認証状況と身元とは無関係にアクセスが許可されることを示します。
配列に1つ以上のロールの名前が含まれている場合、
(getEmptyRoleSemantic()の値とは独立して)名前の付けられたロールの少なくとも1つのメンバーシップに依存してアクセスすることを示します。Copyright © 1999-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms. Portions Copyright © 1999-2002 The Apache Software Foundation. Portions Copyright © 2017- @megascus. Translated by @megascus.