private String _getXMPPAddress(final User user) { if (user == null) return ""; for (final Contact contact : user.getContacts()) { if (contact != null && contact.getType().equals(ContactType.xmppAddress.toString())) { return contact.getInfo().orElse(""); } } return ""; }
/** * Get a home phone number * * @return String the home phone number * @throws java.io.IOException if any. * @param user a {@link org.opennms.netmgt.config.users.User} object. */ public String getHomePhone(final User user) throws IOException { return getContactInfo(user, ContactType.homePhone.toString()); }
/** * Get a Text Page Service Provider * * @param userID * the user ID of the user to return * @return String the text page service provider. * @throws java.io.IOException if any. */ public String getTextPage(final String userID) throws IOException { return getContactServiceProvider(userID, ContactType.textPage.toString()); }
/** * Get a text pin * * @return String the text pin * @param user a {@link org.opennms.netmgt.config.users.User} object. * @throws java.io.IOException if any. */ public String getTextPin(final User user) throws IOException { return getContactInfo(user, ContactType.textPage.toString()); }
/** * Get a text pin * * @param userID * the user ID of the user to return * @return String the text pin * @throws java.io.IOException if any. */ public String getTextPin(final String userID) throws IOException { return getContactInfo(userID, ContactType.textPage.toString()); }
/** * Get a mobile phone number * * @return String the mobile phone number * @throws java.io.IOException if any. * @param user a {@link org.opennms.netmgt.config.users.User} object. */ public String getMobilePhone(final User user) throws IOException { return getContactInfo(user, ContactType.mobilePhone.toString()); }
/** * Get a numeric pin * * @param userID * the user ID of the user to return * @return String the numeric pin * @throws java.io.IOException if any. */ public String getNumericPin(final String userID) throws IOException { return getContactInfo(userID, ContactType.numericPage.toString()); }
/** * Get a pager email by user * * @param user a {@link org.opennms.netmgt.config.users.User} object. * @return String the pager email * @throws java.io.IOException if any. */ public String getPagerEmail(final User user) throws IOException { return getContactInfo(user, ContactType.pagerEmail.toString()); }
/** * Get a pager email by name * * @param userID * the user ID of the user to return * @return String the pager email * @throws java.io.IOException if any. */ public String getPagerEmail(final String userID) throws IOException { return getContactInfo(userID, ContactType.pagerEmail.toString()); }
/** * Get a mobile phone number * * @param userID * the user ID of the user to return * @return String the mobile phone number * @throws java.io.IOException if any. */ public String getMobilePhone(final String userID) throws IOException { return getContactInfo(userID, ContactType.mobilePhone.toString()); }
/** * Get a work phone number * * @param userID * the user ID of the user to return * @return String the work phone number * @throws java.io.IOException if any. */ public String getWorkPhone(final String userID) throws IOException { return getContactInfo(userID, ContactType.workPhone.toString()); }
/** * Get a Text Page Service Provider * * @return String the text page service provider. * @param user a {@link org.opennms.netmgt.config.users.User} object. * @throws java.io.IOException if any. */ public String getTextPage(final User user) throws IOException { return getContactServiceProvider(user, ContactType.textPage.toString()); }
/** * Get a numeric service provider * * @return String the service provider * @param user a {@link org.opennms.netmgt.config.users.User} object. * @throws java.io.IOException if any. */ public String getNumericPage(final User user) throws IOException { return getContactServiceProvider(user, ContactType.numericPage.toString()); }
/** * Get a user's microblog username by username * * @param name * the username of the user whose microblog username should be returned * @return the microblog username of the specified user * @throws java.io.IOException if any. * @throws java.io.FileNotFoundException if any. */ public String getMicroblogName(final String name) throws FileNotFoundException, IOException { return getContactInfo(name, ContactType.microblog.toString()); }
/** * Get a home phone number * * @param userID * the user ID of the user to return * @return String the home phone number * @throws java.io.IOException if any. */ public String getHomePhone(final String userID) throws IOException { return getContactInfo(userID, ContactType.homePhone.toString()); }
/** * Get a numeric pin * * @return String the numeric pin * @param user a {@link org.opennms.netmgt.config.users.User} object. * @throws java.io.IOException if any. */ public String getNumericPin(final User user) throws IOException { return getContactInfo(user, ContactType.numericPage.toString()); }
/** * Get a user's microblog username by User * * @param user * the user object of the user whose microblog username should be returned * @return the microblog username of the specified user * @throws java.io.IOException if any. * @throws java.io.FileNotFoundException if any. */ public String getMicroblogName(final User user) throws FileNotFoundException, IOException { return getContactInfo(user, ContactType.microblog.toString()); }
/** * Get a work phone number * * @return String the work phone number * @throws java.io.IOException if any. * @param user a {@link org.opennms.netmgt.config.users.User} object. */ public String getWorkPhone(final User user) throws IOException { return getContactInfo(user, ContactType.workPhone.toString()); }
/** * Get a numeric service provider * * @param userID * the user ID of the user to return * @return String the service provider * @throws java.io.IOException if any. */ public String getNumericPage(final String userID) throws IOException { return getContactServiceProvider(userID, ContactType.numericPage.toString()); }
/** * Get a email by user * * @param user the user to find the email for * @return String the email specified by name * @throws java.io.IOException if any. */ public String getEmail(final User user) throws IOException { return getContactInfo(user, ContactType.email.toString()); }