Refine search
public DataBinding getDataBinding(String name) { DataBinding databinding = databindings.get(name); if (databinding == null) { Message msg = new Message("DATABINDING_MISSING", LOG, name); throw new ToolException(msg); } return databinding; }
public FrontEnd getFrontEnd(String name) { FrontEnd frontend = frontends.get(name); if (frontend == null) { Message msg = new Message("FRONTEND_MISSING", LOG, name); throw new ToolException(msg); } return frontend; }
public WSDLExtensibilityPlugin getWSDLPlugin(final String key, final Class<?> clz) { StringBuilder sb = new StringBuilder(); sb.append(key); sb.append("-"); sb.append(clz.getName()); WSDLExtensibilityPlugin plugin = wsdlPlugins.get(sb.toString()); if (plugin == null) { throw new ToolException(new Message("FOUND_NO_WSDL_PLUGIN", LOG, sb.toString(), clz)); } return plugin; }
public WSDLExtensibilityPlugin getWSDLPlugin(final String key, final Class<?> clz) { StringBuilder sb = new StringBuilder(); sb.append(key); sb.append("-"); sb.append(clz.getName()); WSDLExtensibilityPlugin plugin = wsdlPlugins.get(sb.toString()); if (plugin == null) { throw new ToolException(new Message("FOUND_NO_WSDL_PLUGIN", LOG, sb.toString(), clz)); } return plugin; }
public FileWriterUtil(String targetDir, OutputStreamCreator osc) throws ToolException { target = new File(targetDir); this.osc = osc == null ? new OutputStreamCreator() : osc; if (!(target.exists()) || !(target.isDirectory())) { Message msg = new Message("DIRECTORY_NOT_EXIST", LOG, target); throw new ToolException(msg); } }
public void init() throws ToolException { // initialize if (toolspec == null) { Message message = new Message("TOOLSPEC_NOT_INITIALIZED", LOG); LOG.log(Level.SEVERE, message.toString()); throw new ToolException(message); } }
private void checkSupported(Definition def) throws ToolException { if (isRPCEncoded(def)) { org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message("UNSUPPORTED_RPC_ENCODED", LOG); throw new ToolException(msg); } }
private void writeToWSDL(Definition def) throws ToolException { try { WSDLUtils.writeWSDL(def, outputdir, wsdlOutput); } catch (Throwable t) { Message msg = new Message("FAIL_TO_WRITE_WSDL", LOG); throw new ToolException(msg, t); } }
public FileWriterUtil(String targetDir, OutputStreamCreator osc) throws ToolException { target = new File(targetDir); this.osc = osc == null ? new OutputStreamCreator() : osc; if (!(target.exists()) || !(target.isDirectory())) { Message msg = new Message("DIRECTORY_NOT_EXIST", LOG, target); throw new ToolException(msg); } }
private AbstractWSDLBuilder loadBuilder(String fullClzName) { AbstractWSDLBuilder builder = null; try { builder = (AbstractWSDLBuilder) ClassLoaderUtils .loadClass(fullClzName, getClass()).newInstance(); } catch (Exception e) { Message msg = new Message("LOAD_PROCESSOR_FAILED", LOG, fullClzName); LOG.log(Level.SEVERE, msg.toString()); throw new ToolException(msg, e); } return builder; }
private FrontEndProfile loadFrontEndProfile(String fullClzName) { FrontEndProfile profile = null; try { Class<?> clz = ClassLoaderUtils.loadClass(fullClzName, this.getClass()); profile = (FrontEndProfile)clz.newInstance(); } catch (Exception e) { Message msg = new Message("FRONTEND_PROFILE_LOAD_FAIL", LOG, fullClzName); LOG.log(Level.SEVERE, msg.toString()); throw new ToolException(msg, e); } return profile; }
private DataBindingProfile loadDataBindingProfile(String fullClzName) { DataBindingProfile profile = null; try { profile = (DataBindingProfile)ClassLoaderUtils.loadClass(fullClzName, getClass()).newInstance(); } catch (Exception e) { Message msg = new Message("DATABINDING_PROFILE_LOAD_FAIL", LOG, fullClzName); LOG.log(Level.SEVERE, msg.toString()); throw new ToolException(msg); } return profile; }
private Processor loadProcessor(String fullClzName) { Processor processor = null; try { processor = (Processor) ClassLoaderUtils.loadClass(fullClzName, getClass()).newInstance(); } catch (Exception e) { Message msg = new Message("LOAD_PROCESSOR_FAILED", LOG, fullClzName); LOG.log(Level.SEVERE, msg.toString()); throw new ToolException(msg, e); } return processor; }
private FrontEndProfile loadFrontEndProfile(String fullClzName) { FrontEndProfile profile = null; try { Class<?> clz = ClassLoaderUtils.loadClass(fullClzName, this.getClass()); profile = (FrontEndProfile)clz.newInstance(); } catch (Exception e) { Message msg = new Message("FRONTEND_PROFILE_LOAD_FAIL", LOG, fullClzName); LOG.log(Level.SEVERE, msg.toString()); throw new ToolException(msg, e); } return profile; }
public void addException(JavaException exception) { if (hasException(exception)) { Message message = new Message("EXCEPTION_ALREADY_EXIST", LOG, exception.getName()); throw new ToolException(message); } exceptions.add(exception); }
public void addException(JavaException exception) { if (hasException(exception)) { Message message = new Message("EXCEPTION_ALREADY_EXIST", LOG, exception.getName()); throw new ToolException(message); } exceptions.add(exception); }
public ToolSpec(InputStream in, boolean validate) throws ToolException { if (in == null) { throw new NullPointerException("Cannot create a ToolSpec object from a null stream"); } try { builder.setValidating(validate); this.doc = builder.parse(in); } catch (Exception ex) { Message message = new Message("FAIL_TO_PARSING_TOOLSPCE_STREAM", LOG); throw new ToolException(message, ex); } }
public void process() throws ToolException { init(); if (isServicePortExisted()) { Message msg = new Message("SERVICE_PORT_EXIST", LOG); throw new ToolException(msg); } if (!isBindingExisted()) { Message msg = new Message("BINDING_NOT_EXIST", LOG); throw new ToolException(msg); } doAppendService(); }
private void initWSDL() throws ToolException { try { wsdlFactory = WSDLFactory.newInstance(); wsdlDefinition = wsdlFactory.newDefinition(); } catch (WSDLException we) { Message msg = new Message("FAIL_TO_CREATE_WSDL_DEFINITION", LOG); throw new ToolException(msg, we); } }
private void initWSDL() throws ToolException { try { wsdlFactory = WSDLFactory.newInstance(); wsdlDefinition = wsdlFactory.newDefinition(); } catch (WSDLException we) { Message msg = new Message("FAIL_TO_CREATE_WSDL_DEFINITION", LOG); throw new ToolException(msg, we); } }