/** * Returns the channel in the invocable hierarchy. * * @param channelUri the channel uri * @param invocable the invocable * @return the channel * @throws Fabric3Exception if the channel is not found */ public static LogicalChannel getChannelInHierarchy(URI channelUri, LogicalInvocable invocable) throws Fabric3Exception { LogicalChannel channel = null; LogicalCompositeComponent parent = invocable.getParent().getParent(); while (true) { if (parent != null) { channel = parent.getChannel(channelUri); if (channel != null) { break; } parent = parent.getParent(); } else { break; } } if (channel == null) { throw new Fabric3Exception("Channel not found: " + channelUri); } return channel; }
/** * Returns the channel in the invocable hierarchy. * * @param channelUri the channel uri * @param invocable the invocable * @return the channel * @throws Fabric3Exception if the channel is not found */ public static LogicalChannel getChannelInHierarchy(URI channelUri, LogicalInvocable invocable) throws Fabric3Exception { LogicalChannel channel = null; LogicalCompositeComponent parent = invocable.getParent().getParent(); while (true) { if (parent != null) { channel = parent.getChannel(channelUri); if (channel != null) { break; } parent = parent.getParent(); } else { break; } } if (channel == null) { throw new Fabric3Exception("Channel not found: " + channelUri); } return channel; }
/** * Returns the channel in the invocable hierarchy. * * @param channelUri the channel uri * @param invocable the invocable * @return the channel * @throws ChannelNotFoundException if the channel is not found */ public static LogicalChannel getChannelInHierarchy(URI channelUri, LogicalInvocable invocable) throws ChannelNotFoundException { LogicalChannel channel = null; LogicalCompositeComponent parent = invocable.getParent().getParent(); while (true) { if (parent != null) { channel = parent.getChannel(channelUri); if (channel != null) { break; } parent = parent.getParent(); } else { break; } } if (channel == null) { throw new ChannelNotFoundException("Channel not found: " + channelUri); } return channel; }
private URI getContributionUri(LogicalBinding<WsBindingDefinition> binding) { LogicalComponent<?> current = binding.getParent().getParent(); while (current.getParent().getParent() != null) { // component deployed directly to the domain current = current.getParent(); } return current.getDefinition().getContributionUri(); }
if (parent.getParent() != null && parent.getParent().getParent() == null) {
if (parent.getParent() != null && parent.getParent().getParent() == null) {