// Path: src/main/java/com/seleniumtests/reporter/pluginmodel/Page.java
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "")
// @XmlRootElement(name = "page")
// public class Page {
// 
//     @XmlAttribute(name = "class-name", required = true)
//     protected String className;
// 
//     /**
//      * Gets the value of the className property.
//      *
//      * @return  possible object is {@link String }
//      */
//     public String getClassName() {
//         return className;
//     }
// 
//     /**
//      * Sets the value of the className property.
//      *
//      * @param  value  allowed object is {@link String }
//      */
//     public void setClassName(final String value) {
//         this.className = value;
//     }
// 
// }


import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
import org.apache.log4j.Logger;
import com.seleniumtests.core.SeleniumTestsPageListener;
import com.seleniumtests.reporter.pluginmodel.Method;
import com.seleniumtests.reporter.pluginmodel.Page;
import com.seleniumtests.reporter.pluginmodel.Plugin;
import com.seleniumtests.reporter.pluginmodel.SeleniumTestsPlugins;
import com.seleniumtests.reporter.pluginmodel.Test;
import com.seleniumtests.webelements.IPage;
        List<SeleniumTestsPageListener> pageListenerList = new ArrayList<SeleniumTestsPageListener>();

        for (Plugin plugin : _seleniumTestsPlugins.getPlugin()) {
            if (isPageListenerApplicable(plugin, testMethodSignature, page.getClass().getCanonicalName())) {
                pageListenerList.add(pageListenerMap.get(plugin.getClassName().trim()));
            }
        }

        for (SeleniumTestsPageListener listener : pageListenerList) {
            try {
                if (isPageLoad) {
                    listener.onPageLoad(page);
                } else {
                    listener.onPageUnload(page);
                }
            } catch (Throwable e) {
                logger.error(e);
            }
        }
    }

    public boolean isPageListenerApplicable(final Plugin plugin, final String testMethodSignature,
            final String pageClassName) {
        if (testMethodSignature == null) {
            return true;
        }

        boolean testFound = false;
        for (Test test : plugin.getTest()) {
            if (testMethodSignature.matches(test.getClassName() + "\\.\\w.*")) {
// Path: src/main/java/com/seleniumtests/reporter/pluginmodel/Page.java
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "")
// @XmlRootElement(name = "page")
// public class Page {
// 
//     @XmlAttribute(name = "class-name", required = true)
//     protected String className;
// 
//     /**
//      * Gets the value of the className property.
//      *
//      * @return  possible object is {@link String }
//      */
//     public String getClassName() {
//         return className;
//     }
// 
//     /**
//      * Sets the value of the className property.
//      *
//      * @param  value  allowed object is {@link String }
//      */
//     public void setClassName(final String value) {
//         this.className = value;
//     }
// 
// }


// Path: src/main/java/com/seleniumtests/reporter/PluginsHelper.java
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
import org.apache.log4j.Logger;
import com.seleniumtests.core.SeleniumTestsPageListener;
import com.seleniumtests.reporter.pluginmodel.Method;
import com.seleniumtests.reporter.pluginmodel.Page;
import com.seleniumtests.reporter.pluginmodel.Plugin;
import com.seleniumtests.reporter.pluginmodel.SeleniumTestsPlugins;
import com.seleniumtests.reporter.pluginmodel.Test;
import com.seleniumtests.webelements.IPage;

        List<SeleniumTestsPageListener> pageListenerList = new ArrayList<SeleniumTestsPageListener>();

        for (Plugin plugin : _seleniumTestsPlugins.getPlugin()) {
            if (isPageListenerApplicable(plugin, testMethodSignature, page.getClass().getCanonicalName())) {
                pageListenerList.add(pageListenerMap.get(plugin.getClassName().trim()));
            }
        }

        for (SeleniumTestsPageListener listener : pageListenerList) {
            try {
                if (isPageLoad) {
                    listener.onPageLoad(page);
                } else {
                    listener.onPageUnload(page);
                }
            } catch (Throwable e) {
                logger.error(e);
            }
        }
    }

    public boolean isPageListenerApplicable(final Plugin plugin, final String testMethodSignature,
            final String pageClassName) {
        if (testMethodSignature == null) {
            return true;
        }

        boolean testFound = false;
        for (Test test : plugin.getTest()) {
            if (testMethodSignature.matches(test.getClassName() + "\\.\\w.*")) {
                for (Page page : test.getPage()) {