diff --git a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionExecutor.java b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionExecutor.java index 3f099ac85..1b30b1b4d 100644 --- a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionExecutor.java +++ b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionExecutor.java @@ -15,17 +15,32 @@ import org.eclipse.passage.lic.api.LicensingResult; /** - * - * Implement the {@link RestrictionVerdict}(s) for the licensed feature: - *
  • early exit from command line tools with notice
  • - *
  • blocking dialogs for UI application
  • - *
  • filtering out the UI
  • - *
  • blocking of bundles using OSGi level
  • * + * The service implementing the restrictions execution phase + * of access cycle. + * @since 0.4.0 + * @see org.eclipse.passage.lic.api */ public interface RestrictionExecutor { + /** + *

    Applies the given {@link RestrictionVerdict}s for feature under licencing + * to the current runtime of the program.

    + * + *

    Is capable to affect the program runtime environment the following ways:

    + *
      + *
    1. early exit from command line tools with notice
    2. + *
    3. block dialogs for UI application
    4. + *
    5. filter out the UI
    6. + *
    7. block of bundles using OSGi level
    8. + *
    + * + * @param verdicts restriction instructions gained at the pagse of permission examining phase of access cycle + * @return the final result summary of the current access cycle + * + * @since 0.4.0 + */ LicensingResult execute(Iterable verdicts); } diff --git a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionExecutorRegistry.java b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionExecutorRegistry.java index 1d5d03c2b..af91a10ee 100644 --- a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionExecutorRegistry.java +++ b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionExecutorRegistry.java @@ -20,12 +20,24 @@ */ public interface RestrictionExecutorRegistry { + /** + * @since 0.4.0 + */ String getDefaultRestrictionLevelIdentifier(); + /** + * @since 0.4.0 + */ Iterable getRestrictionLevelIdentifiers(); + /** + * @since 0.4.0 + */ RestrictionLevelDescriptor getRestrictionLevel(String identifier); + /** + * @since 0.4.0 + */ Iterable getRestrictionLevels(); } diff --git a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionLevelDescriptor.java b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionLevelDescriptor.java index 331f4b75b..fb69ebc74 100644 --- a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionLevelDescriptor.java +++ b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionLevelDescriptor.java @@ -5,10 +5,19 @@ */ public interface RestrictionLevelDescriptor { + /** + * @since 0.4.0 + */ String getIdentifier(); + /** + * @since 0.4.0 + */ String getName(); + /** + * @since 0.4.0 + */ String getDescription(); } \ No newline at end of file diff --git a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionVerdict.java b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionVerdict.java index 12bcdc2b9..84c6a4c9b 100644 --- a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionVerdict.java +++ b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/api/restrictions/RestrictionVerdict.java @@ -21,12 +21,15 @@ * The data required to execute the restriction, produced by * {@link PermissionExaminer} and consumed by {@link RestrictionExecutor} * + * @see RestrictionExecutor * @since 0.4.0 */ public interface RestrictionVerdict { /** * General configuration + * + * @since 0.4.0 */ LicensingConfiguration getLicensingConfiguration(); @@ -37,14 +40,22 @@ public interface RestrictionVerdict { * @see LicensingRequirement * @see org.eclipse.passage.lic.api.access.FeaturePermission * @see org.eclipse.passage.lic.api.access.PermissionExaminer + * @since 0.4.0 */ LicensingRequirement getLicensingRequirement(); /** * Level of restriction severity, described freely, like "warn" or "fatal" + * + * @since 0.4.0 */ String getRestrictionLevel(); + /** + * Encoded reason of restriction, required for {@link RestrictionExecutor} + * + * @since 0.4.0 + */ int getRestrictionCode(); }