diff --git a/bundles/org.eclipse.passage.lic.base/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.lic.base/META-INF/MANIFEST.MF index 9a988e6a2..6693d9f79 100644 --- a/bundles/org.eclipse.passage.lic.base/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.lic.base/META-INF/MANIFEST.MF @@ -14,7 +14,8 @@ Export-Package: org.eclipse.passage.lic.internal.base; org.eclipse.passage.lic.equinox, org.eclipse.passage.lic.hc, org.eclipse.passage.lic.jface, - org.eclipse.passage.loc.licenses.core", + org.eclipse.passage.loc.licenses.core, + org.eclipse.passage.lic.net", org.eclipse.passage.lic.internal.base.access;x-internal:=true, org.eclipse.passage.lic.internal.base.conditions; x-friends:="org.eclipse.passage.lbc.base, diff --git a/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/internal/base/FeatureIdentifier.java b/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/internal/base/FeatureIdentifier.java new file mode 100644 index 000000000..6cdb49e54 --- /dev/null +++ b/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/internal/base/FeatureIdentifier.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2020 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.lic.internal.base; + +import java.util.Map; +import java.util.function.Function; + +/** + * Supplies an {@code identifier} of a feature under licensing, which is + * expected to be stored in a variety of sources under a special key. + * + * @see NamedData + */ +public final class FeatureIdentifier extends StringNamedData { + + public FeatureIdentifier(String value) { + super(value); + } + + public FeatureIdentifier(Map values) { + super(values); + } + + public FeatureIdentifier(Function retriever) { + super(retriever); + } + + @Override + public String key() { + return "licensing.feature.identifier"; //$NON-NLS-1$ + } + +} diff --git a/bundles/org.eclipse.passage.lic.floating.model/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.lic.floating.model/META-INF/MANIFEST.MF index 3f2f4d90a..7d8d05332 100644 --- a/bundles/org.eclipse.passage.lic.floating.model/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.lic.floating.model/META-INF/MANIFEST.MF @@ -17,7 +17,8 @@ Export-Package: org.eclipse.passage.lic.floating.model.api; org.eclipse.passage.loc.dashboard.ui, org.eclipse.passage.loc.api, org.eclipse.passage.loc.licenses.core, - org.eclipse.passage.lic.hc", + org.eclipse.passage.lic.hc, + org.eclipse.passage.lic.net", org.eclipse.passage.lic.floating.model.impl;x-internal:=true, org.eclipse.passage.lic.floating.model.meta; x-friends:="org.eclipse.passage.lic.floating.e4.ui, @@ -25,7 +26,6 @@ Export-Package: org.eclipse.passage.lic.floating.model.api; org.eclipse.passage.loc.licenses.core, org.eclipse.passage.loc.floating.emfforms, org.eclipse.passage.loc.dashboard.ui", - org.eclipse.passage.lic.floating.model.util;x-friends:="org.eclipse.passage.lic.floating.edit", - org.eclipse.passage.lic.internal.floating.model;x-friends:="org.eclipse.passage.loc.dashboard.ui" + org.eclipse.passage.lic.floating.model.util;x-friends:="org.eclipse.passage.lic.floating.edit" Bundle-ClassPath: . Bundle-ActivationPolicy: lazy diff --git a/bundles/org.eclipse.passage.lic.floating.model/src/org/eclipse/passage/lic/internal/floating/model/AssignGrantIdentifiers.java b/bundles/org.eclipse.passage.lic.floating.model/src/org/eclipse/passage/lic/internal/floating/model/AssignGrantIdentifiers.java deleted file mode 100644 index 35396fd65..000000000 --- a/bundles/org.eclipse.passage.lic.floating.model/src/org/eclipse/passage/lic/internal/floating/model/AssignGrantIdentifiers.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2020 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.lic.internal.floating.model; - -import java.util.Optional; -import java.util.function.Consumer; -import java.util.function.Predicate; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.passage.lic.floating.model.api.FeatureGrant; -import org.eclipse.passage.lic.floating.model.api.FloatingLicensePack; - -public final class AssignGrantIdentifiers implements Consumer { - - private final Predicate predicate; - - public AssignGrantIdentifiers() { - predicate = ((Predicate) String::isEmpty).negate(); - } - - @Override - public void accept(FloatingLicensePack pack) { - String identifier = pack.getLicense().getIdentifier(); - EList grants = pack.getFeatures(); - for (int i = 0; i < grants.size(); i++) { - FeatureGrant grant = grants.get(i); - if (Optional.ofNullable(grant.getIdentifier()).filter(predicate).isPresent()) { - continue; - } - grant.setIdentifier(identifier + '#' + i); - } - - } - -} diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/i18n/AccessMessages.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/i18n/AccessMessages.java index 773c659fe..a87668d7e 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/i18n/AccessMessages.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/i18n/AccessMessages.java @@ -25,6 +25,8 @@ public final class AccessMessages extends NLS { public static String AccessPacks_unexpected_amount; public static String AccessPacks_unexpected_type; public static String AccessPacks_files_gaining_failed; + + public static String MineRequestParameters_encoding_failed; static { // initialize resource bundle NLS.initializeMessages(BUNDLE_NAME, AccessMessages.class); diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/i18n/AccessMessages.properties b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/i18n/AccessMessages.properties index 223e331c4..bb1233dc0 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/i18n/AccessMessages.properties +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/i18n/AccessMessages.properties @@ -17,3 +17,4 @@ AccessPacks_failed_xmi_read=Reading xmi content failed AccessPacks_unexpected_amount=Unexpected amount of contents in Floating License Access file: %d AccessPacks_unexpected_type=Unexpected content: %s AccessPacks_files_gaining_failed = Failed to locate Floating License Access files +MineRequestParameters_encoding_failed=Failed to encode url query parameter value [%s] to UTF-8 diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/AccessFiles.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/AccessFiles.java index ea69e1bd1..816a1a5d4 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/AccessFiles.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/AccessFiles.java @@ -23,6 +23,7 @@ import org.eclipse.passage.lic.internal.base.io.UserHomePath; final class AccessFiles { + private final LicensedProduct product; public AccessFiles(LicensedProduct product) { diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/AccessPacks.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/AccessPacks.java index 1a63b12f9..49b862072 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/AccessPacks.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/AccessPacks.java @@ -40,13 +40,13 @@ import org.eclipse.passage.lic.internal.base.diagnostic.code.ServiceFailedOnMorsel; import org.eclipse.passage.lic.internal.hc.i18n.AccessMessages; -final class AccessPacks implements Supplier>> { +public final class AccessPacks implements Supplier>> { private final LicensedProduct product; private final KeyKeeper key; private final StreamCodec codec; - AccessPacks(LicensedProduct product, KeyKeeper key, StreamCodec codec) { + public AccessPacks(LicensedProduct product, KeyKeeper key, StreamCodec codec) { this.product = product; this.key = key; this.codec = codec; diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/FloatingServerCoordinates.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/FloatingServerCoordinates.java index 491aac5e6..79872b720 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/FloatingServerCoordinates.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/FloatingServerCoordinates.java @@ -18,6 +18,7 @@ import org.eclipse.passage.lic.internal.net.LicensingServerCoordinates; final class FloatingServerCoordinates implements LicensingServerCoordinates { + private final FloatingLicenseAccess access; FloatingServerCoordinates(FloatingLicenseAccess access) { diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RemoteConditionsRequest.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RemoteRequest.java similarity index 82% rename from bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RemoteConditionsRequest.java rename to bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RemoteRequest.java index c6dd0ae31..1f6718088 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RemoteConditionsRequest.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RemoteRequest.java @@ -12,7 +12,6 @@ *******************************************************************************/ package org.eclipse.passage.lic.internal.hc.remote.impl; -import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; @@ -37,12 +36,12 @@ *
  • {@code config()} to gain a proper request headers configuring unit
  • * */ -public final class RemoteConditionsRequest implements Request { +public abstract class RemoteRequest implements Request { - private final LicensedProduct product; - private final FloatingLicenseAccess access; + protected final LicensedProduct product; + protected final FloatingLicenseAccess access; - public RemoteConditionsRequest(LicensedProduct product, FloatingLicenseAccess access) { + public RemoteRequest(LicensedProduct product, FloatingLicenseAccess access) { this.product = product; this.access = access; } @@ -54,15 +53,16 @@ public URL url() throws LicensingException { return new URL("http", //$NON-NLS-1$ corrdinates.host(), // Integer.parseInt(corrdinates.port()), // - new MineRequestParameters(product, access).query()); + parameters().query()); } catch (LicensingException // | NumberFormatException // - | MalformedURLException // - | UnsupportedEncodingException e) { + | MalformedURLException e) { throw new LicensingException(HcMessages.RemoteConditionsRequest_failed_to_compose_url, e); } } + protected abstract RequestParameters parameters(); + @Override public Configuration config() { return new HttpUrlConnectionConfiguration(1000, new HashMap<>()); diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RequestParameters.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RequestParameters.java index 37f9deeb5..1b869fe0c 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RequestParameters.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RequestParameters.java @@ -16,49 +16,32 @@ import java.net.URLEncoder; import java.util.Arrays; -import org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess; -import org.eclipse.passage.lic.internal.api.LicensedProduct; -import org.eclipse.passage.lic.internal.api.conditions.ConditionAction; -import org.eclipse.passage.lic.internal.api.conditions.mining.ContentType; +import org.eclipse.passage.lic.internal.api.LicensingException; import org.eclipse.passage.lic.internal.base.NamedData; -import org.eclipse.passage.lic.internal.base.ProductIdentifier; -import org.eclipse.passage.lic.internal.base.ProductVersion; -import org.eclipse.passage.lic.internal.base.conditions.mining.LicensingContentType; -import org.eclipse.passage.lic.internal.net.LicensingAction; +import org.eclipse.passage.lic.internal.hc.i18n.AccessMessages; -final class RequestParameters { +public abstract class RequestParameters { - private final LicensedProduct product; - private final FloatingLicenseAccess access; - - RequestParameters(LicensedProduct product, FloatingLicenseAccess access) { - this.product = product; - this.access = access; + protected RequestParameters() { } - String query() throws UnsupportedEncodingException { + public final String query() throws LicensingException { StringBuilder params = new StringBuilder(); Arrays.stream(parameters())// .map(NamedData.Writable::new)// .forEach(writable -> writable.write(params, "=", "&")); //$NON-NLS-1$ //$NON-NLS-2$ return '?' + params.toString(); - } @SuppressWarnings("rawtypes") - private NamedData[] parameters() throws UnsupportedEncodingException { - return new NamedData[] { // - new ProductIdentifier(encode(product.identifier())), // - new ProductVersion(encode(product.version())), // - new LicensingAction(new ConditionAction.Acquire()), // - new LicensingContentType(new ContentType.Xml()), // - new LicenseUser(access.getUser()), // - new ServerAuthenticationType(access.getServer()), // - new ServerAuthenticationExpression(access.getServer()) }; - } - - private String encode(String value) throws UnsupportedEncodingException { - return URLEncoder.encode(value, "UTF-8"); //$NON-NLS-1$ + protected abstract NamedData[] parameters() throws LicensingException; + + protected String encode(String value) throws LicensingException { + try { + return URLEncoder.encode(value, "UTF-8"); //$NON-NLS-1$ + } catch (UnsupportedEncodingException e) { + throw new LicensingException(AccessMessages.MineRequestParameters_encoding_failed, e); + } } } diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/DecryptedConditions.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/mine/DecryptedConditions.java similarity index 97% rename from bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/DecryptedConditions.java rename to bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/mine/DecryptedConditions.java index c1177f428..c19903700 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/DecryptedConditions.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/mine/DecryptedConditions.java @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.internal.hc.remote.impl; +package org.eclipse.passage.lic.internal.hc.remote.impl.mine; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/MineRequestParameters.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/mine/MineRequestParameters.java similarity index 71% rename from bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/MineRequestParameters.java rename to bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/mine/MineRequestParameters.java index b7fb8d98e..01c93cad0 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/MineRequestParameters.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/mine/MineRequestParameters.java @@ -10,24 +10,24 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.internal.hc.remote.impl; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.Arrays; +package org.eclipse.passage.lic.internal.hc.remote.impl.mine; import org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess; import org.eclipse.passage.lic.internal.api.LicensedProduct; +import org.eclipse.passage.lic.internal.api.LicensingException; import org.eclipse.passage.lic.internal.api.conditions.ConditionAction; import org.eclipse.passage.lic.internal.api.conditions.mining.ContentType; import org.eclipse.passage.lic.internal.base.NamedData; import org.eclipse.passage.lic.internal.base.ProductIdentifier; import org.eclipse.passage.lic.internal.base.ProductVersion; import org.eclipse.passage.lic.internal.base.conditions.mining.LicensingContentType; +import org.eclipse.passage.lic.internal.hc.remote.impl.RequestParameters; +import org.eclipse.passage.lic.internal.net.LicenseUser; import org.eclipse.passage.lic.internal.net.LicensingAction; +import org.eclipse.passage.lic.internal.net.ServerAuthenticationExpression; +import org.eclipse.passage.lic.internal.net.ServerAuthenticationType; -final class MineRequestParameters { - +final class MineRequestParameters extends RequestParameters { private final LicensedProduct product; private final FloatingLicenseAccess access; @@ -36,17 +36,9 @@ final class MineRequestParameters { this.access = access; } - String query() throws UnsupportedEncodingException { - StringBuilder params = new StringBuilder(); - Arrays.stream(parameters())// - .map(NamedData.Writable::new)// - .forEach(writable -> writable.write(params, "=", "&")); //$NON-NLS-1$ //$NON-NLS-2$ - return '?' + params.toString(); - - } - + @Override @SuppressWarnings("rawtypes") - private NamedData[] parameters() throws UnsupportedEncodingException { + protected NamedData[] parameters() throws LicensingException { return new NamedData[] { // new ProductIdentifier(encode(product.identifier())), // new ProductVersion(encode(product.version())), // @@ -57,8 +49,4 @@ private NamedData[] parameters() throws UnsupportedEncodingException { new ServerAuthenticationExpression(access.getServer()) }; } - private String encode(String value) throws UnsupportedEncodingException { - return URLEncoder.encode(value, "UTF-8"); //$NON-NLS-1$ - } - } diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RemoteConditions.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/mine/RemoteConditions.java similarity index 95% rename from bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RemoteConditions.java rename to bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/mine/RemoteConditions.java index 96857602e..d10c08bd0 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/RemoteConditions.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/mine/RemoteConditions.java @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.internal.hc.remote.impl; +package org.eclipse.passage.lic.internal.hc.remote.impl.mine; import java.util.Collection; import java.util.Collections; @@ -33,6 +33,8 @@ import org.eclipse.passage.lic.internal.base.diagnostic.NoSevereErrors; import org.eclipse.passage.lic.internal.base.diagnostic.code.ServiceCannotOperate; import org.eclipse.passage.lic.internal.hc.i18n.MinerMessages; +import org.eclipse.passage.lic.internal.hc.remote.impl.AccessPacks; +import org.eclipse.passage.lic.internal.hc.remote.impl.HttpClient; public final class RemoteConditions implements MinedConditions { diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/mine/RemoteConditionsRequest.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/mine/RemoteConditionsRequest.java new file mode 100644 index 000000000..9db60d930 --- /dev/null +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/mine/RemoteConditionsRequest.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2020 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.lic.internal.hc.remote.impl.mine; + +import org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess; +import org.eclipse.passage.lic.internal.api.LicensedProduct; +import org.eclipse.passage.lic.internal.hc.remote.impl.RemoteRequest; +import org.eclipse.passage.lic.internal.hc.remote.impl.RequestParameters; + +public final class RemoteConditionsRequest extends RemoteRequest { + + public RemoteConditionsRequest(LicensedProduct product, FloatingLicenseAccess access) { + super(product, access); + } + + @Override + protected RequestParameters parameters() { + return new MineRequestParameters(product, access); + } + +} 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 b7684b4a0..1e0e7cba7 100644 --- a/bundles/org.eclipse.passage.lic.net/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.lic.net/META-INF/MANIFEST.MF @@ -9,6 +9,7 @@ Bundle-Copyright: %Bundle-Copyright Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Require-Bundle: org.eclipse.osgi;bundle-version="0.0.0", org.eclipse.osgi.services;bundle-version="0.0.0", - org.eclipse.passage.lic.equinox;bundle-version="1.0.0" + org.eclipse.passage.lic.equinox;bundle-version="1.0.0", + org.eclipse.passage.lic.floating.model;bundle-version="0.1.0" Export-Package: org.eclipse.passage.lic.internal.net;x-friends:="org.eclipse.passage.lbc.base,org.eclipse.passage.lic.hc,org.eclipse.passage.lbc.jetty" Bundle-ActivationPolicy: lazy diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/LicenseUser.java b/bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/LicenseUser.java similarity index 72% rename from bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/LicenseUser.java rename to bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/LicenseUser.java index 8df8bd388..e855f5c38 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/LicenseUser.java +++ b/bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/LicenseUser.java @@ -10,18 +10,10 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.internal.hc.remote.impl; +package org.eclipse.passage.lic.internal.net; import org.eclipse.passage.lic.internal.base.StringNamedData; -/** - *

    - * Until proper user management is developed across both server and client, this - * class supplies the dummy value for a user name for condition mining requests - *

    - * - * FIXME: for development: #564815 - */ public final class LicenseUser extends StringNamedData { public LicenseUser(String value) { diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/ServerAuthenticationExpression.java b/bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/ServerAuthenticationExpression.java similarity index 94% rename from bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/ServerAuthenticationExpression.java rename to bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/ServerAuthenticationExpression.java index f953340fa..84acf9924 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/ServerAuthenticationExpression.java +++ b/bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/ServerAuthenticationExpression.java @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.internal.hc.remote.impl; +package org.eclipse.passage.lic.internal.net; import org.eclipse.passage.lic.floating.model.api.FloatingServerConnection; import org.eclipse.passage.lic.internal.base.StringNamedData; diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/ServerAuthenticationType.java b/bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/ServerAuthenticationType.java similarity index 94% rename from bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/ServerAuthenticationType.java rename to bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/ServerAuthenticationType.java index 50b684dc8..28b0f1589 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/internal/hc/remote/impl/ServerAuthenticationType.java +++ b/bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/ServerAuthenticationType.java @@ -10,7 +10,7 @@ * Contributors: * ArSysOp - initial API and implementation *******************************************************************************/ -package org.eclipse.passage.lic.internal.hc.remote.impl; +package org.eclipse.passage.lic.internal.net; import org.eclipse.passage.lic.floating.model.api.FloatingServerConnection; import org.eclipse.passage.lic.internal.base.StringNamedData; diff --git a/tests/org.eclipse.passage.lic.hc.tests/src/org/eclipse/passage/lic/internal/hc/tests/RemoteConditionsRequestTest.java b/tests/org.eclipse.passage.lic.hc.tests/src/org/eclipse/passage/lic/internal/hc/tests/RemoteConditionsRequestTest.java index 78ad2d570..1b38a7754 100644 --- a/tests/org.eclipse.passage.lic.hc.tests/src/org/eclipse/passage/lic/internal/hc/tests/RemoteConditionsRequestTest.java +++ b/tests/org.eclipse.passage.lic.hc.tests/src/org/eclipse/passage/lic/internal/hc/tests/RemoteConditionsRequestTest.java @@ -32,11 +32,11 @@ import org.eclipse.passage.lic.internal.base.ProductIdentifier; import org.eclipse.passage.lic.internal.base.ProductVersion; import org.eclipse.passage.lic.internal.base.conditions.mining.LicensingContentType; -import org.eclipse.passage.lic.internal.hc.remote.impl.LicenseUser; -import org.eclipse.passage.lic.internal.hc.remote.impl.RemoteConditionsRequest; -import org.eclipse.passage.lic.internal.hc.remote.impl.ServerAuthenticationExpression; -import org.eclipse.passage.lic.internal.hc.remote.impl.ServerAuthenticationType; +import org.eclipse.passage.lic.internal.hc.remote.impl.mine.RemoteConditionsRequest; +import org.eclipse.passage.lic.internal.net.LicenseUser; import org.eclipse.passage.lic.internal.net.LicensingAction; +import org.eclipse.passage.lic.internal.net.ServerAuthenticationExpression; +import org.eclipse.passage.lic.internal.net.ServerAuthenticationType; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder;