Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.EnvironmentProperty


    }
   
    static void addInitParam(Node parentNode, String nodeName, Enumeration initParams) {
        InitParamNode initParamNode = new InitParamNode();
        while (initParams.hasMoreElements()) {
            EnvironmentProperty ep = (EnvironmentProperty) initParams.nextElement();
            initParamNode.writeDescriptor(parentNode, nodeName, ep);
        }
    }
View Full Code Here


        if (RuntimeTagNames.ACTIVATION_CONFIG_PROPERTY_NAME.equals
                (element.getQName())) {
            propertyName = value;
        } else if(RuntimeTagNames.ACTIVATION_CONFIG_PROPERTY_VALUE.equals
                (element.getQName())) {
            EnvironmentProperty prop =
                new EnvironmentProperty(propertyName, value, "");
            descriptor.getActivationConfig().add(prop);
            propertyName = null;
        }
        else super.setElementValue(element, value);
    }
View Full Code Here

                appendChild(parent, nodeName);
            for(Iterator iter = activationConfig.iterator(); iter.hasNext();) {
                Node activationConfigPropertyNode =
                    appendChild(activationConfigNode,
                                RuntimeTagNames.ACTIVATION_CONFIG_PROPERTY);
                EnvironmentProperty next = (EnvironmentProperty) iter.next();
                appendTextChild(activationConfigPropertyNode,
                        RuntimeTagNames.ACTIVATION_CONFIG_PROPERTY_NAME,
                        (String) next.getName());
                appendTextChild(activationConfigPropertyNode,
                        RuntimeTagNames.ACTIVATION_CONFIG_PROPERTY_VALUE,
                        (String) next.getValue());
            }
        }
       
        return activationConfigNode;
    }
View Full Code Here

  } else if (descriptor instanceof OutboundResourceAdapter) {
      configProps = ((OutboundResourceAdapter)descriptor).getConfigProperties().iterator();
  }
  //config property info
  for (;configProps.hasNext();) {
      EnvironmentProperty config = (EnvironmentProperty) configProps.next();
      Node configNode = appendChild(parent, ConnectorTagNames.CONFIG_PROPERTY);
      writeLocalizedDescriptions(configNode, config)
      appendTextChild(configNode, ConnectorTagNames.CONFIG_PROPERTY_NAME, config.getName())
      appendTextChild(configNode, ConnectorTagNames.CONFIG_PROPERTY_TYPE, config.getType())
      appendTextChild(configNode, ConnectorTagNames.CONFIG_PROPERTY_VALUE, config.getValue())
  }
  return parent;
    }
View Full Code Here

     */
    public Node writeDescriptor(Node parent, String nodeName, Descriptor descriptor) {   
        if (!(descriptor instanceof EnvironmentProperty)) {
            throw new IllegalArgumentException(getClass() + " cannot handles descriptors of type " + descriptor.getClass());
        }           
        EnvironmentProperty envProp = (EnvironmentProperty) descriptor;
        Node envEntryNode = super.writeDescriptor(parent, nodeName, descriptor);
       
        writeLocalizedDescriptions(envEntryNode, envProp);
        appendTextChild(envEntryNode, TagNames.ENVIRONMENT_PROPERTY_NAME, envProp.getName());
        appendTextChild(envEntryNode, TagNames.ENVIRONMENT_PROPERTY_TYPE, envProp.getType());
        appendTextChild(envEntryNode, TagNames.ENVIRONMENT_PROPERTY_VALUE, envProp.getValue());
        appendTextChild(envEntryNode, TagNames.MAPPED_NAME, envProp.getMappedName());
        if( envProp.isInjectable() ) {
            InjectionTargetNode ijNode = new InjectionTargetNode();
            for (InjectionTarget target : envProp.getInjectionTargets()) {
                ijNode.writeDescriptor(envEntryNode, TagNames.INJECTION_TARGET, target);
            }
        }

        return envEntryNode;
View Full Code Here

      configProps = ((MessageListener)descriptor).getConfigProperties().iterator();
  }

  //config property info
  for (;configProps.hasNext();) {
      EnvironmentProperty config = (EnvironmentProperty) configProps.next();
      Node configNode = appendChild(parent, ConnectorTagNames.REQUIRED_CONFIG_PROP);
            writeLocalizedDescriptions(configNode, config);
      appendTextChild(configNode, ConnectorTagNames.CONFIG_PROPERTY_NAME, config.getName())
  }
  return parent;
    }
View Full Code Here

        doDescriptionProcessing(mdAn.description(), ejbMsgBeanDesc);
        doMappedNameProcessing(mdAn.mappedName(), ejbMsgBeanDesc);

        for (ActivationConfigProperty acProp : mdAn.activationConfig()) {
            EnvironmentProperty envProp = new EnvironmentProperty(
                    acProp.propertyName(), acProp.propertyValue(), "");
                                                // with empty description
            // xml override
            if (ejbMsgBeanDesc.getActivationConfigValue(envProp.getName()) == null) {
                ejbMsgBeanDesc.putActivationConfigProperty(envProp);
            }
        }

        return procResult;
View Full Code Here

        if (EjbTagNames.ACTIVATION_CONFIG_PROPERTY_NAME.equals
            (element.getQName())) {
            propertyName = value;
        } else if(EjbTagNames.ACTIVATION_CONFIG_PROPERTY_VALUE.equals
                  (element.getQName())) {
            EnvironmentProperty prop =
                new EnvironmentProperty(propertyName, value, "");
            descriptor.getActivationConfig().add(prop);
            propertyName = null;
        }
    }
View Full Code Here

        // ActionConfig must have at least one ActionConfigProperty
        // and ActionConfigProperty must have a pair of name/value
        // so filter out the entries with blank name or value 
        Set activationConfig2 = new HashSet();
        for(Iterator iter = activationConfig.iterator(); iter.hasNext();) {
            EnvironmentProperty next = (EnvironmentProperty) iter.next();
            if ( ! next.getName().trim().equals("") &&
                 ! next.getValue().trim().equals("")) {
                activationConfig2.add(next);
            }
        }

        if( activationConfig2.size() > 0 ) {
            activationConfigNode =
                appendChild(parent, nodeName);
            writeLocalizedDescriptions(activationConfigNode, descriptor);
           
            for(Iterator iter = activationConfig2.iterator(); iter.hasNext();) {
                Node activationConfigPropertyNode =
                    appendChild(activationConfigNode,
                                EjbTagNames.ACTIVATION_CONFIG_PROPERTY);
                EnvironmentProperty next = (EnvironmentProperty) iter.next();
                appendTextChild(activationConfigPropertyNode,
                                EjbTagNames.ACTIVATION_CONFIG_PROPERTY_NAME,
                                (String) next.getName());
                appendTextChild(activationConfigPropertyNode,
                                EjbTagNames.ACTIVATION_CONFIG_PROPERTY_VALUE,
                                (String) next.getValue());
            }                  
        }       
        return activationConfigNode;
    }
View Full Code Here

    static void addInitParam(Node parentNode, String nodeName, Set initParams) {
        if (!initParams.isEmpty()) {
            InitParamNode initParamNode = new InitParamNode();

            for (Iterator e = initParams.iterator(); e.hasNext();) {
                EnvironmentProperty ep = (EnvironmentProperty) e.next();
                initParamNode.writeDescriptor(parentNode, nodeName, ep);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.EnvironmentProperty

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.