Examples of addPackages()


Examples of org.apache.ambari.server.state.ServiceOsSpecific.addPackages()

                                                        String osFamily) {
    ServiceOsSpecific hostOs = new ServiceOsSpecific(osFamily);
    List<ServiceOsSpecific> foundedOSSpecifics = getOSSpecificsByFamily(serviceInfo.getOsSpecifics(), osFamily);
    if (!foundedOSSpecifics.isEmpty()) {
      for (ServiceOsSpecific osSpecific : foundedOSSpecifics) {
        hostOs.addPackages(osSpecific.getPackages());
      }
      // Choose repo that is relevant for host
      ServiceOsSpecific.Repo serviceRepo = hostOs.getRepo();
      if (serviceRepo != null) {
        String serviceRepoInfo = gson.toJson(serviceRepo);
View Full Code Here

Examples of org.apache.ambari.server.state.ServiceOsSpecific.addPackages()

    List<ServiceOsSpecific.Package> packageList2 = new ArrayList<ServiceOsSpecific.Package>();
    packageList2.add(package2);
    packageList2.add(package3);

    ServiceOsSpecific osSpecific1 = new ServiceOsSpecific("testOSFamily");
    osSpecific1.addPackages(packageList1);
    ServiceOsSpecific osSpecific2 = new ServiceOsSpecific("testOSFamily1,testOSFamily,testOSFamily2");
    osSpecific2.addPackages(packageList2);

    osSpecifics.put("testOSFamily", osSpecific1);
    osSpecifics.put("testOSFamily1,testOSFamily,testOSFamily2", osSpecific2);
View Full Code Here

Examples of org.apache.ambari.server.state.ServiceOsSpecific.addPackages()

    packageList2.add(package3);

    ServiceOsSpecific osSpecific1 = new ServiceOsSpecific("testOSFamily");
    osSpecific1.addPackages(packageList1);
    ServiceOsSpecific osSpecific2 = new ServiceOsSpecific("testOSFamily1,testOSFamily,testOSFamily2");
    osSpecific2.addPackages(packageList2);

    osSpecifics.put("testOSFamily", osSpecific1);
    osSpecifics.put("testOSFamily1,testOSFamily,testOSFamily2", osSpecific2);

    expect(serviceInfo.getOsSpecifics()).andReturn(osSpecifics);
View Full Code Here

Examples of org.apache.ambari.server.state.ServiceOsSpecific.addPackages()

    }
    ServiceOsSpecific hostOs = new ServiceOsSpecific(osFamily);
    List<ServiceOsSpecific> foundedOSSpecifics = getOSSpecificsByFamily(serviceInfo.getOsSpecifics(), osFamily);
    if (!foundedOSSpecifics.isEmpty()) {
      for (ServiceOsSpecific osSpecific : foundedOSSpecifics) {
        hostOs.addPackages(osSpecific.getPackages());
      }
      serviceInfo.getOsSpecifics().get(osFamily);
      // Choose repo that is relevant for host
      ServiceOsSpecific.Repo serviceRepo = hostOs.getRepo();
      if (serviceRepo != null) {
View Full Code Here

Examples of org.drools.RuleBase.addPackages()

                "end\n";

        PackageBuilder builder = new PackageBuilder();
        builder.addPackageFromDrl(ResourceFactory.newByteArrayResource(str.getBytes()));
        RuleBase rb = RuleBaseFactory.newRuleBase();
        rb.addPackages(builder.getPackages());
        StatelessSession ss = rb.newStatelessSession();
        ss.execute(new Object[]{
                new MyPerson("John", 20, Arrays.asList(
                        new MyPerson("John Jr 1st", 10, Arrays.asList(new MyPerson("John Jr Jr", 4, Collections.<MyPerson>emptyList()))),
                        new MyPerson("John Jr 2nd", 8, Collections.<MyPerson>emptyList())))
View Full Code Here

Examples of org.drools.RuleBase.addPackages()

        // creates the rulebase
        RuleBase ruleBase = RuleBaseFactory.newRuleBase();

        // adds the packages
        ruleBase.addPackages(packages);

        if (PACKAGEBINFORMAT.equals(binformat)) {
            for (org.drools.rule.Package pkg : packages) {
                if (verboseoption) {
                    log("** Serializing package [" + pkg.getName() + "] to destination file. **** THIS WILL OVERRIDE ANY PREVIOUSLY SERIALIZED PACKAGE ****");
 
View Full Code Here

Examples of org.drools.RuleBase.addPackages()

                "end\n";

        PackageBuilder builder = new PackageBuilder();
        builder.addPackageFromDrl(ResourceFactory.newByteArrayResource(str.getBytes()));
        RuleBase rb = RuleBaseFactory.newRuleBase();
        rb.addPackages(builder.getPackages());
        StatelessSession ss = rb.newStatelessSession();
        ss.execute(new Object[]{
                new MyPerson("John", 20, Arrays.asList(
                        new MyPerson("John Jr 1st", 10, Arrays.asList(new MyPerson("John Jr Jr", 4, Collections.<MyPerson>emptyList()))),
                        new MyPerson("John Jr 2nd", 8, Collections.<MyPerson>emptyList())))
View Full Code Here

Examples of org.drools.RuleBase.addPackages()

    // creates the rulebase
    RuleBase ruleBase = RuleBaseFactory.newRuleBase();

    // adds the packages
    ruleBase.addPackages(packages);

    if (PACKAGEBINFORMAT.equals(binformat)) {
      for(org.drools.rule.Package pkg : packages) {
        if(verboseoption) {
          log("** Serializing package ["+pkg.getName()+"] to destination file. **** THIS WILL OVERRIDE ANY PREVIOUSLY SERIALIZED PACKAGE ****");
 
View Full Code Here

Examples of org.drools.core.RuleBase.addPackages()

                "end\n";

        PackageBuilder builder = new PackageBuilder();
        builder.addPackageFromDrl(ResourceFactory.newByteArrayResource(str.getBytes()));
        RuleBase rb = RuleBaseFactory.newRuleBase();
        rb.addPackages(builder.getPackages());
        StatelessSession ss = rb.newStatelessSession();
        ss.execute(new Object[]{
                new MyPerson("John", 20, Arrays.asList(
                        new MyPerson("John Jr 1st", 10, Arrays.asList(new MyPerson("John Jr Jr", 4, Collections.<MyPerson>emptyList()))),
                        new MyPerson("John Jr 2nd", 8, Collections.<MyPerson>emptyList())))
View Full Code Here

Examples of org.drools.core.RuleBase.addPackages()

                "end\n";

        PackageBuilder builder = new PackageBuilder();
        builder.addPackageFromDrl(ResourceFactory.newByteArrayResource(str.getBytes()));
        RuleBase rb = RuleBaseFactory.newRuleBase();
        rb.addPackages(builder.getPackages());
        StatelessSession ss = rb.newStatelessSession();
        ss.execute(new Object[]{
                new MyPerson("John", 20, Arrays.asList(
                        new MyPerson("John Jr 1st", 10, Arrays.asList(new MyPerson("John Jr Jr", 4, Collections.<MyPerson>emptyList()))),
                        new MyPerson("John Jr 2nd", 8, Collections.<MyPerson>emptyList())))
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.