// technically possible but only someone else's client implementation
// would allow this to happen
if (!isReadyForTransport) {
final String err = "Post-shutdown tasks are only compatible " +
"with a ReadyForTransport request.";
throw new ManageException(err);
}
if (this.authzCallout != null
&& this.authzCallout instanceof PostTaskAuthorization) {
// shortcut: currently we know owner is the caller at this point
final String dnToAuthorize = this.creatorID;
final Integer decision;
String newTargetName;
try {
decision = ((PostTaskAuthorization)this.authzCallout).
isRootPartitionUnpropTargetPermitted(target, dnToAuthorize);
} catch (AuthorizationException e) {
throw new ManageException(e.getMessage(), e);
}
if (!Decision.PERMIT.equals(decision)) {
throw new ManageException(
"request denied, no message for client");
}
}
final String trueTarget;
if (tasks.isAppendID()) {
trueTarget = target.toASCIIString() + "-" + this.id;
// check new uri syntax:
try {
new URI(trueTarget);
} catch (URISyntaxException e) {
throw new ManageException(e.getMessage(), e);
}
} else {
trueTarget = target.toASCIIString();