@Test @Rollback(false) public void removeNotifyServiceSharedCIS() throws Exception{ for (Service service : servicesList) { serReg.removeServiceSharingInCIS(service.getServiceIdentifier(), _cisTestId1); } }
@Override public void removeServiceSharingInCIS( ServiceResourceIdentifier serviceIdentifier, String CISID) throws ServiceSharingNotificationException { Session session = null; Transaction t = null; try { session = sessionFactory.openSession(); t = session.beginTransaction(); ServiceSharedInCISDAO tmpSharedInCIS = new ServiceSharedInCISDAO( CISID, new ServiceResourceIdentifierDAO(serviceIdentifier .getIdentifier().toString(), serviceIdentifier.getServiceInstanceIdentifier())); Object obj = session.load(ServiceSharedInCISDAO.class, tmpSharedInCIS.getId()); session.delete(obj); t.commit(); } catch (Exception e) { if(t!= null) t.rollback(); throw new ServiceSharingNotificationException(e); } finally { if(session != null) session.close(); } }
ServiceRegistry implements IServiceRegistry { @Override public void removeServiceSharingInCIS( ServiceResourceIdentifier serviceIdentifier, String CISID) throws ServiceSharingNotificationException { Session session = null; Transaction t = null; try { session = sessionFactory.openSession(); t = session.beginTransaction(); ServiceSharedInCISDAO tmpSharedInCIS = new ServiceSharedInCISDAO( CISID, new ServiceResourceIdentifierDAO(serviceIdentifier .getIdentifier().toString(), serviceIdentifier.getServiceInstanceIdentifier())); Object obj = session.load(ServiceSharedInCISDAO.class, tmpSharedInCIS.getId()); session.delete(obj); t.commit(); } catch (Exception e) { if(t!= null) t.rollback(); throw new ServiceSharingNotificationException(e); } finally { if(session != null) session.close(); } } }
ServiceRegistry implements IServiceRegistry { @Override public void removeServiceSharingInCIS( ServiceResourceIdentifier serviceIdentifier, String CISID) throws ServiceSharingNotificationException { Session session = null; Transaction t = null; try { session = sessionFactory.openSession(); t = session.beginTransaction(); ServiceSharedInCISDAO tmpSharedInCIS = new ServiceSharedInCISDAO( CISID, new ServiceResourceIdentifierDAO(serviceIdentifier .getIdentifier().toString(), serviceIdentifier.getServiceInstanceIdentifier())); Object obj = session.load(ServiceSharedInCISDAO.class, tmpSharedInCIS.getId()); session.delete(obj); t.commit(); } catch (Exception e) { if(t!= null) t.rollback(); throw new ServiceSharingNotificationException(e); } finally { if(session != null) session.close(); } } ServiceRegistry(); }
ServiceRegistry implements IServiceRegistry { @Override public void removeServiceSharingInCIS( ServiceResourceIdentifier serviceIdentifier, String CISID) throws ServiceSharingNotificationException { Session session = null; Transaction t = null; try { session = sessionFactory.openSession(); t = session.beginTransaction(); ServiceSharedInCISDAO tmpSharedInCIS = new ServiceSharedInCISDAO( CISID, new ServiceResourceIdentifierDAO(serviceIdentifier .getIdentifier().toString(), serviceIdentifier.getServiceInstanceIdentifier())); Object obj = session.load(ServiceSharedInCISDAO.class, tmpSharedInCIS.getId()); session.delete(obj); t.commit(); } catch (Exception e) { if(t!= null) t.rollback(); throw new ServiceSharingNotificationException(e); } finally { if(session != null) session.close(); } } ServiceRegistry(); @Override void registerServiceList(List<Service> servicesList); @Override void unregisterServiceList(List<Service> servicesList); @Override List<Service> retrieveServicesInCSSNode(String CSSID); @Override List<Service> retrieveServicesInCSS(String CSSID); @Override List<Service> retrieveServicesSharedByCIS(String CISID); @Override List<Service> findServices(Service filter); @Override List<Service> findServices(Service filter, String cisId); @Override void notifyServiceIsSharedInCIS(
			ServiceResourceIdentifier serviceIdentifier, String CISID); @Override void removeServiceSharingInCIS(
			ServiceResourceIdentifier serviceIdentifier, String CISID); @Override Service retrieveService(ServiceResourceIdentifier serviceIdentifier); @Override boolean changeStatusOfService(
			ServiceResourceIdentifier serviceIdentifier,
			ServiceStatus serviceStatus); SessionFactory getSessionFactory(); void setSessionFactory(SessionFactory sessionFactory); @Override boolean deleteServiceCSS(String CSSId); @Override boolean clearServiceSharedCIS(String CISId); @Override boolean updateRegisteredService(Service service); @Override List<String> retrieveCISSharedService(ServiceResourceIdentifier serviceIdentifier); }
ServiceRegistry implements IServiceRegistry { @Override public void removeServiceSharingInCIS( ServiceResourceIdentifier serviceIdentifier, String CISID) throws ServiceSharingNotificationException { Session session = null; Transaction t = null; try { session = sessionFactory.openSession(); t = session.beginTransaction(); ServiceSharedInCISDAO tmpSharedInCIS = new ServiceSharedInCISDAO( CISID, new ServiceResourceIdentifierDAO(serviceIdentifier .getIdentifier().toString(), serviceIdentifier.getServiceInstanceIdentifier())); Object obj = session.load(ServiceSharedInCISDAO.class, tmpSharedInCIS.getId()); session.delete(obj); t.commit(); } catch (Exception e) { if(t!= null) t.rollback(); throw new ServiceSharingNotificationException(e); } finally { if(session != null) session.close(); } } ServiceRegistry(); @Override void registerServiceList(List<Service> servicesList); @Override void unregisterServiceList(List<Service> servicesList); @Override List<Service> retrieveServicesInCSSNode(String CSSID); @Override List<Service> retrieveServicesInCSS(String CSSID); @Override List<Service> retrieveServicesSharedByCIS(String CISID); @Override List<Service> findServices(Service filter); @Override List<Service> findServices(Service filter, String cisId); @Override void notifyServiceIsSharedInCIS(
			ServiceResourceIdentifier serviceIdentifier, String CISID); @Override void removeServiceSharingInCIS(
			ServiceResourceIdentifier serviceIdentifier, String CISID); @Override Service retrieveService(ServiceResourceIdentifier serviceIdentifier); @Override boolean changeStatusOfService(
			ServiceResourceIdentifier serviceIdentifier,
			ServiceStatus serviceStatus); SessionFactory getSessionFactory(); void setSessionFactory(SessionFactory sessionFactory); @Override boolean deleteServiceCSS(String CSSId); @Override boolean clearServiceSharedCIS(String CISId); @Override boolean updateRegisteredService(Service service); @Override List<String> retrieveCISSharedService(ServiceResourceIdentifier serviceIdentifier);  }