use of lucee.runtime.osgi.OSGiUtil.VersionDefinition in project Lucee by lucee.
the class DumpUtil method toArray2.
private static Array toArray2(List<PackageQuery> list) {
Struct sct, _sct;
Array arr = new ArrayImpl(), _arr;
Iterator<PackageQuery> it = list.iterator();
PackageQuery pd;
Iterator<VersionDefinition> _it;
VersionDefinition vd;
while (it.hasNext()) {
pd = it.next();
sct = new StructImpl();
sct.setEL(KeyConstants._package, pd.getName());
sct.setEL("versions", _arr = new ArrayImpl());
_it = pd.getVersionDefinitons().iterator();
while (_it.hasNext()) {
vd = _it.next();
_sct = new StructImpl();
_sct.setEL(KeyConstants._bundleVersion, vd.getVersion().toString());
_sct.setEL("operator", vd.getOpAsString());
_arr.appendEL(_sct);
}
arr.appendEL(sct);
}
return arr;
}
use of lucee.runtime.osgi.OSGiUtil.VersionDefinition in project Lucee by lucee.
the class DumpUtil method requiredBundles.
private static void requiredBundles(DumpTable parent, Bundle b) {
try {
List<BundleDefinition> list = OSGiUtil.getRequiredBundles(b);
if (list.isEmpty())
return;
DumpTable dt = new DumpTable("#6289a3", "#dee3e9", "#000000");
dt.appendRow(-1, new SimpleDumpData("name"), new SimpleDumpData("version"), new SimpleDumpData("operator"));
Iterator<BundleDefinition> it = list.iterator();
BundleDefinition bd;
VersionDefinition vd;
String v, op;
while (it.hasNext()) {
bd = it.next();
vd = bd.getVersionDefiniton();
if (vd != null) {
v = vd.getVersionAsString();
op = vd.getOpAsString();
} else {
v = "";
op = "";
}
dt.appendRow(0, new SimpleDumpData(bd.getName()), new SimpleDumpData(v), new SimpleDumpData(op));
}
parent.appendRow(1, new SimpleDumpData("required-bundles"), dt);
} catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
}
}
use of lucee.runtime.osgi.OSGiUtil.VersionDefinition in project Lucee by lucee.
the class BundleInfo method toArray2.
private static Array toArray2(List<PackageQuery> list) {
Struct sct, _sct;
Array arr = new ArrayImpl(), _arr;
Iterator<PackageQuery> it = list.iterator();
PackageQuery pd;
Iterator<VersionDefinition> _it;
VersionDefinition vd;
while (it.hasNext()) {
pd = it.next();
sct = new StructImpl();
sct.setEL(KeyConstants._package, pd.getName());
sct.setEL("versions", _arr = new ArrayImpl());
_it = pd.getVersionDefinitons().iterator();
while (_it.hasNext()) {
vd = _it.next();
_sct = new StructImpl();
_sct.setEL(KeyConstants._bundleVersion, vd.getVersion().toString());
_sct.setEL("operator", vd.getOpAsString());
_arr.appendEL(_sct);
}
arr.appendEL(sct);
}
return arr;
}
use of lucee.runtime.osgi.OSGiUtil.VersionDefinition in project Lucee by lucee.
the class BundleInfo method toArray1.
private static Array toArray1(List<BundleDefinition> list) {
Struct sct;
Array arr = new ArrayImpl();
Iterator<BundleDefinition> it = list.iterator();
BundleDefinition bd;
VersionDefinition vd;
while (it.hasNext()) {
bd = it.next();
sct = new StructImpl();
sct.setEL(KeyConstants._bundleName, bd.getName());
vd = bd.getVersionDefiniton();
if (vd != null) {
sct.setEL(KeyConstants._bundleVersion, vd.getVersionAsString());
sct.setEL("operator", vd.getOpAsString());
}
arr.appendEL(sct);
}
return arr;
}
Aggregations