Location accountAppsLocation = allAppsLocation.append(id.getAccountId());
String name = String.format(Locale.ENGLISH, "%s/%s", type.toString(), id.getApplicationId());
Location applicationProgramsLocation = accountAppsLocation.append(name);
if (!applicationProgramsLocation.exists()) {
throw new FileNotFoundException("Unable to locate the Program, location doesn't exist: "
+ applicationProgramsLocation.toURI().getPath());
}
Location programLocation = applicationProgramsLocation.append(String.format("%s.jar", id.getId()));
if (!programLocation.exists()) {
throw new FileNotFoundException(String.format("Program %s.%s of type %s does not exists.",
id.getApplication(), id.getId(), type));