예제 #1
0
  /**
   * Gets the Device Print Profiles for the specified user.
   *
   * @param amIdentity The user's identity.
   * @return A {@code List} of the user's device print profiles.
   * @throws IdRepoException If there is a problem getting the device print profiles from LDAP.
   * @throws SSOException If there is a problem getting the device print profiles from LDAP.
   * @throws IOException If there is a problem parsing the device print profiles.
   */
  List<Map<String, Object>> getProfiles(AMIdentityWrapper amIdentity)
      throws IdRepoException, SSOException, IOException {

    Set<String> set = (Set<String>) amIdentity.getAttribute(LDAP_DEVICE_PRINT_ATTRIBUTE_NAME);
    List<Map<String, Object>> profiles = new ArrayList<Map<String, Object>>();
    for (String profile : set) {
      profiles.add(MAPPER.readValue(profile, Map.class));
    }
    return profiles;
  }