Examples of IUserProfile


Examples of org.entando.entando.aps.system.services.userprofile.model.IUserProfile

  public String createNew() {
    String profileTypeCode = this.getProfileTypeCode();
    try {
      boolean allowed = false;
      if (profileTypeCode != null) {
        IUserProfile userProfile = (IUserProfile) this.getUserProfileManager().getProfileType(profileTypeCode);
        if (userProfile != null) {
          if (userProfile.getAttributeByRole(SystemConstants.USER_PROFILE_ATTRIBUTE_ROLE_MAIL) == null) {// Verifica che contenga l'attributo della mail
            ApsSystemUtils.getLogger().warn("Registration attempt with profile " + profileTypeCode + " missing email address");
          } else {
            userProfile.disableAttributes(JpUserRegSystemConstants.ATTRIBUTE_DISABLING_CODE_ON_REGISTRATION);
            this.setUserProfile(userProfile);
            this.checkTypeLabels(userProfile);
            allowed = true;
          }
        }
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.model.IUserProfile

   * keeping disabled status until the end of registration process
   */
  @Override
  public String save() {
    try {
      IUserProfile userProfile = this.getUserProfile();
      if (userProfile!=null) {
        userProfile.setId(this.getUsername().trim());
        this._userRegManager.regAccount(userProfile);
        this.setUserProfile(null);
      } else {
        return "expired";
      }
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.model.IUserProfile

*/
public class ListAttributeAction extends com.agiletec.apsadmin.system.entity.attribute.action.list.ListAttributeAction {
 
  @Override
  protected IApsEntity getCurrentApsEntity() {
    IUserProfile userProfile = this.updateUserProfileOnSession();
    return userProfile;
  }
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.model.IUserProfile

  public IUserProfile getUserProfile() {
    return (IUserProfile) this.getRequest().getSession().getAttribute(UserRegistrationAction.SESSION_PARAM_NAME_REQ_PROFILE);
  }
 
  protected IUserProfile updateUserProfileOnSession() {
    IUserProfile userProfile = this.getUserProfile();
    if (null != userProfile) {
      this.getEntityActionHelper().updateEntity(userProfile, this.getRequest());
    }
    return userProfile;
  }
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.model.IUserProfile

    String username = "username_test";
    try {
      this.insertTestProfile(username);
      User user = (User) _userManager.getUser(username);
      assertNotNull(user);
      IUserProfile profile = (IUserProfile) user.getProfile();
      assertNotNull(profile);
      String token_0 = this._testHelper.getTokenFromUsername(username);
      assertNotNull(token_0);
     
      this.initAction("/do/jpuserreg/UserReg", "recoverFromUsername");
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.model.IUserProfile

      _userManager.removeUser(username);
    }
  }
 
  private void insertTestProfile(String username) throws Exception {
    IUserProfile profile = _userProfileManager.getDefaultProfileType();
    profile.setId(username);
    MonoTextAttribute fullnameAttr = (MonoTextAttribute) profile.getAttribute("fullname");
    fullnameAttr.setText("name surname");
    MonoTextAttribute emailAttr = (MonoTextAttribute) profile.getAttribute("email");
    emailAttr.setText(JpUserRegTestHelper.EMAIL);
    DateAttribute dateAttr = (DateAttribute) profile.getAttribute("birthdate");
    dateAttr.setDate(this.getBirthdate(1985, 11, 21));
    MonoTextAttribute languageAttr = (MonoTextAttribute) profile.getAttribute("language");
    languageAttr.setText("en");
    this._regAccountManager.regAccount(profile);
  }
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.model.IUserProfile

  public IContact getContact(String contactKey) throws ApsSystemException {
    Contact contact = null;
    try {
      ContactRecord contactVo = (ContactRecord) this.getAddressBookDAO().loadEntityRecord(contactKey);
      if (contactVo != null) {
        IUserProfile profile = (IUserProfile) this.createEntityFromXml(contactVo.getTypeCode(), contactVo.getXml());
        contact = new Contact(profile);
        contact.setId(contactVo.getId());
        contact.setOwner(contactVo.getOwner());
        contact.setPublicContact(contactVo.isPublicContact());
      }
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.model.IUserProfile

    }
    return idList;
  }
 
  protected EntitySearchFilter[] addOrderFilter(EntitySearchFilter[] filters) {
    IUserProfile prototype = this.getUserProfileManager().getDefaultProfileType();
    if (prototype.getFullNameAttributeName() != null) {
      EntitySearchFilter filterToAdd = new EntitySearchFilter(prototype.getFullNameAttributeName(), true);
      filterToAdd.setOrder(EntitySearchFilter.ASC_ORDER);
      int len = 0;
      if (filters != null) {
        len = filters.length;
      }
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.model.IUserProfile

*/
public class ListAttributeAction extends com.agiletec.apsadmin.system.entity.attribute.action.list.ListAttributeAction {
 
  @Override
  protected IApsEntity getCurrentApsEntity() {
    IUserProfile userProfile = this.updateContactOnSession();
    return userProfile;
  }
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.model.IUserProfile

  public IContact getContact() {
    return (IContact) this.getRequest().getSession().getAttribute(IContactAction.SESSION_PARAM_NAME_CURRENT_CONTACT);
  }
 
  protected IUserProfile updateContactOnSession() {
    IUserProfile userProfile = this.getContact().getContactInfo();
    if (null != userProfile) {
      this.getEntityActionHelper().updateEntity(userProfile, this.getRequest());
    }
    return userProfile;
  }
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.