net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSaxLoader.CFAsteriskSaxLoader.java Source code

Java tutorial

Introduction

Here is the source code for net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSaxLoader.CFAsteriskSaxLoader.java

Source

// Description: Java 8 XML SAX Parser for CFAsterisk.

/*
 *   Code Factory Asterisk 11 Configuration Model
 *
 *   Copyright (c) 2014-2015 Mark Sobkow
 *   
 *   This program is available as free software under the GNU GPL v3, or
 *   under a commercial license from Mark Sobkow.  For commercial licensing
 *   details, please contact msobkow@sasktel.net.
 *   
 *   Under the terms of the GPL:
 *   
 *      This program is free software: you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation, either version 3 of the License, or
 *      (at your option) any later version.
 *     
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *     
 *      You should have received a copy of the GNU General Public License
 *      along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *   
 */

package net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskSaxLoader;

import java.io.File;
import java.lang.reflect.*;
import java.math.*;
import java.net.URL;
import java.sql.*;
import java.text.*;
import java.util.*;
import javax.naming.*;
import javax.sql.*;
import org.apache.commons.codec.binary.Base64;
import org.xml.sax.*;
import net.sourceforge.msscodefactory.cflib.v2_3.CFLib.*;
import net.sourceforge.msscodefactory.cfsecurity.v2_4.CFSecurity.*;
import net.sourceforge.msscodefactory.cfinternet.v2_4.CFInternet.*;
import net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsterisk.*;
import net.sourceforge.msscodefactory.cfsecurity.v2_4.CFSecurityObj.*;
import net.sourceforge.msscodefactory.cfinternet.v2_4.CFInternetObj.*;
import net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskObj.*;

public class CFAsteriskSaxLoader extends CFLibXmlCoreSaxParser implements ContentHandler {

    // The namespace URI of the supported schema
    public final static String SCHEMA_XMLNS = "uri://net.sourceforge.msscodefactory.cfasterisk.v2_4/cfasteriskloader";

    // The source for loading the supported schema
    public final static String SCHEMA_URI = "xsd/cfasterisk-24-structured.xsd";
    public final static String SCHEMA_ROOT_URI = "/xsd/cfasterisk-24-structured.xsd";
    public final static String CFSECURITY_XMLNS = "uri://net.sourceforge.msscodefactory.cfasterisk.v2_4/cfsecurityloader";
    public final static String CFSECURITY_URI = "xsd/cfsecurity-24-structured.xsd";
    public final static String CFSECURITY_ROOT_URI = "xsd/cfsecurity-24-structured.xsd";

    public final static String CFINTERNET_XMLNS = "uri://net.sourceforge.msscodefactory.cfasterisk.v2_4/cfinternetloader";
    public final static String CFINTERNET_URI = "xsd/cfinternet-24-structured.xsd";
    public final static String CFINTERNET_ROOT_URI = "xsd/cfinternet-24-structured.xsd";

    // The schema instance to load in to

    private ICFAsteriskSchemaObj schemaObj = null;

    // The cluster to use for loading

    private ICFSecurityClusterObj useCluster = null;

    public ICFSecurityClusterObj getUseCluster() {
        return (useCluster);
    }

    public void setUseCluster(ICFSecurityClusterObj value) {
        useCluster = value;
    }

    // The tenant to use for loading

    private ICFSecurityTenantObj useTenant = null;

    public ICFSecurityTenantObj getUseTenant() {
        return (useTenant);
    }

    public void setUseTenant(ICFSecurityTenantObj value) {
        useTenant = value;
    }

    // Loader behaviour configuration attributes

    public enum LoaderBehaviourEnum {
        Insert, Update, Replace
    };

    private LoaderBehaviourEnum asteriskConfLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum auditActionLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum clusterLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum configurationFileLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum domainLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum domainBaseLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum extConfigConfLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum extensionsConfLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum hostNodeLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum iSOCountryLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum iSOCountryCurrencyLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum iSOCountryLanguageLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum iSOCurrencyLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum iSOLanguageLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum iSOTimezoneLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum majorVersionLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum mimeTypeLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum minorVersionLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum projectBaseLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum realProjectLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum secAppLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum secDeviceLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum secFormLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum secGroupLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum secGroupFormLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum secGroupIncludeLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum secGroupMemberLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum secSessionLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum secUserLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum serviceLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum serviceTypeLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum sipConfLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum subProjectLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum sysClusterLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum tSecGroupLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum tSecGroupIncludeLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum tSecGroupMemberLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum tenantLoaderBehaviour = LoaderBehaviourEnum.Insert;
    private LoaderBehaviourEnum tldLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum topDomainLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum topProjectLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum uRLProtocolLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum versionLoaderBehaviour = LoaderBehaviourEnum.Update;
    private LoaderBehaviourEnum voicemailConfLoaderBehaviour = LoaderBehaviourEnum.Update;

