Package org.mule.config.i18n

Examples of org.mule.config.i18n.Message


public class MessagesTestCase extends AbstractMuleTestCase
{
    public void testMessageLoading() throws Exception
    {
        Message message = CoreMessages.authFailedForUser("Fred");
        assertEquals("Authentication failed for principal Fred", message.getMessage());
        assertEquals(135, message.getCode());
    }
View Full Code Here


        }
    }

    public void testGoodBundle()
    {
        Message message = TestMessages.testMessage("one", "two", "three");
        assertEquals("Testing, Testing, one, two, three", message.getMessage());
        assertEquals(1, message.getCode());
    }
View Full Code Here

        this.connector = connector;
    }

    private static Message generateMessage(Message message, Connector connector)
    {
        Message m = CoreMessages.connectorCausedError(connector);
        if (message != null)
        {
            message.setNextMessage(m);
        }
        return message;
View Full Code Here

    public void setLifecycleManager(LifecycleManager manager)
    {
        if (!(manager instanceof MuleContextLifecycleManager))
        {
            Message msg = MessageFactory.createStaticMessage(
                "lifecycle manager for MuleContext must be a MuleContextLifecycleManager");
            throw new MuleRuntimeException(msg);
        }
       
        lifecycleManager = (MuleContextLifecycleManager) manager;
View Full Code Here

    {
        InputStream is = IOUtils.getResourceAsStream(fileName, callingClass,
                /* tryAsFile */true, /* tryAsUrl */false);
        if (is == null)
        {
            Message error = CoreMessages.cannotLoadFromClasspath(fileName);
            throw new IOException(error.toString());
        }
       
        return loadProperties(is);
    }
View Full Code Here

   
    public static Properties loadProperties(URL url) throws IOException
    {
        if (url == null)
        {
            Message error = CoreMessages.objectIsNull("url");
            throw new IOException(error.toString());
        }
       
        return loadProperties(url.openStream());
    }
View Full Code Here

   
    public static Properties loadProperties(InputStream is) throws IOException
    {
        if (is == null)
        {
            Message error = CoreMessages.objectIsNull("input stream");
            throw new IOException(error.toString());
        }

        try
        {
            Properties props = new Properties();
View Full Code Here

            }
            catch (Exception e)
            {
                if (e instanceof UnavailableException)
                {
                    Message message = JcaMessages.cannotAllocateManagedInstance();
                    logger.error(message);
                    flowConstruct.getExceptionListener().handleException(new DefaultMuleException(message, e), event);
                }
                else if (e instanceof MessagingException)
                {
View Full Code Here

        return route;
    }

    private static Message generateMessage(Message message, MessageProcessor target)
    {
        Message m = CoreMessages.failedToRouterViaEndpoint(target);
        if (message != null)
        {
            message.setNextMessage(m);
            return message;
        }
View Full Code Here

    private static Message constructMessage(SecurityContext context, ImmutableEndpoint endpoint,
                                            SecurityFilter filter)
    {

        Message m;
        if (context == null)
        {
            m = CoreMessages.authSetButNoContext(filter.getClass().getName());
        }
        else
        {
            m = CoreMessages.authFailedForUser(context.getAuthentication().getPrincipal());
        }
        m.setNextMessage(CoreMessages.authDeniedOnEndpoint(endpoint.getEndpointURI()));
        return m;
    }
View Full Code Here

TOP

Related Classes of org.mule.config.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.