diff --git a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/Conditions.java b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/Conditions.java index 8c33ba899..cc05fefd1 100644 --- a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/Conditions.java +++ b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/Conditions.java @@ -20,17 +20,12 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.eclipse.passage.lbc.internal.base.api.RawRequest; -import org.eclipse.passage.lic.floating.FloatingFileExtensions; -import org.eclipse.passage.lic.internal.api.LicensedProduct; import org.eclipse.passage.lic.internal.api.PassageAction; import org.eclipse.passage.lic.internal.api.ServiceInvocationResult; -import org.eclipse.passage.lic.internal.api.conditions.ConditionMiningTarget; import org.eclipse.passage.lic.internal.api.conditions.ConditionPack; -import org.eclipse.passage.lic.internal.base.conditions.mining.LocalConditions; import org.eclipse.passage.lic.internal.base.diagnostic.DiagnosticExplained; import org.eclipse.passage.lic.internal.base.diagnostic.NoErrors; import org.eclipse.passage.lic.internal.base.io.LicensingFolder; -import org.eclipse.passage.lic.internal.base.io.PathFromLicensedProduct; import org.eclipse.passage.lic.internal.base.io.UserHomePath; import org.eclipse.passage.lic.internal.net.api.handle.NetResponse; import org.eclipse.passage.lic.internal.net.handle.EObjectTransfer; @@ -57,7 +52,7 @@ public Conditions(ProductUserRequest data) { public NetResponse get() { log.debug(String.format("Mining conditions for product %s", data.product().get())); //$NON-NLS-1$ ServiceInvocationResult> conditions = // - new Miner(source, data.user().get())// + new FloatingConditions(source, data.user().get())// .all(data.product().get()); if (!conditions.data().isPresent()) { return new Failure.OperationFailed(// @@ -80,23 +75,4 @@ private LicensePack pack(Collection conditions) { ).get(); } - private final class Miner extends LocalConditions { - - private final Supplier base; - - Miner(Supplier base, String user) { - super(// - new ConditionMiningTarget.Local().child("floating-server"), //$NON-NLS-1$ - new ReassemblingMiningEquipment(user, base), // - new FloatingFileExtensions.FloatingLicenseEncrypted()); - this.base = base; - } - - @Override - protected Supplier base(LicensedProduct product) { - return new PathFromLicensedProduct(base, product); - } - - } - } diff --git a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/FloatingConditions.java b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/FloatingConditions.java new file mode 100644 index 000000000..db908f41f --- /dev/null +++ b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/FloatingConditions.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2021 ArSysOp + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * https://www.eclipse.org/legal/epl-2.0/. + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * ArSysOp - initial API and implementation + *******************************************************************************/ +package org.eclipse.passage.lbc.internal.base.mine; + +import java.nio.file.Path; +import java.util.function.Supplier; + +import org.eclipse.passage.lic.floating.FloatingFileExtensions; +import org.eclipse.passage.lic.internal.api.LicensedProduct; +import org.eclipse.passage.lic.internal.api.conditions.ConditionMiningTarget; +import org.eclipse.passage.lic.internal.base.conditions.mining.LocalConditions; +import org.eclipse.passage.lic.internal.base.io.PathFromLicensedProduct; + +final class FloatingConditions extends LocalConditions { + + private final Supplier base; + + FloatingConditions(Supplier base, String user) { + super(// + new ConditionMiningTarget.Local().child("floating-server"), //$NON-NLS-1$ + new ReassemblingMiningEquipment(user, base), // + new FloatingFileExtensions.FloatingLicenseEncrypted()); + this.base = base; + } + + @Override + protected Supplier base(LicensedProduct product) { + return new PathFromLicensedProduct(base, product); + } + +} \ No newline at end of file diff --git a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/ReassemblingMiningEquipment.java b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/ReassemblingMiningEquipment.java index bd169409d..a1a4e1341 100644 --- a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/ReassemblingMiningEquipment.java +++ b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/ReassemblingMiningEquipment.java @@ -21,7 +21,7 @@ import org.eclipse.passage.lic.internal.api.conditions.mining.MiningEquipment; import org.eclipse.passage.lic.internal.api.conditions.mining.MiningTool; -final class ReassemblingMiningEquipment implements MiningEquipment { +public final class ReassemblingMiningEquipment implements MiningEquipment { private final String user; private final Supplier base; diff --git a/bundles/org.eclipse.passage.lic.api/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.lic.api/META-INF/MANIFEST.MF index c9c1a9e4f..41329a731 100644 --- a/bundles/org.eclipse.passage.lic.api/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.lic.api/META-INF/MANIFEST.MF @@ -8,37 +8,38 @@ Bundle-Vendor: %Bundle-Vendor Bundle-Copyright: %Bundle-Copyright Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Export-Package: org.eclipse.passage.lic.internal.api; - x-friends:="org.eclipse.passage.lbc.api, + x-friends:="org.eclipse.passage.lac, + org.eclipse.passage.lbc.api, org.eclipse.passage.lbc.base, - org.eclipse.passage.loc.workbench, - org.eclipse.passage.loc.dashboard.ui, - org.eclipse.passage.loc.features.ui, - org.eclipse.passage.loc.licenses.ui, - org.eclipse.passage.loc.products.ui, - org.eclipse.passage.loc.users.ui, - org.eclipse.passage.loc.api, + org.eclipse.passage.lbc.base.tests, + org.eclipse.passage.lbc.seal, + org.eclipse.passage.lic.api.tests, org.eclipse.passage.lic.base, - org.eclipse.passage.lic.jface, - org.eclipse.passage.lic.hc, - org.eclipse.passage.lic.equinox, - org.eclipse.passage.lic.equinox.tests, org.eclipse.passage.lic.base.tests, - org.eclipse.passage.lic.api.tests, - org.eclipse.passage.lbc.base.tests, - org.eclipse.passage.loc.licenses.core, - org.eclipse.passage.lic.net, - org.eclipse.passage.lic.emf, - org.eclipse.passage.seal.demo.tests, - org.eclipse.passage.lic.hc.tests, - org.eclipse.passage.seal.demo, org.eclipse.passage.lic.bc, org.eclipse.passage.lic.e4.ui, + org.eclipse.passage.lic.emf, + org.eclipse.passage.lic.equinox, + org.eclipse.passage.lic.equinox.tests, + org.eclipse.passage.lic.hc, + org.eclipse.passage.lic.hc.tests, + org.eclipse.passage.lic.jface, org.eclipse.passage.lic.json, + org.eclipse.passage.lic.licenses.migration, + org.eclipse.passage.lic.net, org.eclipse.passage.lic.oshi, + org.eclipse.passage.loc.api, + org.eclipse.passage.loc.dashboard.ui, + org.eclipse.passage.loc.features.ui, + org.eclipse.passage.loc.licenses.core, + org.eclipse.passage.loc.licenses.ui, org.eclipse.passage.loc.products.core, - org.eclipse.passage.lac, - org.eclipse.passage.lic.licenses.migration, - org.eclipse.passage.lac.seal", + org.eclipse.passage.loc.products.ui, + org.eclipse.passage.loc.users.ui, + org.eclipse.passage.loc.workbench, + org.eclipse.passage.seal.demo, + org.eclipse.passage.seal.demo.tests, + org.eclipse.passage.lac.gear", org.eclipse.passage.lic.internal.api.access; x-friends:="org.eclipse.passage.lic.base, org.eclipse.passage.lic.e4.ui, diff --git a/bundles/org.eclipse.passage.lic.net/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.lic.net/META-INF/MANIFEST.MF index 8f4d34f0e..d982af99a 100644 --- a/bundles/org.eclipse.passage.lic.net/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.lic.net/META-INF/MANIFEST.MF @@ -19,21 +19,21 @@ Export-Package: org.eclipse.passage.lic.internal.net; org.eclipse.passage.lbc.jetty, org.eclipse.passage.lbc.base.tests, org.eclipse.passage.lac", - org.eclipse.passage.lic.internal.net.api;x-friends:="org.eclipse.passage.lac.seal", + org.eclipse.passage.lic.internal.net.api;x-friends:="org.eclipse.passage.lac.gear", org.eclipse.passage.lic.internal.net.api.handle; x-friends:="org.eclipse.passage.lac, + org.eclipse.passage.lac.gear, org.eclipse.passage.lac.jetty, org.eclipse.passage.lbc.base, org.eclipse.passage.lbc.base.tests, org.eclipse.passage.lbc.jetty, - org.eclipse.passage.lic.jetty, - org.eclipse.passage.lac.seal", + org.eclipse.passage.lic.jetty", org.eclipse.passage.lic.internal.net.connect, org.eclipse.passage.lic.internal.net.handle; x-friends:="org.eclipse.passage.lac, + org.eclipse.passage.lac.gear, org.eclipse.passage.lbc.base, - org.eclipse.passage.lic.jetty, - org.eclipse.passage.lbc.jetty, org.eclipse.passage.lbc.base.tests, - org.eclipse.passage.lac.seal" + org.eclipse.passage.lbc.jetty, + org.eclipse.passage.lic.jetty" Bundle-ActivationPolicy: lazy