// A checking on permissions-string attribute has been made because it is applicable
// for both RNS and ByteIO. A thorough testing on all attributes will be an overkill.
private static boolean isCacheContainsAllEntryAttributes(WSResourceConfig targetConfig, List<RNSEntryResponseType> entries)
	{
		String targetContainerId = targetConfig.getContainerId();
		if (targetContainerId == null)
			return true;
		boolean attributesMissingFromResourcesOfSameContainer = false;
		for (RNSEntryResponseType entry : entries) {
			URI entryWSIndentifier = CacheUtils.getEPI(entry.getEndpoint());
			WSResourceConfig entryConfig = (WSResourceConfig) CacheManager.getItemFromCache(entryWSIndentifier, WSResourceConfig.class);
			if (entryConfig == null)
				continue;
			String entryContainerId = entryConfig.getContainerId();
			if (targetContainerId.equals(entryContainerId)) {
				// A checking on permissions-string attribute has been made because it is applicable
				// for both RNS and ByteIO. A thorough testing on all attributes will be an overkill.
				Object permissionProperty = CacheManager.getItemFromCache(entryConfig.getWsIdentifier(),
					GenesisIIBaseRP.PERMISSIONS_STRING_QNAME, MessageElement.class);
				if (permissionProperty == null) {
					attributesMissingFromResourcesOfSameContainer = true;
					break;
				}
			}
		}
		return !attributesMissingFromResourcesOfSameContainer;
	}
String entryContainerId = entryConfig.getContainerId();
if (targetContainerId.equals(entryContainerId)) {
// A checking on permissions-string attribute has been made because it is applicable
// for both RNS and ByteIO. A thorough testing on all attributes will be an overkill.
Object permissionProperty = CacheManager.getItemFromCache(entryConfig.getWsIdentifier(),
GenesisIIBaseRP.PERMISSIONS_STRING_QNAME, MessageElement.class);
if (targetContainerId == null)
return true;
boolean attributesMissingFromResourcesOfSameContainer = false;
for (RNSEntryResponseType entry : entries) {
URI entryWSIndentifier = CacheUtils.getEPI(entry.getEndpoint());
WSResourceConfig entryConfig = (WSResourceConfig) CacheManager.getItemFromCache(entryWSIndentifier, WSResourceConfig.class);
if (entryConfig == null)
continue;
String entryContainerId = entryConfig.getContainerId();
if (targetContainerId.equals(entryContainerId)) {
// A checking on permissions-string attribute has been made because it is applicable
// for both RNS and ByteIO. A thorough testing on all attributes will be an overkill.
Object permissionProperty = CacheManager.getItemFromCache(entryConfig.getWsIdentifier(),
GenesisIIBaseRP.PERMISSIONS_STRING_QNAME, MessageElement.class);
if (permissionProperty == null) {
attributesMissingFromResourcesOfSameContainer = true;
break;
}
}
}
return !attributesMissingFromResourcesOfSameContainer;
}
private static boolean isCacheContainsAllEntryAttributes(WSResourceConfig targetConfig, List<RNSEntryResponseType> entries)
{
String targetContainerId = targetConfig.getContainerId();
if (targetContainerId == null)
return true;
boolean attributesMissingFromResourcesOfSameContainer = false;
for (RNSEntryResponseType entry : entries) {
URI entryWSIndentifier = CacheUtils.getEPI(entry.getEndpoint());
WSResourceConfig entryConfig = (WSResourceConfig) CacheManager.getItemFromCache(entryWSIndentifier, WSResourceConfig.class);
if (entryConfig == null)
continue;
String entryContainerId = entryConfig.getContainerId();
if (targetContainerId.equals(entryContainerId)) {
// A checking on permissions-string attribute has been made because it is applicable
// for both RNS and ByteIO. A thorough testing on all attributes will be an overkill.
Object permissionProperty = CacheManager.getItemFromCache(entryConfig.getWsIdentifier(),
GenesisIIBaseRP.PERMISSIONS_STRING_QNAME, MessageElement.class);
if (permissionProperty == null) {
attributesMissingFromResourcesOfSameContainer = true;
break;
}
}
}
return !attributesMissingFromResourcesOfSameContainer;
}