    // Constructors

    public CFAsteriskSaxLoader() {
        super();
        setRootElementHandler(getSaxRootHandler());
        File file = new File(SCHEMA_URI);
        if (file.exists()) {
            addSchema(SCHEMA_URI);
        } else {
            URL url = getClass().getResource(SCHEMA_ROOT_URI);
            if (url != null) {
                addSchema(url.toString());
            }
        }
        file = new File(CFSECURITY_URI);
        if (file.exists()) {
            addSchema(CFSECURITY_URI);
        } else {
            URL url = getClass().getResource(CFSECURITY_ROOT_URI);
            if (url != null) {
                addSchema(url.toString());
            }
        }
        file = new File(CFINTERNET_URI);
        if (file.exists()) {
            addSchema(CFINTERNET_URI);
        } else {
            URL url = getClass().getResource(CFINTERNET_ROOT_URI);
            if (url != null) {
                addSchema(url.toString());
            }
        }
        initParser();
    }

    public CFAsteriskSaxLoader(ICFLibMessageLog logger) {
        super(logger);
        setRootElementHandler(getSaxRootHandler());
        File file = new File(SCHEMA_URI);
        if (file.exists()) {
            addSchema(SCHEMA_URI);
        } else {
            URL url = getClass().getResource(SCHEMA_ROOT_URI);
            if (url != null) {
                addSchema(url.toString());
            }
        }
        file = new File(CFSECURITY_URI);
        if (file.exists()) {
            addSchema(CFSECURITY_URI);
        } else {
            URL url = getClass().getResource(CFSECURITY_ROOT_URI);
            if (url != null) {
                addSchema(url.toString());
            }
        }
        file = new File(CFINTERNET_URI);
        if (file.exists()) {
            addSchema(CFINTERNET_URI);
        } else {
            URL url = getClass().getResource(CFINTERNET_ROOT_URI);
            if (url != null) {
                addSchema(url.toString());
            }
        }
        initParser();
    }

    // Element Handler instances

    private CFAsteriskSaxLoaderAsteriskConfHandler asteriskConfHandler = null;
    private CFAsteriskSaxLoaderAuditActionHandler auditActionHandler = null;
    private CFAsteriskSaxLoaderClusterHandler clusterHandler = null;
    private CFAsteriskSaxLoaderConfigurationFileHandler configurationFileHandler = null;
    private CFAsteriskSaxLoaderDomainHandler domainHandler = null;
    private CFAsteriskSaxLoaderDomainBaseHandler domainBaseHandler = null;
    private CFAsteriskSaxLoaderExtConfigConfHandler extConfigConfHandler = null;
    private CFAsteriskSaxLoaderExtensionsConfHandler extensionsConfHandler = null;
    private CFAsteriskSaxLoaderHostNodeHandler hostNodeHandler = null;
    private CFAsteriskSaxLoaderISOCountryHandler iSOCountryHandler = null;
    private CFAsteriskSaxLoaderISOCountryCurrencyHandler iSOCountryCurrencyHandler = null;
    private CFAsteriskSaxLoaderISOCountryLanguageHandler iSOCountryLanguageHandler = null;
    private CFAsteriskSaxLoaderISOCurrencyHandler iSOCurrencyHandler = null;
    private CFAsteriskSaxLoaderISOLanguageHandler iSOLanguageHandler = null;
    private CFAsteriskSaxLoaderISOTimezoneHandler iSOTimezoneHandler = null;
    private CFAsteriskSaxLoaderMajorVersionHandler majorVersionHandler = null;
    private CFAsteriskSaxLoaderMimeTypeHandler mimeTypeHandler = null;
    private CFAsteriskSaxLoaderMinorVersionHandler minorVersionHandler = null;
    private CFAsteriskSaxLoaderProjectBaseHandler projectBaseHandler = null;
    private CFAsteriskSaxLoaderRealProjectHandler realProjectHandler = null;
    private CFAsteriskSaxLoaderSecAppHandler secAppHandler = null;
    private CFAsteriskSaxLoaderSecDeviceHandler secDeviceHandler = null;
    private CFAsteriskSaxLoaderSecFormHandler secFormHandler = null;
    private CFAsteriskSaxLoaderSecGroupHandler secGroupHandler = null;
    private CFAsteriskSaxLoaderSecGroupFormHandler secGroupFormHandler = null;
    private CFAsteriskSaxLoaderSecGroupIncludeHandler secGroupIncludeHandler = null;
    private CFAsteriskSaxLoaderSecGroupMemberHandler secGroupMemberHandler = null;
    private CFAsteriskSaxLoaderSecSessionHandler secSessionHandler = null;
    private CFAsteriskSaxLoaderSecUserHandler secUserHandler = null;
    private CFAsteriskSaxLoaderServiceHandler serviceHandler = null;
    private CFAsteriskSaxLoaderServiceTypeHandler serviceTypeHandler = null;
    private CFAsteriskSaxLoaderSipConfHandler sipConfHandler = null;
    private CFAsteriskSaxLoaderSubProjectHandler subProjectHandler = null;
    private CFAsteriskSaxLoaderSysClusterHandler sysClusterHandler = null;
    private CFAsteriskSaxLoaderTSecGroupHandler tSecGroupHandler = null;
    private CFAsteriskSaxLoaderTSecGroupIncludeHandler tSecGroupIncludeHandler = null;
    private CFAsteriskSaxLoaderTSecGroupMemberHandler tSecGroupMemberHandler = null;
    private CFAsteriskSaxLoaderTenantHandler tenantHandler = null;
    private CFAsteriskSaxLoaderTldHandler tldHandler = null;
    private CFAsteriskSaxLoaderTopDomainHandler topDomainHandler = null;
    private CFAsteriskSaxLoaderTopProjectHandler topProjectHandler = null;
    private CFAsteriskSaxLoaderURLProtocolHandler uRLProtocolHandler = null;
    private CFAsteriskSaxLoaderVersionHandler versionHandler = null;
    private CFAsteriskSaxLoaderVoicemailConfHandler voicemailConfHandler = null;
    private CFAsteriskSaxRootHandler saxRootHandler = null;

