/** * Creates the {@link Endpoint} object from the provided {@link OMNode} * * @param om XML node from which the endpoint will be built * @param properties bag of properties to pass in any information to the factory * @return created endpoint as an {@link Object} */ public Object getObjectFromOMNode(OMNode om, Properties properties) { if (om instanceof OMElement) { return createEndpointWithName((OMElement) om, false, properties); } else { handleException("Invalid XML configuration for an Endpoint. OMElement expected"); } return null; }
/** * Creates the {@link Endpoint} object from the provided {@link OMNode} * * @param om XML node from which the endpoint will be built * @param properties bag of properties to pass in any information to the factory * @return created endpoint as an {@link Object} */ public Object getObjectFromOMNode(OMNode om, Properties properties) { if (om instanceof OMElement) { return createEndpointWithName((OMElement) om, false, properties); } else { handleException("Invalid XML configuration for an Endpoint. OMElement expected"); } return null; }
/** * Helper method to construct children endpoints * * @param listEndpointElement OMElement representing the children endpoints * @param parent Parent endpoint * @param properties bag of properties to pass in any information to the factory * @return List of children endpoints */ protected ArrayList<Endpoint> getEndpoints(OMElement listEndpointElement, Endpoint parent, Properties properties) { ArrayList<Endpoint> endpoints = new ArrayList<Endpoint>(); ArrayList<String> keys = new ArrayList<String>(); Iterator iter = listEndpointElement.getChildrenWithName(XMLConfigConstants.ENDPOINT_ELT); while (iter.hasNext()) { OMElement endptElem = (OMElement) iter.next(); Endpoint endpoint = EndpointFactory.getEndpointFromElement(endptElem, true, properties); if (endpoint instanceof IndirectEndpoint) { String key = ((IndirectEndpoint) endpoint).getKey(); if (!keys.contains(key)) { keys.add(key); } else { handleException("Same endpoint definition cannot be used with in the siblings"); } } endpoint.setParentEndpoint(parent); endpoints.add(endpoint); } return endpoints; }
/** * Helper method to construct children endpoints * * @param listEndpointElement OMElement representing the children endpoints * @param parent Parent endpoint * @param properties bag of properties to pass in any information to the factory * @return List of children endpoints */ protected ArrayList<Endpoint> getEndpoints(OMElement listEndpointElement, Endpoint parent, Properties properties) { ArrayList<Endpoint> endpoints = new ArrayList<Endpoint>(); ArrayList<String> keys = new ArrayList<String>(); Iterator iter = listEndpointElement.getChildrenWithName(XMLConfigConstants.ENDPOINT_ELT); while (iter.hasNext()) { OMElement endptElem = (OMElement) iter.next(); Endpoint endpoint = EndpointFactory.getEndpointFromElement(endptElem, true, properties); if (endpoint instanceof IndirectEndpoint) { String key = ((IndirectEndpoint) endpoint).getKey(); if (!keys.contains(key)) { keys.add(key); } else { handleException("Same endpoint definition cannot be used with in the siblings"); } } endpoint.setParentEndpoint(parent); endpoints.add(endpoint); } return endpoints; }
handleException("Invalid endpoint configuration.");
handleException("Invalid endpoint configuration.");