Examples of UserProfileData


Examples of org.exoplatform.services.organization.impl.UserProfileData

   }

   public void saveUserProfile(UserProfile profile, boolean broadcast) throws Exception
   {
      Session session = service_.openSession();
      UserProfileData upd =
         (UserProfileData)service_.findOne(session, queryFindUserProfileByName, profile.getUserName());
      if (upd == null)
      {
         upd = new UserProfileData();
         upd.setUserProfile(profile);
         if (broadcast)
            preSave(profile, true);
         session = service_.openSession();
         session.save(profile.getUserName(), upd);
         if (broadcast)
            postSave(profile, true);
         session.flush();
      }
      else
      {
         upd.setUserProfile(profile);
         if (broadcast)
            preSave(profile, false);
         session = service_.openSession();
         session.update(upd);
         if (broadcast)
View Full Code Here

Examples of org.exoplatform.services.organization.impl.UserProfileData

   public UserProfile removeUserProfile(String userName, boolean broadcast) throws Exception
   {
      Session session = service_.openSession();
      try
      {
         UserProfileData upd = (UserProfileData)service_.findExactOne(session, queryFindUserProfileByName, userName);
         UserProfile profile = upd.getUserProfile();
         if (broadcast)
            preDelete(profile);
         session = service_.openSession();
         session.delete(upd);
         if (broadcast)
View Full Code Here

Examples of org.exoplatform.services.organization.impl.UserProfileData

      return up;
   }

   public UserProfile findUserProfileByName(String userName, Session session) throws Exception
   {
      UserProfileData upd = (UserProfileData)service_.findOne(session, queryFindUserProfileByName, userName);
      if (upd != null)
      {
         return upd.getUserProfile();
      }
      return null;
   }
View Full Code Here

Examples of org.exoplatform.services.organization.impl.UserProfileData

               catch (NameNotFoundException e)
               {
                  ctx.createSubcontext(profileDN, ldapAttrMapping.profileToAttributes(profile));
                  return;
               }
               UserProfileData upd = new UserProfileData();
               upd.setUserProfile(profile);
               ModificationItem[] mods = new ModificationItem[1];
               mods[0] =
                  new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(
                     ldapAttrMapping.ldapDescriptionAttr, upd.getProfile()));
               ctx.modifyAttributes(profileDN, mods);
            }
            catch (NamingException e)
            {
               ctx = reloadCtx(ctx, err, e);
View Full Code Here

Examples of org.exoplatform.services.organization.impl.UserProfileData

      attrs.put(new ObjectClassAttribute(PROFILE_LDAP_CLASSES));
      // TODO http://jira.exoplatform.org/browse/COR-49
      // Comment: at the time profiles are stored in bd.
      // 27.03.2009
      attrs.put("sn", profile.getUserName());
      UserProfileData upd = new UserProfileData();
      upd.setUserProfile(profile);
      attrs.put(ldapDescriptionAttr, upd.getProfile());
      return attrs;
   }
View Full Code Here

Examples of org.exoplatform.services.organization.impl.UserProfileData

    */
   public final UserProfileData attributesToProfile(Attributes attrs)
   {
      if (attrs == null || attrs.size() == 0)
         return null;
      UserProfileData upd = new UserProfileData();
      upd.setProfile(getAttributeValueAsString(attrs, ldapDescriptionAttr));
      return upd;
   }
View Full Code Here

Examples of org.exoplatform.services.organization.impl.UserProfileData

               catch (NameNotFoundException e)
               {
                  ctx.createSubcontext(profileDN, ldapAttrMapping.profileToAttributes(profile));
                  return;
               }
               UserProfileData upd = new UserProfileData();
               upd.setUserProfile(profile);
               ModificationItem[] mods = new ModificationItem[1];
               mods[0] =
                  new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(
                     ldapAttrMapping.ldapDescriptionAttr, upd.getProfile()));
               ctx.modifyAttributes(profileDN, mods);
            }
            catch (NamingException e)
            {
               if (isConnectionError(e) && err < getMaxConnectionError())
View Full Code Here

Examples of org.exoplatform.services.organization.impl.UserProfileData

      attrs.put(new ObjectClassAttribute(PROFILE_LDAP_CLASSES));
      // TODO http://jira.exoplatform.org/browse/COR-49
      // Comment: at the time profiles are stored in bd.
      // 27.03.2009
      attrs.put("sn", profile.getUserName());
      UserProfileData upd = new UserProfileData();
      upd.setUserProfile(profile);
      attrs.put(ldapDescriptionAttr, upd.getProfile());
      return attrs;
   }
View Full Code Here

Examples of org.exoplatform.services.organization.impl.UserProfileData

    */
   public final UserProfileData attributesToProfile(Attributes attrs)
   {
      if (attrs == null || attrs.size() == 0)
         return null;
      UserProfileData upd = new UserProfileData();
      upd.setProfile(getAttributeValueAsString(attrs, ldapDescriptionAttr));
      return upd;
   }
View Full Code Here

Examples of org.exoplatform.services.organization.impl.UserProfileData

      if (PROFILE_LDAP_CLASSES == null)
         PROFILE_LDAP_CLASSES = profileLDAPClasses.split(",");
      attrs.put(new ObjectClassAttribute(PROFILE_LDAP_CLASSES));

      attrs.put("sn", profile.getUserName());
      UserProfileData upd = new UserProfileData();
      upd.setUserProfile(profile);
      attrs.put(ldapDescriptionAttr, upd.getProfile());
      return attrs;
   }
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.