    private CFAsteriskSaxDocHandler saxDocHandler = null;

    // Schema object accessors

    // SchemaObj accessors

    public ICFAsteriskSchemaObj getSchemaObj() {
        return (schemaObj);
    }

    public void setSchemaObj(ICFAsteriskSchemaObj value) {
        schemaObj = value;
    }

    // Element Handler Resolver Factories

    protected CFAsteriskSaxLoaderAsteriskConfHandler getAsteriskConfHandler() {
        if (asteriskConfHandler == null) {
            asteriskConfHandler = new CFAsteriskSaxLoaderAsteriskConfHandler(this);
        }
        return (asteriskConfHandler);
    }

    protected CFAsteriskSaxLoaderAuditActionHandler getAuditActionHandler() {
        if (auditActionHandler == null) {
            auditActionHandler = new CFAsteriskSaxLoaderAuditActionHandler(this);
        }
        return (auditActionHandler);
    }

    protected CFAsteriskSaxLoaderClusterHandler getClusterHandler() {
        if (clusterHandler == null) {
            clusterHandler = new CFAsteriskSaxLoaderClusterHandler(this);
            clusterHandler.addElementHandler("HostNode", getHostNodeHandler());
            clusterHandler.addElementHandler("Tenant", getTenantHandler());
            clusterHandler.addElementHandler("SecApp", getSecAppHandler());
            clusterHandler.addElementHandler("SecGroup", getSecGroupHandler());
            clusterHandler.addElementHandler("SysCluster", getSysClusterHandler());
        }
        return (clusterHandler);
    }

    protected CFAsteriskSaxLoaderConfigurationFileHandler getConfigurationFileHandler() {
        if (configurationFileHandler == null) {
            configurationFileHandler = new CFAsteriskSaxLoaderConfigurationFileHandler(this);
        }
        return (configurationFileHandler);
    }

    protected CFAsteriskSaxLoaderDomainHandler getDomainHandler() {
        if (domainHandler == null) {
            domainHandler = new CFAsteriskSaxLoaderDomainHandler(this);
            domainHandler.addElementHandler("TopProject", getTopProjectHandler());
        }
        return (domainHandler);
    }

    protected CFAsteriskSaxLoaderDomainBaseHandler getDomainBaseHandler() {
        if (domainBaseHandler == null) {
            domainBaseHandler = new CFAsteriskSaxLoaderDomainBaseHandler(this);
        }
        return (domainBaseHandler);
    }

    protected CFAsteriskSaxLoaderExtConfigConfHandler getExtConfigConfHandler() {
        if (extConfigConfHandler == null) {
            extConfigConfHandler = new CFAsteriskSaxLoaderExtConfigConfHandler(this);
        }
        return (extConfigConfHandler);
    }

    protected CFAsteriskSaxLoaderExtensionsConfHandler getExtensionsConfHandler() {
        if (extensionsConfHandler == null) {
            extensionsConfHandler = new CFAsteriskSaxLoaderExtensionsConfHandler(this);
        }
        return (extensionsConfHandler);
    }

    protected CFAsteriskSaxLoaderHostNodeHandler getHostNodeHandler() {
        if (hostNodeHandler == null) {
            hostNodeHandler = new CFAsteriskSaxLoaderHostNodeHandler(this);
            hostNodeHandler.addElementHandler("Service", getServiceHandler());
            hostNodeHandler.addElementHandler("AsteriskConf", getAsteriskConfHandler());
            hostNodeHandler.addElementHandler("SipConf", getSipConfHandler());
            hostNodeHandler.addElementHandler("ExtensionsConf", getExtensionsConfHandler());
            hostNodeHandler.addElementHandler("VoicemailConf", getVoicemailConfHandler());
            hostNodeHandler.addElementHandler("ExtConfigConf", getExtConfigConfHandler());
        }
        return (hostNodeHandler);
    }

