Package org.olat.core.id

Examples of org.olat.core.id.Identity


                  urlToSend = NotificationHelper.getURLFromBusinessPathString(p, bControlString);
                }
               
                // string[] gets filled into translation key by adding {0...n} to
                // the string
                Identity ident = ManagerFactory.getManager().loadIdentityByKey(Long.valueOf(element.getModifyAuthor()));
                String desc = translator.translate("notifications.entry", new String[] { element.getPageName(), NotificationHelper.getFormatedName(ident)});             
                subListItem = new SubscriptionListItem(desc, urlToSend, modDate, CSS_CLASS_WIKI_PAGE_CHANGED_ICON);
                si.addSubscriptionListItem(subListItem);
              } else {
                //there are no more new pages so we stop here
View Full Code Here


    if ( log_.isDebug() ) {
      log_.debug("onSearchMessage, correlationID=" + correlationID + " , replyTo=" + replyTo + " , searchRequest=" + searchRequest);
    }
    Session session = null;
    try{
      Identity identity = ManagerFactory.getManager().loadIdentityByKey(searchRequest.getIdentityId());
 
      SearchResults searchResults = this.doSearch(searchRequest.getQueryString(), identity, searchRequest.getRoles(), searchRequest
          .isDoHighlighting());
      if (log_.isDebug()) {
        log_.debug("searchResults: " + searchResults.getLength());
View Full Code Here

  protected InstantMessagingClient(String username, String password) {
    this.username = username;
    this.password = password;
    jabberServer = InstantMessagingModule.getAdapter().getConfig().getServername();
   
    Identity ident = ManagerFactory.getManager().findIdentityByName(username);
    ImPreferences prefs = ImPrefsManager.getInstance().loadOrCreatePropertiesFor(ident);
    this.defaultRosterStatus = prefs.getRosterDefaultStatus();
    reconnect(true);
  }
View Full Code Here

  /**
   *
   * @return
   */
  public String getFullName() {
    Identity identity = ManagerFactory.getManager().findIdentityByName(username);
    return identity != null ? identity.getUser().getProperty(UserConstants.FIRSTNAME, null) + " " + identity.getUser().getProperty(UserConstants.LASTNAME, null) : "" ;
  }
View Full Code Here

  /**
   *
   * @return
   */
  public String getEmail() {
    Identity identity = ManagerFactory.getManager().findIdentityByName(username);
    return identity != null ? identity.getUser().getProperty(UserConstants.EMAIL, null): "" ;
  }
View Full Code Here

   * @return The name of the author
   */
  public String getAuthor() {
    String authorName = null;
    if(authorKey > 0) {
      Identity identity = ManagerFactory.getManager().loadIdentityByKey(authorKey, false);
      if (identity != null) {
        User user = identity.getUser();
        if (user == null) {
          authorName = author = identity.getName();         
        } else {
          authorName = author = user.getProperty(UserConstants.FIRSTNAME, null) + " " + user.getProperty(UserConstants.LASTNAME, null);
        }
      }
    }
View Full Code Here

   * @return The name of the modifier
   */
  public String getModifier() {
    String modifierName = null;
    if(modifierKey > 0) {
      Identity identity = ManagerFactory.getManager().loadIdentityByKey(modifierKey, false);
      if (identity != null) {
        User user = identity.getUser();
        if (user == null) {
          modifierName = modifier = identity.getName();         
        } else {
          modifierName = modifier = user.getProperty(UserConstants.FIRSTNAME, null) + " " + user.getProperty(UserConstants.LASTNAME, null);
        }
      }
    }
View Full Code Here

    List<Identity> identities = new ArrayList<Identity>();
    LocalFolderImpl item = new LocalFolderImpl(new File(FilePersister.getFullPathToCourseNodeDirectory(Long.toString(resourceableId), ident)));
    if (VFSManager.exists(item)) {
      Manager secMgr = ManagerFactory.getManager();
      for (VFSItem identityFolder : item.getItems()) {
        Identity identity = secMgr.findIdentityByName(identityFolder.getName());
        if (identity != null) identities.add(identity);
      }
    }
   
    return identities;
View Full Code Here

      throw new AssertException("use constructor with course and coursnode");
    }
    List nodeScores = new ArrayList(identities.size());
   
    for (Iterator iter = identities.iterator(); iter.hasNext();) {
      Identity identity = (Identity) iter.next();
      if (identity != null){
        IdentityEnvironment ienv = new IdentityEnvironment();
        ienv.setIdentity(identity);
        ICourse course = CourseFactory.loadCourse(ores);
        UserCourseEnvironment uce = new UserCourseEnvironmentImpl(ienv, course.getCourseEnvironment());
View Full Code Here

   * @return Identity if authentication was successfull, null otherwise.
   * @deprecated should not be part of the controller
   */
  public static Identity authenticate(String login, String pass) {
    if (pass == null) return null; // do never accept empty passwords
    Identity ident = ManagerFactory.getManager().findIdentityByName(login);
    // check for email instead of username if ident is null
    if (ident == null && LoginModule.allowLoginUsingEmail()) {
      if (MailHelper.isValidEmailAddress(login)){
        ident = UserManager.getInstance().findIdentityByEmail(login);
      }
View Full Code Here

TOP

Related Classes of org.olat.core.id.Identity

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.