Search in sources :

Example 1 with PackageQuery

use of lucee.runtime.osgi.OSGiUtil.PackageQuery 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;
}
Also used : Array(lucee.runtime.type.Array) VersionDefinition(lucee.runtime.osgi.OSGiUtil.VersionDefinition) StructImpl(lucee.runtime.type.StructImpl) PackageQuery(lucee.runtime.osgi.OSGiUtil.PackageQuery) ArrayImpl(lucee.runtime.type.ArrayImpl) Struct(lucee.runtime.type.Struct)

Example 2 with PackageQuery

use of lucee.runtime.osgi.OSGiUtil.PackageQuery 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;
}
Also used : Array(lucee.runtime.type.Array) VersionDefinition(lucee.runtime.osgi.OSGiUtil.VersionDefinition) StructImpl(lucee.runtime.type.StructImpl) PackageQuery(lucee.runtime.osgi.OSGiUtil.PackageQuery) ArrayImpl(lucee.runtime.type.ArrayImpl) Struct(lucee.runtime.type.Struct)

Aggregations

PackageQuery (lucee.runtime.osgi.OSGiUtil.PackageQuery)2 VersionDefinition (lucee.runtime.osgi.OSGiUtil.VersionDefinition)2 Array (lucee.runtime.type.Array)2 ArrayImpl (lucee.runtime.type.ArrayImpl)2 Struct (lucee.runtime.type.Struct)2 StructImpl (lucee.runtime.type.StructImpl)2