public class

CORSRule

extends Object
implements Serializable
java.lang.Object
   ↳ org.mule.module.s3.model.CORSRule

Class Overview

Container for rules of cross origin configuration.

Summary

Nested Classes
enum CORSRule.AllowedMethods Enumeration of names of the all the allowed methods. 
Constants
long serialVersionUID
Fields
private List<String> allowedHeaders
private List<CORSRule.AllowedMethods> allowedMethods
private List<String> allowedOrigins
private List<String> exposedHeaders
private String id
private int maxAgeSeconds
Public Constructors
CORSRule(String id)
Public Methods
List<String> getAllowedHeaders()
Returns allowed headers of this rule.
List<CORSRule.AllowedMethods> getAllowedMethods()
Returns the allowed methods of this rule.
List<String> getAllowedOrigins()
Returns the allowed origins of this rule and returns a reference to this object for method chaining.
List<String> getExposedHeaders()
Returns expose headers of this rule and returns a reference to this object for method chaining.
String getId()
Returns the Id of this rule.
int getMaxAgeSeconds()
Sets the ID of this rule and returns a reference to this object for method chaining.
void setAllowedHeaders(List<String> allowedHeaders)
Sets the allowed headers for the rule.
void setAllowedHeaders(String... allowedHeaders)
Convenience array style method for setAllowedHeaders(List)
void setAllowedMethods(List<CORSRule.AllowedMethods> allowedMethods)
Sets the allowed methods of the rule.
void setAllowedMethods(AllowedMethods... allowedMethods)
Convenience array style method for setAllowedMethods(List)
void setAllowedOrigins(List<String> allowedOrigins)
Sets the allowed origins of the rule.
void setAllowedOrigins(String... allowedOrigins)
Convenience array style method for setAllowedOrigins(List)
void setExposedHeaders(List<String> exposedHeaders)
Sets the expose headers of the rule.
void setExposedHeaders(String... exposedHeaders)
Convenience array style method for setExposedHeaders(List)
void setId(String id)
Sets the ID of this rule.
void setMaxAgeSeconds(int maxAgeSeconds)
Sets the max age in seconds of the rule.
CORSRule withAllowedHeaders(List<String> allowedHeaders)
Sets the allowed headers of this rule and returns a reference to this object for method chaining.
CORSRule withAllowedMethods(List<CORSRule.AllowedMethods> allowedMethods)
Sets the allowed methods of this rule and returns a reference to this object for method chaining.
CORSRule withAllowedOrigins(List<String> allowedOrigins)
Sets the allowed origins of this rule and returns a reference to this object for method chaining.
CORSRule withExposedHeaders(List<String> exposedHeaders)
Sets the exposeHeaders of this rule and returns a reference to this object for method chaining.
CORSRule withId(String id)
Sets the ID of this rule and returns a reference to this object for method chaining.
CORSRule withMaxAgeSeconds(int maxAgeSeconds)
Sets the max age in seconds of this rule and returns a reference to this object for method chaining.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

private static final long serialVersionUID

Constant Value: 6653330903388159693 (0x5c556134ad947ecd)

Fields

private List<String> allowedHeaders

private List<CORSRule.AllowedMethods> allowedMethods

private List<String> allowedOrigins

private List<String> exposedHeaders

private String id

private int maxAgeSeconds

Public Constructors

public CORSRule (String id)

Parameters
id

Public Methods

public List<String> getAllowedHeaders ()

Returns allowed headers of this rule.

public List<CORSRule.AllowedMethods> getAllowedMethods ()

Returns the allowed methods of this rule.

public List<String> getAllowedOrigins ()

Returns the allowed origins of this rule and returns a reference to this object for method chaining.

public List<String> getExposedHeaders ()

Returns expose headers of this rule and returns a reference to this object for method chaining.

public String getId ()

Returns the Id of this rule.

public int getMaxAgeSeconds ()

Sets the ID of this rule and returns a reference to this object for method chaining.

See Also

public void setAllowedHeaders (List<String> allowedHeaders)

Sets the allowed headers for the rule.

Parameters
allowedHeaders

public void setAllowedHeaders (String... allowedHeaders)

Convenience array style method for setAllowedHeaders(List)

Parameters
allowedHeaders

public void setAllowedMethods (List<CORSRule.AllowedMethods> allowedMethods)

Sets the allowed methods of the rule.

Parameters
allowedMethods

public void setAllowedMethods (AllowedMethods... allowedMethods)

Convenience array style method for setAllowedMethods(List)

Parameters
allowedMethods

public void setAllowedOrigins (List<String> allowedOrigins)

Sets the allowed origins of the rule.

Parameters
allowedOrigins

public void setAllowedOrigins (String... allowedOrigins)

Convenience array style method for setAllowedOrigins(List)

Parameters
allowedOrigins

public void setExposedHeaders (List<String> exposedHeaders)

Sets the expose headers of the rule.

Parameters
exposedHeaders

public void setExposedHeaders (String... exposedHeaders)

Convenience array style method for setExposedHeaders(List)

Parameters
exposedHeaders

public void setId (String id)

Sets the ID of this rule. Rules must be less than 255 alphanumeric characters, and must be unique for a bucket. If you do not assign an ID, one will be generated.

Parameters
id

public void setMaxAgeSeconds (int maxAgeSeconds)

Sets the max age in seconds of the rule.

Parameters
maxAgeSeconds

public CORSRule withAllowedHeaders (List<String> allowedHeaders)

Sets the allowed headers of this rule and returns a reference to this object for method chaining.

Parameters
allowedHeaders

public CORSRule withAllowedMethods (List<CORSRule.AllowedMethods> allowedMethods)

Sets the allowed methods of this rule and returns a reference to this object for method chaining.

Parameters
allowedMethods

public CORSRule withAllowedOrigins (List<String> allowedOrigins)

Sets the allowed origins of this rule and returns a reference to this object for method chaining.

Parameters
allowedOrigins

public CORSRule withExposedHeaders (List<String> exposedHeaders)

Sets the exposeHeaders of this rule and returns a reference to this object for method chaining.

Parameters
exposedHeaders

public CORSRule withId (String id)

Sets the ID of this rule and returns a reference to this object for method chaining.

Parameters
id
See Also

public CORSRule withMaxAgeSeconds (int maxAgeSeconds)

Sets the max age in seconds of this rule and returns a reference to this object for method chaining.

Parameters
maxAgeSeconds