...
Code Block |
---|
/** * Searches for a single {@link IPersonIPersonAttributes} using the specified uid (userName).<br> * * This method returns according to the following rules:<br> * <ul> * <li>If the user exists and has attributes a populated {@link IPersonIPersonAttributes} is returned.</li> * <li>If the user exists and has no attributes an {@link IPersonIPersonAttributes} with an empty attributes Map is returned.</li> * <li>If the user doesn't exist <code>null</code> is returned.</li> * <li>If an error occurs while find the person an appropriate exception will be thrown.</li> * </ul> * * @param uid The userName of the person to find. * @return The populated {@link IPersonIPersonAttributes} for the specified uid, null if no person could be found for the uid. * @throws IllegalArgumentException If <code>uid</code> is <code>null.</code> */ public IPersonIPersonAttributes getPerson(String uid); /** * Searches for {@link IPersonIPersonAttributes}s that match the set of attributes provided in the query {@link Map}. Each * implementation is free to define what qualifies as a 'match' is on its own. The provided query Map contains * String attribute names and single values which may be null. * <br> * If the implementation can not execute its query for an expected reason such as not enough information in the * query {@link Map} null should be returned. For unexpected problems throw an exception. * * @param query A {@link Map} of name/value pair attributes to use in searching for {@link IPersonIPersonAttributes}s * @return A {@link Set} of {@link IPersonIPersonAttributes}s that match the query {@link Map}. If no matches are found an empty {@link Set} is returned. If the query could not be run null is returned. * @throws IllegalArgumentException If <code>query</code> is <code>null.</code> */ public Set<IPerson>Set<IPersonAttributes> getPeople(Map<String, Object> query); /** * Searches for {@link IPersonIPersonAttributes}s that match the set of attributes provided in the query {@link Map}. Each * implementation is free to define what qualifies as a 'match' is on its own. The provided query Map contains * String attribute names and single values which may be null. * <br> * If the implementation can not execute its query for an expected reason such as not enough information in the * query {@link Map} null should be returned. For unexpected problems throw an exception. * * @param query A {@link Map} of name/value pair attributes to use in searching for {@link IPersonIPersonAttributes}s * @return A {@link Set} of {@link IPersonIPersonAttributes}s that match the query {@link Map}. If no matches are found an empty {@link Set} is returned. If the query could not be run null is returned. * @throws IllegalArgumentException If <code>query</code> is <code>null.</code> */ public Set<IPerson>Set<IPersonAttributes> getPeopleWithMultivaluedAttributes(Map<String, List<Object>> query); |
Notice they all return an IPerson IPersonAttributes or a Set of IPersonsIPersonAttributess. To allow for more manageable return signatures of the methods. An IPerson IPersonAttributes represents an immutable set of user attributes with an associated user name. It implements the Java Principal interface for added compatibility and is Serializable.
...