Examples of BundleType


Examples of com.google.gxp.compiler.base.BundleType

        // go through the attrBundleMap and turn each entry into an
        // AttrBundleParam and put this into the builder map.
        for (Map.Entry<String, Map<AttributeValidator, Attribute>> attrBundle :
                attrBundles.entrySet()) {
          FormalParameter parameter = callee.getParameterByPrimary(attrBundle.getKey());
          BundleType bt = (BundleType) parameter.getType();

          // special case for the (common case) of a single bundle on the
          // callee side. In this case there is no mixing of attributes
          // between bundles so the GxpAttrBundleBuilder does not need to
          // include only some attributes from passed in bundles.  See the
          // empty constructor in j/c/g/gxp/base/GxpAttrBundleBuilder.java
          Set<String> includeAttrs = (attrBundles.size() == 1)
              ? Collections.<String>emptySet() : bt.getAttrMap().keySet();

          AttrBundleParam newBundle =
              new AttrBundleParam(call, callee.getSchema(), includeAttrs,
                                  attrBundle.getValue(), call.getAttrBundles());
View Full Code Here

Examples of com.google.gxp.compiler.base.BundleType

      Map<String, AttributeValidator> validatorMap = Maps.newHashMap();

      for (FormalParameter parameter : callee.getParameters()) {
        if (parameter.getType() instanceof BundleType) {
          // build up validatorMap
          BundleType calleeBundle = (BundleType) parameter.getType();
          validatorMap.putAll(calleeBundle.getAttrMap());
        }
      }

      // this is a set of all allowed attributes for the call attr bundles
      // it remains unchanged for the entire execution of this function
View Full Code Here

Examples of com.google.gxp.compiler.base.BundleType

  protected BundleType bundleType(SourcePosition pos, Schema schema, String element,
                                  String attribute) {
    Map<String, AttributeValidator> map = Maps.newHashMap();
    map.put(attribute, schema.getElementValidator(element).getAttributeValidator(attribute));
    return new BundleType(pos, "BundleType", schema, map);
  }
View Full Code Here

Examples of com.google.gxp.compiler.base.BundleType

              //               actually remove elements
              subAttrMap.remove(eItem.trim());
            }
          }

          return new BundleType(node, rootSchema, subAttrMap);
        default:
          alertSink.add(new InvalidAttributeValueError(gxpType));
          return null;
      }
    }
View Full Code Here

Examples of com.google.gxp.compiler.base.BundleType

              //               actually remove elements
              subAttrMap.remove(eItem.trim());
            }
          }

          return new BundleType(node, rootSchema, subAttrMap);
        default:
          alertSink.add(new InvalidAttributeValueError(gxpType));
          return null;
      }
    }
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleType

    private void parseBundleTypeTarget(List<? extends ResourceDescriptor> resourceTypes) {
        for (ResourceDescriptor d : resourceTypes) {
            if (d.getBundle() != null) {
                ResourceType rt = getResourceTypeFromPlugin(d.getName(), pluginDescriptor.getName());
                BundleType bt = rt.getBundleType();
                parseBundleTypeTarget(bt, d.getBundle().getTargets());
            }
        }
    }
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleType

            }

            Bundle bundle = resourceDescriptor.getBundle();
            if (bundle != null) {
                String typeName = bundle.getType();
                resourceType.setBundleType(new BundleType(typeName, resourceType));
                // do NOT parse the target types of bundle type right now so that we don't
                // require the plugin writer to order the types herself
            }

            BundleTargetDescriptor bundleTarget = resourceDescriptor.getBundleTarget();
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleType

            bundleFiles.put(bundleFile2, new File(tmpDir, bundleFile2));
            bundleFiles.put(bundleFile3, new File(tmpDir, bundleFile3));

            File bundleDistroFile = tmpDir; // not a real distro zip, but its just a simulation anyway - SLSB will pass this to our mock PC
            String recipe = "mock recipe";
            BundleType bt1 = createBundleType("one");

            // prepare our mock bundle PC
            bpc.parseRecipe_returnValue = new RecipeParseResults(bundleMetadata, configDef, new HashSet<String>(
                bundleFiles.keySet()));
            bpc.processBundleDistributionFile_returnValue = new BundleDistributionInfo(recipe,
                bpc.parseRecipe_returnValue, bundleFiles);
            bpc.processBundleDistributionFile_returnValue.setBundleTypeName(bt1.getName());

            // now ask the SLSB to persist our bundle data given our mock distribution
            BundleVersion bv1 = bundleManager.createBundleVersionViaURL(overlord, bundleDistroFile.toURI().toURL()
                .toString());
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleType

        }
    }

    @Test(enabled = TESTS_ENABLED)
    public void testGetBundleTypes() throws Exception {
        BundleType bt1 = createBundleType("one");
        BundleType bt2 = createBundleType("two");
        List<BundleType> bts = bundleManager.getAllBundleTypes(overlord);
        assert bts.size() >= 2 : "should have at least 2 bundle types";

        List<String> btNames = new ArrayList<String>();
        for (BundleType bundleType : bts) {
            btNames.add(bundleType.getName());
        }

        assert btNames.contains(bt1.getName());
        assert btNames.contains(bt2.getName());
    }
View Full Code Here

Examples of org.rhq.core.domain.bundle.BundleType

    }

    @Test(enabled = TESTS_ENABLED)
    public void testAddBundleFilesToDifferentBundles() throws Exception {
        // create a bundle type to use for both bundles.
        BundleType bt = createBundleType("one");
        Bundle b1 = createBundle(overlord, "one", bt, null);
        assertNotNull(b1);
        BundleVersion bv1 = createBundleVersion(b1.getName(), "1.0", b1);
        assertNotNull(bv1);
        BundleFile b1f1 = bundleManager.addBundleFileViaByteArray(overlord, bv1.getId(), TEST_PREFIX + "-file1", "1.0",
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.