// Request is either unversioned or versioned listMethods request
try {
PID = Server.getPID(URIArray[5]).toString(); // normalize PID
} catch (Throwable th) {
logger.error("Bad pid syntax in request", th);
throw new BadRequest400Exception(request,
ACTION_LABEL,
"",
new String[0]);
}
if (URIArray.length == 7) {
// Request is a versioned listMethods request
try {
versDateTime = DateUtility.parseDateStrict(URIArray[6]);
} catch(ParseException e) {
logger.error("Bad date format in request");
throw new BadRequest400Exception(request,
ACTION_LABEL,
"",
new String[0]);
}
asOfDateTime = versDateTime;
}
logger.debug("Listing methods (PID=" + PID + ", asOfDate="
+ versDateTime + ")");
} else {
logger.error("Bad syntax (expected 6 or 7 parts) in request");
throw new BadRequest400Exception(request,
ACTION_LABEL,
"",
new String[0]);
}