Examples of ItemNotFoundException


Examples of org.apache.empire.exceptions.ItemNotFoundException

        // Find log configuration node
        Element loggingNode = XMLUtil.findFirstChild(rootNode, loggingNodeName);
        if (loggingNode == null)
        {   // log configuration node not found
            log.error("Log configuration node {} has not been found. Logging has not been configured.", loggingNodeName);
            throw new ItemNotFoundException(loggingNodeName);
        }
        // Init Log4J
        DOMConfigurator.configure(loggingNode);
        // done
        log.info("Logging sucessfully configured from node {}.", loggingNodeName);
View Full Code Here

Examples of org.apache.empire.exceptions.ItemNotFoundException

            return;

        // Set action from param
        this.action = PageDefinition.decodeActionParam(actionParam);
        if (this.action==null)
            throw new ItemNotFoundException(actionParam);
    }
View Full Code Here

Examples of org.apache.empire.exceptions.ItemNotFoundException

        // Find log configuration node
        Element loggingNode = XMLUtil.findFirstChild(rootNode, loggingNodeName);
        if (loggingNode == null)
        {   // log configuration node not found
            log.error("Log configuration node {} has not been found. Logging has not been configured.", loggingNodeName);
            throw new ItemNotFoundException(loggingNodeName);
        }
        // Init Log4J
        DOMConfigurator.configure(loggingNode);
        // done
        log.info("Logging sucessfully configured from node {}.", loggingNodeName);
View Full Code Here

Examples of org.apache.empire.exceptions.ItemNotFoundException

          t.setTimestampColumn(c);
      }
          // Check whether all key columns have been set
          for (i=0; i<keys.length; i++)
              if (keys[i]==null){
                throw new ItemNotFoundException(pkCols.get(i));
              }
          if(keys.length > 0){
            t.setPrimaryKey(keys);
          }
    } finally {
View Full Code Here

Examples of org.broadleafcommerce.core.order.service.exception.ItemNotFoundException

   

    @Override
    public void updateItemQuantity(Order order, OrderItem item, boolean priceOrder) throws ItemNotFoundException, PricingException {
        if (!order.getOrderItems().contains(item)) {
            throw new ItemNotFoundException("Order Item (" + item.getId() + ") not found in Order (" + order.getId() + ")");
        }
       
        if (item.getQuantity() == 0) {
            removeItemFromOrder(order, item);
        } else if (item.getQuantity() < 0) {
View Full Code Here

Examples of org.dbpedia.spotlight.exceptions.ItemNotFoundException

    @Override
    public DBpediaResourceOccurrence disambiguate(SurfaceFormOccurrence sfOccurrence) throws SearchException, ItemNotFoundException, InputException {
        List<DBpediaResourceOccurrence> candidates = bestK(sfOccurrence, 1);
        if (candidates.size()==0)
            throw new ItemNotFoundException(sfOccurrence.surfaceForm()+" was not found in the index.");
        return candidates.get(0);
    }
View Full Code Here

Examples of org.openhab.core.items.ItemNotFoundException

    Widget w = mock(Widget.class);
    Item item = mock(Item.class);
    when(w.getLabel()).thenReturn(testLabel);
    when(w.getItem()).thenReturn("Item");
    when(w.eClass()).thenReturn(SitemapFactory.eINSTANCE.createText().eClass());
    when(registry.getItem("Item")).thenThrow(new ItemNotFoundException("Item"));
    when(item.getState()).thenReturn(new StringType("State"));
    String label = uiRegistry.getLabel(w);
    assertEquals("Label [-]", label);
  }
View Full Code Here

Examples of org.sonatype.nexus.proxy.ItemNotFoundException

    catch (ItemNotFoundException e) {
      // if it is thrown by super.doRetrieveItem()
      List<String> transformedPaths = transformShadow2Master(request.getRequestPath());

      if (transformedPaths == null || transformedPaths.isEmpty()) {
        throw new ItemNotFoundException(reasonFor(request, this,
            "Request path %s is not transformable to master.", request.getRequestPath()));
      }

      for (String transformedPath : transformedPaths) {
        // delegate the call to the master
        request.pushRequestPath(transformedPath);
        try {
          result = doRetrieveItemFromMaster(request);

          // try to create link on the fly
          try {
            StorageLinkItem link = createLink(result);

            if (link != null) {
              return link;
            }
            else {
              // fallback to result, but will not happen, see above
              return result;
            }
          }
          catch (Exception e1) {
            // fallback to result, but will not happen, see above
            return result;
          }
        }
        catch (ItemNotFoundException ex) {
          // neglect, we might try another transformed path
        }
        finally {
          request.popRequestPath();
        }
      }

      throw new ItemNotFoundException(request, this);
    }
  }
View Full Code Here

Examples of org.switchyard.quickstarts.demo.multiapp.ItemNotFoundException

    @Override
    public Item lookupItem(String itemId) throws ItemNotFoundException {
        Item item = _inventory.get(itemId);
        if (item == null) {
            throw new ItemNotFoundException("We don't got any " + itemId);
        }

        return item;
    }
View Full Code Here

Examples of org.uispec4j.ItemNotFoundException

        }
      }
      Collections.sort(names);
      String message =
        Messages.computeNotFoundMessage(componentType, name, names);
      throw new ItemNotFoundException(message);
    }
  }
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.