    protected CFAsteriskSaxLoaderISOCountryHandler getISOCountryHandler() {
        if (iSOCountryHandler == null) {
            iSOCountryHandler = new CFAsteriskSaxLoaderISOCountryHandler(this);
            iSOCountryHandler.addElementHandler("ISOCountryCurrency", getISOCountryCurrencyHandler());
            iSOCountryHandler.addElementHandler("ISOCountryLanguage", getISOCountryLanguageHandler());
        }
        return (iSOCountryHandler);
    }

    protected CFAsteriskSaxLoaderISOCountryCurrencyHandler getISOCountryCurrencyHandler() {
        if (iSOCountryCurrencyHandler == null) {
            iSOCountryCurrencyHandler = new CFAsteriskSaxLoaderISOCountryCurrencyHandler(this);
        }
        return (iSOCountryCurrencyHandler);
    }

    protected CFAsteriskSaxLoaderISOCountryLanguageHandler getISOCountryLanguageHandler() {
        if (iSOCountryLanguageHandler == null) {
            iSOCountryLanguageHandler = new CFAsteriskSaxLoaderISOCountryLanguageHandler(this);
        }
        return (iSOCountryLanguageHandler);
    }

    protected CFAsteriskSaxLoaderISOCurrencyHandler getISOCurrencyHandler() {
        if (iSOCurrencyHandler == null) {
            iSOCurrencyHandler = new CFAsteriskSaxLoaderISOCurrencyHandler(this);
        }
        return (iSOCurrencyHandler);
    }

    protected CFAsteriskSaxLoaderISOLanguageHandler getISOLanguageHandler() {
        if (iSOLanguageHandler == null) {
            iSOLanguageHandler = new CFAsteriskSaxLoaderISOLanguageHandler(this);
        }
        return (iSOLanguageHandler);
    }

    protected CFAsteriskSaxLoaderISOTimezoneHandler getISOTimezoneHandler() {
        if (iSOTimezoneHandler == null) {
            iSOTimezoneHandler = new CFAsteriskSaxLoaderISOTimezoneHandler(this);
        }
        return (iSOTimezoneHandler);
    }

    protected CFAsteriskSaxLoaderMajorVersionHandler getMajorVersionHandler() {
        if (majorVersionHandler == null) {
            majorVersionHandler = new CFAsteriskSaxLoaderMajorVersionHandler(this);
            majorVersionHandler.addElementHandler("MinorVersion", getMinorVersionHandler());
        }
        return (majorVersionHandler);
    }

    protected CFAsteriskSaxLoaderMimeTypeHandler getMimeTypeHandler() {
        if (mimeTypeHandler == null) {
            mimeTypeHandler = new CFAsteriskSaxLoaderMimeTypeHandler(this);
        }
        return (mimeTypeHandler);
    }

    protected CFAsteriskSaxLoaderMinorVersionHandler getMinorVersionHandler() {
        if (minorVersionHandler == null) {
            minorVersionHandler = new CFAsteriskSaxLoaderMinorVersionHandler(this);
        }
        return (minorVersionHandler);
    }

    protected CFAsteriskSaxLoaderProjectBaseHandler getProjectBaseHandler() {
        if (projectBaseHandler == null) {
            projectBaseHandler = new CFAsteriskSaxLoaderProjectBaseHandler(this);
        }
        return (projectBaseHandler);
    }

    protected CFAsteriskSaxLoaderRealProjectHandler getRealProjectHandler() {
        if (realProjectHandler == null) {
            realProjectHandler = new CFAsteriskSaxLoaderRealProjectHandler(this);
            realProjectHandler.addElementHandler("MajorVersion", getMajorVersionHandler());
        }
        return (realProjectHandler);
    }

    protected CFAsteriskSaxLoaderSecAppHandler getSecAppHandler() {
        if (secAppHandler == null) {
            secAppHandler = new CFAsteriskSaxLoaderSecAppHandler(this);
            secAppHandler.addElementHandler("SecForm", getSecFormHandler());
        }
        return (secAppHandler);
    }

    protected CFAsteriskSaxLoaderSecDeviceHandler getSecDeviceHandler() {
        if (secDeviceHandler == null) {
            secDeviceHandler = new CFAsteriskSaxLoaderSecDeviceHandler(this);
        }
        return (secDeviceHandler);
    }

    protected CFAsteriskSaxLoaderSecFormHandler getSecFormHandler() {
        if (secFormHandler == null) {
            secFormHandler = new CFAsteriskSaxLoaderSecFormHandler(this);
        }
        return (secFormHandler);
    }

