private final boolean willService(URI attributeId) { if (hasAttribute(attributeId)) { logger.debug("willService() {} accept this known serviced attribute {}", iAm(), attributeId); return true; } if (!canHandleAdhoc()) { logger.debug("willService() {} deny any adhoc attribute {}", iAm(), attributeId); return false; } if (attributesDenied.contains(attributeId)) { logger.debug("willService() {} deny this known adhoc attribute {}", iAm(), attributeId); return false; } logger.debug("willService() {} allow this unknown adhoc attribute {}", iAm(), attributeId); return true; }
protected final URI getAttributeTypeUri(String id) { return getAttributeType(URI.create(id)); }
@Deprecated protected final String getAttributeType(String id) { return getAttributeTypeUri(id).toString(); }
private final boolean parmsOk(URI attributeType, URI attributeId, int designatorType) { logger.debug("in parmsOk {}", iAm()); if (!getSupportedDesignatorTypes() .contains(Integer.valueOf(designatorType))) { logger.debug("AttributeFinder:parmsOk{} exit on target not supported [{}]", iAm(), designatorType); return false; iAm()); return false; iAm()); return false; iAm(), attributeId); showRegisteredAttributes(); if (hasAttribute(attributeId)) { if (!getAttributeType(attributeId).equals(attributeType)) { logger.debug("AttributeFinder:parmsOk{} exit on attributeType incorrect for attributeId", iAm()); return false; if (!STRING_ATTRIBUTE_TYPE_URI.equals(attributeType)) { logger.debug("AttributeFinder:parmsOk{} exit on attributeType incorrect for attributeId", iAm()); return false;
EvaluationCtx context, int designatorType) { logger.debug("AttributeFinder:findAttribute {}", iAm()); logger.debug("attributeType=[{}], attributeId=[{}] {}", attributeType, attributeId, iAm()); if (!parmsOk(attributeType, attributeId, designatorType)) { logger.debug("AttributeFinder:findAttribute exit on parms not ok {}", iAm()); if (attributeType == null) { attributeType = STRING_ATTRIBUTE_TYPE_URI; return getEmptyResult(attributeType); if (!willService(attributeId)) { logger.debug("AttributeFinder:willService() {} returns false", iAm()); return getEmptyResult(attributeType); logger.debug("++++++++++ AttributeFinder:findAttribute {} category={}", iAm(), category.toString()); logger.debug("++++++++++ AttributeFinder:findAttribute {} designatorType={}", iAm(), designatorType); logger.debug("about to get temp {}", iAm()); Object temp = getAttributeLocally(designatorType, attributeId, category, context); logger.debug("{} got temp={}", iAm(), temp); + "attribute value not found", iAm());
@Override public boolean isDesignatorSupported() { logger.debug("isDesignatorSupported() will return {} {}", iAm(), (instantiatedOk == Boolean.TRUE)); return instantiatedOk == Boolean.TRUE; }
private final boolean parmsOk(URI attributeType, URI attributeId, int designatorType) { logger.debug("in parmsOk {}", iAm()); if (!getSupportedDesignatorTypes() .contains(Integer.valueOf(designatorType))) { logger.debug("AttributeFinder:parmsOk{} exit on target not supported [{}]", iAm(), designatorType); return false; iAm()); return false; iAm()); return false; iAm(), attributeId); showRegisteredAttributes(); if (hasAttribute(attributeId)) { if (!getAttributeType(attributeId).equals(attributeType)) { logger.debug("AttributeFinder:parmsOk{} exit on attributeType incorrect for attributeId", iAm()); return false; if (!STRING_ATTRIBUTE_TYPE_URI.equals(attributeType)) { logger.debug("AttributeFinder:parmsOk{} exit on attributeType incorrect for attributeId", iAm()); return false;
EvaluationCtx context, int designatorType) { logger.debug("AttributeFinder:findAttribute {}", iAm()); logger.debug("attributeType=[{}], attributeId=[{}] {}", attributeType, attributeId, iAm()); if (!parmsOk(attributeType, attributeId, designatorType)) { logger.debug("AttributeFinder:findAttribute exit on parms not ok {}", iAm()); if (attributeType == null) { attributeType = STRING_ATTRIBUTE_TYPE_URI; return getEmptyResult(attributeType); if (!willService(attributeId)) { logger.debug("AttributeFinder:willService() {} returns false", iAm()); return getEmptyResult(attributeType); logger.debug("++++++++++ AttributeFinder:findAttribute {} category={}", iAm(), category.toString()); logger.debug("++++++++++ AttributeFinder:findAttribute {} designatorType={}", iAm(), designatorType); logger.debug("about to get temp {}", iAm()); Object temp = getAttributeLocally(designatorType, attributeId, category, context); logger.debug("{} got temp={}", iAm(), temp); + "attribute value not found", iAm());
@Override public boolean isDesignatorSupported() { logger.debug("isDesignatorSupported() will return {} {}", iAm(), (instantiatedOk == Boolean.TRUE)); return instantiatedOk == Boolean.TRUE; }
protected final void registerAttribute(URI id, URI type) throws URISyntaxException { logger.debug("registering attribute {} {}", iAm(), id); attributeIdUris.add(id); attributeTypes.put(id, type); }
private final boolean willService(URI attributeId) { if (hasAttribute(attributeId)) { logger.debug("willService() {} accept this known serviced attribute {}", iAm(), attributeId); return true; } if (!canHandleAdhoc()) { logger.debug("willService() {} deny any adhoc attribute {}", iAm(), attributeId); return false; } if (attributesDenied.contains(attributeId)) { logger.debug("willService() {} deny this known adhoc attribute {}", iAm(), attributeId); return false; } logger.debug("willService() {} allow this unknown adhoc attribute {}", iAm(), attributeId); return true; }
@Deprecated protected final String getAttributeType(String id) { return getAttributeTypeUri(id).toString(); }
protected final URI getAttributeTypeUri(String id) { return getAttributeType(URI.create(id)); }
protected final void registerAttribute(XacmlName attribute) { logger.debug("registering attribute {} {}", iAm(), attribute.uri); attributeIdUris.add(attribute.attributeId); attributeTypes.put(attribute.attributeId, attribute.datatype); }
@Override @SuppressWarnings("rawtypes") public Set getSupportedDesignatorTypes() { if (instantiatedOk != null && instantiatedOk.booleanValue()) { logger.debug("getSupportedDesignatorTypes() will return {} set of elements, n={}", iAm(), supportedDesignatorTypes.size()); return supportedDesignatorTypes; } logger.debug("getSupportedDesignatorTypes() will return {}NULLSET", iAm()); return Collections.emptySet(); }
protected final void denyAttribute(URI id) { logger.debug("Denying attribute {} {}", iAm(), id); attributesDenied.add(id); }
protected final void registerSupportedDesignatorType(int designatorType) { logger.debug("registerSupportedDesignatorType() {}", iAm()); supportedDesignatorTypes.add(designatorType); }
@Override @SuppressWarnings("rawtypes") public Set getSupportedDesignatorTypes() { if (instantiatedOk != null && instantiatedOk.booleanValue()) { logger.debug("getSupportedDesignatorTypes() will return {} set of elements, n={}", iAm(), supportedDesignatorTypes.size()); return supportedDesignatorTypes; } logger.debug("getSupportedDesignatorTypes() will return {}NULLSET", iAm()); return Collections.emptySet(); }
protected final void denyAttribute(URI id) { logger.debug("Denying attribute {} {}", iAm(), id); attributesDenied.add(id); }
protected final void registerSupportedDesignatorType(int designatorType) { logger.debug("registerSupportedDesignatorType() {}", iAm()); supportedDesignatorTypes.add(designatorType); }