Package com.oorian.html.elements.consts
Enum Class CrossOrigin
- All Implemented Interfaces:
Serializable,Comparable<CrossOrigin>,Constable
Enumeration defining CORS (Cross-Origin Resource Sharing) modes for media and script elements.
This enum provides type-safe constants for the "crossorigin" attribute, which configures
how cross-origin requests are handled.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAnonymous CORS mode - sends cross-origin requests without credentials.Credentialed CORS mode - sends cross-origin requests with credentials. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Gets the CORS mode value for use in crossorigin attribute.toString()static CrossOriginReturns the enum constant of this class with the specified name.static CrossOrigin[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ANONYMOUS
Anonymous CORS mode - sends cross-origin requests without credentials. No cookies, client-side certificates, or HTTP authentication are sent. -
USE_CREDENTIALS
Credentialed CORS mode - sends cross-origin requests with credentials. Includes cookies, client-side certificates, and HTTP authentication. Requires the server to explicitly allow credentials via CORS headers.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
Gets the CORS mode value for use in crossorigin attribute.- Returns:
- the string value used in HTML crossorigin attribute.
-
toString
- Overrides:
toStringin classEnum<CrossOrigin>
-