Package no.ugland.utransprod.service

Examples of no.ugland.utransprod.service.ConstructionTypeManager


  private void setArticles(

  final Set<OrderLine> orderLines,
      final Set<ConstructionTypeArticle> articles, final Order order,
      final Deviation deviation) {
    ConstructionTypeManager constructionTypeManager = (ConstructionTypeManager) ModelUtil
        .getBean("constructionTypeManager");

    if (articles.size() != 0) {
      for (ConstructionTypeArticle article : articles) {
        createAndAddOrderLine(orderLines, constructionTypeManager,
View Full Code Here


  }

  private void setOrderLineConstructionRefs(
      ConstructionTypeArticle constructionArticle,
      OrderLine orderLineMain, Order order, Deviation deviation) {
    ConstructionTypeManager constructionTypeManager = (ConstructionTypeManager) ModelUtil
        .getBean("constructionTypeManager");
    constructionTypeManager
        .lazyLoadArticle(
            constructionArticle,
            new LazyLoadConstructionTypeArticleEnum[] { LazyLoadConstructionTypeArticleEnum.CONSTRUCTION_TYPE_ARTICLES });
    Set<ConstructionTypeArticle> articleRefs = constructionArticle
        .getConstructionTypeArticles();
    OrderLine orderLine;
    Set<OrderLineAttribute> orderLineAttributes;
    Set<OrderLine> orderLineRefs = new LinkedHashSet<OrderLine>();
    if (articleRefs != null) {
      for (ConstructionTypeArticle articleRef : articleRefs) {
        orderLine = OrderLine.getInstance(order, articleRef,
            orderLineMain, articleRef.getNumberOfItems(),
            articleRef.getDialogOrder(), deviation);

        constructionTypeManager
            .lazyLoadArticle(
                articleRef,
                new LazyLoadConstructionTypeArticleEnum[] { LazyLoadConstructionTypeArticleEnum.ATTRIBUTES });
        Set<ConstructionTypeArticleAttribute> attributes = articleRef
            .getAttributes();
View Full Code Here

  public static void setUpOrder() throws Exception {
    FailOnThreadViolationRepaintManager.install();
    orderManager = (OrderManager) ModelUtil.getBean("orderManager");
    CustomerManager customerManager = (CustomerManager) ModelUtil
        .getBean("customerManager");
    ConstructionTypeManager constructionTypeManager = (ConstructionTypeManager) ModelUtil
        .getBean(ConstructionTypeManager.MANAGER_NAME);
    final ProductAreaManager productAreaManager = (ProductAreaManager) ModelUtil
        .getBean(ProductAreaManager.MANAGER_NAME);

    order = new Order();
    Set<OrderLine> orderLines = new HashSet<OrderLine>();
    OrderLine orderLine = new OrderLine();
    orderLine.setOrder(order);
    orderLine.setArticlePath("articlePath");
    orderLines.add(orderLine);
    order.setOrderLines(orderLines);
    order.setOrderNr("123456789");
    order.setDeliveryAddress("deliveryAddress");
    order.setPostalCode("1234");
    order.setPostOffice("postOffice");
    order.setOrderDate(Calendar.getInstance().getTime());
    Customer customer = customerManager.findByCustomerNr(1);
    order.setCustomer(customer);
    ConstructionType constructionType = constructionTypeManager
        .findByName("A1");
    order.setConstructionType(constructionType);
    productArea = productAreaManager.findByName("Garasje villa");
    order.setProductArea(productArea);
    orderManager.saveOrder(order);
View Full Code Here

  public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    final UserType userType = new UserType();
    userType.setIsAdmin(1);
    when(login.getUserType()).thenReturn(userType);
    ConstructionTypeManager constructionTypeManager = (ConstructionTypeManager) ModelUtil
        .getBean(ConstructionTypeManager.MANAGER_NAME);
    when(managerRepository.getConstructionTypeManager()).thenReturn(
        constructionTypeManager);
    ArticleTypeManager articleTypeManager = (ArticleTypeManager) ModelUtil
        .getBean(ArticleTypeManager.MANAGER_NAME);
View Full Code Here

  }

  @After
  public void tearDown() throws Exception {
    ConstructionTypeManager constructionTypeManager = (ConstructionTypeManager) ModelUtil
        .getBean("constructionTypeManager");
    ConstructionType constructionType = constructionTypeManager
        .findByName("test");
    if (constructionType != null) {
      constructionTypeManager.removeConstructionType(constructionType);
    }
    dialogFixture.cleanUp();
  }
View Full Code Here

TOP

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

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.