/** * Gets the formatted string with the given arguments. * @param key the keystring on which to apply arguments * @param obj1 the first object argument for the formatter * @param obj2 the second object argument for the formatter * @param obj3 the third object argument for the formatter * @return the formatted string */ public String getMessage(final String key, final Object obj1, final Object obj2, final Object obj3) { return getMessage(key, new Object[] {obj1, obj2, obj3 }); }
/** * Gets the instance for a given package. * @param packageName the package for which we want a bundle * @param cl the classloader used to load bundle * @return I18n object */ public static I18n getInstance(final String packageName, final ClassLoader cl) { if (bundles == null) { bundles = new HashMap<String, I18n>(); } I18n i18n = (I18n) bundles.get(packageName); if (i18n != null) { return i18n; } i18n = new I18n(packageName, cl); bundles.put(packageName, i18n); return i18n; }
/** * Gets the instance for a given package. * @param packageName the package for which we want a bundle * @return I18n object */ public static I18n getInstance(final String packageName) { return getInstance(packageName, Thread.currentThread().getContextClassLoader()); }
/** * Gets the formatted string with the given arguments. * @param key the keystring on which to apply arguments * @param obj1 the first object argument for the formatter * @param obj2 the second object argument for the formatter * @return the formatted string */ public String getMessage(final String key, final Object obj1, final Object obj2) { return getMessage(key, new Object[] {obj1, obj2 }); }
/** * Gets the instance for a given class. * @param c the class for which we want a bundle * @param cl the classloader used to load bundle * @return I18n object */ public static I18n getInstance(final Class<?> c, final ClassLoader cl) { return getInstance(c.getPackage().getName(), cl); }
/** * Gets the formatted string with the given arguments. * @param key the keystring on which to apply arguments * @param obj the object argument for the formatter * @return the formatted string */ public String getMessage(final String key, final Object obj) { return getMessage(key, new Object[] {obj}); }
/** * Gets the instance for a given class. * @param c the class for which we want a bundle * @return I18n object */ public static I18n getInstance(final Class<?> c) { return getInstance(c.getPackage().getName(), c.getClassLoader()); }
/** * Gets the formatted string with the given arguments. * @param key the keystring on which to apply arguments * @param obj1 argument for the formatter * @param obj2 argument for the formatter * @param obj3 argument for the formatter * @param obj4 argument for the formatter * @return the formatted string */ public String getMessage(final String key, final Object obj1, final Object obj2, final Object obj3, final Object obj4) { return getMessage(key, new Object[] {obj1, obj2, obj3, obj4 }); }
/** * Gets the formatted string with the given arguments. * @param key the keystring on which to apply arguments * @param obj1 argument for the formatter * @param obj2 argument for the formatter * @param obj3 argument for the formatter * @param obj4 argument for the formatter * @param obj5 argument for the formatter * @return the formatted string */ public String getMessage(final String key, final Object obj1, final Object obj2, final Object obj3, final Object obj4, final Object obj5) { return getMessage(key, new Object[] {obj1, obj2, obj3, obj4, obj5 }); }
/** * Gets the formatted string with the given arguments. * @param key the keystring on which to apply arguments * @param obj1 argument for the formatter * @param obj2 argument for the formatter * @param obj3 argument for the formatter * @param obj4 argument for the formatter * @param obj5 argument for the formatter * @param obj6 argument for the formatter * @return the formatted string */ public String getMessage(final String key, final Object obj1, final Object obj2, final Object obj3, final Object obj4, final Object obj5, final Object obj6) { return getMessage(key, new Object[] {obj1, obj2, obj3, obj4, obj5, obj6 }); }
/** * Gets the formatted string with the given arguments. * @param key the keystring on which to apply arguments * @param args the object arguments for the formatter * @return the formatted string */ public String getMessage(final String key, final Object[] args) { String value = getMessage(key); return MessageFormat.format(value, args); }
/** * Setter method for J2EE component linking. * @param desc the descriptor of the component implementing the endpoint. * @throws WSDeploymentDescException when desc is an unknown type. */ public void setDesc(Object desc) throws WSDeploymentDescException { if (desc instanceof SessionStatelessDesc) { setSessionStatelessDesc((SessionStatelessDesc) desc); } else { throw new IllegalStateException(getI18n().getMessage( "SSBPortComponentDesc.illegalState", SessionStatelessDesc.class.getName())); //$NON-NLS-1$ } }
/** * Setter method for J2EE component linking. * @param desc the descriptor of the component implementing the endpoint. * @throws WSDeploymentDescException when desc is an unknown type. */ public void setDesc(Object desc) throws WSDeploymentDescException { if (desc instanceof WebContainerDeploymentDesc) { setWebDesc((WebContainerDeploymentDesc) desc); } else { throw new IllegalStateException(getI18n().getMessage("JaxRpcPortComponentDesc.illegalState", //$NON-NLS-1$ WebContainerDeploymentDesc.class.getName())); } }
/** * @return Returns a String representation of this WSDLFile. */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append("\n" + getClass().getName()); //$NON-NLS-1$ sb.append("\ngetName()=" + getName()); //$NON-NLS-1$ StringWriter sw = new StringWriter(); // Write Definition try { WSDLFactory factory = WSDLFactory.newInstance(); WSDLWriter writer = factory.newWSDLWriter(); writer.writeWSDL(def, sw); } catch (WSDLException e) { sb.append(getI18n().getMessage("WSDLFile.writeDefError")); //$NON-NLS-1$ } sb.append(sw.getBuffer().toString()); return sb.toString(); }
/** * return the given port location, null if the port is undefined. * @param portQName the port QName identifying the port searched. * @return portQname location. * @throws WSDeploymentDescException when port is not found */ public URL getLocation(QName portQName) throws WSDeploymentDescException { Port port = getPort(portQName.getLocalPart()); // get portQName port if (port != null) { List ee = port.getExtensibilityElements(); Iterator eeIt = ee.iterator(); while (eeIt.hasNext()) { // find the soap address element Object elem = eeIt.next(); if ((elem != null) && elem instanceof SOAPAddress) { try { return new URL(((SOAPAddress) elem).getLocationURI()); } catch (MalformedURLException e) { throw new WSDeploymentDescException(getI18n().getMessage("WSDLFile.MalformedPortLocation", portQName)); //$NON-NLS-1$ } } } } return null; }
/** * Creates a new WSDLFile object. * @param url URL to load * @param name wsdl file name * @throws WSDeploymentDescException when a parse error occurs */ public WSDLFile(URL url, String name) throws WSDeploymentDescException { this.name = name; try { WSDLFactory f = WSDLFactory.newInstance(); WSDLReader r = f.newWSDLReader(); r.setFeature("javax.wsdl.verbose", VERBOSE); //$NON-NLS-1$ r.setFeature("javax.wsdl.importDocuments", true); //$NON-NLS-1$ if (url == null) { throw new WSDeploymentDescException(getI18n().getMessage("WSDLFile.notFound", name)); //$NON-NLS-1$ } def = r.readWSDL(url.toExternalForm(), url.toExternalForm()); } catch (WSDLException e) { throw new WSDeploymentDescException(getI18n().getMessage("WSDLFile.WSDLParsingError", name), e); //$NON-NLS-1$ } wsdlPorts = new Vector(); fillWsdlPorts(); }
throw new WSDeploymentDescException(getI18n().getMessage( "ServiceRefDesc.missingMappingFile", this.name)); //$NON-NLS-1$ if (!getWSDLFile().hasPort((String) pnl.get(j))) { throw new WSDeploymentDescException(getI18n().getMessage( "ServiceRefDesc.undefinedPort", myHRef.getName(), pnl.get(j), wsdlFileName)); //$NON-NLS-1$ throw new WSDeploymentDescException(getI18n().getMessage( "ServiceRefDesc.wsdlMissingInformation", serviceInterface.getName(), name)); //$NON-NLS-1$ throw new WSDeploymentDescException(getI18n().getMessage( "ServiceRefDesc.needPackageMapping", mappingFileName, realPackage)); //$NON-NLS-1$
String err = getI18n().getMessage("PortComponentDesc.noPCName"); //$NON-NLS-1$ throw new WSDeploymentDescException(err); String err = getI18n().getMessage("PortComponentDesc.noInterfaceName"); //$NON-NLS-1$ throw new WSDeploymentDescException(err); sei = jarCL.loadClass(seiClassName); } catch (ClassNotFoundException e) { String err = getI18n().getMessage("PortComponentDesc.loadError", seiClassName); //$NON-NLS-1$ throw new WSDeploymentDescException(err, e); String err = getI18n().getMessage("PortComponentDesc.invalidEndpointURI", this.name); //$NON-NLS-1$ throw new WSDeploymentDescException(err);
String err = getI18n().getMessage("WSDeploymentDesc.serviceNameNotUnique", sn); //$NON-NLS-1$ logger.log(BasicLevel.ERROR, err); throw new WSDeploymentDescException(err); String err = getI18n().getMessage("WSDeploymentDesc.portCompNameNotUnique", pcn); //$NON-NLS-1$ logger.log(BasicLevel.ERROR, err); throw new WSDeploymentDescException(err); String err = getI18n().getMessage("WSDeploymentDesc.wsdlDeclareUnknownPort", wsdlf.getName()); //$NON-NLS-1$ logger.log(BasicLevel.ERROR, err); throw new WSDeploymentDescException(err);
throw new WSDeploymentDescException(getI18n().getMessage("PortComponentRefDesc.seiNotFound", className), e); //$NON-NLS-1$