Determine if a channel references a chain in the runtime config.

@param channelName
@param chainName
@return boolean true if channel is referenced by chain, false otherwise
354518
public synchronized boolean doesChannelReferenceChain(String channelName, String chainName) {
        boolean foundRef = false;
        Chain chain = this.chainRunningMap.get(chainName);
        if (chain != null) {
            ChannelData channelsData[] = chain.getChannelsData();
            ChildChannelDataImpl childChannelData = null;
            for (int i = 0; i < channelsData.length; i++) {
                childChannelData = (ChildChannelDataImpl) channelsData[i];
                if (childChannelData.getExternalName().equals(channelName)) {
                    foundRef = true;
                    break;
                }
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "doesChannelReferenceChain: channel=" + channelName + ", chain=" + chainName + ", rc=" + foundRef);
        }
        return foundRef;
    }
700827
public boolean isSharable(Map<String, com.ibm.websphere.channelfw.ChannelData> channelConfiguration) {
        return false;
    }
1312400
public static boolean isReference(KeyValue kv) {
        if (Bytes.equals(kv.getFamily(), REF_COLUMN_FAMILY)) {
            return true;
        }
        return false;
    }
95851
def _set_reference_channel_cb(self, w, idx):
        
        chname = self.chnames[idx]
        self._set_reference_channel(chname)
72609
@Override
    public Channel join(String channelName) {
        if (!connected) {
            throw new NotConnectedException();
        }

        ChannelImpl channel = new ChannelImpl(this, channelName);

        /* Attempt to join */
        if (channel.join()) {
            return channel;
        }

        /* Error while joining */
        return null;
    }
1288264
private boolean isGlobalVarReference(String name, Scope s) {
    Var v = s.getVar(name);
    if (v == null && externsScope != null) {
      v = externsScope.getVar(name);
    }
    return v != null && !v.isLocal();
  }
582326
private static Chain isKnownChain(String asymId, List<Chain> chains){

		for (int i = 0; i< chains.size();i++){
			Chain testchain =  chains.get(i);
			//System.out.println("comparing chainID >"+chainID+"< against testchain " + i+" >" +testchain.getName()+"<");
			if (asymId.equals(testchain.getId())) {
				//System.out.println("chain "+ chainID+" already known ...");
				return testchain;
			}
		}

		return null;
	}
271040
protected function isInChannel($server, $channel, $user)
    {
        if (!isset($this->channels[$server][$channel]))
        {
            return false;
        }

        $names = array_keys($this->channels[$server][$channel], true, true);
        foreach ($names as $name) {
            if (!strcasecmp($name, $user)) {
                return true;
            }
        }

        return false;
    }
234661
public boolean isSupported(String fileName) {
		String extension = getExtension(fileName);

		return isInternalSupported(extension) || isExternalSupported(extension);
	}
843846
private static boolean hasReferences(Bean target, BeanId reference) {
        for (String name : target.getReferenceNames()) {
            for (BeanId ref : target.getReference(name)) {
                if (ref.equals(reference)) {
                    return true;
                }
            }
        }
        return false;
    }
732638
public boolean hasForeignkey(String name)
    {
        String        realName = (name == null ? "" : name);
        ForeignkeyDef def      = null;

        for (Iterator it = getForeignkeys(); it.hasNext();)
        {
            def = (ForeignkeyDef)it.next();
            if (realName.equals(def.getName()))
            {
                return true;
            }
        }
        return false;
    }
992051
public Boolean isSubscribed(String channel) {
		Boolean result = null;

		/*
		 * Sanity checks
		 */
		if (!isConnected) {
			raiseOrtcEvent(EventEnum.OnException, this,
					new OrtcNotConnectedException());
		} else if (Strings.isNullOrEmpty(channel)) {
			raiseOrtcEvent(EventEnum.OnException, this,
					new OrtcEmptyFieldException("Channel"));
		} else if (!Strings.ortcIsValidInput(channel)) {
			raiseOrtcEvent(EventEnum.OnException, this,
					new OrtcInvalidCharactersException("Channel"));
		} else {
			ChannelSubscription subscribedChannel = subscribedChannels
					.get(channel);
			result = subscribedChannel != null
					&& subscribedChannel.isSubscribed();
		}

		return result;
	}
574024
public function hasChannel($channel)
    {
        if ($channel instanceof ChannelInterface) {
            $channel = $channel->getId();
        }

        $channel = (string) $channel;

        return false === array_search($channel, $this->channels) ? false : true;
    }
1334302
def set_reference_channel(self, chname):
        
        # change the GUI control to match
        idx = self.chnames.index(str(chname))
        self.w.ref_channel.set_index(idx)
        return self._set_reference_channel(chname)
645962
@Override
    public synchronized ChannelData removeChannel(String channelName) throws ChannelException, ChainException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "removeChannel: " + channelName);
        }
        if (null == channelName) {
            throw new InvalidChannelNameException("Input channel name is null");
        }

        // Fetch the channel data from the framework.
        ChannelDataImpl channelData = (ChannelDataImpl) channelDataMap.get(channelName);
        if (null == channelData) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
                // Due to timing windows (i.e. multiple channel providers going away), there is
                // a race to stop and/or clean up chains. This is not a notable condition: the chain can only be removed
                // once.
                Tr.exit(tc, "removeChannel: " + channelName, "Channel not found");
            }
            return null;
        }

        // Channel configs can only be removed if they are not in use by the
        // runtime.
        if (0 != channelData.getNumChildren()) {
            throw new ChannelException("Can't remove channel config " + channelName + " in runtime.  Destroy must happen first. ");
        }

        // Remove the chain config from the framework's map.
        this.channelDataMap.remove(channelName);

        // iterating chain configs will clear out live chains/channelRunningMap
        // Remove any chain configurations that refer to this channel.
        // Get a temp array so we can release the lock needed by removeChain.
        // This isn't a clone, but we should be okay holding the references.
        Object[] chainDataArray = this.chainDataMap.values().toArray();
        ChainDataImpl chainData = null;
        for (int i = 0; i < chainDataArray.length; i++) {
            chainData = (ChainDataImpl) chainDataArray[i];
            if (chainData.containsChannel(channelName)) {
                // Found reference to channel config. Remove chain config.
                // This ripples into the chain groups and cleans them up too.
                removeChain(chainData.getName());
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "removeChannel");
        }
        return channelData;
    }
1317284
public synchronized Chain getRunningChain(String chainName) {
        Chain chain = null;
        if (null != chainName) {
            chain = this.chainRunningMap.get(chainName);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getRunningChain: " + chainName + " found=" + (null != chain));
        }
        return chain;
    }
1357892
Channel loadChannel(HFClient client, String channelName) throws NetworkConfigurationException {
        return loadChannel(client, channelName, networkConfigAddPeerHandlerDefault, networkConfigAddOrdererHandlerDefault);
    }