- java.lang.Object
-
- javax.servlet.HttpConstraintElement
-
- javax.servlet.ServletSecurityElement
-
public class ServletSecurityElement extends HttpConstraintElement
Java Class represntation of aServletSecurity
annotation value.- Since:
- Servlet 3.0
-
-
Constructor Summary
Constructors Constructor and Description ServletSecurityElement()
Constructs an instance using the defaultHttpConstraintElement
value as the default Constraint element and with no HTTP Method specific constraint elements.ServletSecurityElement(Collection<HttpMethodConstraintElement> methodConstraints)
Constructs an instance using the defaultHttpConstraintElement
value as the default Constraint element and with a collection of HTTP Method specific constraint elements.ServletSecurityElement(HttpConstraintElement constraint)
Constructs an instance with a default Constraint element and with no HTTP Method specific constraint elements.ServletSecurityElement(HttpConstraintElement constraint, Collection<HttpMethodConstraintElement> methodConstraints)
Constructs an instance with a default Constraint element and with a collection of HTTP Method specific constraint elements.ServletSecurityElement(ServletSecurity annotation)
Constructs an instance from aServletSecurity
annotation value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Collection<HttpMethodConstraintElement>
getHttpMethodConstraints()
Gets the (possibly empty) collection of HTTP Method specific constraint elements.Collection<String>
getMethodNames()
Gets the set of HTTP method names named by the HttpMethodConstraints.-
Methods inherited from class javax.servlet.HttpConstraintElement
getEmptyRoleSemantic, getRolesAllowed, getTransportGuarantee
-
-
-
-
Constructor Detail
-
ServletSecurityElement
public ServletSecurityElement()
Constructs an instance using the defaultHttpConstraintElement
value as the default Constraint element and with no HTTP Method specific constraint elements.
-
ServletSecurityElement
public ServletSecurityElement(HttpConstraintElement constraint)
Constructs an instance with a default Constraint element and with no HTTP Method specific constraint elements.- Parameters:
constraint
- the HttpConstraintElement to be applied to all HTTP methods other than those represented in the methodConstraints
-
ServletSecurityElement
public ServletSecurityElement(Collection<HttpMethodConstraintElement> methodConstraints)
Constructs an instance using the defaultHttpConstraintElement
value as the default Constraint element and with a collection of HTTP Method specific constraint elements.- Parameters:
methodConstraints
- the collection of HTTP method specific constraint elements- Throws:
IllegalArgumentException
- if duplicate method names are detected
-
ServletSecurityElement
public ServletSecurityElement(HttpConstraintElement constraint, Collection<HttpMethodConstraintElement> methodConstraints)
Constructs an instance with a default Constraint element and with a collection of HTTP Method specific constraint elements.- Parameters:
constraint
- the HttpConstraintElement to be applied to all HTTP methods other than those represented in the methodConstraintsmethodConstraints
- the collection of HTTP method specific constraint elements.- Throws:
IllegalArgumentException
- if duplicate method names are detected
-
ServletSecurityElement
public ServletSecurityElement(ServletSecurity annotation)
Constructs an instance from aServletSecurity
annotation value.- Parameters:
annotation
- the annotation value- Throws:
IllegalArgumentException
- if duplicate method names are detected
-
-
Method Detail
-
getHttpMethodConstraints
public Collection<HttpMethodConstraintElement> getHttpMethodConstraints()
Gets the (possibly empty) collection of HTTP Method specific constraint elements.If permitted, any changes to the returned
Collection
must not affect thisServletSecurityElement
.- Returns:
- the (possibly empty) collection of HttpMethodConstraintElement objects
-
getMethodNames
public Collection<String> getMethodNames()
Gets the set of HTTP method names named by the HttpMethodConstraints.If permitted, any changes to the returned
Collection
must not affect thisServletSecurityElement
.- Returns:
- the collection String method names
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 15:05:44 Cette version de la page est en cache (à la date du 21/08/2025 15:05:44) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/servlet/servletsecurityelement.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.