diff --git a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/AccessEvents.java b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/AccessEvents.java index 266caa83c..d4383964e 100644 --- a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/AccessEvents.java +++ b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/AccessEvents.java @@ -19,6 +19,8 @@ import org.eclipse.passage.lic.api.conditions.LicensingCondition; /** + * Codes for Access Management cycle events. + * * @since 0.4.0 */ public final class AccessEvents { diff --git a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/AccessManager.java b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/AccessManager.java index 33f588469..b6aa77b89 100644 --- a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/AccessManager.java +++ b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/AccessManager.java @@ -19,24 +19,29 @@ import org.eclipse.passage.lic.api.restrictions.RestrictionVerdict; /** - * The main entry point to the licensing + * The main entry point to the licensing. * * @since 0.4.0 */ public interface AccessManager { /** - * Aggregated method to: - *
  • resolve {@link LicensingRequirement}(s)
  • - *
  • obtain {@link LicensingCondition}(s)
  • - *
  • evaluate {@link LicensingCondition}(s) to emit - * {@link FeaturePermission}(s)
  • - *
  • examine requirements and permissions to compose - * {@link RestrictionVerdict}(s)
  • - *
  • execute {@link RestrictionVerdict}(s) to realize restrictions
  • - * - * @param configuration + *

    Aggregating method for the full access cycle, which consists of the following steps:

    + *
    1. resolve {@link LicensingRequirement}s
    2. + *
    3. obtain {@link LicensingCondition}s
    4. + *
    5. evaluate {@link LicensingCondition}s to emit {@link FeaturePermission}s
    6. + *
    7. examine requirements and permissions to compose {@link RestrictionVerdict}s
    8. + *
    9. execute {@link RestrictionVerdict}s to realize restrictions
    10. + *
    + * + * @param configuration - general configuration for the licensing process * @return the composite result of execution + * @see #resolveRequirements + * @see #extractConditions + * @see #evaluateConditions + * @see #evaluateConditions + * @see #examinePermissons + * @see #executeRestrictions */ LicensingResult executeAccessRestrictions(LicensingConfiguration configuration); diff --git a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/PermissionEmitter.java b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/PermissionEmitter.java index 4d1972b75..3a19cd6ad 100644 --- a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/PermissionEmitter.java +++ b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/PermissionEmitter.java @@ -17,19 +17,20 @@ import org.eclipse.passage.lic.api.conditions.LicensingCondition; /** - * 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. + * Interface of a service responsible for the third step of access cycle: condition evaluation. + * According to the contract, a service must be able to evaluate given {@link LicensingCondition}s against the current program runtime. + * As a result of evaluation, for a {@link LicensingCondition} a {@link FeaturePermission} must be emitted + * in the case all of the {@link LicensingCondition}'s terms are met at the current program runtime. * - * @see LicensingCondition - * @see FeaturePermission + * @see org.eclipse.passage.lic.api.conditions.ConditionMiner * @since 0.4.0 */ public interface PermissionEmitter { /** - * Evaluates the collection of {@link LicensingCondition} to emit a collection - * of {@link FeaturePermission} + * Evaluates the collection of {@link LicensingCondition}s to emit a collection of {@link FeaturePermission}. * + * @param configuration general configuration for the whole access cycle + * @param conditions source conditions to be evaluated against the current program runtime */ Iterable emitPermissions(LicensingConfiguration configuration, Iterable conditions) throws LicensingException; diff --git a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/PermissionExaminer.java b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/PermissionExaminer.java index db4664d47..6b8292acd 100644 --- a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/PermissionExaminer.java +++ b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/PermissionExaminer.java @@ -18,7 +18,7 @@ import org.eclipse.passage.lic.api.restrictions.RestrictionVerdict; /** - * The contract for a service responsible for examining set of {@link FeaturePermission}s + * The contract for a service responsible for the forth phase of access cycle: 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. diff --git a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/PermissionTransport.java b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/PermissionTransport.java index 22961cd15..1d59913c9 100644 --- a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/PermissionTransport.java +++ b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/access/PermissionTransport.java @@ -17,20 +17,20 @@ import java.io.OutputStream; /** - * Transport interface for {@link FeaturePermission}(s) + * Transport interface for {@link FeaturePermission}s * * @since 0.4.0 */ public interface PermissionTransport { /** - * Reads {@link FeaturePermission}(s) from the given {@link InputStream}. + * Reads {@link FeaturePermission}s from the given {@link InputStream}. * */ Iterable readPermissions(InputStream input) throws IOException; /** - * Writes {@link FeaturePermission}(s) from the given {@link OutputStream}. + * Writes {@link FeaturePermission}s from the given {@link OutputStream}. * */ void writePermissions(Iterable conditions, OutputStream output) throws IOException;