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

547289 Provide javadoc for org.eclipse.passage.lic.api package #39

Merged
merged 2 commits into from
Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -18,6 +18,9 @@

import org.eclipse.passage.lic.api.conditions.LicensingCondition;

/**
* @since 0.4.0
*/
public final class AccessEvents {

private AccessEvents() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/**
* The main entry point to the licensing
*
* @since 0.4.0
*/
public interface AccessManager {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,37 @@
import org.eclipse.passage.lic.api.conditions.LicensingCondition;

/**
* Permission to use the component of given name and version range obtained from
* {@link PermissionEmitter} as a result of evaluation for
* {@link LicensingCondition}
* Permission expresses runtime state of a satisfied {@link LicensingCondition}:
* all terms that {@link LicensingCondition} establishes are fulfilled and the
* permission to use the feature of given name and version range is issues by
* {@link PermissionEmitter}.
* <p>
* In other words, {@link PermissionEmitter} <i>evaluates</i> a {@link LicensingCondition} and <i>emits or not</i>
* corresponding {@link FeaturePermission}.
*
* @since 0.4.0
*/
public interface FeaturePermission {

LicensingConfiguration getLicensingConfiguration();

/**
* The original {@code LicensingCondition} for which this {@link FeaturePermission} was emitted.
*/
LicensingCondition getLicensingCondition();

/**
* In general case a {@link FeaturePermission} is time-limited.
* {@code LeaseDate} is timestamp of the permission emission.
*
* @see #getExpireDate()
*/
Date getLeaseDate();

/**
* The date of the permission expiration. It is no longer valid after this date.
*
* @see #getLeaseDate()
*/
Date getExpireDate();
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@

/**
* Collects the data required to issue the license
*
* @since 0.5.0
*
* @since 0.5.0
*/
public interface LicensingRequest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,20 @@
import org.eclipse.passage.lic.api.conditions.LicensingCondition;

/**
* Evaluates the collection of {@link LicensingCondition} to emit a collection
* of {@link FeaturePermission}
* Interface of a service responsible for {@link LicensingCondition}s evaluation against the current program runtime.
* As a result of evaluation, for a {@link LicensingCondition} a {@code FeaturePermission} can be emitted,
* in case all the {@link LicensingCondition}'s terms are met at the current program runtime.
*
* @see LicensingCondition
* @see FeaturePermission
* @since 0.4.0
*/
public interface PermissionEmitter {

/**
* Evaluates the collection of {@link LicensingCondition} to emit a collection
* of {@link FeaturePermission}
*
*/
Iterable<FeaturePermission> emitPermissions(LicensingConfiguration configuration,
Iterable<LicensingCondition> conditions) throws LicensingException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
*******************************************************************************/
package org.eclipse.passage.lic.api.access;

/**
* Takes care of all {@link PermissionEmitter} services registered at runtime.
*
* @since 0.4.0
*/
public interface PermissionEmitterRegistry {

String getDefaultConditionType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,31 @@
import org.eclipse.passage.lic.api.restrictions.RestrictionVerdict;

/**
* Examines how {@link FeaturePermission}(s) cover the
* {@link LicensingRequirement}(s) and produce {@link RestrictionVerdict}(s) to
* be consumed by {@link RestrictionExecutor}(s)
* The contract for a service responsible for examining set of {@link FeaturePermission}s
* (runtime-evaluated {@code LicensingCondition}s)
* against all {@link LicensingRequirement}s for the same set of features.
* Examining reports which {@link LicensingRequirement}s are left unsatisfied.
ruspl-afed marked this conversation as resolved.
Show resolved Hide resolved
*
* @see LicensingRequirement
* @see PermissionEmitter
* @see FeaturePermission
* @see RestrictionVerdict
* @since 0.4.0
*/
public interface PermissionExaminer {

/**
* Examines how {@link FeaturePermission}s cover the
* {@link LicensingRequirement}s and produce {@link RestrictionVerdict}s to
* be consumed by {@link RestrictionExecutor}s.
* Each {@link RestrictionVerdict} describes uncovered {@link LicensingRequirement}
*
* @param configuration overall configuration
* @param requirements program licensing requirements to be covered by the {@code permissions}
* @param permissions feature permissions collected for the appropriate set of features
* @return not null iterable structure of {@link RestrictionVerdict}s begotten by all the {@code requirements} unsatisfied
* by the given {@code permissions}
*/
Iterable<RestrictionVerdict> examine(LicensingConfiguration configuration,
Iterable<LicensingRequirement> requirements, Iterable<FeaturePermission> permissions);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

/**
* Transport interface for {@link FeaturePermission}(s)
*
* @since 0.4.0
*/
public interface PermissionTransport {

Expand Down