public static RoleAuthorization translate(String authenticationId) {
    if (authenticationId == null) {
      return null;
    } else {
      authenticationId = authenticationId.trim();

      if (authenticationId.isEmpty()) {
        return null;
      } else {
        return RoleAuthorization.valueOf(authenticationId.replace(".", "_").toUpperCase());
      }
    }
  }
Safely translates a role authorization Id to a RoleAuthorization

@param authenticationId an authentication id
@return a RoleAuthorization or null if no translation can be made
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/RoleAuthorization.java