Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.ApplicationUser


    // robot = BasicRobot.robotWithNewAwtHierarchy();
    JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
        .getBean(JobFunctionManager.MANAGER_NAME);
    when(managerRepository.getJobFunctionManager()).thenReturn(
        jobFunctionManager);
    ApplicationUser applicationUser = new ApplicationUser();
    ProductArea productArea = new ProductArea();
    ProductAreaGroup productAreaGroup = new ProductAreaGroup();
    productArea.setProductAreaGroup(productAreaGroup);
    applicationUser.setProductArea(productArea);
    applicationUser.setGroupUser("Nei");
    when(login.getApplicationUser()).thenReturn(applicationUser);
    ProductAreaManager productAreaManager = (ProductAreaManager) ModelUtil
        .getBean(ProductAreaManager.MANAGER_NAME);
    when(managerRepository.getProductAreaManager()).thenReturn(
        productAreaManager);
View Full Code Here


    statusChekers.put(veggArticleName, new LagerProductionStatusChecker(
        veggArticleName, attributeName, attributeValue));
    statusChekers.put(frontArticleName, new LagerProductionStatusChecker(
        frontArticleName, attributeName, attributeValue));
    final ApplicationUser applicationUser = new ApplicationUser();
    ProductArea productArea = new ProductArea();
    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);

    MainPackageViewHandler mainPackageViewHandler = new MainPackageViewHandler(
        vismaFileCreator, orderViewHandlerFactory, login,
        managerRepository, deviationViewHandlerFactory, colliSetup,
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public ApplicationUserModel getBufferedObjectModel(
      PresentationModel presentationModel) {
    ApplicationUserModel model = new ApplicationUserModel(
        new ApplicationUser());
    model.setFirstName((String) presentationModel
        .getBufferedValue(PROPERTY_FIRST_NAME));
    model.setGroupUser((String) presentationModel
        .getBufferedValue(PROPERTY_GROUP_USER));
    model.setLastName((String) presentationModel
View Full Code Here

  @Mock
  private Login login;

  @After
  public void tearDown() throws Exception {
    ApplicationUser bruker = new ApplicationUser();
    bruker.setUserName("test");
    List<ApplicationUser> brukere = applicationUserManager
        .findByObject(bruker);
    for (ApplicationUser user : brukere) {
      applicationUserManager.removeObject(user);
    }
View Full Code Here

  }

  @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

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

    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

    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

    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

    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

TOP

Related Classes of no.ugland.utransprod.model.ApplicationUser

Copyright © 2018 www.massapicom. 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.