@Override /** {@Inheritdoc} */ public void storeWSDLEndpoint(WSDLEndpoint endpoint) { this.init(); CoreInternalEndpointServiceImpl.LOG.debug( "Storing WSDL Endpoint with CSARID: \"" + endpoint.getCSARId() + "\", portType: \"" + endpoint.getPortType() + "\", IAName: \"" + endpoint.getIaName() + "\", NodeTypeImplementation: \"" + endpoint.getNodeTypeImplementation() + "\", URI: \"" + endpoint.getURI().toString() + "\""); // TODO this check is a hack because of the problem with deploying of // multiple deployment artifacts if (!this.existsWSDLEndpoint(endpoint)) { this.em.getTransaction().begin(); CoreInternalEndpointServiceImpl.LOG.debug( "The endpoint for \"{}\" is not stored. Thus store it.", endpoint.getPortType()); this.em.persist(endpoint); this.em.getTransaction().commit(); } else { CoreInternalEndpointServiceImpl.LOG.debug( "The endpoint for \"{}\" is stored already.", endpoint.getPortType()); } }
public void _endpoint_show_wsdl(CommandInterpreter commandInterpreter) { this.em.getTransaction().begin(); Query query = this.em.createQuery("SELECT e FROM WSDLEndpoint e"); @SuppressWarnings("unchecked") List<WSDLEndpoint> queryResults = query.getResultList(); for (WSDLEndpoint e : queryResults) { commandInterpreter.println("CSARId: " + e.getCSARId()); commandInterpreter.println("PortType: " + e.getPortType().toString()); commandInterpreter.println( "PlanId: " + (e.getPlanId() == null ? "" : e.getPlanId().toString())); commandInterpreter.println( "NodeTypeImpl: " + (e.getNodeTypeImplementation() == null ? "" : e.getNodeTypeImplementation().toString())); commandInterpreter.println("IaName: " + (e.getIaName() == null ? "" : e.getIaName())); commandInterpreter.println("URI: " + e.getURI().toString()); commandInterpreter.println(""); } this.em.getTransaction().commit(); }