Examples of IPersonManager


Examples of org.davinci.server.user.IPersonManager

      String name = req.getParameter("searchname");
      String count = req.getParameter("count");
      String startString = req.getParameter("start");
      String type = req.getParameter("type");

      IPersonManager personManager = ServerManager.getServerManager().getPersonManager();

      if("photo".equals(type)){
        responseString = personManager.getPhotoRepositoryPath();
      }else{
        int resultNumber = Integer.parseInt(count);
        int start = Integer.parseInt(startString);
        IPerson[] persons;
        if(usernameTypeaheadEnabled){
          persons = personManager.getPersons(name, resultNumber, start);
        }else{
          persons = new IPerson[0];
        }
        responseString = arrayToJson(persons);
      }
View Full Code Here

Examples of org.davinci.server.user.IPersonManager

 
  public String getUserID() {
    if (name.equals("")) {
      //Try and look it up... this is necessary because reviewer doesn't necessarily have
      //a user name at the time they are invited to a review
      IPersonManager personManager = ServerManager.getServerManager().getPersonManager();
      IPerson person = personManager.getPersonByEmail(email);
      if (person != null) {
        name = person.getUserID();
      }
    }
    return name;
View Full Code Here

Examples of org.davinci.server.user.IPersonManager

    return versions.values().iterator();
  }

  public String getDisplayName() {
    String displayName = this.getEmail();
    IPersonManager personManager = ServerManager.getServerManager().getPersonManager();
    IPerson person = personManager.getPersonByEmail(this.getEmail());
    if (person != null) {
      displayName = person.getDisplayName();
    }
   
View Full Code Here

Examples of org.jasig.portal.security.IPersonManager

            }
           
            return;
        }
       
        final IPersonManager personManager = PersonManagerLocator.getPersonManager();

        // Update the session timeout for an unauthenticated user.
        final IPerson person = personManager.getPerson(writableRequest);
        if (person != null && !person.getSecurityContext().isAuthenticated()) {

            if (unauthenticatedUserSessionTimeout != 0) {
                session.setMaxInactiveInterval(unauthenticatedUserSessionTimeout);
               
View Full Code Here

Examples of org.jasig.portal.security.IPersonManager

        request.setCharacterEncoding("UTF-8");
    } catch (UnsupportedEncodingException uee) {
        log.error("Unable to set UTF-8 character encoding!", uee);
    }

    final IPersonManager personManager = PersonManagerFactory.getPersonManagerInstance();
   
    // Clear out the existing session for the user if they have one
    String targetUid = null;
    String originalUid = null;
    boolean swap = false;
    if (request.isRequestedSessionIdValid()) {
      try {
            HttpSession s = request.getSession(false);
          //Check if this is a swapped user hitting the Login servlet
          originalUid = (String)s.getAttribute(SWAP_ORIGINAL_UID);

          //No original person in session so check for swap request
          if (originalUid == null) {
              targetUid = (String)s.getAttribute(SWAP_TARGET_UID);
              if (targetUid != null) {
                  final IPerson person = personManager.getPerson(request);
                  originalUid = person.getName();
                  swap = true;
              }
          }
          else {
              final IPerson person = personManager.getPerson(request);
              targetUid = person.getName();
          }

            s.invalidate();
      } catch (IllegalStateException ise) {
        // ISE indicates session was already invalidated.
        // This is fine.  This servlet trying to guarantee that the session has been invalidated;
        // it doesn't have to insist that it is the one that invalidated it.
        if (log.isTraceEnabled()) {
          log.trace("LoginServlet attempted to invalidate an already invalid session.", ise);
        }
      }
    }

    //  Create the user's session
    HttpSession s = request.getSession(true);
   
    IPerson person = null;
    try {
        final HashMap principals;
        final HashMap credentials;
       
        // Get the person object associated with the request
        person = personManager.getPerson(request);
       
        //If doing an identity swap
        if (targetUid != null && originalUid != null) {
            if (swap) {
                swapperLog.warn("Swapping identity for '" + originalUid + "' to '" + targetUid + "'");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.