- 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
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/servlet/servletsecurityelement.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.