public static String getPid(EvaluationCtx context) { EvaluationResult attribute = context.getResourceAttribute(STRING_ATTRIBUTE, Constants.OBJECT.PID.attributeId, null); BagAttribute element = getAttributeFromEvaluationResult(attribute); if (element == null) { logger.debug("PolicyFinderModule:getPid exit on can't get pid on request callback"); return null; } if (!(element.getType().equals(STRING_ATTRIBUTE))) { logger.debug("PolicyFinderModule:getPid exit on couldn't get pid from xacml request non-string returned"); return null; } return (element.size() == 1) ? (String) element.getValue() : null; }
public static String getPid(EvaluationCtx context) { EvaluationResult attribute = context.getResourceAttribute(STRING_ATTRIBUTE, Constants.OBJECT.PID.attributeId, null); BagAttribute element = getAttributeFromEvaluationResult(attribute); if (element == null) { logger.debug("PolicyFinderModule:getPid exit on can't get pid on request callback"); return null; } if (!(element.getType().equals(STRING_ATTRIBUTE))) { logger.debug("PolicyFinderModule:getPid exit on couldn't get pid from xacml request non-string returned"); return null; } return (element.size() == 1) ? (String) element.getValue() : null; }
private final String getDatastreamId(EvaluationCtx context) { EvaluationResult attribute = context.getResourceAttribute(STRING_ATTRIBUTE_TYPE_URI, Constants.DATASTREAM.ID.attributeId, null); Object element = getAttributeFromEvaluationResult(attribute); if (element == null) { logger.debug("getDatastreamId: exit on can't get resource-id on request callback"); return null; } if (!(element instanceof StringAttribute)) { logger.debug("getDatastreamId: exit on " + "couldn't get resource-id from xacml request " + "non-string returned"); return null; } String datastreamId = ((StringAttribute) element).getValue(); if (datastreamId == null) { logger.debug("getDatastreamId: exit on null resource-id"); return null; } if (!validDatastreamId(datastreamId)) { logger.debug("invalid resource-id: datastreamId is not valid"); return null; } return datastreamId; }
private final String getDatastreamId(EvaluationCtx context) { EvaluationResult attribute = context.getResourceAttribute(STRING_ATTRIBUTE_TYPE_URI, Constants.DATASTREAM.ID.attributeId, null); Object element = getAttributeFromEvaluationResult(attribute); if (element == null) { logger.debug("getDatastreamId: exit on can't get resource-id on request callback"); return null; } if (!(element instanceof StringAttribute)) { logger.debug("getDatastreamId: exit on " + "couldn't get resource-id from xacml request " + "non-string returned"); return null; } String datastreamId = ((StringAttribute) element).getValue(); if (datastreamId == null) { logger.debug("getDatastreamId: exit on null resource-id"); return null; } if (!validDatastreamId(datastreamId)) { logger.debug("invalid resource-id: datastreamId is not valid"); return null; } return datastreamId; }
break; case RESOURCE_TARGET: result = context.getResourceAttribute(type, id, issuer); break; case ACTION_TARGET:
for (String attributeId : im.keySet()) { EvaluationResult result = eval.getResourceAttribute(new URI(im.get(attributeId)), new URI(attributeId), null);