Package org.drools.guvnor.server.selector

Examples of org.drools.guvnor.server.selector.AssetSelector


    /**
   * This will build the package - preparePackage would have been called first.
     * This will always prioritise DRL before other assets.
   */
  private void buildPackage() {
    AssetSelector selector = SelectorManager.getInstance().getSelector(
        selectorConfigName);
    if (selector == null) {
      this.errors.add(new ContentAssemblyError(this.pkg,
          "The selector named " + selectorConfigName
              + " is not available."));
      return;
    }
       
        Iterator<AssetItem> drls = pkg.listAssetsByFormat(new String[]{AssetFormats.DRL});
        while (drls.hasNext()) {
            AssetItem asset = (AssetItem) drls.next();
            if (!asset.isArchived() && (selector.isAssetAllowed(asset))) {
                buildAsset(asset);
            }
        }
    Iterator<AssetItem> it = pkg.getAssets();
    while (it.hasNext()) {
      AssetItem asset = (AssetItem) it.next();
      if (!asset.getFormat().equals(AssetFormats.DRL) && !asset.isArchived() && (selector.isAssetAllowed(asset))) {
        buildAsset(asset);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.server.selector.AssetSelector

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.