Java tutorial
// Description: Java 7 XML SAX Parser for CFAst. /* * 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/>. * * This software incorporates code originally Copyright (c) Mark Sobkow 2014-2015 * and licensed under the BSD 3-Clause license as written by xfree86.org: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * (1) Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * (2) Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * (3)The name of the author may not be used to * endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * *********************************************************************** * * Code manufactured by MSS Code Factory */ package net.sourceforge.msscodefactory.cfasterisk.v2_2.CFAstSaxLoader; 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 net.sourceforge.msscodefactory.cflib.v2_1.CFLib.*; import org.apache.commons.codec.binary.Base64; import org.xml.sax.*; import net.sourceforge.msscodefactory.cfasterisk.v2_2.CFAst.*; import net.sourceforge.msscodefactory.cfasterisk.v2_2.CFAstObj.*; public class CFAstSaxLoader extends CFLibXmlCoreSaxParser implements ContentHandler { // The namespace URI of the supported schema public final static String SCHEMA_XMLNS = "uri://net.sourceforge.msscodefactory.cfasterisk.v2_2/cfastloader"; // The source for loading the supported schema public final static String SCHEMA_URI = "xsd/cfasterisk-22-structured.xsd"; public final static String SCHEMA_ROOT_URI = "/xsd/cfasterisk-22-structured.xsd"; public final static String CFSECURITY_XMLNS = "uri://net.sourceforge.msscodefactory.cfasterisk.v2_2/cfsecurityloader"; public final static String CFSECURITY_URI = "xsd/cfsecurity-22-structured.xsd"; public final static String CFSECURITY_ROOT_URI = "xsd/cfsecurity-22-structured.xsd"; public final static String CFINTERNET_XMLNS = "uri://net.sourceforge.msscodefactory.cfasterisk.v2_2/cfinternetloader"; public final static String CFINTERNET_URI = "xsd/cfinternet-22-structured.xsd"; public final static String CFINTERNET_ROOT_URI = "xsd/cfinternet-22-structured.xsd"; // The schema instance to load in to private ICFAstSchemaObj schemaObj = null; // 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 CFAstSaxLoader() { 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 CFAstSaxLoader(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 CFAstSaxLoaderAsteriskConfHandler asteriskConfHandler = null; private CFAstSaxLoaderAuditActionHandler auditActionHandler = null; private CFAstSaxLoaderClusterHandler clusterHandler = null; private CFAstSaxLoaderConfigurationFileHandler configurationFileHandler = null; private CFAstSaxLoaderDomainHandler domainHandler = null; private CFAstSaxLoaderDomainBaseHandler domainBaseHandler = null; private CFAstSaxLoaderExtConfigConfHandler extConfigConfHandler = null; private CFAstSaxLoaderExtensionsConfHandler extensionsConfHandler = null; private CFAstSaxLoaderHostNodeHandler hostNodeHandler = null; private CFAstSaxLoaderISOCountryHandler iSOCountryHandler = null; private CFAstSaxLoaderISOCountryCurrencyHandler iSOCountryCurrencyHandler = null; private CFAstSaxLoaderISOCountryLanguageHandler iSOCountryLanguageHandler = null; private CFAstSaxLoaderISOCurrencyHandler iSOCurrencyHandler = null; private CFAstSaxLoaderISOLanguageHandler iSOLanguageHandler = null; private CFAstSaxLoaderISOTimezoneHandler iSOTimezoneHandler = null; private CFAstSaxLoaderMajorVersionHandler majorVersionHandler = null; private CFAstSaxLoaderMimeTypeHandler mimeTypeHandler = null; private CFAstSaxLoaderMinorVersionHandler minorVersionHandler = null; private CFAstSaxLoaderProjectBaseHandler projectBaseHandler = null; private CFAstSaxLoaderRealProjectHandler realProjectHandler = null; private CFAstSaxLoaderSecAppHandler secAppHandler = null; private CFAstSaxLoaderSecDeviceHandler secDeviceHandler = null; private CFAstSaxLoaderSecFormHandler secFormHandler = null; private CFAstSaxLoaderSecGroupHandler secGroupHandler = null; private CFAstSaxLoaderSecGroupFormHandler secGroupFormHandler = null; private CFAstSaxLoaderSecGroupIncludeHandler secGroupIncludeHandler = null; private CFAstSaxLoaderSecGroupMemberHandler secGroupMemberHandler = null; private CFAstSaxLoaderSecSessionHandler secSessionHandler = null; private CFAstSaxLoaderSecUserHandler secUserHandler = null; private CFAstSaxLoaderServiceHandler serviceHandler = null; private CFAstSaxLoaderServiceTypeHandler serviceTypeHandler = null; private CFAstSaxLoaderSipConfHandler sipConfHandler = null; private CFAstSaxLoaderSubProjectHandler subProjectHandler = null; private CFAstSaxLoaderSysClusterHandler sysClusterHandler = null; private CFAstSaxLoaderTSecGroupHandler tSecGroupHandler = null; private CFAstSaxLoaderTSecGroupIncludeHandler tSecGroupIncludeHandler = null; private CFAstSaxLoaderTSecGroupMemberHandler tSecGroupMemberHandler = null; private CFAstSaxLoaderTenantHandler tenantHandler = null; private CFAstSaxLoaderTldHandler tldHandler = null; private CFAstSaxLoaderTopDomainHandler topDomainHandler = null; private CFAstSaxLoaderTopProjectHandler topProjectHandler = null; private CFAstSaxLoaderURLProtocolHandler uRLProtocolHandler = null; private CFAstSaxLoaderVersionHandler versionHandler = null; private CFAstSaxLoaderVoicemailConfHandler voicemailConfHandler = null; private CFAstSaxRootHandler saxRootHandler = null; private CFAstSaxDocHandler saxDocHandler = null; // Schema object accessors // SchemaObj accessors public ICFAstSchemaObj getSchemaObj() { return (schemaObj); } public void setSchemaObj(ICFAstSchemaObj value) { schemaObj = value; } // Element Handler Resolver Factories protected CFAstSaxLoaderAsteriskConfHandler getAsteriskConfHandler() { if (asteriskConfHandler == null) { asteriskConfHandler = new CFAstSaxLoaderAsteriskConfHandler(this); } return (asteriskConfHandler); } protected CFAstSaxLoaderAuditActionHandler getAuditActionHandler() { if (auditActionHandler == null) { auditActionHandler = new CFAstSaxLoaderAuditActionHandler(this); } return (auditActionHandler); } protected CFAstSaxLoaderClusterHandler getClusterHandler() { if (clusterHandler == null) { clusterHandler = new CFAstSaxLoaderClusterHandler(this); clusterHandler.addElementHandler("HostNode", getHostNodeHandler()); clusterHandler.addElementHandler("Tenant", getTenantHandler()); clusterHandler.addElementHandler("SecApp", getSecAppHandler()); clusterHandler.addElementHandler("SecGroup", getSecGroupHandler()); clusterHandler.addElementHandler("SysCluster", getSysClusterHandler()); } return (clusterHandler); } protected CFAstSaxLoaderConfigurationFileHandler getConfigurationFileHandler() { if (configurationFileHandler == null) { configurationFileHandler = new CFAstSaxLoaderConfigurationFileHandler(this); } return (configurationFileHandler); } protected CFAstSaxLoaderDomainHandler getDomainHandler() { if (domainHandler == null) { domainHandler = new CFAstSaxLoaderDomainHandler(this); domainHandler.addElementHandler("TopProject", getTopProjectHandler()); } return (domainHandler); } protected CFAstSaxLoaderDomainBaseHandler getDomainBaseHandler() { if (domainBaseHandler == null) { domainBaseHandler = new CFAstSaxLoaderDomainBaseHandler(this); } return (domainBaseHandler); } protected CFAstSaxLoaderExtConfigConfHandler getExtConfigConfHandler() { if (extConfigConfHandler == null) { extConfigConfHandler = new CFAstSaxLoaderExtConfigConfHandler(this); } return (extConfigConfHandler); } protected CFAstSaxLoaderExtensionsConfHandler getExtensionsConfHandler() { if (extensionsConfHandler == null) { extensionsConfHandler = new CFAstSaxLoaderExtensionsConfHandler(this); } return (extensionsConfHandler); } protected CFAstSaxLoaderHostNodeHandler getHostNodeHandler() { if (hostNodeHandler == null) { hostNodeHandler = new CFAstSaxLoaderHostNodeHandler(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 CFAstSaxLoaderISOCountryHandler getISOCountryHandler() { if (iSOCountryHandler == null) { iSOCountryHandler = new CFAstSaxLoaderISOCountryHandler(this); iSOCountryHandler.addElementHandler("ISOCountryCurrency", getISOCountryCurrencyHandler()); iSOCountryHandler.addElementHandler("ISOCountryLanguage", getISOCountryLanguageHandler()); } return (iSOCountryHandler); } protected CFAstSaxLoaderISOCountryCurrencyHandler getISOCountryCurrencyHandler() { if (iSOCountryCurrencyHandler == null) { iSOCountryCurrencyHandler = new CFAstSaxLoaderISOCountryCurrencyHandler(this); } return (iSOCountryCurrencyHandler); } protected CFAstSaxLoaderISOCountryLanguageHandler getISOCountryLanguageHandler() { if (iSOCountryLanguageHandler == null) { iSOCountryLanguageHandler = new CFAstSaxLoaderISOCountryLanguageHandler(this); } return (iSOCountryLanguageHandler); } protected CFAstSaxLoaderISOCurrencyHandler getISOCurrencyHandler() { if (iSOCurrencyHandler == null) { iSOCurrencyHandler = new CFAstSaxLoaderISOCurrencyHandler(this); } return (iSOCurrencyHandler); } protected CFAstSaxLoaderISOLanguageHandler getISOLanguageHandler() { if (iSOLanguageHandler == null) { iSOLanguageHandler = new CFAstSaxLoaderISOLanguageHandler(this); } return (iSOLanguageHandler); } protected CFAstSaxLoaderISOTimezoneHandler getISOTimezoneHandler() { if (iSOTimezoneHandler == null) { iSOTimezoneHandler = new CFAstSaxLoaderISOTimezoneHandler(this); } return (iSOTimezoneHandler); } protected CFAstSaxLoaderMajorVersionHandler getMajorVersionHandler() { if (majorVersionHandler == null) { majorVersionHandler = new CFAstSaxLoaderMajorVersionHandler(this); majorVersionHandler.addElementHandler("MinorVersion", getMinorVersionHandler()); } return (majorVersionHandler); } protected CFAstSaxLoaderMimeTypeHandler getMimeTypeHandler() { if (mimeTypeHandler == null) { mimeTypeHandler = new CFAstSaxLoaderMimeTypeHandler(this); } return (mimeTypeHandler); } protected CFAstSaxLoaderMinorVersionHandler getMinorVersionHandler() { if (minorVersionHandler == null) { minorVersionHandler = new CFAstSaxLoaderMinorVersionHandler(this); } return (minorVersionHandler); } protected CFAstSaxLoaderProjectBaseHandler getProjectBaseHandler() { if (projectBaseHandler == null) { projectBaseHandler = new CFAstSaxLoaderProjectBaseHandler(this); } return (projectBaseHandler); } protected CFAstSaxLoaderRealProjectHandler getRealProjectHandler() { if (realProjectHandler == null) { realProjectHandler = new CFAstSaxLoaderRealProjectHandler(this); realProjectHandler.addElementHandler("MajorVersion", getMajorVersionHandler()); } return (realProjectHandler); } protected CFAstSaxLoaderSecAppHandler getSecAppHandler() { if (secAppHandler == null) { secAppHandler = new CFAstSaxLoaderSecAppHandler(this); secAppHandler.addElementHandler("SecForm", getSecFormHandler()); } return (secAppHandler); } protected CFAstSaxLoaderSecDeviceHandler getSecDeviceHandler() { if (secDeviceHandler == null) { secDeviceHandler = new CFAstSaxLoaderSecDeviceHandler(this); } return (secDeviceHandler); } protected CFAstSaxLoaderSecFormHandler getSecFormHandler() { if (secFormHandler == null) { secFormHandler = new CFAstSaxLoaderSecFormHandler(this); } return (secFormHandler); } protected CFAstSaxLoaderSecGroupHandler getSecGroupHandler() { if (secGroupHandler == null) { secGroupHandler = new CFAstSaxLoaderSecGroupHandler(this); secGroupHandler.addElementHandler("SecGroupInclude", getSecGroupIncludeHandler()); secGroupHandler.addElementHandler("SecGroupMember", getSecGroupMemberHandler()); secGroupHandler.addElementHandler("SecGroupForm", getSecGroupFormHandler()); } return (secGroupHandler); } protected CFAstSaxLoaderSecGroupFormHandler getSecGroupFormHandler() { if (secGroupFormHandler == null) { secGroupFormHandler = new CFAstSaxLoaderSecGroupFormHandler(this); } return (secGroupFormHandler); } protected CFAstSaxLoaderSecGroupIncludeHandler getSecGroupIncludeHandler() { if (secGroupIncludeHandler == null) { secGroupIncludeHandler = new CFAstSaxLoaderSecGroupIncludeHandler(this); } return (secGroupIncludeHandler); } protected CFAstSaxLoaderSecGroupMemberHandler getSecGroupMemberHandler() { if (secGroupMemberHandler == null) { secGroupMemberHandler = new CFAstSaxLoaderSecGroupMemberHandler(this); } return (secGroupMemberHandler); } protected CFAstSaxLoaderSecSessionHandler getSecSessionHandler() { if (secSessionHandler == null) { secSessionHandler = new CFAstSaxLoaderSecSessionHandler(this); } return (secSessionHandler); } protected CFAstSaxLoaderSecUserHandler getSecUserHandler() { if (secUserHandler == null) { secUserHandler = new CFAstSaxLoaderSecUserHandler(this); secUserHandler.addElementHandler("SecDevice", getSecDeviceHandler()); secUserHandler.addElementHandler("SecSession", getSecSessionHandler()); } return (secUserHandler); } protected CFAstSaxLoaderServiceHandler getServiceHandler() { if (serviceHandler == null) { serviceHandler = new CFAstSaxLoaderServiceHandler(this); } return (serviceHandler); } protected CFAstSaxLoaderServiceTypeHandler getServiceTypeHandler() { if (serviceTypeHandler == null) { serviceTypeHandler = new CFAstSaxLoaderServiceTypeHandler(this); } return (serviceTypeHandler); } protected CFAstSaxLoaderSipConfHandler getSipConfHandler() { if (sipConfHandler == null) { sipConfHandler = new CFAstSaxLoaderSipConfHandler(this); } return (sipConfHandler); } protected CFAstSaxLoaderSubProjectHandler getSubProjectHandler() { if (subProjectHandler == null) { subProjectHandler = new CFAstSaxLoaderSubProjectHandler(this); subProjectHandler.addElementHandler("MajorVersion", getMajorVersionHandler()); } return (subProjectHandler); } protected CFAstSaxLoaderSysClusterHandler getSysClusterHandler() { if (sysClusterHandler == null) { sysClusterHandler = new CFAstSaxLoaderSysClusterHandler(this); } return (sysClusterHandler); } protected CFAstSaxLoaderTSecGroupHandler getTSecGroupHandler() { if (tSecGroupHandler == null) { tSecGroupHandler = new CFAstSaxLoaderTSecGroupHandler(this); tSecGroupHandler.addElementHandler("TSecGroupInclude", getTSecGroupIncludeHandler()); tSecGroupHandler.addElementHandler("TSecGroupMember", getTSecGroupMemberHandler()); } return (tSecGroupHandler); } protected CFAstSaxLoaderTSecGroupIncludeHandler getTSecGroupIncludeHandler() { if (tSecGroupIncludeHandler == null) { tSecGroupIncludeHandler = new CFAstSaxLoaderTSecGroupIncludeHandler(this); } return (tSecGroupIncludeHandler); } protected CFAstSaxLoaderTSecGroupMemberHandler getTSecGroupMemberHandler() { if (tSecGroupMemberHandler == null) { tSecGroupMemberHandler = new CFAstSaxLoaderTSecGroupMemberHandler(this); } return (tSecGroupMemberHandler); } protected CFAstSaxLoaderTenantHandler getTenantHandler() { if (tenantHandler == null) { tenantHandler = new CFAstSaxLoaderTenantHandler(this); tenantHandler.addElementHandler("TSecGroup", getTSecGroupHandler()); tenantHandler.addElementHandler("Tld", getTldHandler()); } return (tenantHandler); } protected CFAstSaxLoaderTldHandler getTldHandler() { if (tldHandler == null) { tldHandler = new CFAstSaxLoaderTldHandler(this); tldHandler.addElementHandler("TopDomain", getTopDomainHandler()); } return (tldHandler); } protected CFAstSaxLoaderTopDomainHandler getTopDomainHandler() { if (topDomainHandler == null) { topDomainHandler = new CFAstSaxLoaderTopDomainHandler(this); topDomainHandler.addElementHandler("Domain", getDomainHandler()); topDomainHandler.addElementHandler("TopProject", getTopProjectHandler()); } return (topDomainHandler); } protected CFAstSaxLoaderTopProjectHandler getTopProjectHandler() { if (topProjectHandler == null) { topProjectHandler = new CFAstSaxLoaderTopProjectHandler(this); topProjectHandler.addElementHandler("MajorVersion", getMajorVersionHandler()); topProjectHandler.addElementHandler("SubProject", getSubProjectHandler()); } return (topProjectHandler); } protected CFAstSaxLoaderURLProtocolHandler getURLProtocolHandler() { if (uRLProtocolHandler == null) { uRLProtocolHandler = new CFAstSaxLoaderURLProtocolHandler(this); } return (uRLProtocolHandler); } protected CFAstSaxLoaderVersionHandler getVersionHandler() { if (versionHandler == null) { versionHandler = new CFAstSaxLoaderVersionHandler(this); } return (versionHandler); } protected CFAstSaxLoaderVoicemailConfHandler getVoicemailConfHandler() { if (voicemailConfHandler == null) { voicemailConfHandler = new CFAstSaxLoaderVoicemailConfHandler(this); } return (voicemailConfHandler); } // Root Element Handler Resolver Factory protected CFAstSaxRootHandler getSaxRootHandler() { if (saxRootHandler == null) { saxRootHandler = new CFAstSaxRootHandler(this); saxRootHandler.addElementHandler("CFAst", getSaxDocHandler()); saxRootHandler.addElementHandler("CFSecurity", getSaxDocHandler()); saxRootHandler.addElementHandler("CFInternet", getSaxDocHandler()); } return (saxRootHandler); } // Root Element Handler /* * CFAstSaxRootHandler XML SAX Root Element Handler implementation */ public class CFAstSaxRootHandler extends CFLibXmlCoreElementHandler { public CFAstSaxRootHandler(CFAstSaxLoader 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 CFAstSaxDocHandler getSaxDocHandler() { if (saxDocHandler == null) { saxDocHandler = new CFAstSaxDocHandler(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 /* * CFAstSaxDocHandler XML SAX Doc Element Handler implementation */ public class CFAstSaxDocHandler extends CFLibXmlCoreElementHandler { public CFAstSaxDocHandler(CFAstSaxLoader 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); } }