    protected CFAsteriskSaxLoaderSecGroupHandler getSecGroupHandler() {
        if (secGroupHandler == null) {
            secGroupHandler = new CFAsteriskSaxLoaderSecGroupHandler(this);
            secGroupHandler.addElementHandler("SecGroupInclude", getSecGroupIncludeHandler());
            secGroupHandler.addElementHandler("SecGroupMember", getSecGroupMemberHandler());
            secGroupHandler.addElementHandler("SecGroupForm", getSecGroupFormHandler());
        }
        return (secGroupHandler);
    }

    protected CFAsteriskSaxLoaderSecGroupFormHandler getSecGroupFormHandler() {
        if (secGroupFormHandler == null) {
            secGroupFormHandler = new CFAsteriskSaxLoaderSecGroupFormHandler(this);
        }
        return (secGroupFormHandler);
    }

    protected CFAsteriskSaxLoaderSecGroupIncludeHandler getSecGroupIncludeHandler() {
        if (secGroupIncludeHandler == null) {
            secGroupIncludeHandler = new CFAsteriskSaxLoaderSecGroupIncludeHandler(this);
        }
        return (secGroupIncludeHandler);
    }

    protected CFAsteriskSaxLoaderSecGroupMemberHandler getSecGroupMemberHandler() {
        if (secGroupMemberHandler == null) {
            secGroupMemberHandler = new CFAsteriskSaxLoaderSecGroupMemberHandler(this);
        }
        return (secGroupMemberHandler);
    }

    protected CFAsteriskSaxLoaderSecSessionHandler getSecSessionHandler() {
        if (secSessionHandler == null) {
            secSessionHandler = new CFAsteriskSaxLoaderSecSessionHandler(this);
        }
        return (secSessionHandler);
    }

    protected CFAsteriskSaxLoaderSecUserHandler getSecUserHandler() {
        if (secUserHandler == null) {
            secUserHandler = new CFAsteriskSaxLoaderSecUserHandler(this);
            secUserHandler.addElementHandler("SecDevice", getSecDeviceHandler());
            secUserHandler.addElementHandler("SecSession", getSecSessionHandler());
        }
        return (secUserHandler);
    }

    protected CFAsteriskSaxLoaderServiceHandler getServiceHandler() {
        if (serviceHandler == null) {
            serviceHandler = new CFAsteriskSaxLoaderServiceHandler(this);
        }
        return (serviceHandler);
    }

    protected CFAsteriskSaxLoaderServiceTypeHandler getServiceTypeHandler() {
        if (serviceTypeHandler == null) {
            serviceTypeHandler = new CFAsteriskSaxLoaderServiceTypeHandler(this);
        }
        return (serviceTypeHandler);
    }

    protected CFAsteriskSaxLoaderSipConfHandler getSipConfHandler() {
        if (sipConfHandler == null) {
            sipConfHandler = new CFAsteriskSaxLoaderSipConfHandler(this);
        }
        return (sipConfHandler);
    }

    protected CFAsteriskSaxLoaderSubProjectHandler getSubProjectHandler() {
        if (subProjectHandler == null) {
            subProjectHandler = new CFAsteriskSaxLoaderSubProjectHandler(this);
            subProjectHandler.addElementHandler("MajorVersion", getMajorVersionHandler());
        }
        return (subProjectHandler);
    }

    protected CFAsteriskSaxLoaderSysClusterHandler getSysClusterHandler() {
        if (sysClusterHandler == null) {
            sysClusterHandler = new CFAsteriskSaxLoaderSysClusterHandler(this);
        }
        return (sysClusterHandler);
    }

    protected CFAsteriskSaxLoaderTSecGroupHandler getTSecGroupHandler() {
        if (tSecGroupHandler == null) {
            tSecGroupHandler = new CFAsteriskSaxLoaderTSecGroupHandler(this);
            tSecGroupHandler.addElementHandler("TSecGroupInclude", getTSecGroupIncludeHandler());
            tSecGroupHandler.addElementHandler("TSecGroupMember", getTSecGroupMemberHandler());
        }
        return (tSecGroupHandler);
    }

    protected CFAsteriskSaxLoaderTSecGroupIncludeHandler getTSecGroupIncludeHandler() {
        if (tSecGroupIncludeHandler == null) {
            tSecGroupIncludeHandler = new CFAsteriskSaxLoaderTSecGroupIncludeHandler(this);
        }
        return (tSecGroupIncludeHandler);
    }

    protected CFAsteriskSaxLoaderTSecGroupMemberHandler getTSecGroupMemberHandler() {
        if (tSecGroupMemberHandler == null) {
            tSecGroupMemberHandler = new CFAsteriskSaxLoaderTSecGroupMemberHandler(this);
        }
        return (tSecGroupMemberHandler);
    }

