throws AuthzException {
try {
logger.debug("Entered enforceAddDatastream");
String target = Constants.ACTION.ADD_DATASTREAM.uri;
context.setActionAttributes(null);
MultiValueMap resourceAttributes = new MultiValueMap();
String name = null;
try {
name = Constants.DATASTREAM.MIME_TYPE.uri;
resourceAttributes.set(name, MIMEType);
name = Constants.DATASTREAM.FORMAT_URI.uri;
resourceAttributes.set(name, formatURI);
name = Constants.DATASTREAM.STATE.uri;
resourceAttributes.set(name, dsState);
name = Constants.DATASTREAM.ID.uri;
resourceAttributes.set(name, dsId);
name = Constants.DATASTREAM.LOCATION.uri;
resourceAttributes.set(name, dsLocation);
name = Constants.DATASTREAM.CONTROL_GROUP.uri;
resourceAttributes.set(name, controlGroup);
name = Constants.DATASTREAM.ALT_IDS.uri;
resourceAttributes.set(name, altIDs);
name = Constants.DATASTREAM.CHECKSUM_TYPE.uri;
resourceAttributes.set(name, checksumType);
name = Constants.DATASTREAM.CHECKSUM.uri;
resourceAttributes.set(name, checksum);
} catch (Exception e) {
context.setResourceAttributes(null);
throw new AuthzOperationalException(target + " couldn't set "
+ name, e);
}