Class HostSourceDirective
- java.lang.Object
-
- com.shapesecurity.salvation2.Directive
-
- com.shapesecurity.salvation2.Directives.HostSourceDirective
-
- Direct Known Subclasses:
FrameAncestorsDirective,SourceExpressionDirective
public abstract class HostSourceDirective extends Directive
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.shapesecurity.salvation2.Directive
Directive.DirectiveErrorConsumer, Directive.ManipulationErrorConsumer
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Host>hostsprotected Stringnoneprotected List<Scheme>schemesprotected booleanselfprotected booleanstar-
Fields inherited from class com.shapesecurity.salvation2.Directive
containsNonDirectiveCharacter, IS_DIRECTIVE_NAME, values
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHostSourceDirective(List<String> values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHost(Host host, Directive.ManipulationErrorConsumer errors)voidaddScheme(Scheme scheme, Directive.ManipulationErrorConsumer errors)protected voidaddValue(String value)List<Host>getHosts()List<Scheme>getSchemes()booleanremoveHost(Host host)booleanremoveScheme(Scheme scheme)protected voidremoveValueIgnoreCase(String value)protected <T> voidremoveValuesMatching(T value, java.util.function.Function<String,Optional<T>> parser)booleanself()voidsetSelf(boolean self)voidsetStar(boolean star)booleanstar()-
Methods inherited from class com.shapesecurity.salvation2.Directive
getValues, wrapManipulationErrorConsumer
-
-
-
-
Method Detail
-
removeValueIgnoreCase
protected void removeValueIgnoreCase(String value)
- Overrides:
removeValueIgnoreCasein classDirective
-
removeValuesMatching
protected <T> void removeValuesMatching(T value, java.util.function.Function<String,Optional<T>> parser)
-
star
public boolean star()
-
setStar
public void setStar(boolean star)
-
self
public boolean self()
-
setSelf
public void setSelf(boolean self)
-
addScheme
public void addScheme(Scheme scheme, Directive.ManipulationErrorConsumer errors)
-
removeScheme
public boolean removeScheme(Scheme scheme)
-
addHost
public void addHost(Host host, Directive.ManipulationErrorConsumer errors)
-
removeHost
public boolean removeHost(Host host)
-
-