Java tutorial
// Description: Java 8 XMsg Client DbIO implementation for SysCluster. /* * Code Factory Asterisk 11 Configuration Model * * Copyright (c) 2014-2015 Mark Sobkow * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsgClient; import java.lang.reflect.*; import java.math.*; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.sql.*; import java.text.*; import java.util.*; import javax.crypto.BadPaddingException; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; import javax.naming.*; import javax.sql.*; import net.sourceforge.msscodefactory.cflib.v2_3.CFLib.*; import net.sourceforge.msscodefactory.cflib.v2_3.CFLib.Tip.*; import org.apache.commons.codec.binary.Base64; 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.*; import net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsg.*; import net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsgRspnHandler.*; /* * CFAsteriskXMsgClientSysClusterTable XMsg Client DbIO implementation * for SysCluster. */ public class CFAsteriskXMsgClientSysClusterTable implements ICFAsteriskSysClusterTable { private CFAsteriskXMsgClientSchema schema; public CFAsteriskXMsgClientSysClusterTable(CFAsteriskXMsgClientSchema argSchema) { schema = argSchema; } public void createSysCluster(CFSecurityAuthorization Authorization, CFSecuritySysClusterBuff Buff) { final String S_ProcName = "createSysCluster"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgSysClusterMessageFormatter.formatSysClusterRqstCreate("\n\t\t\t", Buff) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } Object lastObjectProcessed = responseHandler.getLastObjectProcessed(); if (lastObjectProcessed != null) { ICFAsteriskSysClusterObj realized = null; if (lastObjectProcessed instanceof ICFAsteriskSysClusterObj) { realized = (ICFAsteriskSysClusterObj) lastObjectProcessed; } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSysClusterObj"); } if (realized != null) { Buff.set(realized.getSysClusterBuff()); } } else { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "responseHandler.getLastObjectProcessed()"); } } public CFSecuritySysClusterBuff readDerived(CFSecurityAuthorization Authorization, CFSecuritySysClusterPKey PKey) { final String S_ProcName = "readDerived"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgSysClusterMessageFormatter.formatSysClusterRqstRead("\n\t\t\t", PKey) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } CFSecuritySysClusterBuff buff = null; Object lastObjectProcessed = responseHandler.getLastObjectProcessed(); if (lastObjectProcessed != null) { ICFAsteriskSysClusterObj realized = null; if (lastObjectProcessed instanceof ICFAsteriskSysClusterObj) { realized = (ICFAsteriskSysClusterObj) lastObjectProcessed; } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSysClusterObj"); } if (realized != null) { buff = realized.getSysClusterBuff(); } } return (buff); } public CFSecuritySysClusterBuff lockDerived(CFSecurityAuthorization Authorization, CFSecuritySysClusterPKey PKey) { final String S_ProcName = "lockDerived"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgSysClusterMessageFormatter.formatSysClusterRqstLock("\n\t\t\t", PKey) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } CFSecuritySysClusterBuff buff = null; Object lastObjectProcessed = responseHandler.getLastObjectProcessed(); if (lastObjectProcessed != null) { ICFAsteriskSysClusterObj realized = null; if (lastObjectProcessed instanceof ICFAsteriskSysClusterObj) { realized = (ICFAsteriskSysClusterObj) lastObjectProcessed; } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSysClusterObj"); } if (realized != null) { buff = realized.getSysClusterBuff(); } } return (buff); } public CFSecuritySysClusterBuff[] readAllDerived(CFSecurityAuthorization Authorization) { final String S_ProcName = "readAllDerived"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgSysClusterMessageFormatter.formatSysClusterRqstReadAll("\n\t\t\t") + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } Object sortedListObj = responseHandler.getListOfObjects(); if (sortedListObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "responseHandler.getListOfObjects"); } @SuppressWarnings("unchecked") List<ICFSecuritySysClusterObj> sortedList = (List<ICFSecuritySysClusterObj>) sortedListObj; int sz = sortedList.size(); CFSecuritySysClusterBuff arr[] = new CFSecuritySysClusterBuff[sz]; Iterator<ICFSecuritySysClusterObj> iter = sortedList.iterator(); ICFSecuritySysClusterObj cur; for (int idx = 0; idx < sz; idx++) { cur = (ICFSecuritySysClusterObj) iter.next(); arr[idx] = cur.getSysClusterBuff(); } return (arr); } public CFSecuritySysClusterBuff readDerivedByIdIdx(CFSecurityAuthorization Authorization, int argSingletonId) { final String S_ProcName = "readDerivedByIdIdx"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgSysClusterMessageFormatter.formatSysClusterRqstReadByIdIdx("\n\t\t\t", argSingletonId) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } CFSecuritySysClusterBuff buff = null; Object lastObjectProcessed = responseHandler.getLastObjectProcessed(); if (lastObjectProcessed != null) { ICFAsteriskSysClusterObj realized = null; if (lastObjectProcessed instanceof ICFAsteriskSysClusterObj) { realized = (ICFAsteriskSysClusterObj) lastObjectProcessed; } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSysClusterObj"); } if (realized != null) { buff = realized.getSysClusterBuff(); } } return (buff); } public CFSecuritySysClusterBuff[] readDerivedByClusterIdx(CFSecurityAuthorization Authorization, long argClusterId) { final String S_ProcName = "readDerivedByClusterIdx"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgSysClusterMessageFormatter .formatSysClusterRqstReadByClusterIdx("\n\t\t\t", argClusterId) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } Object sortedListObj = responseHandler.getListOfObjects(); if (sortedListObj == null) { throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "responseHandler.getListOfObjects"); } @SuppressWarnings("unchecked") List<ICFSecuritySysClusterObj> sortedList = (List<ICFSecuritySysClusterObj>) sortedListObj; int sz = sortedList.size(); CFSecuritySysClusterBuff arr[] = new CFSecuritySysClusterBuff[sz]; Iterator<ICFSecuritySysClusterObj> iter = sortedList.iterator(); ICFSecuritySysClusterObj cur; for (int idx = 0; idx < sz; idx++) { cur = (ICFSecuritySysClusterObj) iter.next(); arr[idx] = cur.getSysClusterBuff(); } return (arr); } public CFSecuritySysClusterBuff readBuff(CFSecurityAuthorization Authorization, CFSecuritySysClusterPKey PKey) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuff"); } public CFSecuritySysClusterBuff lockBuff(CFSecurityAuthorization Authorization, CFSecuritySysClusterPKey PKey) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "lockBuff"); } public CFSecuritySysClusterBuff[] readAllBuff(CFSecurityAuthorization Authorization) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readAllBuff"); } public CFSecuritySysClusterBuff readBuffByIdIdx(CFSecurityAuthorization Authorization, int argSingletonId) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByIdIdx"); } public CFSecuritySysClusterBuff[] readBuffByClusterIdx(CFSecurityAuthorization Authorization, long argClusterId) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "readBuffByClusterIdx"); } public void updateSysCluster(CFSecurityAuthorization Authorization, CFSecuritySysClusterBuff Buff) { final String S_ProcName = "updateSysCluster"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgSysClusterMessageFormatter.formatSysClusterRqstUpdate("\n\t\t\t", Buff) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } CFSecuritySysClusterBuff buff = null; Object lastObjectProcessed = responseHandler.getLastObjectProcessed(); if (lastObjectProcessed != null) { ICFAsteriskSysClusterObj realized = null; if (lastObjectProcessed instanceof ICFAsteriskSysClusterObj) { realized = (ICFAsteriskSysClusterObj) lastObjectProcessed; } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSysClusterObj"); } if (realized != null) { buff = realized.getSysClusterBuff(); } } if (buff != null) { Buff.set(buff); } } public void deleteSysCluster(CFSecurityAuthorization Authorization, CFSecuritySysClusterBuff Buff) { final String S_ProcName = "deleteSysCluster"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgSysClusterMessageFormatter.formatSysClusterRqstDelete("\n\t\t\t", Buff) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } boolean deleted = responseHandler.getDeleted(); if (!deleted) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Server did not respond with a Deleted message"); } } public void deleteSysClusterByIdIdx(CFSecurityAuthorization Authorization, int argSingletonId) { final String S_ProcName = "deleteSysClusterByIdIdx"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgSysClusterMessageFormatter .formatSysClusterRqstDeleteByIdIdx("\n\t\t\t", argSingletonId) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } boolean deleted = responseHandler.getDeleted(); if (!deleted) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Server did not respond with a Deleted message"); } } public void deleteSysClusterByIdIdx(CFSecurityAuthorization Authorization, CFSecuritySysClusterPKey argKey) { deleteSysClusterByIdIdx(Authorization, argKey.getRequiredSingletonId()); } public void deleteSysClusterByClusterIdx(CFSecurityAuthorization Authorization, long argClusterId) { final String S_ProcName = "deleteSysClusterByClusterIdx"; String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t" + CFAsteriskXMsgSysClusterMessageFormatter .formatSysClusterRqstDeleteByClusterIdx("\n\t\t\t", argClusterId) + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble(); try { schema.getCFTipClientHandler().issueAppRequest(rqst); } catch (BadPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e); } catch (IllegalBlockSizeException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e); } catch (InvalidKeyException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e); } catch (NoSuchAlgorithmException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e); } catch (InvalidAlgorithmParameterException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e); } catch (NoSuchPaddingException e) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e); } ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler(); CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised(); if (exceptionRaised != null) { throw exceptionRaised; } boolean deleted = responseHandler.getDeleted(); if (!deleted) { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Server did not respond with a Deleted message"); } } public void deleteSysClusterByClusterIdx(CFSecurityAuthorization Authorization, CFSecuritySysClusterByClusterIdxKey argKey) { deleteSysClusterByClusterIdx(Authorization, argKey.getRequiredClusterId()); } public CFSecurityCursor openSysClusterCursorAll(CFSecurityAuthorization Authorization) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "openSysClusterCursorAll"); } public CFSecurityCursor openSysClusterCursorByClusterIdx(CFSecurityAuthorization Authorization, long argClusterId) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "openSysClusterCursorByClusterIdx"); } public void closeSysClusterCursor(CFSecurityCursor Cursor) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "closeSysClusterCursor"); } public CFSecuritySysClusterBuff nextSysClusterCursor(CFSecurityCursor Cursor) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nextSysClusterCursor"); } public CFSecuritySysClusterBuff prevSysClusterCursor(CFSecurityCursor Cursor) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "prevSysClusterCursor"); } public CFSecuritySysClusterBuff firstSysClusterCursor(CFSecurityCursor Cursor) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "firstSysClusterCursor"); } public CFSecuritySysClusterBuff lastSysClusterCursor(CFSecurityCursor Cursor) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "lastSysClusterCursor"); } public CFSecuritySysClusterBuff nthSysClusterCursor(CFSecurityCursor Cursor, int Idx) { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "nthSysClusterCursor"); } /** * Release the prepared statements. * <p> * When the schema changes connections, the prepared statements * have to be released because they contain connection-specific * information for most databases. */ public void releasePreparedStatements() { throw CFLib.getDefaultExceptionFactory().newNotSupportedException(getClass(), "releasePreparedStatements"); } }