org.jasig.portlet.calendar.util
Class StringCleaningUtil

java.lang.Object
  extended by org.jasig.portlet.calendar.util.StringCleaningUtil
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class StringCleaningUtil
extends Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

Version:
$Revision: 22522 $
Author:
Jen Bourey, jbourey@unicon.net

Constructor Summary
StringCleaningUtil()
           
 
Method Summary
 void afterPropertiesSet()
           
 String getCleanString(String dirtyInput)
          Clean a string using the configured Anti-samy policy file
 void setApplicationContext(org.springframework.context.ApplicationContext ctx)
           
 void setSecurityFile(String path)
          Set the file path to the Anti-samy policy file to be used for cleaning strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringCleaningUtil

public StringCleaningUtil()
Method Detail

setSecurityFile

public void setSecurityFile(String path)
Set the file path to the Anti-samy policy file to be used for cleaning strings.

Parameters:
path -

getCleanString

public String getCleanString(String dirtyInput)
                      throws org.owasp.validator.html.ScanException,
                             org.owasp.validator.html.PolicyException
Clean a string using the configured Anti-samy policy file

Parameters:
dirtyInput -
Returns:
Throws:
org.owasp.validator.html.ScanException
org.owasp.validator.html.PolicyException

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext ctx)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception


Copyright © 2012 Jasig. All Rights Reserved.