Examples of Recipe


Examples of org.apache.aries.blueprint.di.Recipe

    private MapRecipe createMapRecipe(MapMetadata mapValue) {
        String keyType = mapValue.getKeyType();
        String valueType = mapValue.getValueType();
        MapRecipe mr = new MapRecipe(getName(null), HashMap.class);
        for (MapEntry entry : mapValue.getEntries()) {
            Recipe key = getValue(entry.getKey(), keyType);
            Recipe val = getValue(entry.getValue(), valueType);
            mr.put(key, val);
        }
        return mr;
    }
View Full Code Here

Examples of org.apache.aries.blueprint.di.Recipe

        container.quiesce();
       
        QuiesceDelegatingCallback qdcbk = new QuiesceDelegatingCallback(callback, bundleToQuiesce);
        for (String name: names)
        {
          Recipe recipe = repository.getRecipe(name);
          if (recipe instanceof ServiceRecipe)
          {
            qdcbk.callCountDown.incrementAndGet();
            ((ServiceRecipe)recipe).quiesce(qdcbk);
          }
View Full Code Here

Examples of org.apache.aries.blueprint.di.Recipe

            if (ref != null && getRecipe(ref) == null) {
                throw new ComponentDefinitionException("Unresolved ref/idref to component: " + ref);
            }
            // Check service
            if (recipe instanceof ServiceRecipe) {
                Recipe r = ((ServiceRecipe) recipe).getServiceRecipe();
                if (r instanceof RefRecipe) {
                    r = getRecipe(((RefRecipe) r).getIdRef());
                }
                if (r instanceof ServiceRecipe) {
                    throw new ComponentDefinitionException("The target for a <service> element must not be <service> element");
View Full Code Here

Examples of org.apache.stanbol.rules.base.api.Recipe

    @Override
    public RecipeList listRecipes() throws NoSuchRecipeException, RecipeConstructionException {
        RecipeList recipeList = new RecipeList();

        for (UriRef recipeID : recipes) {
            Recipe recipe;
            try {
                recipe = getRecipe(recipeID);
            } catch (NoSuchRecipeException e) {
                throw e;
            } catch (RecipeConstructionException e) {
View Full Code Here

Examples of org.apache.whirr.service.chef.Recipe

  @Test(timeout = TestConstants.ITEST_TIMEOUT)
  public void testChefRunRecipeFromURL() throws Exception {
    // As chef will be mostly used indirectly in other services
    // this test tests chef's ability to run a recipe, specifically to
    // install nginx.
    Recipe nginx = new Recipe(
        "nginx",
        null,
        "http://s3.amazonaws.com/opscode-community/cookbook_versions/tarballs/529/original/nginx.tgz");

    Map<? extends NodeMetadata, ExecResponse> responses = runRecipe(nginx);
View Full Code Here

Examples of org.apache.xbean.recipe.Recipe

    }
   
    public List<Recipe> getNestedRecipes() {
        Object object = getReference();
        if (object instanceof Recipe) {
            Recipe recipe = (Recipe) object;
            return Collections.singletonList(recipe);
        } else {
            return Collections.emptyList();
        }
    }
View Full Code Here

Examples of org.bukkit.inventory.Recipe

   
    // Get the output if that item was smelted
    ItemStack result = null;
    Iterator<Recipe> iter = Bukkit.recipeIterator();
    while (iter.hasNext()){
      Recipe recipe = iter.next();
      if (recipe instanceof FurnaceRecipe){
        if (((FurnaceRecipe) recipe).getInput().getType() == player.getItemInHand().getType()){
          result = recipe.getResult();
        }
      }
    }
   
    if (result != null){
View Full Code Here

Examples of org.jvnet.hudson.test.recipes.Recipe

        recipeLoadCurrentPlugin();
        // look for recipe meta-annotation
        try {
            Method runMethod= getClass().getMethod(getName());
            for( final Annotation a : runMethod.getAnnotations() ) {
                Recipe r = a.annotationType().getAnnotation(Recipe.class);
                if(r==null)     continue;
                final Runner runner = r.value().newInstance();
                recipes.add(runner);
                tearDowns.add(new LenientRunnable() {
                    public void run() throws Exception {
                        runner.tearDown(HudsonTestCase.this,a);
                    }
View Full Code Here

Examples of org.ocobo.model.Recipe

  }

  @Transactional
  public Recipe removeRecipe(int id) throws RecipeException {
    try {
      final Recipe recipe = loadRecipe(id);
      return removeRecipe(recipe);
    }
    catch (DataAccessException ex) {
      throw new RecipeException(id, "Error removing the recipe.", ex);
    }
View Full Code Here

Examples of org.spout.api.inventory.recipe.Recipe

        cntr = 0;
      }
    }
    RecipeManager recipeManager = VanillaPlugin.getInstance().getEngine().getRecipeManager();
    Collections.reverse(materials);
    Recipe recipe = recipeManager.matchShapedRecipe(materials);
    if (recipe == null) {
      recipe = recipeManager.matchShapelessRecipe(shapeless);
    }
    if (recipe != null) {
      updateCraftingSlot(recipe.getResult());
      return;
    }
    updateCraftingSlot(null);
  }
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.