Examples of SystemUser


Examples of org.infoglue.cms.entities.management.SystemUser

 
        try
        {
          beginTransaction(db);
         
          SystemUser systemUser = SystemUserController.getController().getReadOnlySystemUserWithName(userName, db);
          if(logger.isInfoEnabled())
            t.printElapsedTime("systemUser AAA took:");
          //setDebug(Level.DEBUG, "org.exolab.castor.jdo");
          if(systemUser != null)
          {
            Collection<RoleVO> roleVOList = RoleController.getController().getRoleVOList(userName, db);
              if(logger.isInfoEnabled())
                t.printElapsedTime("getRoleVOList took:");

            Iterator<RoleVO> roleVOListIterator = roleVOList.iterator();
            while(roleVOListIterator.hasNext())
            {
              RoleVO roleVO = roleVOListIterator.next();
              if(logger.isInfoEnabled())
                logger.info("Adding role:" + roleVO.getRoleName());
              InfoGlueRole infoGlueRole = new InfoGlueRole(roleVO.getRoleName(), roleVO.getRoleName(), roleVO.getDescription(), roleVO.getSource(), roleVO.getIsActive(), roleVO.getModifiedDateTime(), this);
              roles.add(infoGlueRole);
            }
               
              Collection<GroupVO> groupVOList = GroupController.getController().getGroupVOList(userName, db);
              if(logger.isInfoEnabled())
                t.printElapsedTime("groupVOList took:");

            Iterator<GroupVO> groupVOListIterator = groupVOList.iterator();
            while(groupVOListIterator.hasNext())
            {
              GroupVO groupVO = groupVOListIterator.next();
              if(logger.isInfoEnabled())
                logger.info("Adding group:" + groupVO.getGroupName());
              InfoGlueGroup infoGlueGroup = new InfoGlueGroup(groupVO.getGroupName(), groupVO.getGroupName(), groupVO.getDescription(), groupVO.getSource(), groupVO.getGroupType(), groupVO.getIsActive(), groupVO.getModifiedDateTime(), this);
              groups.add(infoGlueGroup);
            }
             
            infogluePrincipal = new InfoGluePrincipal(userName, userName, systemUser.getFirstName(), systemUser.getLastName(), systemUser.getEmail(), systemUser.getSource(), systemUser.getIsActive(), systemUser.getModifiedDateTime(), roles, groups, new HashMap(), isAdministrator, this);
          }
          else
          {
              logger.warn("Could not find user with userName '" + userName + "' - fix your template logic.");
              infogluePrincipal = null;
          }
          //setDebug(Level.ERROR, "org.exolab.castor.jdo");
         
          commitTransaction(db);
        }
        catch (Exception e)
        {
          logger.info("An error occurred trying to get SystemUser for " + userName + ":" + e.getMessage());
          rollbackTransaction(db);
          throw new SystemException(e.getMessage());
        }
      }
      else
      {
          SystemUser systemUser = SystemUserController.getController().getReadOnlySystemUserWithName(userName, transactionObject);
          if(logger.isInfoEnabled())
            t.printElapsedTime("systemUser BBB took:");
         
          if(systemUser != null)
          {
            Collection<RoleVO> roleVOList = RoleController.getController().getRoleVOList(userName, transactionObject);
            if(logger.isInfoEnabled())
              t.printElapsedTime("getRoleVOList took:");

          Iterator<RoleVO> roleVOListIterator = roleVOList.iterator();
          while(roleVOListIterator.hasNext())
          {
            RoleVO roleVO = roleVOListIterator.next();
            if(logger.isInfoEnabled())
              logger.info("Adding role:" + roleVO.getRoleName());
            InfoGlueRole infoGlueRole = new InfoGlueRole(roleVO.getRoleName(), roleVO.getRoleName(), roleVO.getDescription(), roleVO.getSource(), roleVO.getIsActive(), roleVO.getModifiedDateTime(), this);
            roles.add(infoGlueRole);
          }
         
            Collection<GroupVO> groupVOList = GroupController.getController().getGroupVOList(userName, transactionObject);
            if(logger.isInfoEnabled())
              t.printElapsedTime("groupVOList took:");

          Iterator<GroupVO> groupVOListIterator = groupVOList.iterator();
          while(groupVOListIterator.hasNext())
          {
            GroupVO groupVO = (GroupVO)groupVOListIterator.next();
            if(logger.isInfoEnabled())
              logger.info("Adding group:" + groupVO.getGroupName());
            InfoGlueGroup infoGlueGroup = new InfoGlueGroup(groupVO.getGroupName(), groupVO.getGroupName(), groupVO.getDescription(), groupVO.getSource(), groupVO.getGroupType(), groupVO.getIsActive(), groupVO.getModifiedDateTime(), this);
            groups.add(infoGlueGroup);
          }
         
          infogluePrincipal = new InfoGluePrincipal(userName, userName, systemUser.getFirstName(), systemUser.getLastName(), systemUser.getEmail(), systemUser.getSource(), systemUser.getIsActive(), systemUser.getModifiedDateTime(), roles, groups, new HashMap(), isAdministrator, this);
          }
        else
        {
            logger.warn("Could not find user with userName '" + userName + "' - fix your template logic.");
            infogluePrincipal = null;
View Full Code Here

Examples of org.infoglue.cms.entities.management.SystemUser

    {
      List systemUsers = SystemUserController.getController().getSystemUserList(transactionObject);
      Iterator systemUserListIterator = systemUsers.iterator();
      while(systemUserListIterator.hasNext())
      {
        SystemUser systemUser = (SystemUser)systemUserListIterator.next();
 
        List<InfoGlueRole> roles = new ArrayList<InfoGlueRole>();
        List<RoleVO> roleVOList = RoleController.getController().getRoleVOList(systemUser.getUserName(), transactionObject);
        for(RoleVO role : roleVOList)
        {
          InfoGlueRole infoGlueRole = new InfoGlueRole(role.getRoleName(), role.getRoleName(), role.getDescription(), role.getSource(), role.getIsActive(), role.getModifiedDateTime(), this);
          roles.add(infoGlueRole);
        }

        List<InfoGlueGroup> groups = new ArrayList<InfoGlueGroup>();
        List<GroupVO> groupVOList = GroupController.getController().getGroupVOList(systemUser.getUserName(), transactionObject);
        for(GroupVO group : groupVOList)
        {
          InfoGlueGroup infoGlueGroup = new InfoGlueGroup(group.getGroupName(), group.getGroupName(), group.getDescription(), group.getSource(), group.getGroupType(), group.getIsActive(), group.getModifiedDateTime(), this);
          groups.add(infoGlueGroup);
        }
       
        InfoGluePrincipal infoGluePrincipal = new InfoGluePrincipal(systemUser.getUserName(), systemUser.getUserName(), systemUser.getFirstName(), systemUser.getLastName(), systemUser.getEmail(), systemUser.getSource(), systemUser.getIsActive(), systemUser.getModifiedDateTime(), roles, groups, new HashMap(), false, this);
       
        users.add(infoGluePrincipal);
      }
    }
   
View Full Code Here

Examples of org.infoglue.cms.entities.management.SystemUser

    {
      List systemUserList = SystemUserController.getController().getFilteredSystemUserList(offset, limit, sortProperty, direction, searchString, transactionObject);
      Iterator systemUserListIterator = systemUserList.iterator();
      while(systemUserListIterator.hasNext())
      {
        SystemUser systemUser = (SystemUser)systemUserListIterator.next();
       
        List<InfoGlueRole> roles = new ArrayList<InfoGlueRole>();
        List<InfoGlueGroup> groups = new ArrayList<InfoGlueGroup>();

        if(populateRolesAndGroups)
        {
          List<RoleVO> roleList = RoleController.getController().getRoleVOList(systemUser.getUserName());
          for(RoleVO role : roleList)
          {
            InfoGlueRole infoGlueRole = new InfoGlueRole(role.getRoleName(), role.getRoleName(), role.getDescription(), role.getSource(), role.getIsActive(), role.getModifiedDateTime(), this);
            roles.add(infoGlueRole);
          }
         
          List<GroupVO> groupList = GroupController.getController().getGroupVOList(systemUser.getUserName(), transactionObject);
          for(GroupVO group : groupList)
          {
            InfoGlueGroup infoGlueGroup = new InfoGlueGroup(group.getGroupName(), group.getGroupName(), group.getDescription(), group.getSource(), group.getGroupType(), group.getIsActive(), group.getModifiedDateTime(), this);
            groups.add(infoGlueGroup);
          }
        }
       
        InfoGluePrincipal infoGluePrincipal = new InfoGluePrincipal(systemUser.getUserName(), systemUser.getUserName(), systemUser.getFirstName(), systemUser.getLastName(), systemUser.getEmail(), systemUser.getSource(), systemUser.getIsActive(), systemUser.getModifiedDateTime(), roles, groups, new HashMap(), false, this);
        users.add(infoGluePrincipal);
      }
    }
   
    return users;
View Full Code Here

Examples of org.srvlnc.common.model.entity.SystemUser

    userNameForSearch = null;
    fullNameForSearch = null;
  }

  public void submitUpdateForm(ActionEvent event) {
    SystemUser systemUser;
    if (idSystemUser != null && idSystemUser.trim().length() > 0) {
      systemUser = userMaintenanceFacade.find(Integer.valueOf(idSystemUser));
    } else {
      systemUser = new SystemUser();
    }
    systemUser.setUserName(userName);
    systemUser.setFullName(fullName);
    if (userPassword != null && userPassword.equals(userPasswordRepeat) ) {
      systemUser.setUserPassword(userPassword);
      userMaintenanceFacade.saveOrUpdate(systemUser);
      setSuccessMessage(messageHandler.getMessage("userMaintenance_updateSuccess"));
    } else {
      userPassword = null;
      userPasswordRepeat = null;
View Full Code Here

Examples of org.srvlnc.common.model.entity.SystemUser

  }
 
  public void retrieveObjectForUpdate(ActionEvent event) {
    try {
      Integer id = Integer.valueOf(getRequestParameter("idSystemUser"));
      SystemUser systemUser = userMaintenanceFacade.find(id);
      if (systemUser != null) {
        idSystemUser = systemUser.getId().toString();
        userName = systemUser.getUserName();
        fullName = systemUser.getFullName();
      } else {
        setErrorMessage(messageHandler.getMessage("userMaintenance_objectNotFound"));
      }
    } catch (Exception ex) {
      setErrorMessage(messageHandler.getMessage("userMaintenance_executionFailure")
View Full Code Here

Examples of org.srvlnc.common.model.entity.SystemUser

  @PersistenceContext(unitName = "srvlncUnit")
  private EntityManager em;

  public SystemUser find(Integer id) {
    Session session = (Session) em.getDelegate();
    SystemUser systemUser = (SystemUser) session
        .createCriteria(SystemUser.class)
        .add(Restrictions.eq("id", id))
        .uniqueResult();
    return systemUser;
  }
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.