@Test(expected = ValidationException.class) public void shouldNotRegisterChannelWhenValidationExceptionIsAppeared() { String channel = String.format("{displayName: %s, moduleName: %s, moduleVersion: %s}", BUNDLE_SYMBOLIC_NAME, BUNDLE_SYMBOLIC_NAME, VERSION); InputStream stream = new ByteArrayInputStream(channel.getBytes(Charset.forName("UTF-8"))); channelService.registerChannel(stream, null, null); }
@Override @Transactional public void registerChannel(ChannelRequest channelRequest) { LOGGER.info("Registering channel: {}", channelRequest.getModuleName()); addOrUpdate(ChannelBuilder.fromChannelRequest(channelRequest).build()); }
ChannelServiceImpl implements ChannelService { @Override @Transactional public void registerChannel(ChannelRequest channelRequest) { LOGGER.info("Registering channel: {}", channelRequest.getModuleName()); addOrUpdate(ChannelBuilder.fromChannelRequest(channelRequest).build()); } }
ChannelServiceImpl implements ChannelService { @Override @Transactional public void registerChannel(ChannelRequest channelRequest) { LOGGER.info("Registering channel: {}", channelRequest.getModuleName()); addOrUpdate(ChannelBuilder.fromChannelRequest(channelRequest).build()); } @Autowired  ChannelServiceImpl(TriggerEventService triggerEventService, ChannelsDataService channelsDataService, EventRelay eventRelay); }
ChannelServiceImpl implements ChannelService { @Override @Transactional public void registerChannel(ChannelRequest channelRequest) { LOGGER.info("Registering channel: {}", channelRequest.getModuleName()); addOrUpdate(ChannelBuilder.fromChannelRequest(channelRequest).build()); } @Autowired  ChannelServiceImpl(TriggerEventService triggerEventService, ChannelsDataService channelsDataService, EventRelay eventRelay); @Override @Transactional void registerChannel(ChannelRequest channelRequest); @Override @Transactional void unregisterChannel(String moduleName); @Override @Transactional void registerChannel(final InputStream stream, String moduleName, String moduleVersion); @Override @Transactional synchronized void addOrUpdate(final Channel channel); @Override @Transactional synchronized void delete(final String moduleName); @Override @Transactional List<Channel> getAllChannels(); @Override @Transactional Channel getChannel(final String moduleName); @Override @Transactional boolean channelExists(String moduleName); @Autowired(required = false) void setBundleContext(BundleContext bundleContext); }
ChannelServiceImpl implements ChannelService { @Override @Transactional public void registerChannel(ChannelRequest channelRequest) { LOGGER.info("Registering channel: {}", channelRequest.getModuleName()); addOrUpdate(ChannelBuilder.fromChannelRequest(channelRequest).build()); } @Autowired  ChannelServiceImpl(TriggerEventService triggerEventService, ChannelsDataService channelsDataService, EventRelay eventRelay); @Override @Transactional void registerChannel(ChannelRequest channelRequest); @Override @Transactional void unregisterChannel(String moduleName); @Override @Transactional void registerChannel(final InputStream stream, String moduleName, String moduleVersion); @Override @Transactional synchronized void addOrUpdate(final Channel channel); @Override @Transactional synchronized void delete(final String moduleName); @Override @Transactional List<Channel> getAllChannels(); @Override @Transactional Channel getChannel(final String moduleName); @Override @Transactional boolean channelExists(String moduleName); @Autowired(required = false) void setBundleContext(BundleContext bundleContext);  }