Class HstsFilterPageDecorator
- java.lang.Object
-
- hudson.model.Descriptor<PageDecorator>
-
- hudson.model.PageDecorator
-
- org.jenkins.ci.plugins.hsts_filter.HstsFilterPageDecorator
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<PageDecorator>
,Saveable
,OnMaster
@Extension public class HstsFilterPageDecorator extends PageDecorator
The HSTS Filter Plugin provides a very simple filter which adds a response header indicating that HTTP Strict Transport Security (HSTS) response headers should be utilized.- Author:
- Jesse Farinacci
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description protected static boolean
DEFAULT_INCLUDE_SUB_DOMAINS
The default value forincludeSubDomains
.protected static String
DEFAULT_MAX_AGE
The default value formaxAge
.protected static boolean
DEFAULT_SEND_HEADER
The default value forsendHeader
.-
Fields inherited from class hudson.model.PageDecorator
ALL
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description HstsFilterPageDecorator()
Create a default HSTS FilterPageDecorator
.HstsFilterPageDecorator(boolean sendHeader, String maxAge, boolean includeSubDomains)
Create a HSTS FilterPageDecorator
with the specified configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest request, net.sf.json.JSONObject json)
String
getDisplayName()
String
getMaxAge()
boolean
isIncludeSubDomains()
boolean
isSendHeader()
void
setIncludeSubDomains(boolean includeSubDomains)
void
setMaxAge(String maxAge)
void
setSendHeader(boolean sendHeader)
-
Methods inherited from class hudson.model.PageDecorator
all, getDescriptor, getUrl
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Field Detail
-
DEFAULT_SEND_HEADER
protected static final boolean DEFAULT_SEND_HEADER
The default value forsendHeader
.- See Also:
- Constant Field Values
-
DEFAULT_MAX_AGE
protected static final String DEFAULT_MAX_AGE
The default value formaxAge
.- See Also:
- Constant Field Values
-
DEFAULT_INCLUDE_SUB_DOMAINS
protected static final boolean DEFAULT_INCLUDE_SUB_DOMAINS
The default value forincludeSubDomains
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HstsFilterPageDecorator
public HstsFilterPageDecorator()
Create a default HSTS FilterPageDecorator
.
-
HstsFilterPageDecorator
@DataBoundConstructor public HstsFilterPageDecorator(boolean sendHeader, String maxAge, boolean includeSubDomains)
Create a HSTS FilterPageDecorator
with the specified configuration.
-
-
Method Detail
-
getDisplayName
public String getDisplayName()
- Overrides:
getDisplayName
in classDescriptor<PageDecorator>
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest request, net.sf.json.JSONObject json) throws Descriptor.FormException
- Overrides:
configure
in classDescriptor<PageDecorator>
- Throws:
Descriptor.FormException
-
isSendHeader
public boolean isSendHeader()
-
setSendHeader
public void setSendHeader(boolean sendHeader)
-
getMaxAge
public String getMaxAge()
-
setMaxAge
public void setMaxAge(String maxAge)
-
isIncludeSubDomains
public boolean isIncludeSubDomains()
-
setIncludeSubDomains
public void setIncludeSubDomains(boolean includeSubDomains)
-
-