Package org.jayasoft.woj.common.model

Examples of org.jayasoft.woj.common.model.Principal


   * @param ident id as string
   * @return a Principal object whom Id is ident or null.
   */
  public static Principal getPrincipal(String ident) {
    LOGGER.debug("Resolving principal ident: " + ident);
    Principal result = null;
    // look for ident in User table
    result = (Principal)WOJServer.getInstance().getDataService().getUserDao().getUserById(Long.valueOf(ident));
    if (result == null) {
      // No user known for this ident, look for Group
      result = (Principal)WOJServer.getInstance().getDataService().getGroupDao().getGroup(ident);
View Full Code Here


  private String[] getMailFromIds(Long[] ids) {
    UserDao dao = WOJServer.getInstance().getDataService().getUserDao();
    String[] result = new String[ids.length];
    int j = 0;
    for (int i = 0; i < ids.length; i++) {
      Principal p = DataUtil.getPrincipal(ids[i].toString());
      if (p != null) {
        if (p instanceof User) {
          result[j] = ((User)p).getEmail();
        } else {
          // It a group
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.common.model.Principal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.