    protected CFAsteriskSaxLoaderTenantHandler getTenantHandler() {
        if (tenantHandler == null) {
            tenantHandler = new CFAsteriskSaxLoaderTenantHandler(this);
            tenantHandler.addElementHandler("TSecGroup", getTSecGroupHandler());
            tenantHandler.addElementHandler("Tld", getTldHandler());
        }
        return (tenantHandler);
    }

    protected CFAsteriskSaxLoaderTldHandler getTldHandler() {
        if (tldHandler == null) {
            tldHandler = new CFAsteriskSaxLoaderTldHandler(this);
            tldHandler.addElementHandler("TopDomain", getTopDomainHandler());
        }
        return (tldHandler);
    }

    protected CFAsteriskSaxLoaderTopDomainHandler getTopDomainHandler() {
        if (topDomainHandler == null) {
            topDomainHandler = new CFAsteriskSaxLoaderTopDomainHandler(this);
            topDomainHandler.addElementHandler("Domain", getDomainHandler());
            topDomainHandler.addElementHandler("TopProject", getTopProjectHandler());
        }
        return (topDomainHandler);
    }

    protected CFAsteriskSaxLoaderTopProjectHandler getTopProjectHandler() {
        if (topProjectHandler == null) {
            topProjectHandler = new CFAsteriskSaxLoaderTopProjectHandler(this);
            topProjectHandler.addElementHandler("MajorVersion", getMajorVersionHandler());
            topProjectHandler.addElementHandler("SubProject", getSubProjectHandler());
        }
        return (topProjectHandler);
    }

    protected CFAsteriskSaxLoaderURLProtocolHandler getURLProtocolHandler() {
        if (uRLProtocolHandler == null) {
            uRLProtocolHandler = new CFAsteriskSaxLoaderURLProtocolHandler(this);
        }
        return (uRLProtocolHandler);
    }

    protected CFAsteriskSaxLoaderVersionHandler getVersionHandler() {
        if (versionHandler == null) {
            versionHandler = new CFAsteriskSaxLoaderVersionHandler(this);
        }
        return (versionHandler);
    }

    protected CFAsteriskSaxLoaderVoicemailConfHandler getVoicemailConfHandler() {
        if (voicemailConfHandler == null) {
            voicemailConfHandler = new CFAsteriskSaxLoaderVoicemailConfHandler(this);
        }
        return (voicemailConfHandler);
    }

    // Root Element Handler Resolver Factory

    protected CFAsteriskSaxRootHandler getSaxRootHandler() {
        if (saxRootHandler == null) {
            saxRootHandler = new CFAsteriskSaxRootHandler(this);
            saxRootHandler.addElementHandler("CFAsterisk", getSaxDocHandler());
            saxRootHandler.addElementHandler("CFSecurity", getSaxDocHandler());
            saxRootHandler.addElementHandler("CFInternet", getSaxDocHandler());
        }
        return (saxRootHandler);
    }

    // Root Element Handler

    /*
     *   CFAsteriskSaxRootHandler XML SAX Root Element Handler implementation
     */
    public class CFAsteriskSaxRootHandler extends CFLibXmlCoreElementHandler {
        public CFAsteriskSaxRootHandler(CFAsteriskSaxLoader saxLoader) {
            super(saxLoader);
        }

        public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException {
        }

        public void endElement(String uri, String localName, String qName) throws SAXException {
        }
    }

    // Document Element Handler Resolver Factory

    protected CFAsteriskSaxDocHandler getSaxDocHandler() {
        if (saxDocHandler == null) {
            saxDocHandler = new CFAsteriskSaxDocHandler(this);
            saxDocHandler.addElementHandler("AuditAction", getAuditActionHandler());
            saxDocHandler.addElementHandler("Cluster", getClusterHandler());
            saxDocHandler.addElementHandler("ISOCountry", getISOCountryHandler());
            saxDocHandler.addElementHandler("ISOCurrency", getISOCurrencyHandler());
            saxDocHandler.addElementHandler("ISOLanguage", getISOLanguageHandler());
            saxDocHandler.addElementHandler("ISOTimezone", getISOTimezoneHandler());
            saxDocHandler.addElementHandler("MimeType", getMimeTypeHandler());
            saxDocHandler.addElementHandler("SecUser", getSecUserHandler());
            saxDocHandler.addElementHandler("ServiceType", getServiceTypeHandler());
            saxDocHandler.addElementHandler("URLProtocol", getURLProtocolHandler());
        }
        return (saxDocHandler);
    }

    // Document Element Handler

    /*
     *   CFAsteriskSaxDocHandler XML SAX Doc Element Handler implementation
     */
    public class CFAsteriskSaxDocHandler extends CFLibXmlCoreElementHandler {
        public CFAsteriskSaxDocHandler(CFAsteriskSaxLoader saxLoader) {
            super(saxLoader);
        }

        public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException {
        }

        public void endElement(String uri, String localName, String qName) throws SAXException {
        }
    }

