Examples of ApplicationUser


Examples of no.ugland.utransprod.model.ApplicationUser

  }

  @Test
  public void testSaveObject() throws Exception {
    ApplicationUser user = new ApplicationUser();
    user.setUserName("test");
    user.setFirstName("test");
    user.setLastName("test");
    user.setPassword("test");
    viewHandler.saveObject(new ApplicationUserModel(user), null);
    assertEquals(1, viewHandler.getObjectSelectionListSize());
  }
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

  /**
   * @param manager
   */
  public void setManager(ApplicationUser manager) {
    ApplicationUser oldManager = getManager();
    object.setManager(manager);
    firePropertyChange(PROPERTY_MANAGER, oldManager, manager);
  }
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

    productionUnitManager = (ProductionUnitManager) ModelUtil
        .getBean("productionUnitManager");

    ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean("applicationUserManager");
    ApplicationUser user;
    user = applicationUserManager.login("admin", "admin");
    applicationUserManager.lazyLoad(user, new LazyLoadEnum[][] { {
        LazyLoadEnum.USER_ROLES, LazyLoadEnum.NONE } });
    UserType userType = user.getUserRoles().iterator().next().getUserType();

    Login login = new LoginImpl(user, userType);

    ProductionUnitViewHandler productionUnitViewHandler = new ProductionUnitViewHandler(
        login, productionUnitManager);
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

    when(managerRepository.getOrderLineManager()).thenReturn(
        orderLineManager);
    ColliManager colliManager=(ColliManager)ModelUtil.getBean(ColliManager.MANAGER_NAME);
    when(managerRepository.getColliManager()).thenReturn(colliManager);

    final ApplicationUser applicationUser = new ApplicationUser();
    ProductArea productArea = new ProductArea();
    ProductAreaGroup productAreaGroup = new ProductAreaGroup();
    productArea.setProductAreaGroup(productAreaGroup);
    applicationUser.setProductArea(productArea);
    applicationUser.setUserName("username");
    when(login.getApplicationUser()).thenReturn(applicationUser);

    final UserType userType = new UserType();
    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

    supplierManager = (SupplierManager) ModelUtil
        .getBean("supplierManager");

    ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean("applicationUserManager");
    ApplicationUser user;
    user = applicationUserManager.login("admin", "admin");
    applicationUserManager.lazyLoad(user, new LazyLoadEnum[][] { {
        LazyLoadEnum.USER_ROLES, LazyLoadEnum.NONE } });
    UserType userType = user.getUserRoles().iterator().next().getUserType();

    Login login = new LoginImpl(user, userType);

    when(managerRepository.getSupplierManager())
        .thenReturn(supplierManager);
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

    when(managerRepository.getPacklistVManager()).thenReturn(
        packlistVManager);
    ArticleTypeManager articleTypeManager=(ArticleTypeManager)ModelUtil.getBean(ArticleTypeManager.MANAGER_NAME);
    when(managerRepository.getArticleTypeManager()).thenReturn(
        articleTypeManager);
    ApplicationUser applicationUser = new ApplicationUser();
    applicationUser.setFirstName("firstName");
    applicationUser.setLastName("lastName");
    when(login.getApplicationUser()).thenReturn(applicationUser);
    UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);

    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWindowAccess(new WindowAccess(null, "Attributter",
        null));
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);
    ProductArea productArea = new ProductArea();
    ProductAreaGroup productAreaGroup = new ProductAreaGroup();
    productArea.setProductAreaGroup(productAreaGroup);
    applicationUser.setProductArea(productArea);
    final PacklistVManager packlistVManager = (PacklistVManager) ModelUtil
        .getBean(PacklistVManager.MANAGER_NAME);

    AbstractProductionPackageViewHandler<PacklistV> productionViewHandler = new PacklistViewHandler(
        login, managerRepository, deviationViewHandlerFactory,
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

    managerRepository = injector.getInstance(ManagerRepository.class);

    ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean("applicationUserManager");
    ApplicationUser user;
    user = applicationUserManager.login("admin", "admin");
    applicationUserManager.lazyLoad(user, new LazyLoadEnum[][] { {
        LazyLoadEnum.USER_ROLES, LazyLoadEnum.NONE } });
    UserType userType = user.getUserRoles().iterator().next().getUserType();

    Login login = new LoginImpl(user, userType);

    AccidentViewHandler accidentViewHandler = new AccidentViewHandler(
        login, managerRepository);
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

    when(managerRepository.getApplicationUserManager()).thenReturn(applicationUserManager);
    final DeviationManager deviationManager = (DeviationManager) ModelUtil
        .getBean(DeviationManager.MANAGER_NAME);
    when(managerRepository.getDeviationManager()).thenReturn(deviationManager);
   
final ApplicationUser applicationUser = new ApplicationUser();
   
    final ProductArea productArea = productAreaManager
        .findByName("Garasje villa");
    ProductAreaGroupManager productAreaGroupManager = (ProductAreaGroupManager) ModelUtil
        .getBean(ProductAreaGroupManager.MANAGER_NAME);
    ProductAreaGroup productAreaGroup = productAreaGroupManager
        .findByName("Garasje");
    productArea.setProductAreaGroup(productAreaGroup);
    applicationUser.setProductArea(productArea);
    applicationUser.setUserName("username");
    applicationUser.setGroupUser("Nei");
    when(login.getApplicationUser()).thenReturn(applicationUser);
    final UserType userType = new UserType();
    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWriteAccess(1);
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

    when(managerRepository.getDeviationStatusManager()).thenReturn(
        deviationStatusManager);
    when(managerRepository.getApplicationUserManager()).thenReturn(
        applicationUserManager);
    when(managerRepository.getOrderManager()).thenReturn(orderManager);
    ApplicationUser applicationUser = new ApplicationUser();
    when(login.getApplicationUser()).thenReturn(applicationUser);
    UserType userType = new UserType();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWindowAccess(new WindowAccess(null, "Attributter",
        null));
View Full Code Here

Examples of no.ugland.utransprod.model.ApplicationUser

    final DeviationManager deviationManager = (DeviationManager) ModelUtil
        .getBean(DeviationManager.MANAGER_NAME);
    when(managerRepository.getDeviationManager()).thenReturn(
        deviationManager);

    final ApplicationUser applicationUser = new ApplicationUser();
    final ProductArea productArea = productAreaManager
        .findByName("Garasje villa");
    ProductAreaGroupManager productAreaGroupManager = (ProductAreaGroupManager) ModelUtil
        .getBean(ProductAreaGroupManager.MANAGER_NAME);
    ProductAreaGroup productAreaGroup = productAreaGroupManager
        .findByName("Garasje");
    productArea.setProductAreaGroup(productAreaGroup);
    applicationUser.setProductArea(productArea);
    applicationUser.setUserName("username");
    applicationUser.setGroupUser("Nei");
    when(login.getApplicationUser()).thenReturn(applicationUser);
    final UserType userType = new UserType();
    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWriteAccess(1);
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.