/** * write the descriptor class to a DOM tree and return it * * @param parent node for the DOM tree * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, Descriptor descriptor) { if (! (descriptor instanceof MessageListener)) { throw new IllegalArgumentException(getClass() + " cannot handle descriptors of type " + descriptor.getClass()); } Iterator configProps = null; configProps = ((MessageListener)descriptor).getRequiredConfigProperties().iterator(); //config property info if (configProps != null) { 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; } }
/** * write the descriptor class to a DOM tree and return it * * @param parent node for the DOM tree * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, Descriptor descriptor) { if (! (descriptor instanceof MessageListener)) { throw new IllegalArgumentException(getClass() + " cannot handle descriptors of type " + descriptor.getClass()); } Iterator configProps = null; if (descriptor instanceof MessageListener) { configProps = ((MessageListener)descriptor).getRequiredConfigProperties().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; } }