Examples of IUserProfileManager


Examples of org.entando.entando.aps.system.services.userprofile.IUserProfileManager

 
    protected void init() throws Exception {
      try {
        this._newsletterManager = (INewsletterManager) this.getService(JpnewsletterSystemConstants.NEWSLETTER_MANAGER);
        IUserManager userManager = (IUserManager) this.getService(SystemConstants.USER_MANAGER);
        IUserProfileManager profileManager = (IUserProfileManager) this.getService(SystemConstants.USER_PROFILE_MANAGER);
        ConfigInterface configManager = (ConfigInterface) this.getService(SystemConstants.BASE_CONFIG_MANAGER);
        this._helper = new JpnewsletterTestHelper(userManager, profileManager, configManager);
        DataSource dataSource = (DataSource) this.getApplicationContext().getBean("servDataSource");
        this._helper.setDataSource(dataSource);
    } catch (Exception e) {
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.IUserProfileManager

  }
 
    protected void init() throws Exception {
      try {
        IUserManager userManager = (IUserManager) this.getService(SystemConstants.USER_MANAGER);
        IUserProfileManager profileManager = (IUserProfileManager) this.getService(SystemConstants.USER_PROFILE_MANAGER);
        ConfigInterface configManager = (ConfigInterface) this.getService(SystemConstants.BASE_CONFIG_MANAGER);
        this._helper = new JpnewsletterTestHelper(userManager, profileManager, configManager);
        DataSource dataSource = (DataSource) this.getApplicationContext().getBean("servDataSource");
        this._helper.setDataSource(dataSource);
    } catch (Exception e) {
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.IUserProfileManager

 
    protected void init() throws Exception {
      try {
        this._newsletterManager = (INewsletterManager) this.getService(JpnewsletterSystemConstants.NEWSLETTER_MANAGER);
        IUserManager userManager = (IUserManager) this.getService(SystemConstants.USER_MANAGER);
        IUserProfileManager profileManager = (IUserProfileManager) this.getService(SystemConstants.USER_PROFILE_MANAGER);
        ConfigInterface configManager = (ConfigInterface) this.getService(SystemConstants.BASE_CONFIG_MANAGER);
        this._helper = new JpnewsletterTestHelper(userManager, profileManager, configManager);
        DataSource dataSource = (DataSource) this.getApplicationContext().getBean("servDataSource");
        this._helper.setDataSource(dataSource);
    } catch (Exception e) {
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.IUserProfileManager

 
    protected void init() throws Exception {
      try {
        this._newsletterManager = (INewsletterManager) this.getService(JpnewsletterSystemConstants.NEWSLETTER_MANAGER);
        IUserManager userManager = (IUserManager) this.getService(SystemConstants.USER_MANAGER);
        IUserProfileManager profileManager = (IUserProfileManager) this.getService(SystemConstants.USER_PROFILE_MANAGER);
        ConfigInterface configManager = (ConfigInterface) this.getService(SystemConstants.BASE_CONFIG_MANAGER);
        this._helper = new JpnewsletterTestHelper(userManager, profileManager, configManager);
        DataSource dataSource = (DataSource) this.getApplicationContext().getBean("servDataSource");
        this._helper.setDataSource(dataSource);
    } catch (Exception e) {
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.IUserProfileManager

  }
 
    protected void init() throws Exception {
      try {
        IUserManager userManager = (IUserManager) this.getService(SystemConstants.USER_MANAGER);
        IUserProfileManager profileManager = (IUserProfileManager) this.getService(SystemConstants.USER_PROFILE_MANAGER);
        ConfigInterface configManager = (ConfigInterface) this.getService(SystemConstants.BASE_CONFIG_MANAGER);
        this._helper = new JpnewsletterTestHelper(userManager, profileManager, configManager);
        DataSource dataSource = (DataSource) this.getApplicationContext().getBean("servDataSource");
        this._helper.setDataSource(dataSource);
    } catch (Exception e) {
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.IUserProfileManager

  @Override
  public Collection<String> getUsernamesByEmail(String email) throws ApsSystemException {
    try {
      Collection<String> usernames = new HashSet<String>();
      IUserProfileManager profileManager = this.getUserProfileManager();
      Iterator<IApsEntity> prototypes = profileManager.getEntityPrototypes().values().iterator();
      while (prototypes.hasNext()) {
        IApsEntity prototype = prototypes.next();
        AttributeInterface eMailAttr = prototype.getAttributeByRole(SystemConstants.USER_PROFILE_ATTRIBUTE_ROLE_MAIL);
        if (eMailAttr!=null) {
          EntitySearchFilter[] filters = {
              new EntitySearchFilter(IEntityManager.ENTITY_TYPE_CODE_FILTER_KEY, false, prototype.getTypeCode(), false),
              new EntitySearchFilter(eMailAttr.getName(), true, email, false) };
          usernames.addAll(profileManager.searchId(filters));
        }
      }
      return usernames;
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getUsernamesFromEmail");
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.IUserProfileManager

  }

  protected List<UserDetails> findContentOperators() throws ApsSystemException {
    IAuthorizationManager authManager = this.getAuthorizationManager();
    IUserManager userManager = this.getUserManager();
    IUserProfileManager profileManager = this.getProfileManager();
    List<UserDetails> systemUsers = userManager.getUsers();
    List<UserDetails> allowedUsers = new ArrayList<UserDetails>();
    for (UserDetails user : systemUsers){
      user.addAutorities(this.getRoleManager().getAuthorizationsByUser(user));
      if (authManager.isAuthOnPermission(user, Permission.SUPERVISOR) || authManager.isAuthOnPermission(user, "editContents")) {
        try {
          AbstractUser userDetails = (AbstractUser) user;
          IUserProfile profile = profileManager.getProfile(userDetails.getUsername());
          userDetails.setProfile(profile);
        } catch (Throwable t) {
          ApsSystemUtils.logThrowable(t, this, "findContentOperators", "Error searching profile for user " + user.getUsername());
        }
        user.addAutorities(this.getGroupManager().getAuthorizationsByUser(user));
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.IUserProfileManager

    }
  }
 
  protected String getMailAddress(String username) throws Throwable {
    String email = null;
    IUserProfileManager profileManager = (IUserProfileManager) super.getBeanFactory().getBean(SystemConstants.USER_PROFILE_MANAGER);
    IUserProfile profile = profileManager.getProfile(username);
    if (null != profile) {
      ITextAttribute mailAttribute = (ITextAttribute) profile.getAttributeByRole(SystemConstants.USER_PROFILE_ATTRIBUTE_ROLE_MAIL);
      if (null != mailAttribute && mailAttribute.getText().trim().length() > 0) {
        email = mailAttribute.getText();
      }
View Full Code Here

Examples of org.entando.entando.aps.system.services.userprofile.IUserProfileManager

  protected void findContentOperators(List<String> editors, List<String> supervisors) throws ApsSystemException {
    List<Role> rolesWithSupervisor = ((IRoleManager) this.getRoleManager()).getRolesWithPermission(Permission.SUPERVISOR);
    List<String> roleNamesWithSupervisor = this.getRolesNames(rolesWithSupervisor);
    List<Role> rolesWithEditors = ((IRoleManager) this.getRoleManager()).getRolesWithPermission("editContents");
    List<String> roleNamesWithEditor = this.getRolesNames(rolesWithEditors);
    IUserProfileManager profileManager = (IUserProfileManager) super.getBeanFactory().getBean(SystemConstants.USER_PROFILE_MANAGER);
    List<String> usernames = profileManager.searchId(null);
    for (int i = 0; i < usernames.size(); i++) {
      String extractedUsername = usernames.get(i);
      List<IApsAuthority> userRoles = this.getRoleManager().getAuthorizationsByUser(extractedUsername);
      if (null == userRoles) {
        continue;
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.