Examples of UserType


Examples of no.ugland.utransprod.model.UserType

    when(managerRepository.getOrderManager()).thenReturn(orderManager);
    final OrderViewHandler orderViewHandler = new OrderViewHandler(login,
        managerRepository, deviationOverviewViewFactory,
        deviationViewHandlerFactory, true);
    when(orderViewHandlerFactory.create(true)).thenReturn(orderViewHandler);
    UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);
    YearWeek yearWeek = new YearWeek();

    viewHandler = new SupplierOrderViewHandler(login, managerRepository,
        assemblyReportFactory, deviationViewHandlerFactory,
View Full Code Here

Examples of no.ugland.utransprod.model.UserType

    final OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    when(managerRepository.getOrderManager()).thenReturn(orderManager);
    when(managerRepository.getProductAreaManager()).thenReturn(
        productAreaManager);
    final UserType userType = new UserType();
    userType.setIsAdmin(1);
    Set<UserTypeAccess> userTypeAccesses = new HashSet<UserTypeAccess>();
    UserTypeAccess userTypeAccess = new UserTypeAccess();
    userTypeAccess.setWindowAccess(new WindowAccess(null, "Attributter",
        null));
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);

    viewHandler = new OrderViewHandler(login, managerRepository,
        deviationOverviewViewFactory, deviationViewHandlerFactory,
        false);
  }
View Full Code Here

Examples of no.ugland.utransprod.model.UserType

    MockitoAnnotations.initMocks(this);
    ApplicationParamUtil.setApplicationParamManger(applicationParamManager);
    when(managerRepository.getColliManager()).thenReturn(colliManager);
    when(managerRepository.getOrderLineManager()).thenReturn(
        orderLineManager);
    UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);
    final OrdchgrHeadV ordchgrHeadV = new OrdchgrHeadV();
    when(ordchgrHeadVManager.getHead(1)).thenReturn(ordchgrHeadV);

    final List<Integer> lnNos = new ArrayList<Integer>();
View Full Code Here

Examples of no.ugland.utransprod.model.UserType

        .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.UserType

  @Before
  public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    colliManager = (ColliManager) ModelUtil.getBean("colliManager");
    when(managerRepository.getColliManager()).thenReturn(colliManager);
    UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);

    viewHandler = new ColliViewHandler("Kolli", new Colli(), null, login,
        managerRepository, null);
View Full Code Here

Examples of no.ugland.utransprod.model.UserType

    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();
    userTypeAccess.setWriteAccess(1);
    WindowAccess windowAccess = new WindowAccess();
    windowAccess.setWindowName("Produksjonsenhet");
    userTypeAccess.setWindowAccess(windowAccess);
    userTypeAccesses.add(userTypeAccess);
    userType.setUserTypeAccesses(userTypeAccesses);
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);

    OrderViewHandler orderViewHandler = new OrderViewHandler(login,
        managerRepository, deviationOverviewViewFactory,
        deviationViewHandlerFactory, true);
View Full Code Here

Examples of no.ugland.utransprod.model.UserType

        .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.UserType

        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
View Full Code Here

Examples of no.ugland.utransprod.model.UserType

    /**
     * @see no.ugland.utransprod.gui.handlers.AbstractViewHandler#getNewObject()
     */
    @Override
    public UserType getNewObject() {
        return new UserType();
    }
View Full Code Here

Examples of no.ugland.utransprod.model.UserType

         * @param rowIndex
         * @param columnIndex
         * @return verdi
         */
        public Object getValueAt(int rowIndex, int columnIndex) {
            UserType userType = (UserType) getRow(rowIndex);
            switch (columnIndex) {
            case 0:
                return userType.getDescription();
            case 1:
                return userType.getStartupWindowEnum();
            case 2:
                return Util.convertNumberToBoolean(userType.getIsAdmin());
            default:
                throw new IllegalStateException("Unknown column");
            }

        }
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.