Package org.objectweb.celtix.common.i18n

Examples of org.objectweb.celtix.common.i18n.Message


        fc1.setArgs(args);
        cmdline1 = fc1.toString();
        assertEquals(cmdline1, cmdline2);
       
        new ForkedCommandException(new NullPointerException());
        Message msg = org.easymock.classextension.EasyMock.createMock(Message.class);
        new ForkedCommandException(msg, new NullPointerException());
    }
View Full Code Here


            provider.init(configuration);
            return provider;
        } catch (ConfigurationException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ConfigurationException(new Message("DEFAULT_PROVIDER_INSTANTIATION_EXC", LOG), ex);
        }
    }
View Full Code Here

                providerClass = rd.readLine();
                rd.close();
            } catch (UnsupportedEncodingException ex) {
                //we're asking for UTF-8 which is supposed to always be supported,
                //but we'll throw a ConfigurationException anyway
                throw new ConfigurationException(new Message("DEFAULT_PROVIDER_INSTANTIATION_EXC", LOG), ex);
            } catch (IOException ex) {
                throw new ConfigurationException(new Message("DEFAULT_PROVIDER_INSTANTIATION_EXC", LOG), ex);
            }
        }
       
        if (providerClass != null && !"".equals(providerClass)) {
            return providerClass;
View Full Code Here

                Dispatch<StreamSource> streamDispatch = createDispatch(dtService, dt.getPort());
                if (null == streamDispatch) {
                    LOG.log(Level.SEVERE,
                            "CREATEDISPATCH_FAILURE",
                            new Object[] {dt.getService(), portName });
                    throw new WebServiceException(new Message("CREATEDISPATCH_FAILURE",
                                                              LOG,
                                                              dt.getService(),
                                                              portName).toString());
                }
                dList.add(streamDispatch);
View Full Code Here

                InvocationHandler proxyHandler = Proxy.getInvocationHandler(clientProxy);
                try {
                    ret = proxyHandler.invoke(clientProxy, method, args);
                } catch (UndeclaredThrowableException ute) {
                    LOG.log(Level.SEVERE, "PROXY_INVOKE_UNDECLEXCEPTION", method.toString());
                    ex = new ProtocolException(new Message("PROXY_INVOKE_UNDECLEXCEPTION",
                                                           LOG,
                                                           method.toString()).toString(),
                                               ute.getCause());
                } catch (Error error) {
                    LOG.log(Level.SEVERE, "PROXY_INVOKE_ERROR", method.toString());
                    ex = new ProtocolException(new Message("PROXY_INVOKE_UNDECLEXCEPTION",
                                                           LOG,
                                                           method.toString()).toString(),
                                               error);
                } catch (Throwable t) {
                    LOG.log(Level.WARNING, "PROXY_INVOKE_EXCEPTION", method.toString());               
View Full Code Here

                Object proxy = dtService.getPort(portName, seiClass);
                if (null == proxy) {
                    LOG.log(Level.SEVERE,
                            "GETPORT_FAILURE",
                            new Object[] {dt.getService(), portName.toString()});
                    throw new WebServiceException(new Message("GETPORT_FAILURE",
                                                              LOG,
                                                              dt.getService(),
                                                              portName).toString());
                }
                proxyList.add(proxy);
View Full Code Here

    public Object getObject(String name) {

        ConfigurationItemMetadata definition = model.getDefinition(name);
        if (null == definition) {
            throw new ConfigurationException(new Message("ITEM_NOT_DEFINED_EXC", BUNDLE, name));
        }

        Configuration holder = this;
        while (null != holder) {
            Object obj = getLocal(holder, name);
View Full Code Here

     * Then try all providers in turn until one is found that accepts the change.
     */
    public boolean setObject(String name, Object value) {
        ConfigurationItemMetadata definition = model.getDefinition(name);
        if (null == definition) {
            throw new ConfigurationException(new Message("ITEM_NOT_DEFINED_EXC", BUNDLE, name));
        }

        // use model to validate value
        Object defaultValue = definition.getDefaultValue();
        if (defaultValue != null && !defaultValue.getClass().isAssignableFrom(value.getClass())) {
            QName type = model.getDefinition(name).getType();
            throw new ConfigurationException(new Message("ITEM_TYPE_MISMATCH_EXC", BUNDLE, name, type));
        }

        // TODO: check if property can be modified at all:
        // if it is static, report an error, if it is process or bus accept the change but log a
        // warning informing the user that the change will take effect only after next bus
View Full Code Here

    }

    public boolean getBoolean(String name) {
        Object obj = getObject(name);
        if (null == obj) {
            throw new ConfigurationException(new Message("ITEM_NO_VALUE_EXC", BUNDLE, name));
        }
        try {
            return ((Boolean)obj).booleanValue();
        } catch (ClassCastException ex) {
            QName type = model.getDefinition(name).getType();
            throw new ConfigurationException(new Message("ITEM_TYPE_MISMATCH_EXC", BUNDLE, name, type));
        }
    }
View Full Code Here

    }

    public short getShort(String name) {
        Object obj = getObject(name);
        if (null == obj) {
            throw new ConfigurationException(new Message("ITEM_NO_VALUE_EXC", BUNDLE, name));
        }
        try {
            return ((Short)obj).shortValue();
        } catch (ClassCastException ex) {
            QName type = model.getDefinition(name).getType();
            throw new ConfigurationException(new Message("ITEM_TYPE_MISMATCH_EXC", BUNDLE, name, type));
        }
    }
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.common.i18n.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.