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 java.util.List<Host>hostsprotected java.lang.Stringnoneprotected java.util.List<Scheme>schemesprotected booleanselfprotected booleanstar-
Fields inherited from class com.shapesecurity.salvation2.Directive
containsNonDirectiveCharacter, values
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHostSourceDirective(java.util.List<java.lang.String> values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void_addHostOrSchemeDuringConstruction(java.lang.String token, java.lang.String lowcaseToken, java.lang.String kind, int index, Directive.DirectiveErrorConsumer errors)private boolean_addHostSource(Host source, int index, Directive.DirectiveErrorConsumer errors)private boolean_addScheme(Scheme scheme, int index, Directive.DirectiveErrorConsumer errors)voidaddHost(Host host, Directive.ManipulationErrorConsumer errors)voidaddScheme(Scheme scheme, Directive.ManipulationErrorConsumer errors)protected voidaddValue(java.lang.String value)java.util.List<Host>getHosts()java.util.List<Scheme>getSchemes()booleanremoveHost(Host host)booleanremoveScheme(Scheme scheme)protected voidremoveValueIgnoreCase(java.lang.String value)protected <T> voidremoveValuesMatching(T value, java.util.function.Function<java.lang.String,java.util.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(java.lang.String value)
- Overrides:
removeValueIgnoreCasein classDirective
-
removeValuesMatching
protected <T> void removeValuesMatching(T value, java.util.function.Function<java.lang.String,java.util.Optional<T>> parser)
-
_addHostOrSchemeDuringConstruction
void _addHostOrSchemeDuringConstruction(java.lang.String token, java.lang.String lowcaseToken, java.lang.String kind, int index, Directive.DirectiveErrorConsumer errors)
-
_addScheme
private boolean _addScheme(Scheme scheme, int index, Directive.DirectiveErrorConsumer errors)
-
_addHostSource
private boolean _addHostSource(Host source, int index, Directive.DirectiveErrorConsumer errors)
-
star
public boolean star()
-
setStar
public void setStar(boolean star)
-
self
public boolean self()
-
setSelf
public void setSelf(boolean self)
-
getSchemes
public java.util.List<Scheme> getSchemes()
-
addScheme
public void addScheme(Scheme scheme, Directive.ManipulationErrorConsumer errors)
-
removeScheme
public boolean removeScheme(Scheme scheme)
-
getHosts
public java.util.List<Host> getHosts()
-
addHost
public void addHost(Host host, Directive.ManipulationErrorConsumer errors)
-
removeHost
public boolean removeHost(Host host)
-
-