Package org.apache.slide.projector.descriptor

Examples of org.apache.slide.projector.descriptor.ProvidedEnvironmentDescriptor


        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);
      List requiredEnvironment = new ArrayList();
      for ( Iterator i = requiredEnvironmentElements.iterator(); i.hasNext(); ) {
        Element requiredEnvironmentElement = (Element)i.next();
        String name = requiredEnvironmentElement.getAttributeValue("name");
        String storeName = requiredEnvironmentElement.getAttributeValue("store");
        int store = StoreHelper.getStoreByName(storeName);
        String description = requiredEnvironmentElement.getAttributeValue("description");
        RequiredEnvironmentDescriptor environmentDescriptor;
        if ( description != null ) {
          environmentDescriptor = new RequiredEnvironmentDescriptor(name, store, new ParameterMessage(description), null);
        } else {
          environmentDescriptor = new RequiredEnvironmentDescriptor(name, store, new ParameterMessage(ParameterMessage.NO_MESSAGE_AVAILABLE, new String[] {name}), null);
        }
        requiredEnvironment.add(environmentDescriptor);
        Element valueDescriptorElement = (Element)requiredEnvironmentElement.getChildren().iterator().next();
        ValueDescriptor valueDescriptor = ValueFactoryManager.getInstance().loadValueDescriptor(valueDescriptorElement);
        environmentDescriptor.setValueDescriptor(valueDescriptor);
      }
      requiredEnvironmentDescriptors = (RequiredEnvironmentDescriptor [])requiredEnvironment.toArray(new RequiredEnvironmentDescriptor[requiredEnvironment.size()]);
      List stepElements = XPath.newInstance("/process/step").selectNodes(rootElement);
      for ( Iterator i = stepElements.iterator(); i.hasNext(); ) {
        Element stepElement = (Element)i.next();
View Full Code Here

TOP

Related Classes of org.apache.slide.projector.descriptor.ProvidedEnvironmentDescriptor

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.