Package no.ugland.utransprod.service

Examples of no.ugland.utransprod.service.ArticleTypeManager


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


        .getBean(ColliManager.MANAGER_NAME);
    when(managerRepository.getColliManager()).thenReturn(colliManager);
    final ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean(ApplicationUserManager.MANAGER_NAME);
    when(managerRepository.getApplicationUserManager()).thenReturn(applicationUserManager);
    final ArticleTypeManager articleTypeManager = (ArticleTypeManager) ModelUtil
        .getBean(ArticleTypeManager.MANAGER_NAME);
    when(managerRepository.getArticleTypeManager()).thenReturn(articleTypeManager);
    final OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
        .getBean(OrderLineManager.MANAGER_NAME);
    when(managerRepository.getOrderLineManager()).thenReturn(orderLineManager);
View Full Code Here

        deviationStatusManager);
    ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean(ApplicationUserManager.MANAGER_NAME);
    when(managerRepository.getApplicationUserManager()).thenReturn(
        applicationUserManager);
    ArticleTypeManager articleTypeManager = (ArticleTypeManager) ModelUtil
        .getBean(ArticleTypeManager.MANAGER_NAME);
    when(managerRepository.getArticleTypeManager()).thenReturn(
        articleTypeManager);
    ProductAreaGroupManager productAreaGroupManager = (ProductAreaGroupManager) ModelUtil
        .getBean(ProductAreaGroupManager.MANAGER_NAME);
    when(managerRepository.getProductAreaGroupManager()).thenReturn(
        productAreaGroupManager);
    BudgetManager budgetManager = (BudgetManager) ModelUtil
        .getBean(BudgetManager.MANAGER_NAME);
    when(managerRepository.getBudgetManager()).thenReturn(budgetManager);
    OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    when(managerRepository.getOrderManager()).thenReturn(orderManager);
    ProductionUnitManager productionUnitManager = (ProductionUnitManager) ModelUtil
        .getBean(ProductionUnitManager.MANAGER_NAME);
    when(managerRepository.getProductionUnitManager()).thenReturn(
        productionUnitManager);
    TakstolPackageVManager takstolPackageVManager = (TakstolPackageVManager) ModelUtil
        .getBean(TakstolPackageVManager.MANAGER_NAME);
    when(managerRepository.getTakstolPackageVManager()).thenReturn(
        takstolPackageVManager);
    TakstolProductionVManager takstolProductionVManager = (TakstolProductionVManager) ModelUtil
        .getBean(TakstolProductionVManager.MANAGER_NAME);
    when(managerRepository.getTakstolProductionVManager()).thenReturn(
        takstolProductionVManager);
    PacklistVManager packlistVManager = (PacklistVManager) ModelUtil
        .getBean(PacklistVManager.MANAGER_NAME);
    when(managerRepository.getPacklistVManager()).thenReturn(
        packlistVManager);
    SupplierManager supplierManager = (SupplierManager) ModelUtil
        .getBean(SupplierManager.MANAGER_NAME);
    when(managerRepository.getSupplierManager())
        .thenReturn(supplierManager);
    DeviationManager deviationManager = (DeviationManager) ModelUtil
        .getBean(DeviationManager.MANAGER_NAME);
    when(managerRepository.getDeviationManager()).thenReturn(
        deviationManager);
    FrontProductionVManager frontProductionVManager = (FrontProductionVManager) ModelUtil
        .getBean(FrontProductionVManager.MANAGER_NAME);
    when(managerRepository.getFrontProductionVManager()).thenReturn(
        frontProductionVManager);
    OrderLineManager orderLineManager = (OrderLineManager) ModelUtil
        .getBean(OrderLineManager.MANAGER_NAME);
    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();
    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);
    when(orderViewHandlerFactory.create(true)).thenReturn(orderViewHandler);


    final ShowTakstolInfoActionFactory showTakstolInfoActionFactory = new ShowTakstolInfoActionFactory() {

      public ShowTakstolInfoAction create(
          OrderNrProvider aProduceableProvider, WindowInterface window) {
        return null;
      }
    };


    OrdchgrHeadVManager ordchgrHeadVManager = (OrdchgrHeadVManager) ModelUtil
        .getBean(OrdchgrHeadVManager.MANAGER_NAME);
    VismaFileCreator vismaFileCreator = new VismaFileCreatorImpl(
        ordchgrHeadVManager, false);
    final SetProductionUnitActionFactory setProductionUnitActionFactory = new SetProductionUnitActionFactory() {

      public SetProductionUnitAction create(ArticleType aArticleType,
          ProduceableProvider aProduceableProvider,
          WindowInterface aWindow) {
        return new SetProductionUnitAction(managerRepository,
            aArticleType, aProduceableProvider, aWindow);
      }
    };
    ArticleType articleTypeTakstol = articleTypeManager
        .findByName("Takstoler");
    final ArticlePackageViewHandlerFactory articlePackageViewHandlerFactory=new ArticlePackageViewHandlerFactory() {
     
      public ArticlePackageViewHandler create(ArticleType articleType,
          String defaultColliName) {
View Full Code Here

        return null;
    }

    private void initTakstolArticleType() throws ProTransException{
        if (takstolArticleType == ArticleType.UNKNOWN) {
            ArticleTypeManager articleTypeManager = (ArticleTypeManager) ModelUtil
                    .getBean(ArticleTypeManager.MANAGER_NAME);
            takstolArticleType = articleTypeManager.findByName(Util.getTakstolArticleName());
            if (takstolArticleType.getProdCatNo() == null) {
                throw new ProTransException("Takstolartikkel har ikke produktkategori satt");
            }
        }
    }
View Full Code Here

   */
  @Override
  public AbstractProductionPackageViewHandler<Produceable> getViewHandler() {
    VeggProductionVManager veggProductionVManager = (VeggProductionVManager) ModelUtil
        .getBean("veggProductionVManager");
        ArticleTypeManager articleTypeManager=(ArticleTypeManager)ModelUtil.getBean("articleTypeManager");
        ArticleType articleType = articleTypeManager.findByName(ApplicationParamUtil.findParamByName(getParamArticleName()));
    return new VeggProductionViewHandler(
        new ProductionApplyList(
            login,veggProductionVManager, null, "Vegg", null,managerRepository), "Veggproduksjon",
        login,articleType,managerRepository,
        deviationViewHandlerFactory,setProductionUnitActionFactory);
View Full Code Here

    final OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    when(managerRepository.getOrderManager()).thenReturn(orderManager);
    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");
View Full Code Here

            .getBean(OrdchgrHeadVManager.MANAGER_NAME));
    bind(String.class).annotatedWith(Names.named("takstol_article"))
        .toInstance(
            ApplicationParamUtil
                .findParamByName("takstol_artikkel"));
    ArticleTypeManager articleTypeManager = (ArticleTypeManager) ModelUtil
        .getBean(ArticleTypeManager.MANAGER_NAME);
    bind(ArticleType.class).annotatedWith(Names.named("takstolArticle"))
        .toInstance(
            articleTypeManager.findByName(ApplicationParamUtil
                .findParamByName("takstol_artikkel")));
    bind(ArticleTypeManager.class).toInstance(
        (ArticleTypeManager) ModelUtil
            .getBean(ArticleTypeManager.MANAGER_NAME));
    bind(TakstolProductionVManager.class).toInstance(
        (TakstolProductionVManager) ModelUtil
            .getBean(TakstolProductionVManager.MANAGER_NAME));
    bind(String.class).annotatedWith(Names.named("takstolColliName"))
        .toInstance("Takstol");
    bind(Login.class).to(LoginImpl.class);
    bind(ColliManager.class).toInstance(
        (ColliManager) ModelUtil.getBean(ColliManager.MANAGER_NAME));
    bind(OrderLineManager.class).toInstance(
        (OrderLineManager) ModelUtil
            .getBean(OrderLineManager.MANAGER_NAME));
    bind(AttributeChoiceManager.class).toInstance(
        (AttributeChoiceManager) ModelUtil
            .getBean(AttributeChoiceManager.MANAGER_NAME));
    bind(AttributeManager.class).toInstance(
        (AttributeManager) ModelUtil
            .getBean(AttributeManager.MANAGER_NAME));
    bind(ConstructionTypeManager.class).toInstance(
        (ConstructionTypeManager) ModelUtil
            .getBean(ConstructionTypeManager.MANAGER_NAME));
    bind(CustomerManager.class).toInstance(
        (CustomerManager) ModelUtil
            .getBean(CustomerManager.MANAGER_NAME));
    bind(DeviationManager.class).toInstance(
        (DeviationManager) ModelUtil
            .getBean(DeviationManager.MANAGER_NAME));
    bind(ExternalOrderLineManager.class).toInstance(
        (ExternalOrderLineManager) ModelUtil
            .getBean(ExternalOrderLineManager.MANAGER_NAME));
    bind(String.class).annotatedWith(Names.named("gulvspon_article"))
        .toInstance(
            ApplicationParamUtil
                .findParamByName("gulvspon_artikkel"));
    bind(AccidentManager.class).toInstance(
        (AccidentManager) ModelUtil
            .getBean(AccidentManager.MANAGER_NAME));
    bind(ApplicationParamManager.class).toInstance(
        (ApplicationParamManager) ModelUtil
            .getBean(ApplicationParamManager.MANAGER_NAME));
    bind(UserTypeManager.class).toInstance(
        (UserTypeManager) ModelUtil
            .getBean(UserTypeManager.MANAGER_NAME));
    bind(TransportManager.class).toInstance(
        (TransportManager) ModelUtil
            .getBean(TransportManager.MANAGER_NAME));
    bind(TransportCostBasisManager.class).toInstance(
        (TransportCostBasisManager) ModelUtil
            .getBean(TransportCostBasisManager.MANAGER_NAME));
    bind(TaksteinSkarpnesVManager.class).toInstance(
        (TaksteinSkarpnesVManager) ModelUtil
            .getBean(TaksteinSkarpnesVManager.MANAGER_NAME));
    bind(SupplierManager.class).toInstance(
        (SupplierManager) ModelUtil
            .getBean(SupplierManager.MANAGER_NAME));
    bind(ProductionUnitManager.class).toInstance(
        (ProductionUnitManager) ModelUtil
            .getBean(ProductionUnitManager.MANAGER_NAME));
    bind(BudgetManager.class).toInstance(
        (BudgetManager) ModelUtil.getBean(BudgetManager.MANAGER_NAME));
    bind(ProcentDoneManager.class).toInstance(
        (ProcentDoneManager) ModelUtil
            .getBean(ProcentDoneManager.MANAGER_NAME));
    bind(PreventiveActionManager.class).toInstance(
        (PreventiveActionManager) ModelUtil
            .getBean(PreventiveActionManager.MANAGER_NAME));
    bind(SupplierTypeManager.class).toInstance(
        (SupplierTypeManager) ModelUtil
            .getBean(SupplierTypeManager.MANAGER_NAME));
    bind(PaidVManager.class).toInstance(
        (PaidVManager) ModelUtil.getBean(PaidVManager.MANAGER_NAME));
    bind(OrderManager.class).toInstance(
        (OrderManager) ModelUtil.getBean(OrderManager.MANAGER_NAME));
    bind(JobFunctionManager.class).toInstance(
        (JobFunctionManager) ModelUtil
            .getBean(JobFunctionManager.MANAGER_NAME));
    bind(InfoManager.class).toInstance(
        (InfoManager) ModelUtil.getBean(InfoManager.MANAGER_NAME));
    bind(IncomingOrderManager.class).toInstance(
        (IncomingOrderManager) ModelUtil
            .getBean(IncomingOrderManager.MANAGER_NAME));
    bind(FunctionCategoryManager.class).toInstance(
        (FunctionCategoryManager) ModelUtil
            .getBean(FunctionCategoryManager.MANAGER_NAME));
    bind(ExternalOrderManager.class).toInstance(
        (ExternalOrderManager) ModelUtil
            .getBean(ExternalOrderManager.MANAGER_NAME));
    bind(EmployeeTypeManager.class).toInstance(
        (EmployeeTypeManager) ModelUtil
            .getBean(EmployeeTypeManager.MANAGER_NAME));
    bind(EmployeeManager.class).toInstance(
        (EmployeeManager) ModelUtil
            .getBean(EmployeeManager.MANAGER_NAME));
    bind(DeviationStatusManager.class).toInstance(
        (DeviationStatusManager) ModelUtil
            .getBean(DeviationStatusManager.MANAGER_NAME));
    bind(CostUnitManager.class).toInstance(
        (CostUnitManager) ModelUtil
            .getBean(CostUnitManager.MANAGER_NAME));
    bind(CostTypeManager.class).toInstance(
        (CostTypeManager) ModelUtil
            .getBean(CostTypeManager.MANAGER_NAME));
    bind(ApplicationUserManager.class).toInstance(
        (ApplicationUserManager) ModelUtil
            .getBean(ApplicationUserManager.MANAGER_NAME));
    bind(AssemblyManager.class).toInstance(
        (AssemblyManager) ModelUtil
            .getBean(AssemblyManager.MANAGER_NAME));
    bind(FaktureringVManager.class).toInstance(
        (FaktureringVManager) ModelUtil
            .getBean(FaktureringVManager.MANAGER_NAME));
    bind(GulvsponPackageVManager.class).toInstance(
        (GulvsponPackageVManager) ModelUtil
            .getBean(GulvsponPackageVManager.MANAGER_NAME));
    bind(PacklistVManager.class).toInstance(
        (PacklistVManager) ModelUtil
            .getBean(PacklistVManager.MANAGER_NAME));
    bind(TakstolInfoVManager.class).toInstance(
        (TakstolInfoVManager) ModelUtil
            .getBean(TakstolInfoVManager.MANAGER_NAME));
    bind(ShowTakstolInfoActionFactory.class).toProvider(
        FactoryProvider.newFactory(ShowTakstolInfoActionFactory.class,
            ShowTakstolInfoAction.class));
    bind(OrdlnManager.class).toInstance(
        (OrdlnManager) ModelUtil.getBean(OrdlnManager.MANAGER_NAME));

    bind(SetProductionUnitActionFactory.class).toProvider(
        FactoryProvider.newFactory(
            SetProductionUnitActionFactory.class,
            SetProductionUnitAction.class));

    bind(ArticlePackageViewFactory.class).toProvider(
        FactoryProvider.newFactory(ArticlePackageViewFactory.class,
            ArticleProductionPackageView.class));

    bind(ArticlePackageViewHandlerFactory.class).toProvider(
        FactoryProvider.newFactory(
            ArticlePackageViewHandlerFactory.class,
            ArticlePackageViewHandler.class));

    bind(ProductAreaManager.class).toInstance(
        (ProductAreaManager) ModelUtil
            .getBean(ProductAreaManager.MANAGER_NAME));

    bind(ArticleType.class).annotatedWith(Names.named("taksteinArticle"))
        .toInstance(
            articleTypeManager.findByName(ApplicationParamUtil
                .findParamByName("stein_artikkel")));

    bind(ArticleTypeAttributeManager.class).toInstance(
        (ArticleTypeAttributeManager) ModelUtil
            .getBean(ArticleTypeAttributeManager.MANAGER_NAME));
View Full Code Here

   * @param articleType
   * @param orderLineMain
   */
  private void setOrderLineRefs(ArticleType articleType,
      OrderLine orderLineMain) {
    ArticleTypeManager articleTypeManager = (ArticleTypeManager) ModelUtil
        .getBean("articleTypeManager");
    articleTypeManager
        .lazyLoad(
            articleType,
            new LazyLoadArticleTypeEnum[] { LazyLoadArticleTypeEnum.ARTICLE_TYPE_ARTICLE_TYPE });
    Set<ArticleTypeArticleType> articleRefs = articleType
        .getArticleTypeArticleTypes();
    OrderLine orderLine;
    Set<OrderLineAttribute> orderLineAttributes;
    Set<OrderLine> orderLineRefs = new HashSet<OrderLine>();
    if (articleRefs != null) {
      for (ArticleTypeArticleType articleRef : articleRefs) {
        orderLine = OrderLine
            .getInstance(
                (Order) presentationModel
                    .getBufferedValue(ICostableModel.PROPERTY_ORDER),
                articleRef.getArticleTypeRef(),
                orderLineMain,
                (Deviation) presentationModel
                    .getBufferedValue(ICostableModel.PROPERTY_DEVIATION));

        ArticleType articleTypeRef = articleRef.getArticleTypeRef();
        articleTypeManager
            .lazyLoad(
                articleTypeRef,
                new LazyLoadArticleTypeEnum[] { LazyLoadArticleTypeEnum.ATTRIBUTE });
        Set<ArticleTypeAttribute> attributes = articleTypeRef
            .getArticleTypeAttributes();
View Full Code Here

        .getBean(PreventiveActionManager.MANAGER_NAME);
    final DeviationManager deviationManager = (DeviationManager) ModelUtil
        .getBean(DeviationManager.MANAGER_NAME);
    final OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    final ArticleTypeManager articleTypeManager = (ArticleTypeManager) ModelUtil
        .getBean(ArticleTypeManager.MANAGER_NAME);
    final DeviationStatusManager deviationStatusManager = (DeviationStatusManager) ModelUtil
        .getBean(DeviationStatusManager.MANAGER_NAME);
    final SupplierManager supplierManager = (SupplierManager) ModelUtil
        .getBean(SupplierManager.MANAGER_NAME);
View Full Code Here

        .getBean(BudgetManager.MANAGER_NAME);
    when(managerRepository.getBudgetManager()).thenReturn(budgetManager);
    OrderManager orderManager = (OrderManager) ModelUtil
        .getBean(OrderManager.MANAGER_NAME);
    when(managerRepository.getOrderManager()).thenReturn(orderManager);
    ArticleTypeManager articleTypeManager = (ArticleTypeManager) ModelUtil
        .getBean(ArticleTypeManager.MANAGER_NAME);
    when(managerRepository.getArticleTypeManager()).thenReturn(
        articleTypeManager);
    SupplierManager supplierManager = (SupplierManager) ModelUtil
        .getBean(SupplierManager.MANAGER_NAME);
View Full Code Here

TOP

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

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.