Examples of Messages


Examples of org.apache.camel.component.yammer.model.Messages

        try {
            String jsonBody = endpoint.getConfig().getRequestor(apiUrl).get();  
           
            if (!endpoint.getConfig().isUseJson()) {
                ObjectMapper jsonMapper = new ObjectMapper();
                Messages messages = jsonMapper.readValue(jsonBody, Messages.class);
                exchange.getIn().setBody(messages);
            } else {
                exchange.getIn().setBody(jsonBody);
            }
View Full Code Here

Examples of org.apache.commons.scaffold.util.Messages

            String bizType = bizFormBean.getBizType();

            if ((errors.empty()) && (null!=bizType)) {

                // Generate and populate our business request
                Messages messages = new MessagesImpl();
                try {
   
                    BizRequest bizRequest = createBizRequest(bizType);
                    // Populate the business request with ourselves
                    // merged with any user profile properties
                    Map properties = merge(getUserProfile());
                    BeanUtils.copyProperties(bizRequest,properties);
               
                }
                catch (Throwable t) {
                   
                    messages.add(new MessageImpl(
                        Tokens.ERROR_GENERAL,
                        t.toString()
                    ));
                   
                }

                // Validate our business request
                if (messages.isEmpty()) {
                    messages.add(
                        bizRequest.validate(mapping.getAttribute()));
                }
                if (messages.isEmpty()) {

                    setBizRequest(bizRequest);
                }
                else {
View Full Code Here

Examples of org.apache.hivemind.Messages

public class TestRegistryImpl extends HiveMindTestCase
{
    public void testGetModuleMessages() throws Exception
    {
        final Registry reg = buildFrameworkRegistry(new SimpleModule());
        final Messages msgs = reg.getModuleMessages( "hivemind.test.services" );
        assertEquals( "Test Message", msgs.getMessage( "test.message" ) );
    }
View Full Code Here

Examples of org.apache.isis.viewer.scimpi.dispatcher.view.display.Messages

        addElementProcessor(new LinkField());
        addElementProcessor(new ListView());
        addElementProcessor(new NewActionLink());
        addElementProcessor(new Mark());
        addElementProcessor(new Members());
        addElementProcessor(new Messages());
        addElementProcessor(new Methods());
        addElementProcessor(new ObjectLink());
        addElementProcessor(new PageTitle());
        addElementProcessor(new Parameter());
        addElementProcessor(new ParameterName());
View Full Code Here

Examples of org.apache.myfaces.wap.component.Messages

        if (context == null || component == null) {
            throw new NullPointerException();
        }
        if (!component.isRendered()) return;
       
        Messages comp = (Messages)component;
        ResponseWriter writer = context.getResponseWriter();
       
        MessagesIterator messagesIterator = new MessagesIterator(context, comp.isGlobalOnly());
       
        if (messagesIterator.hasNext()) {
            String layout = comp.getLayout();
           
            if (layout == null || layout.equalsIgnoreCase(Attributes.LIST)) {
                while(messagesIterator.hasNext()) {
                    renderMessage(context, comp, (FacesMessage)messagesIterator.next());
                   
View Full Code Here

Examples of org.apache.shale.util.Messages

     * instantiating a new one if necessary.</p>
     */
    private Messages messages() {

        if (messages == null) {
            messages = new Messages("org.apache.shale.tiger.faces.Bundle",
                                    Thread.currentThread().getContextClassLoader());
        }
        return messages;

    }
View Full Code Here

Examples of org.apache.sis.util.resources.Messages

     * @param value   The value that we failed to parse.
     * @param type    The target type of the parsing process.
     * @param cause   The exception that occurred during the parsing process.
     */
    static void parseFailure(final Context context, final String value, final Class<?> type, final Exception cause) {
        final Messages resources = Messages.getResources(context != null ? context.getLocale() : null);
        final LogRecord record = resources.getLogRecord(Level.WARNING, Messages.Keys.UnparsableValueStoredAsText_2, type, value);
        record.setSourceClassName(IdentifierMap.class.getCanonicalName());
        record.setSourceMethodName("put");
        record.setThrown(cause);
        Context.warningOccured(context, record);
    }
View Full Code Here

Examples of org.apache.struts2.Messages

    final TextProvider textProvider = DefaultTextProvider.INSTANCE;
    Map<String, Messages> fieldMap = new HashMap<String, Messages>();
    Map<Severity, List<String>> severityMap = new EnumMap<Severity, List<String>>(Severity.class);

    public Messages forField(String fieldName) {
        Messages forField = fieldMap.get(fieldName);
        if (forField == null) {
            forField = new MessagesImpl();
            fieldMap.put(fieldName, forField);
        }
        return forField;
View Full Code Here

Examples of org.apache.tapestry.ioc.Messages

        replay();

        forceCacheClear();

        Messages messages = _source.getMessages(model, Locale.ENGLISH);

        assertEquals(messages.get("color"), "color");
        assertEquals(messages.get("framework"), "Tapestry");

        // Check normal caching

        assertSame(_source.getMessages(model, Locale.ENGLISH), messages);

        // Now, force a cache clear and retry.

        forceCacheClear();

        Messages messages2 = _source.getMessages(model, Locale.ENGLISH);

        // Check that a new Messages was created

        assertNotSame(messages2, messages);

        assertEquals(messages2.get("color"), "color");
        assertEquals(messages2.get("framework"), "Tapestry");

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.Messages

        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        Map<String, Validator> map = newMap();

        train_getComponentResources(field, resources);
        train_getId(resources, "fred");
        train_getLocale(resources, Locale.ENGLISH);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.