List of usage examples for javax.xml.namespace QName toString
public String toString()
From source file:org.apache.ode.daohib.bpel.MessageExchangeDaoImpl.java
public void setFault(QName faultType) { entering("MessageExchangeDaoImpl.setFault"); _hself.setFault(faultType == null ? null : faultType.toString()); update();//w w w . j a v a2 s. co m }
From source file:org.apache.ode.daohib.bpel.MessageExchangeDaoImpl.java
public void setCallee(QName callee) { entering("MessageExchangeDaoImpl.setCallee"); _hself.setCallee(callee == null ? null : callee.toString()); update();// ww w .j ava 2 s . com }
From source file:org.apache.ode.store.hib.ConfStoreConnectionHib.java
public ProcessConfDAO getProcess(QName pid) { try {/* w ww . j a va 2 s . co m*/ return (ProcessConfDaoImpl) _session.get(ProcessConfDaoImpl.class, pid.toString()); } catch (HibernateException e) { __log.error("DbError", e); throw e; } }
From source file:org.apache.pluto.driver.services.container.EventProviderImpl.java
private List<String> getAllPortletsRegisteredForEvent(Event event, DriverConfiguration driverConfig, ServletContext containerServletContext) { Set<String> resultSet = new HashSet<String>(); List<String> resultList = new ArrayList<String>(); QName eventName = event.getQName(); Collection<PortletWindowConfig> portlets = getAllPortlets(driverConfig); if (portletRegistry == null) { portletRegistry = ((PortletContainer) containerServletContext .getAttribute(AttributeKeys.PORTLET_CONTAINER)).getOptionalContainerServices() .getPortletRegistryService(); }/*from ww w . j av a 2 s . c o m*/ for (PortletWindowConfig portlet : portlets) { String contextPath = portlet.getContextPath(); String applicationName = contextPath; if (applicationName.length() > 0) { applicationName = applicationName.substring(1); } PortletApplicationDefinition portletAppDD = null; try { portletAppDD = portletRegistry.getPortletApplication(applicationName); List<? extends PortletDefinition> portletDDs = portletAppDD.getPortlets(); List<QName> aliases = getAllAliases(eventName, portletAppDD); for (PortletDefinition portletDD : portletDDs) { List<? extends EventDefinitionReference> processingEvents = portletDD .getSupportedProcessingEvents(); if (isEventSupported(processingEvents, eventName, portletAppDD.getDefaultNamespace())) { if (portletDD.getPortletName().equals(portlet.getPortletName())) { resultSet.add(portlet.getId()); } } else { if (processingEvents != null) { for (EventDefinitionReference ref : processingEvents) { QName name = ref.getQualifiedName(portletAppDD.getDefaultNamespace()); if (name == null) { continue; } // add also grouped portlets, that ends with "." if (name.toString().endsWith(".") && eventName.toString().startsWith(name.toString()) && portletDD.getPortletName().equals(portlet.getPortletName())) { resultSet.add(portlet.getId()); } // also look for alias names: if (aliases != null) { for (QName alias : aliases) { if (alias.toString().equals(name.toString()) && portletDD.getPortletName().equals(portlet.getPortletName())) { resultSet.add(portlet.getId()); } } } // also look for default namespaced events if (name.getNamespaceURI() == null || name.getNamespaceURI().equals("")) { String defaultNamespace = portletAppDD.getDefaultNamespace(); QName qname = new QName(defaultNamespace, name.getLocalPart()); if (eventName.toString().equals(qname.toString()) && portletDD.getPortletName().equals(portlet.getPortletName())) { resultSet.add(portlet.getId()); } } } } } } } catch (PortletContainerException e) { LOG.warn(e); } } // make list for (String name : resultSet) { resultList.add(name); } return resultList; }
From source file:org.apache.servicemix.jbi.runtime.impl.AbstractComponentContext.java
public ServiceEndpoint getEndpoint(QName serviceName, String endpointName) { Map<String, Object> props = new HashMap<String, Object>(); props.put(Endpoint.SERVICE_NAME, serviceName.toString()); props.put(Endpoint.ENDPOINT_NAME, endpointName); props.put(INTERNAL_ENDPOINT, Boolean.TRUE.toString()); List<Endpoint> endpoints = getNmr().getEndpointRegistry().query(props); if (endpoints.isEmpty()) { return null; }/*from w ww .ja v a 2 s . com*/ Map<String, ?> p = getNmr().getEndpointRegistry().getProperties(endpoints.get(0)); return new ServiceEndpointImpl(p); }
From source file:org.apache.servicemix.jbi.runtime.impl.AbstractComponentContext.java
public ServiceEndpoint[] getEndpoints(QName interfaceName) { Map<String, Object> props = null; if (interfaceName != null) { props = new HashMap<String, Object>(); props.put(Endpoint.INTERFACE_NAME, interfaceName.toString()); }//from w w w . j av a2s.co m return queryInternalEndpoints(props); }
From source file:org.apache.servicemix.jbi.runtime.impl.AbstractComponentContext.java
public ServiceEndpoint[] getEndpointsForService(QName serviceName) { if (serviceName == null) { // invalid throw new IllegalArgumentException("This method needs a non-null serviceName parameter!"); }//from ww w. jav a2s. co m Map<String, Object> props = new HashMap<String, Object>(); props.put(Endpoint.SERVICE_NAME, serviceName.toString()); return queryInternalEndpoints(props); }
From source file:org.apache.servicemix.jbi.runtime.impl.AbstractComponentContext.java
public ServiceEndpoint[] getExternalEndpoints(QName interfaceName) { Map<String, Object> props = null; if (interfaceName != null) { props = new HashMap<String, Object>(); props.put(Endpoint.INTERFACE_NAME, interfaceName.toString()); }/*from w w w .j av a 2 s . co m*/ return queryExternalEndpoints(props); }
From source file:org.apache.servicemix.jbi.runtime.impl.AbstractComponentContext.java
public ServiceEndpoint[] getExternalEndpointsForService(QName serviceName) { if (serviceName == null) { // invalid throw new IllegalArgumentException("This method needs a non-null serviceName parameter!"); }/* w ww. j a v a 2 s . c o m*/ Map<String, Object> props = new HashMap<String, Object>(); props.put(Endpoint.SERVICE_NAME, serviceName.toString()); return queryExternalEndpoints(props); }
From source file:org.apache.servicemix.jbi.runtime.impl.ComponentContextImpl.java
public synchronized ServiceEndpoint activateEndpoint(QName serviceName, String endpointName) throws JBIException { try {//from ww w. ja va 2 s . co m ServiceEndpoint se = new ServiceEndpointImpl(serviceName, endpointName); Map<String, Object> props = new HashMap<String, Object>(); props.put(Endpoint.NAME, serviceName.toString() + ":" + endpointName); props.put(Endpoint.SERVICE_NAME, serviceName.toString()); props.put(Endpoint.ENDPOINT_NAME, endpointName); props.put(INTERNAL_ENDPOINT, Boolean.TRUE.toString()); Document doc = component.getComponent().getServiceDescription(se); if (doc != null) { QName[] interfaceNames = getInterfaces(doc, se); if (interfaceNames != null) { StringBuilder sb = new StringBuilder(); for (QName itf : interfaceNames) { if (sb.length() > 0) { sb.append(","); } sb.append(itf.toString()); } props.put(Endpoint.INTERFACE_NAME, sb.toString()); } String data = DOMUtil.asXML(doc); String url = componentRegistry.getDocumentRepository().register(data.getBytes()); props.put(Endpoint.WSDL_URL, url); } EndpointImpl endpoint = new EndpointImpl(props); endpoint.setQueue(queue); componentRegistry.getNmr().getEndpointRegistry().register(endpoint, props); return endpoint; } catch (TransformerException e) { throw new JBIException(e); } }