org.exoplatform.social.common.xmlprocessor.filters
Class XMLTagFilterPlugin

java.lang.Object
  extended by org.exoplatform.container.component.BaseComponentPlugin
      extended by org.exoplatform.social.common.xmlprocessor.BaseXMLFilterPlugin
          extended by org.exoplatform.social.common.xmlprocessor.filters.XMLTagFilterPlugin
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin, Filter

public class XMLTagFilterPlugin
extends BaseXMLFilterPlugin

This is XML Tags and Attributes filter from String input base on whitelist. You must define XMLTagFilterPolicy and add XMLTagFilterPolicy to this constructor.

Author:
Ly Minh Phuong - http://phuonglm.net

Field Summary
 
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name
 
Constructor Summary
XMLTagFilterPlugin(XMLTagFilterPolicy tagFilterPolicy)
          Constructor, the policy must be set from constructor.
 
Method Summary
 Object doFilter(Object input)
          Filters the input data.
 LinkedHashMap<String,Attributes> getAllowedTags()
          Gets allowed tags list
 void setAllowedTags(LinkedHashMap<String,Attributes> allowedTags)
          Sets allowed tags list
 
Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLTagFilterPlugin

public XMLTagFilterPlugin(XMLTagFilterPolicy tagFilterPolicy)
Constructor, the policy must be set from constructor.

Parameters:
tagFilterPolicy -
Method Detail

getAllowedTags

public LinkedHashMap<String,Attributes> getAllowedTags()
Gets allowed tags list

Returns:
the allowed tags list

setAllowedTags

public void setAllowedTags(LinkedHashMap<String,Attributes> allowedTags)
Sets allowed tags list

Parameters:
allowedTags -

doFilter

public Object doFilter(Object input)
Description copied from interface: Filter
Filters the input data.

Parameters:
input - the input data
Returns:
an Object with the result after filtered


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.