    // Loader behaviour configuration accessors

    public LoaderBehaviourEnum getAsteriskConfLoaderBehaviour() {
        return (asteriskConfLoaderBehaviour);
    }

    public void setAsteriskConfLoaderBehaviour(LoaderBehaviourEnum value) {
        asteriskConfLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getAuditActionLoaderBehaviour() {
        return (auditActionLoaderBehaviour);
    }

    public void setAuditActionLoaderBehaviour(LoaderBehaviourEnum value) {
        auditActionLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getClusterLoaderBehaviour() {
        return (clusterLoaderBehaviour);
    }

    public void setClusterLoaderBehaviour(LoaderBehaviourEnum value) {
        clusterLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getConfigurationFileLoaderBehaviour() {
        return (configurationFileLoaderBehaviour);
    }

    public void setConfigurationFileLoaderBehaviour(LoaderBehaviourEnum value) {
        configurationFileLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getDomainLoaderBehaviour() {
        return (domainLoaderBehaviour);
    }

    public void setDomainLoaderBehaviour(LoaderBehaviourEnum value) {
        domainLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getDomainBaseLoaderBehaviour() {
        return (domainBaseLoaderBehaviour);
    }

    public void setDomainBaseLoaderBehaviour(LoaderBehaviourEnum value) {
        domainBaseLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getExtConfigConfLoaderBehaviour() {
        return (extConfigConfLoaderBehaviour);
    }

    public void setExtConfigConfLoaderBehaviour(LoaderBehaviourEnum value) {
        extConfigConfLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getExtensionsConfLoaderBehaviour() {
        return (extensionsConfLoaderBehaviour);
    }

    public void setExtensionsConfLoaderBehaviour(LoaderBehaviourEnum value) {
        extensionsConfLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getHostNodeLoaderBehaviour() {
        return (hostNodeLoaderBehaviour);
    }

    public void setHostNodeLoaderBehaviour(LoaderBehaviourEnum value) {
        hostNodeLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getISOCountryLoaderBehaviour() {
        return (iSOCountryLoaderBehaviour);
    }

    public void setISOCountryLoaderBehaviour(LoaderBehaviourEnum value) {
        iSOCountryLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getISOCountryCurrencyLoaderBehaviour() {
        return (iSOCountryCurrencyLoaderBehaviour);
    }

    public void setISOCountryCurrencyLoaderBehaviour(LoaderBehaviourEnum value) {
        iSOCountryCurrencyLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getISOCountryLanguageLoaderBehaviour() {
        return (iSOCountryLanguageLoaderBehaviour);
    }

    public void setISOCountryLanguageLoaderBehaviour(LoaderBehaviourEnum value) {
        iSOCountryLanguageLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getISOCurrencyLoaderBehaviour() {
        return (iSOCurrencyLoaderBehaviour);
    }

    public void setISOCurrencyLoaderBehaviour(LoaderBehaviourEnum value) {
        iSOCurrencyLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getISOLanguageLoaderBehaviour() {
        return (iSOLanguageLoaderBehaviour);
    }

    public void setISOLanguageLoaderBehaviour(LoaderBehaviourEnum value) {
        iSOLanguageLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getISOTimezoneLoaderBehaviour() {
        return (iSOTimezoneLoaderBehaviour);
    }

    public void setISOTimezoneLoaderBehaviour(LoaderBehaviourEnum value) {
        iSOTimezoneLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getMajorVersionLoaderBehaviour() {
        return (majorVersionLoaderBehaviour);
    }

    public void setMajorVersionLoaderBehaviour(LoaderBehaviourEnum value) {
        majorVersionLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getMimeTypeLoaderBehaviour() {
        return (mimeTypeLoaderBehaviour);
    }

    public void setMimeTypeLoaderBehaviour(LoaderBehaviourEnum value) {
        mimeTypeLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getMinorVersionLoaderBehaviour() {
        return (minorVersionLoaderBehaviour);
    }

    public void setMinorVersionLoaderBehaviour(LoaderBehaviourEnum value) {
        minorVersionLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getProjectBaseLoaderBehaviour() {
        return (projectBaseLoaderBehaviour);
    }

    public void setProjectBaseLoaderBehaviour(LoaderBehaviourEnum value) {
        projectBaseLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getRealProjectLoaderBehaviour() {
        return (realProjectLoaderBehaviour);
    }

    public void setRealProjectLoaderBehaviour(LoaderBehaviourEnum value) {
        realProjectLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getSecAppLoaderBehaviour() {
        return (secAppLoaderBehaviour);
    }

    public void setSecAppLoaderBehaviour(LoaderBehaviourEnum value) {
        secAppLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getSecDeviceLoaderBehaviour() {
        return (secDeviceLoaderBehaviour);
    }

    public void setSecDeviceLoaderBehaviour(LoaderBehaviourEnum value) {
        secDeviceLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getSecFormLoaderBehaviour() {
        return (secFormLoaderBehaviour);
    }

    public void setSecFormLoaderBehaviour(LoaderBehaviourEnum value) {
        secFormLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getSecGroupLoaderBehaviour() {
        return (secGroupLoaderBehaviour);
    }

    public void setSecGroupLoaderBehaviour(LoaderBehaviourEnum value) {
        secGroupLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getSecGroupFormLoaderBehaviour() {
        return (secGroupFormLoaderBehaviour);
    }

    public void setSecGroupFormLoaderBehaviour(LoaderBehaviourEnum value) {
        secGroupFormLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getSecGroupIncludeLoaderBehaviour() {
        return (secGroupIncludeLoaderBehaviour);
    }

    public void setSecGroupIncludeLoaderBehaviour(LoaderBehaviourEnum value) {
        secGroupIncludeLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getSecGroupMemberLoaderBehaviour() {
        return (secGroupMemberLoaderBehaviour);
    }

    public void setSecGroupMemberLoaderBehaviour(LoaderBehaviourEnum value) {
        secGroupMemberLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getSecSessionLoaderBehaviour() {
        return (secSessionLoaderBehaviour);
    }

    public void setSecSessionLoaderBehaviour(LoaderBehaviourEnum value) {
        secSessionLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getSecUserLoaderBehaviour() {
        return (secUserLoaderBehaviour);
    }

    public void setSecUserLoaderBehaviour(LoaderBehaviourEnum value) {
        secUserLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getServiceLoaderBehaviour() {
        return (serviceLoaderBehaviour);
    }

    public void setServiceLoaderBehaviour(LoaderBehaviourEnum value) {
        serviceLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getServiceTypeLoaderBehaviour() {
        return (serviceTypeLoaderBehaviour);
    }

    public void setServiceTypeLoaderBehaviour(LoaderBehaviourEnum value) {
        serviceTypeLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getSipConfLoaderBehaviour() {
        return (sipConfLoaderBehaviour);
    }

    public void setSipConfLoaderBehaviour(LoaderBehaviourEnum value) {
        sipConfLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getSubProjectLoaderBehaviour() {
        return (subProjectLoaderBehaviour);
    }

    public void setSubProjectLoaderBehaviour(LoaderBehaviourEnum value) {
        subProjectLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getSysClusterLoaderBehaviour() {
        return (sysClusterLoaderBehaviour);
    }

    public void setSysClusterLoaderBehaviour(LoaderBehaviourEnum value) {
        sysClusterLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getTSecGroupLoaderBehaviour() {
        return (tSecGroupLoaderBehaviour);
    }

    public void setTSecGroupLoaderBehaviour(LoaderBehaviourEnum value) {
        tSecGroupLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getTSecGroupIncludeLoaderBehaviour() {
        return (tSecGroupIncludeLoaderBehaviour);
    }

    public void setTSecGroupIncludeLoaderBehaviour(LoaderBehaviourEnum value) {
        tSecGroupIncludeLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getTSecGroupMemberLoaderBehaviour() {
        return (tSecGroupMemberLoaderBehaviour);
    }

    public void setTSecGroupMemberLoaderBehaviour(LoaderBehaviourEnum value) {
        tSecGroupMemberLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getTenantLoaderBehaviour() {
        return (tenantLoaderBehaviour);
    }

    public void setTenantLoaderBehaviour(LoaderBehaviourEnum value) {
        tenantLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getTldLoaderBehaviour() {
        return (tldLoaderBehaviour);
    }

    public void setTldLoaderBehaviour(LoaderBehaviourEnum value) {
        tldLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getTopDomainLoaderBehaviour() {
        return (topDomainLoaderBehaviour);
    }

    public void setTopDomainLoaderBehaviour(LoaderBehaviourEnum value) {
        topDomainLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getTopProjectLoaderBehaviour() {
        return (topProjectLoaderBehaviour);
    }

    public void setTopProjectLoaderBehaviour(LoaderBehaviourEnum value) {
        topProjectLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getURLProtocolLoaderBehaviour() {
        return (uRLProtocolLoaderBehaviour);
    }

    public void setURLProtocolLoaderBehaviour(LoaderBehaviourEnum value) {
        uRLProtocolLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getVersionLoaderBehaviour() {
        return (versionLoaderBehaviour);
    }

    public void setVersionLoaderBehaviour(LoaderBehaviourEnum value) {
        versionLoaderBehaviour = value;
    }

    public LoaderBehaviourEnum getVoicemailConfLoaderBehaviour() {
        return (voicemailConfLoaderBehaviour);
    }

    public void setVoicemailConfLoaderBehaviour(LoaderBehaviourEnum value) {
        voicemailConfLoaderBehaviour = value;
    }

    // Parse a file

    public void parseFile(String url) {
        parse(url);
    }
}