Package no.ugland.utransprod.service

Examples of no.ugland.utransprod.service.JobFunctionManager


  @Before
  protected void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    // robot = BasicRobot.robotWithNewAwtHierarchy();
    JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
        .getBean(JobFunctionManager.MANAGER_NAME);
    when(managerRepository.getJobFunctionManager()).thenReturn(
        jobFunctionManager);
    ApplicationUser applicationUser = new ApplicationUser();
    ProductArea productArea = new ProductArea();
View Full Code Here


    MockitoAnnotations.initMocks(this);
    ProductAreaManager productAreaManager = (ProductAreaManager) ModelUtil
        .getBean(ProductAreaManager.MANAGER_NAME);
    when(managerRepository.getProductAreaManager()).thenReturn(
        productAreaManager);
    JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
        .getBean(JobFunctionManager.MANAGER_NAME);
    when(managerRepository.getJobFunctionManager()).thenReturn(
        jobFunctionManager);
    DeviationStatusManager deviationStatusManager = (DeviationStatusManager) ModelUtil
        .getBean(DeviationStatusManager.MANAGER_NAME);
View Full Code Here

  @Before
  public void beforeClass() {
    MockitoAnnotations.initMocks(this);

    orderManager = (OrderManager) ModelUtil.getBean("orderManager");
    final JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
        .getBean(JobFunctionManager.MANAGER_NAME);
    when(managerRepository.getJobFunctionManager()).thenReturn(jobFunctionManager);
    final ProductAreaManager productAreaManager = (ProductAreaManager) ModelUtil
        .getBean(ProductAreaManager.MANAGER_NAME);
    when(managerRepository.getProductAreaManager()).thenReturn(productAreaManager);
View Full Code Here

  }

  @Before
  public void beforeClass() {
    MockitoAnnotations.initMocks(this);
    JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
        .getBean(JobFunctionManager.MANAGER_NAME);
    when(managerRepository.getJobFunctionManager()).thenReturn(
        jobFunctionManager);
    ProductAreaManager productAreaManager = (ProductAreaManager) ModelUtil
        .getBean(ProductAreaManager.MANAGER_NAME);
View Full Code Here

  public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    PreventiveActionManager preventiveActionManager = (PreventiveActionManager) ModelUtil
        .getBean(PreventiveActionManager.MANAGER_NAME);
    when(managerRepository.getPreventiveActionManager()).thenReturn(preventiveActionManager);
    JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
        .getBean(JobFunctionManager.MANAGER_NAME);
    when(managerRepository.getJobFunctionManager()).thenReturn(jobFunctionManager);
    ProductAreaManager productAreaManager=(ProductAreaManager)ModelUtil.getBean(ProductAreaManager.MANAGER_NAME);
    when(managerRepository.getProductAreaManager()).thenReturn(productAreaManager);
    DeviationStatusManager deviationStatusManager=(DeviationStatusManager)ModelUtil.getBean(DeviationStatusManager.MANAGER_NAME);
View Full Code Here

   * Henter ur funksjonsliste
   *
   * @return funksjonsliste
   */
  public List<JobFunction> getJobFunctionList() {
    JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
        .getBean("jobFunctionManager");
    return jobFunctionManager.findAll();
  }
View Full Code Here

        .getBean("applicationUserManager");
    ApplicationUser user;
    user = applicationUserManager.login("avviktransport", "avviktransport");
    applicationUserManager.lazyLoad(user, new LazyLoadEnum[][] { {
        LazyLoadEnum.USER_ROLES, LazyLoadEnum.NONE } });
    JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
        .getBean("jobFunctionManager");
    if (user == null) {

      UserTypeManager userTypeManager = (UserTypeManager) ModelUtil
          .getBean("userTypeManager");
      JobFunction jobFunction = new JobFunction();
      jobFunction.setJobFunctionName("Transport");
      List<JobFunction> jobFunctions = jobFunctionManager
          .findByObject(jobFunction);
      jobFunction = jobFunctions.get(0);

      user = new ApplicationUser(null, "avviktransport",
          "avviktransport", "avviktransport", "avviktransport", null,
          "Nei", jobFunction, productArea, null);
      applicationUserManager.saveObject(user);

      UserType userType = new UserType();
      userType.setDescription("Avvik");
      List<UserType> userTypes = userTypeManager.findByObject(userType);
      userType = userTypes.get(0);

      Set<UserRole> userRoles = new HashSet<UserRole>();
      UserRole userRole = new UserRole(null, userType, user);
      userRoles.add(userRole);
      user.setUserRoles(userRoles);

      applicationUserManager.saveObject(user);
    }

    JobFunction jobFunction = user.getJobFunction();

    if (!jobFunction.getManager().equals(user)) {
      jobFunction.setManager(user);
      jobFunctionManager.saveObject(jobFunction);
    }

    Login login = new LoginImpl(user, user.getUserRoles().iterator().next()
        .getUserType());
View Full Code Here

    PreventiveActionManager preventiveActionManager = (PreventiveActionManager) ModelUtil
        .getBean(PreventiveActionManager.MANAGER_NAME);
    when(managerRepository.getPreventiveActionManager()).thenReturn(
        preventiveActionManager);
    JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
        .getBean(JobFunctionManager.MANAGER_NAME);
    when(managerRepository.getJobFunctionManager()).thenReturn(
        jobFunctionManager);
    ProductAreaManager productAreaManager = (ProductAreaManager) ModelUtil
        .getBean(ProductAreaManager.MANAGER_NAME);
View Full Code Here

    when(managerRepository.getOrderManager()).thenReturn(orderManager);
    AssemblyOverdueVManager assemblyOverdueVmnager = (AssemblyOverdueVManager) ModelUtil
        .getBean(AssemblyOverdueVManager.MANAGER_NAME);
    when(managerRepository.getAssemblyOverdueVManager()).thenReturn(
        assemblyOverdueVmnager);
    JobFunctionManager jobFunctionManager=(JobFunctionManager)ModelUtil.getBean(JobFunctionManager.MANAGER_NAME);
    when(managerRepository.getJobFunctionManager()).thenReturn(jobFunctionManager);
    UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);
    ApplicationUser applicationUser = new ApplicationUser();
View Full Code Here

  protected DeviationOverviewViewFactory deviationOverviewViewFactory;

  @Override
  protected void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    final JobFunctionManager jobFunctionManager = (JobFunctionManager) ModelUtil
        .getBean(JobFunctionManager.MANAGER_NAME);
    when(managerRepository.getJobFunctionManager()).thenReturn(
        jobFunctionManager);
    TakstolPackageVManager takstolPackageVManager = (TakstolPackageVManager) ModelUtil
        .getBean(TakstolPackageVManager.MANAGER_NAME);
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.service.JobFunctionManager

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.