com.day.cq.xss.EscapingRule Maven / Gradle / Ivy
/*************************************************************************
*
* ADOBE CONFIDENTIAL
* __________________
*
* Copyright 2011 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/
package com.day.cq.xss;
import org.apache.sling.jcr.api.SlingRepository;
/**
* This interface must be implemented for each {@link ProtectionContext}.
*
* @since 5.4
* @deprecated
*/
@Deprecated
public interface EscapingRule {
/**
* Configures the rule.
*
* @param policyPath Path to the policy file to be used
* @param relPathPrefixes Array containing prefixes for resolving relative path
* prefixes
* @param repository The repository to use
* @throws XSSProtectionException if an error occured during configuring the service
*/
void configure(String policyPath, String[] relPathPrefixes, SlingRepository repository)
throws XSSProtectionException;
/**
* Escapes the specified string according to the implementes rule.
*
* @param str The string to be encoded
* @return The escaped string
* @throws XSSProtectionException if an error occured while escaping the string
*/
String escape(String str) throws XSSProtectionException;
}