/** * Return an iterator for the rules in this module */ public Iterator<AssetItem> getAssets() { try { Node content = getVersionContentNode(); return new VersionedAssetItemIterator(content.getNode(ASSET_FOLDER_NAME).getNodes(), this.rulesRepository, this.getDependencies()); } catch (RepositoryException e) { throw new RulesRepositoryException(e); } }
/** * Return an iterator for the rules in this module */ public Iterator<AssetItem> getAssets() { try { Node content = getVersionContentNode(); return new VersionedAssetItemIterator(content.getNode(ASSET_FOLDER_NAME).getNodes(), this.rulesRepository, this.getDependencies()); } catch (RepositoryException e) { throw new RulesRepositoryException(e); } }
this.getDependencies()); } catch (RepositoryException e) { throw new RulesRepositoryException(e);
this.getDependencies()); } catch (RepositoryException e) { throw new RulesRepositoryException(e);
getRepo().save(); String[] dependencies = item.getDependencies(); assertEquals(dependencies.length, 0); rule.checkin("version 3"); dependencies = item.getDependencies(); assertEquals(dependencies.length, 1); assertEquals( dependencies = item.getDependencies(); assertEquals( "testDependenciesAsset1?version=LATEST", dependencies = item.getDependencies(); assertEquals( "testDependenciesAsset1?version=2",
getRepo().save(); String[] dependencies = item.getDependencies(); assertEquals(dependencies.length, 0); dependencies = item.getDependencies(); assertEquals(dependencies.length, 1); assertEquals( item.checkin("v1"); ModuleItem historicalPackage = getRepo().loadModule("testDependenciesWithHistoricalVersion", 2); dependencies = historicalPackage.getDependencies(); assertEquals(1, dependencies.length); item.checkin("v2"); historicalPackage = getRepo().loadModule("testDependenciesWithHistoricalVersion", 3); dependencies = historicalPackage.getDependencies(); assertEquals(1, dependencies.length);
String[] dependencies = pkg.getDependencies(); assertEquals(dependencies.length, 3);