Package org.apache.slide.projector.i18n

Examples of org.apache.slide.projector.i18n.DefaultMessage


    public ResultDescriptor getResultDescriptor() {
        return new ResultDescriptor(
                new StateDescriptor[] { StateDescriptor.OK_DESCRIPTOR },
                new ResultEntryDescriptor[]{
                    new ResultEntryDescriptor(OUTPUT, new DefaultMessage("templateArrayRenderer/result/output"), "*", true)
                });
    }
View Full Code Here


    public ResultDescriptor getResultDescriptor() {
        return new ResultDescriptor(
                new StateDescriptor[] { StateDescriptor.OK_DESCRIPTOR },
                new ResultEntryDescriptor[]{
                    new ResultEntryDescriptor(OUTPUT, new DefaultMessage("templateMapRenderer/result/output"), "*", true)
                });
    }
View Full Code Here

        };
    }

    public ResultDescriptor getResultDescriptor() {
        return new ResultDescriptor(new StateDescriptor[] {
           new StateDescriptor(LOGIN_OK, new DefaultMessage("login/state/ok")),
           new StateDescriptor(LOGIN_FAILED, new DefaultMessage("login/state/failed"))
        });
    }
View Full Code Here

        Element outputResult = (Element)i.next();
        String name = outputResult.getAttributeValue("name");
        String description = outputResult.getAttributeValue("description");
        String contentType = outputResult.getAttributeValue("content-type");
        boolean presentable = ConversionHelpers.getBoolean(outputResult.getAttributeValue("presentable"), false);
        resultEntryDescriptors.add(new ResultEntryDescriptor(name, new DefaultMessage(description), contentType, presentable));
      }
      List stateElements = XPath.newInstance("/process/description/output/state").selectNodes(rootElement);
      List states = new ArrayList();
      for ( Iterator i = stateElements.iterator(); i.hasNext(); ) {
        Element stateElement = (Element)i.next();
        String description = stateElement.getAttributeValue("description");
        states.add(new StateDescriptor(stateElement.getTextTrim(), new DefaultMessage(description)));
      }
      resultDescriptor = new ResultDescriptor((StateDescriptor [])states.toArray(new StateDescriptor[states.size()]), (ResultEntryDescriptor[])resultEntryDescriptors.toArray(new ResultEntryDescriptor[resultEntryDescriptors.size()]));
      List providedEnvironmentElements = XPath.newInstance("/process/description/output/environment").selectNodes(rootElement);
      List providedEnvironment = new ArrayList();
      for ( Iterator i = providedEnvironmentElements.iterator(); i.hasNext(); ) {
        Element environmentElement = (Element)i.next();
        String key = environmentElement.getAttributeValue("key");
        String storeName = environmentElement.getAttributeValue("store");
        String description = environmentElement.getAttributeValue("description");
        String contentType = environmentElement.getAttributeValue("content-type");
        boolean presentable = ConversionHelpers.getBoolean(environmentElement.getAttributeValue("presentable"), false);
        int store = StoreHelper.getStoreByName(storeName);
        ProvidedEnvironmentDescriptor environmentDescriptor = new ProvidedEnvironmentDescriptor(key, new DefaultMessage(description), contentType, presentable);
        environmentDescriptor.setStore(store);
        providedEnvironment.add(environmentDescriptor);
      }
      providedEnvironmentDescriptors = (ProvidedEnvironmentDescriptor [])providedEnvironment.toArray(new ProvidedEnvironmentDescriptor[providedEnvironment.size()]);
      List requiredEnvironmentElements = XPath.newInstance("/process/description/input/environment").selectNodes(rootElement);
View Full Code Here

            ArrayValue arrayResource = new ArrayValue((Value [])resources.toArray(array));
            result.addResultEntry(SimpleProcessor.OUTPUT, arrayResource);
            resultDescriptors = new ResultDescriptor(
                    new StateDescriptor[] { StateDescriptor.OK_DESCRIPTOR },
                    new ResultEntryDescriptor[] {
                        new ResultEntryDescriptor(SimpleProcessor.OUTPUT, new DefaultMessage("sitemap/output"), ArrayValue.CONTENT_TYPE, false)
                    });
        } catch (Exception exception) {
            logger.log(Level.SEVERE, "Error while parsing sitemap configuration", exception);
        }
    }
View Full Code Here

    public ParameterDescriptor getParameterDescriptor() {
        return new ParameterDescriptor(INPUT, new ParameterMessage("url/parameter/input"), new StringValueDescriptor());
    }

    public ResultEntryDescriptor getResultEntryDescriptor() {
        return new ResultEntryDescriptor(OUTPUT, new DefaultMessage("url/result/output"), ContentType.DYNAMIC, true);
    }
View Full Code Here

                    modified = true;
                  }
                  if ( descriptionKey == null ) {
                    descriptionKey = "processorManager/noProcessorDescriptionAvailable";
                  }
                  DefaultMessage description = null;
                  if ( processorDescriptor.getDescription() == null || !processorDescriptor.getDescription().getId().equals(descriptionKey) ) {
                    description = new DefaultMessage(descriptionKey);
                    processorDescriptor.setDescription(description);
                    modified = true;
                  }
                  if ( processorDescriptor.getProcessor() != processor ) {
                    processorDescriptor.setProcessor(processor);
View Full Code Here


    public ResultDescriptor getResultDescriptor() {
        return new ResultDescriptor(new StateDescriptor[]{ StateDescriptor.OK_DESCRIPTOR },
                new ResultEntryDescriptor[]{
                    new ResultEntryDescriptor(TITLE, new DefaultMessage("exceptionRenderer/result/title"), "text/plain", true),
                    new ResultEntryDescriptor(TEXT, new DefaultMessage("exceptionRenderer/result/text"), "text/plain", true),
                    new ResultEntryDescriptor(SUMMARY, new DefaultMessage("exceptionRenderer/result/summary"), "text/plain", true),
                    new ResultEntryDescriptor(DETAILS, new DefaultMessage("exceptionRenderer/result/details"), "text/plain", true),
                    new ResultEntryDescriptor(CLASS, new DefaultMessage("exceptionRenderer/result/class"), "text/plain", true),
                    new ResultEntryDescriptor(STACK_TRACE, new DefaultMessage("exceptionRenderer/result/stackTrace"), "text/plain", true)
                });
    }
View Full Code Here

            } else if (path.matches("route")) {
                String value = attributes.getValue("value");
                String description = attributes.getValue("description");
                String state = attributes.getValue("state");
                valueDesriptor.addAllowedValue(value);
                states.add(new StateDescriptor(value, new DefaultMessage(description)));
                routes.put(value, state);
            }
        }
View Full Code Here

    public ParameterDescriptor getParameterDescriptor() {
        return new ParameterDescriptor(INPUT, new ParameterMessage("arrayRenderer/input"), new ArrayValueDescriptor(new StringValueDescriptor()));
    }

    public ResultEntryDescriptor getResultEntryDescriptor() {
        return new ResultEntryDescriptor(OUTPUT, new DefaultMessage("arrayRenderer/output"), "*", true);
    }
View Full Code Here

TOP

Related Classes of org.apache.slide.projector.i18n.DefaultMessage

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.