コード例 #1
0
  /** Use this if you want to build and compile just the one asset. */
  public ContentPackageAssembler(AssetItem assetToBuild) {
    this.pkg = assetToBuild.getPackage();
    createBuilder();

    if (preparePackage()) {
      buildAsset(assetToBuild);
    }
  }
コード例 #2
0
  /** This will build the package. */
  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 it = pkg.getAssets();
    while (it.hasNext()) {

      AssetItem asset = (AssetItem) it.next();

      if (!asset.isArchived() && (selector.isAssetAllowed(asset))) {
        buildAsset(asset);
      }
    }
  }