Package no.ugland.utransprod.model

Examples of no.ugland.utransprod.model.UserType


    when(managerRepository.getProductAreaGroupManager()).thenReturn(
        productAreaGroupManager);
    OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    when(managerRepository.getOrderManager()).thenReturn(orderManager);
    UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);
    OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
        .getBean(OrderLineManager.MANAGER_NAME);
    when(managerRepository.getOrderLineManager()).thenReturn(
        orderLineManager);
    ArticleTypeManager articleTypeManager = (ArticleTypeManager) ModelUtil
        .getBean(ArticleTypeManager.MANAGER_NAME);
    when(managerRepository.getArticleTypeManager()).thenReturn(
        articleTypeManager);
    FrontProductionVManager frontProductionVManager = (FrontProductionVManager) ModelUtil
        .getBean(FrontProductionVManager.MANAGER_NAME);
    when(managerRepository.getFrontProductionVManager()).thenReturn(
        frontProductionVManager);
    ProductionUnitManager productionUnitManager = (ProductionUnitManager) ModelUtil
        .getBean(ProductionUnitManager.MANAGER_NAME);
    when(managerRepository.getProductionUnitManager()).thenReturn(
        productionUnitManager);
    ColliManager colliManager = (ColliManager) ModelUtil
        .getBean(ColliManager.MANAGER_NAME);
    when(managerRepository.getColliManager()).thenReturn(colliManager);
    TakstolProductionVManager takstolProductionVManager = (TakstolProductionVManager) ModelUtil
        .getBean(TakstolProductionVManager.MANAGER_NAME);
    when(managerRepository.getTakstolProductionVManager()).thenReturn(
        takstolProductionVManager);
    TakstolPackageVManager takstolPackageVManager=(TakstolPackageVManager)ModelUtil.getBean(TakstolPackageVManager.MANAGER_NAME);
    when(managerRepository.getTakstolPackageVManager()).thenReturn(
        takstolPackageVManager);
    // vismaFileCreator =context.mock(VismaFileCreator.class);
    // managerRepository = context.mock(ManagerRepository.class);
    // deviationViewHandlerFactory = context
    // .mock(DeviationViewHandlerFactory.class);
    // login = context.mock(Login.class);
    // final PreventiveActionManager preventiveActionManager =
    // (PreventiveActionManager) ModelUtil
    // .getBean(PreventiveActionManager.MANAGER_NAME);

    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);

    // final JobFunctionManager jobFunctionManager = (JobFunctionManager)
    // ModelUtil
    // .getBean(JobFunctionManager.MANAGER_NAME);
View Full Code Here


    final OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
   
    when(managerRepository.getOrderManager()).thenReturn(orderManager);

    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);

    final ColliManager colliManager = (ColliManager) ModelUtil
        .getBean(ColliManager.MANAGER_NAME);
View Full Code Here

  private Login login;

  @Before
  public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);
    final CustomerManager customerManager = (CustomerManager) ModelUtil
        .getBean(CustomerManager.MANAGER_NAME);

    viewHandler = new CustomersViewHandler(login, customerManager);
View Full Code Here

  @Before
  public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    costTypeManager = (CostTypeManager) ModelUtil
        .getBean("costTypeManager");
    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 CostTypeViewHandler(login, costTypeManager);

  }
View Full Code Here

  public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean("applicationUserManager");

    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 ApplicationUserViewHandler(login,
        applicationUserManager);
  }
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  @Override
  public UserTypeModel getBufferedObjectModel(
      PresentationModel presentationModel) {
    UserTypeModel model = new UserTypeModel(new UserType());
    model.setDescription((String) presentationModel
        .getBufferedValue(PROPERTY_DESCRIPTION));
    model.setStartupWindow((String) presentationModel
        .getBufferedValue(PROPERTY_STARTUP_WINDOW));
    model.setUserTypeAccessList((List<UserTypeAccess>) presentationModel
View Full Code Here

    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

    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

    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

        .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

TOP

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

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.