Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 572897 lic api goes out from the shadows #838

Merged
merged 4 commits into from
Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
import org.eclipse.passage.lic.api.ServiceInvocationResult;
import org.eclipse.passage.lic.api.access.GrantLockAttempt;
import org.eclipse.passage.lic.api.restrictions.ExaminationCertificate;
import org.eclipse.passage.lic.internal.equinox.EquinoxPassage;
import org.eclipse.passage.lic.equinox.EquinoxPassage;
import org.eclipse.passage.lic.internal.net.NetFrameworkAware;
import org.eclipse.passage.lic.internal.net.api.handle.NetRequest;
import org.eclipse.passage.lic.internal.net.handle.ProductUserRequest;

@SuppressWarnings("restriction")
final class PassageAgent implements Passage {

private final EquinoxPassage delegate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eclipse.passage.lic.api.LicensedProduct;
import org.eclipse.passage.lic.internal.equinox.EquinoxPassage;
import org.eclipse.passage.lic.equinox.EquinoxPassage;
import org.eclipse.passage.lic.licenses.model.api.FeatureGrant;
import org.eclipse.passage.lic.licenses.model.api.GrantAcqisition;
import org.eclipse.passage.lic.licenses.model.meta.LicensesFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eclipse.passage.lic.internal.equinox.EquinoxPassage;
import org.eclipse.passage.lic.equinox.EquinoxPassage;
import org.eclipse.passage.lic.licenses.model.api.FeatureGrant;

final class ProtectedGrantCapacity implements Supplier<Integer> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*******************************************************************************/
package org.eclipse.passage.lbc.internal.base.api;

import org.eclipse.passage.lic.internal.equinox.GearAware;
import org.eclipse.passage.lic.equinox.GearAware;

public final class FlsGearAwre extends GearAware<FlsGear, FlsGearSupplier> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
import org.eclipse.passage.lic.api.LicensingException;
import org.eclipse.passage.lic.base.BaseFramework;
import org.eclipse.passage.lic.base.InvalidLicensedProduct;
import org.eclipse.passage.lic.internal.equinox.LicensedApplication;
import org.eclipse.passage.lic.equinox.LicensedApplication;

@SuppressWarnings("restriction")
public class FlsFramework extends BaseFramework {

static final Framework instance = new FlsFramework();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@
import org.eclipse.passage.lic.base.acquire.UserHomeLicenseAcquisitionService;
import org.eclipse.passage.lic.base.conditions.mining.UserHomeResidentConditions;
import org.eclipse.passage.lic.base.registry.ReadOnlyRegistry;
import org.eclipse.passage.lic.internal.equinox.acquire.ConfigurationLicenseAcquisitionService;
import org.eclipse.passage.lic.internal.equinox.acquire.InstallationLicenseAcquisitionService;
import org.eclipse.passage.lic.internal.equinox.conditions.ConfigurationResidentConditions;
import org.eclipse.passage.lic.internal.equinox.conditions.InstallationResidentConditions;
import org.eclipse.passage.lic.equinox.acquire.ConfigurationLicenseAcquisitionService;
import org.eclipse.passage.lic.equinox.acquire.InstallationLicenseAcquisitionService;
import org.eclipse.passage.lic.equinox.conditions.ConfigurationResidentConditions;
import org.eclipse.passage.lic.equinox.conditions.InstallationResidentConditions;
import org.osgi.framework.FrameworkUtil;

@SuppressWarnings("restriction")
final class SealedAccessCycleConfiguration extends BaseAccessCycleConfiguration {

private final Registry<ConditionMiningTarget, MinedConditions> conditions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Properties file for org.eclipse.passage.lbc.jetty
###############################################################################
# Copyright (c) 2018, 2020 ArSysOp and others
# Copyright (c) 2018, 2021 ArSysOp and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.eclipse.passage.lbc.internal.base.EagerFloatingState;
import org.eclipse.passage.lbc.internal.base.FlotingRequestHandled;
import org.eclipse.passage.lbc.internal.base.api.FloatingState;
import org.eclipse.passage.lic.internal.equinox.io.FileFromBundle;
import org.eclipse.passage.lic.equinox.io.FileFromBundle;
import org.eclipse.passage.lic.internal.jetty.JettyHandler;
import org.eclipse.passage.lic.internal.jetty.interaction.LicensedJettyActivator;
import org.eclipse.passage.lic.internal.net.connect.Storage;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Properties file for org.eclipse.passage.lic.e4.ui
###############################################################################
# Copyright (c) 2018, 2020 ArSysOp and others
# Copyright (c) 2018, 2021 ArSysOp and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
Expand All @@ -14,7 +14,7 @@

Bundle-Name = Passage LIC E4 UI
Bundle-Vendor = Eclipse Passage
Bundle-Copyright = Copyright (c) 2018, 2020 ArSysOp and others.\n\
Bundle-Copyright = Copyright (c) 2018, 2021 ArSysOp and others.\n\
\n\
This program and the accompanying materials are made\n\
available under the terms of the Eclipse Public License 2.0\n\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
* Copyright (c) 2020, 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
Expand All @@ -21,9 +21,9 @@
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.passage.lic.api.ServiceInvocationResult;
import org.eclipse.passage.lic.api.access.GrantLockAttempt;
import org.eclipse.passage.lic.equinox.EquinoxPassage;
import org.eclipse.passage.lic.equinox.LicensedProductFromContext;
import org.eclipse.passage.lic.internal.e4.ui.restrictions.WorkbenchShutdown;
import org.eclipse.passage.lic.internal.equinox.EquinoxPassage;
import org.eclipse.passage.lic.internal.equinox.LicensedProductFromContext;
import org.eclipse.passage.lic.internal.jface.EquinoxPassageUI;
import org.eclipse.swt.widgets.Shell;
import org.osgi.service.event.Event;
Expand Down
25 changes: 5 additions & 20 deletions bundles/org.eclipse.passage.lic.equinox/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,17 @@ Require-Bundle: org.eclipse.osgi;bundle-version="0.0.0";visibility:=reexport,
org.eclipse.passage.lic.api;bundle-version="1.0.0";visibility:=reexport,
org.eclipse.passage.lic.base;bundle-version="1.0.0";visibility:=reexport,
org.apache.logging.log4j;bundle-version="2.8.2"
Export-Package: org.eclipse.passage.lic.equinox.io,
Export-Package: org.eclipse.passage.lic.equinox,
org.eclipse.passage.lic.equinox.acquire,
org.eclipse.passage.lic.equinox.conditions,
org.eclipse.passage.lic.equinox.io,
org.eclipse.passage.lic.equinox.requirements,
org.eclipse.passage.lic.internal.equinox;
x-friends:="org.eclipse.passage.lac,
org.eclipse.passage.lic.e4.ui,
org.eclipse.passage.lic.jface,
org.eclipse.passage.lic.net,
org.eclipse.passage.seal.demo,
org.eclipse.passage.lic.jetty,
org.eclipse.passage.loc.api,
org.eclipse.passage.lbc.base",
org.eclipse.passage.lic.internal.equinox.acquire;x-internal:=true,
org.eclipse.passage.lic.internal.equinox.conditions;x-internal:=true,
org.eclipse.passage.lic.internal.equinox.events;
x-friends:="org.eclipse.passage.loc.features.core,
org.eclipse.passage.loc.products.core,
org.eclipse.passage.loc.licenses.core,
org.eclipse.passage.loc.users.core",
org.eclipse.passage.lic.internal.equinox.i18n;x-internal:=true,
org.eclipse.passage.lic.internal.equinox.io;
x-friends:="org.eclipse.passage.lic.hc,
org.eclipse.passage.loc.features.core,
org.eclipse.passage.loc.products.core,
org.eclipse.passage.loc.licenses.core,
org.eclipse.passage.loc.users.core,
org.eclipse.passage.lbc.jetty"
org.eclipse.passage.lic.internal.equinox.i18n;x-internal:=true
Bundle-ActivationPolicy: lazy
Provide-Capability: licensing.management;licensing.management="equinox";version="1.0.0"

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
* Copyright (c) 2020, 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
Expand All @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.internal.equinox;
package org.eclipse.passage.lic.equinox;

import java.util.Optional;
import java.util.function.Supplier;
Expand All @@ -19,6 +19,9 @@
import org.eclipse.passage.lic.base.InvalidLicensedProduct;
import org.eclipse.passage.lic.base.ProductIdentifier;

/**
* @since 2.1
*/
public final class ApplicationIdentifier implements Supplier<String> {

private final IApplicationContext context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.internal.equinox;
package org.eclipse.passage.lic.equinox;

import java.util.Optional;
import java.util.function.Supplier;
Expand All @@ -23,6 +23,9 @@
import org.osgi.framework.Bundle;
import org.osgi.framework.Version;

/**
* @since 2.1
*/
public final class ApplicationVersion implements Supplier<String> {

private final IApplicationContext context;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
* Copyright (c) 2020, 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
Expand All @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.internal.equinox;
package org.eclipse.passage.lic.equinox;

import java.net.URL;
import java.nio.file.Path;
Expand All @@ -20,6 +20,9 @@
import org.eclipse.core.runtime.FileLocator;
import org.osgi.framework.Bundle;

/**
* @since 2.1
*/
public final class BundleResource implements Supplier<Optional<URL>> {
private final Bundle bundle;
private final Path path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.internal.equinox;
package org.eclipse.passage.lic.equinox;

import java.util.List;
import java.util.function.Supplier;
Expand All @@ -19,9 +19,12 @@
import org.eclipse.passage.lic.api.EvaluationType;
import org.eclipse.passage.lic.api.inspection.RuntimeEnvironment;

/**
* @since 2.1
*/
public final class EnvironmentNames implements Supplier<List<String>> {

//FIXME: work for caching supplier
// FIXME: work for caching supplier
private final List<String> names;

public EnvironmentNames() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
* Copyright (c) 2020, 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
Expand All @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.internal.equinox;
package org.eclipse.passage.lic.equinox;

import java.util.Collection;
import java.util.Collections;
Expand All @@ -19,6 +19,9 @@
import org.eclipse.passage.lic.api.Framework;
import org.eclipse.passage.lic.api.inspection.RuntimeEnvironment;

/**
* @since 2.1
*/
public final class Environments implements Supplier<Collection<RuntimeEnvironment>> {

private final FrameworkAware<?> delegate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.internal.equinox;
package org.eclipse.passage.lic.equinox;

import org.eclipse.passage.lic.api.LicensedProduct;
import org.eclipse.passage.lic.api.Passage;
Expand All @@ -20,6 +20,9 @@
import org.eclipse.passage.lic.base.BaseServiceInvocationResult;
import org.eclipse.passage.lic.base.access.Access;

/**
* @since 2.1
*/
public final class EquinoxPassage implements Passage {

private final FrameworkAware<?> delegate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.internal.equinox;
package org.eclipse.passage.lic.equinox;

import org.eclipse.passage.lic.api.PassageLicenseCoverage;
import org.eclipse.passage.lic.api.ServiceInvocationResult;
import org.eclipse.passage.lic.api.restrictions.ExaminationCertificate;
import org.eclipse.passage.lic.base.access.Access;

/**
* @since 2.1
*/
public final class EquinoxPassageLicenseCoverage implements PassageLicenseCoverage {

private final FrameworkAware<?> delegate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.internal.equinox;
package org.eclipse.passage.lic.equinox;

import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -39,6 +39,8 @@
* <p>
* Use {@code withFrameworkService} to implement client level secondary services
* or {@code withFramework} to retrieve parts of configuration directly.
*
* @since 2.1
*/
public abstract class FrameworkAware<S> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.internal.equinox;
package org.eclipse.passage.lic.equinox;

import java.util.Collection;
import java.util.Collections;
Expand All @@ -26,6 +26,9 @@
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;

/**
* @since 2.1
*/
public abstract class GearAware<G extends Gear, S extends GearSupplier<G>> {

private final Logger log = LogManager.getLogger(getClass());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
* Copyright (c) 2020, 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
Expand All @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.internal.equinox;
package org.eclipse.passage.lic.equinox;

import java.util.function.Supplier;

Expand All @@ -19,6 +19,9 @@
import org.eclipse.passage.lic.base.BaseServiceInvocationResult;
import org.eclipse.passage.lic.base.conditions.mining.BaseLicenseReadingService;

/**
* @since 2.1
*/
public final class LicenseReadingServiceRequest implements Supplier<ServiceInvocationResult<LicenseReadingService>> {

private final FrameworkAware<?> delegate;
Expand Down
Loading