public Usage getCallerUsage(Caller caller) throws ManageException {
this.opIntakeGeneralOp("ALL-USAGE", caller);
if (this.accounting == null) {
throw new ManageException("not able to query usage, there is " +
"no accounting plugin configured");
}
final String id;
// already checked in opIntake but guard against object extenders
if (caller == null || caller.getIdentity() == null) {
throw new ManageException("not able to query usage, there is " +
"no caller information");
} else {
id = caller.getIdentity();
}
try {
final ElapsedAndReservedMinutes earm =
this.accounting.totalElapsedAndReservedMinutesTuple(id);
return this.dataConvert.getUsage(earm);
} catch (Exception e) {
throw new ManageException(e.getMessage(), e);
}
}