コード例 #1
0
 public void _endpoint_show_rest(CommandInterpreter commandInterpreter) {
   this.em.getTransaction().begin();
   Query query = this.em.createQuery("SELECT e FROM RESTEndpoint e");
   @SuppressWarnings("unchecked")
   List<RESTEndpoint> queryResults = query.getResultList();
   for (RESTEndpoint e : queryResults) {
     commandInterpreter.println(
         "SeriviceTemplateID: " + e.getCSARId().getFileName() + " URI: " + e.getURI());
   }
   this.em.getTransaction().commit();
 }
コード例 #2
0
 @Override
 /** {@Inheritdoc} */
 public void storeRESTEndpoint(RESTEndpoint endpoint) {
   this.init();
   CoreInternalEndpointServiceImpl.LOG.debug(
       "Storing REST Endpoint with Path : \"{}\", STID: \"{}\"",
       endpoint.getPath(),
       endpoint.getCSARId().getFileName());
   this.em.getTransaction().begin();
   this.em.persist(endpoint);
   this.em.getTransaction().commit();
 }