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

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.DOMXMLTagFilterPlugin
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin, Filter

public class DOMXMLTagFilterPlugin
extends BaseXMLFilterPlugin

This Filter travel through DOM tree and find if any TAG is not satisfied the rules specified by a list of allowed tags. With wrong TAG, it change itself to content Type.

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

Field Summary
 
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name
 
Constructor Summary
DOMXMLTagFilterPlugin(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 the policy List.
 void setAllowedTags(LinkedHashMap<String,Attributes> allowedTags)
          Sets allowed tag policy to DOMXMLagFilter.
 
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

DOMXMLTagFilterPlugin

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

Parameters:
tagFilterPolicy -
Method Detail

getAllowedTags

public LinkedHashMap<String,Attributes> getAllowedTags()
Gets the policy List.

Returns:
the allowedTags

setAllowedTags

public void setAllowedTags(LinkedHashMap<String,Attributes> allowedTags)
Sets allowed tag policy to DOMXMLagFilter.

Parameters:
allowedTags -

doFilter

public Object doFilter(Object input)
Filters the input data.

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


Copyright © 2013 eXo Platform SAS. All Rights Reserved.