public void endViewerProtocolPolicy(String text) { cacheBehavior.setViewerProtocolPolicy(ViewerProtocolPolicy.fromText(text)); }
public void endViewerProtocolPolicy(String text) { cacheBehavior.setViewerProtocolPolicy(ViewerProtocolPolicy.fromText(text)); }
/** * @deprecated as of 2012-05-05 API version, instead use {@link #getDefaultCacheBehavior()} */ @Deprecated public void setRequiredProtocols(String[] protocols) { // Convert pre 2012-05-05 version requiredProtocol into default cache behavior setting if(protocols != null && protocols.length > 0) { if(protocols.length > 1 || !"https".equals(protocols[0])) { throw new IllegalArgumentException( "if set, the requiredProtocols argument may contain only a single string" + " value \"https\""); } // If a required protocol is set, and is set correctly, it must be HTTPS_ONLY this.getDefaultCacheBehavior().setViewerProtocolPolicy(ViewerProtocolPolicy.HTTPS_ONLY); } else { this.getDefaultCacheBehavior().setViewerProtocolPolicy(ViewerProtocolPolicy.ALLOW_ALL); } }
/** * @deprecated as of 2012-05-05 API version, instead use {@link #getDefaultCacheBehavior()} */ @Deprecated public void setRequiredProtocols(String[] protocols) { // Convert pre 2012-05-05 version requiredProtocol into default cache behavior setting if(protocols != null && protocols.length > 0) { if(protocols.length > 1 || !"https".equals(protocols[0])) { throw new IllegalArgumentException( "if set, the requiredProtocols argument may contain only a single string" + " value \"https\""); } // If a required protocol is set, and is set correctly, it must be HTTPS_ONLY this.getDefaultCacheBehavior().setViewerProtocolPolicy(ViewerProtocolPolicy.HTTPS_ONLY); } else { this.getDefaultCacheBehavior().setViewerProtocolPolicy(ViewerProtocolPolicy.ALLOW_ALL); } }