@Path("{secretId}") @Timed @ExceptionMetered @GET public AutomationSecretResponse readSecretById(@Auth AutomationClient automationClient,@PathParam("secretId") LongParam secretId){
  Optional<Secret> secret=secretController.getSecretById(secretId.get());
  if (!secret.isPresent()) {
    throw new NotFoundException("Secret not found.");
  }
  ImmutableList<Group> groups=ImmutableList.copyOf(aclDAO.getGroupsFor(secret.get()));
  return AutomationSecretResponse.fromSecret(secret.get(),groups);
}

@ Path ( "{secretId}" ) @ Timed @ ExceptionMetered @ GET public AutomationSecretResponse readSecretById ( @ Auth AutomationClient automationClient , @ PathParam ( "secretId" ) LongParam secretId ) { Optional < Secret > secret = secretController . getSecretById ( secretId . get ( ) ) ; if ( ! secret . isPresent ( ) ) { throw new NotFoundException ( "Secret not found." ) ; } ImmutableList < Group > groups = ImmutableList . copyOf ( aclDAO . getGroupsFor ( secret . get ( ) ) ) ; return AutomationSecretResponse . fromSecret ( secret . get ( ) , groups ) ; }
retrieve secret by id
