Skip to content

Commit

Permalink
Merge 542b585 into e9a6454
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcin committed Sep 6, 2020
2 parents e9a6454 + 542b585 commit af4f03c
Show file tree
Hide file tree
Showing 9 changed files with 138 additions and 32 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com)

## [Unreleased]
## [2.2.0] - 2020-09-07

### Added

- Added Sling simulation behavior with specific ProgressCheck handling for Embedded Packages,
RepositoryInitializer (repoinit) scripts, and OSGi Configurations in sling:OsgiConfig nodes, plus .cfg.json,
.config, and .properties/.cfg file formats.
- CLI and maven-plugin execution support specifying runModes to simulate effects on JCR Installer
behavior.
- Added caliper content-package module structure to provide a common basis for oakpal self-test
functionality in the future. The intention is for it eventually to drive at least one example
of every event expressible to a ProgressCheck by the OakMachine.

## [2.1.0] - 2020-05-28

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

/**
* An installable path identified as an embedded package.
*
* @since 2.2.0
*/
public final class EmbeddedPackageInstallable implements SlingOpenable<JcrPackage> {
private final @NotNull PackageId parentId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

/**
* Sling Installable representing an OSGi config node.
*
* @since 2.2.0
*/
public final class OsgiConfigInstallable implements SlingInstallable {
private final @NotNull PackageId parentId;
Expand Down
6 changes: 4 additions & 2 deletions api/src/main/java/net/adamcin/oakpal/api/ProgressCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ default void beforeSlingInstall(PackageId scanPackageId, SlingInstallable slingI
* @param slingInstallable the associated {@link SlingInstallable} identifying the source JCR event
* @since 2.2.0
*/
default void identifyEmbeddedPackage(PackageId packageId, PackageId parentId, EmbeddedPackageInstallable slingInstallable) {
default void identifyEmbeddedPackage(PackageId packageId, PackageId parentId,
EmbeddedPackageInstallable slingInstallable) {

}

Expand All @@ -220,7 +221,8 @@ default void identifyEmbeddedPackage(PackageId packageId, PackageId parentId, Em
* @throws RepositoryException because of access to a {@link Session}
* @since 2.2.0
*/
default void appliedRepoInitScripts(PackageId scanPackageId, List<String> scripts, SlingInstallable slingInstallable, Session inspectSession)
default void appliedRepoInitScripts(PackageId scanPackageId, List<String> scripts,
SlingInstallable slingInstallable, Session inspectSession)
throws RepositoryException {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
* Extended interface marking progress checks that respect a mid-scan mode that expects oakpal to temporarily silence
* violations triggered by scan events. {@link ProgressCheck}s that do not implement this interface are simply blocked
* from receiving scan events for the duration of the silent period.
*
* @since 2.2.0
*/
@ConsumerType
public interface SilenceableCheck extends ProgressCheck {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/**
* Type representing a Sling-installable resource JCR path.
*
* @since 2.2.0
*/
@ProviderType
public interface SlingInstallable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* Some sling installable resources must be opened to be read, perhaps throwing an exception, and then maybe closed.
*
* @param <ResourceType> the concrete resource type that can be opened from the installable type
* @since 2.2.0
*/
@ProviderType
public interface SlingOpenable<ResourceType> extends SlingInstallable {
Expand Down
7 changes: 5 additions & 2 deletions api/src/main/java/net/adamcin/oakpal/api/SlingSimulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

/**
* Simulates aspects of the Sling runtime.
*
* @since 2.2.0
*/
@ProviderType
public interface SlingSimulator {
Expand All @@ -34,8 +36,9 @@ public interface SlingSimulator {
* located under {@code /apps/}. This should not be used to request traditional installation of {@code subpackages}
* under {@code /etc/packages}.
* <p>
* Ideally, this method should be called by a check during
* {@link ProgressCheck#importedPath(PackageId, String, Node, PathAction)}.
* Ideally, this method should be called by a single active check during
* {@link ProgressCheck#importedPath(PackageId, String, Node, PathAction)} (such as the {@code sling-jcr-installer}
* check).
*
* @param parentPackageId the parent package ID (not the embedded package ID)
* @param node the JCR node of the embedded JCR package
Expand Down
136 changes: 109 additions & 27 deletions core/src/site/xdoc/the-basic-checklist.xml.vm
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
<h1>The Basic Checklist</h1>
<section name="Default Configuration">

<p>The full name of the basic checklist is <code>
<a href="${project.scm.url}/blob/master/core/src/main/resources/OAKPAL-INF/checklists/basic.json">
net.adamcin.oakpal.core/basic</a></code>.
</p>
<div class="source">
<pre>
<p>The full name of the basic checklist is
<code>
<a href="${project.scm.url}/blob/master/core/src/main/resources/OAKPAL-INF/checklists/basic.json">
net.adamcin.oakpal.core/basic
</a>
</code>
.
</p>
<div class="source">
<pre><![CDATA[
{
"name": "basic",
"checks": [
Expand Down Expand Up @@ -49,6 +53,10 @@
"name": "composite-store-alignment",
"impl": "net.adamcin.oakpal.core.checks.CompositeStoreAlignment"
},
{
"name": "sling-jcr-installer",
"impl": "net.adamcin.oakpal.core.checks.SlingJcrInstaller"
},
{
"name": "echo",
"impl": "net.adamcin.oakpal.core.checks.Echo",
Expand All @@ -71,32 +79,106 @@
}
]
}
</pre>
]]>
</pre>
</div>

</section>
<section name="Check Reference">
<dl>
<dt><code>paths</code> (<code>net.adamcin.oakpal.core/basic/paths</code>)</dt>
<dd>see <a href="apidocs/net/adamcin/oakpal/core/checks/Paths.html">net.adamcin.oakpal.core.checks.Paths</a></dd>
<dt><code>subpackages</code> (<code>net.adamcin.oakpal.core/basic/subpackages</code>)</dt>
<dd>see <a href="apidocs/net/adamcin/oakpal/core/checks/Subpackages.html">net.adamcin.oakpal.core.checks.Subpackages</a></dd>
<dt><code>acHandling</code> (<code>net.adamcin.oakpal.core/basic/acHandling</code>)</dt>
<dd>see <a href="apidocs/net/adamcin/oakpal/core/checks/AcHandling.html">net.adamcin.oakpal.core.checks.AcHandling</a></dd>
<dt><code>filterSets</code> (<code>net.adamcin.oakpal.core/basic/filterSets</code>)</dt>
<dd>see <a href="apidocs/net/adamcin/oakpal/core/checks/FilterSets.html">net.adamcin.oakpal.core.checks.FilterSets</a></dd>
<dt><code>overlaps</code> (<code>net.adamcin.oakpal.core/basic/overlaps</code>)</dt>
<dd>see <a href="apidocs/net/adamcin/oakpal/core/checks/Overlaps.html">net.adamcin.oakpal.core.checks.Overlaps</a></dd>
<dt><code>composite-store-alignment</code> (<code>net.adamcin.oakpal.core/basic/composite-store-alignment</code>)</dt>
<dd>see <a href="apidocs/net/adamcin/oakpal/core/checks/CompositeStoreAlignment.html">net.adamcin.oakpal.core.checks.CompositeStoreAlignment</a></dd>
<dt><code>echo</code> (<code>net.adamcin.oakpal.core/basic/echo</code>)</dt>
<dd>(skipped, template-only) see <a href="apidocs/net/adamcin/oakpal/core/checks/Echo.html">net.adamcin.oakpal.core.checks.Echo</a></dd>
<dt><code>jcrProperties</code> (<code>net.adamcin.oakpal.core/basic/jcrProperties</code>)</dt>
<dd>(skipped, template-only) see <a href="apidocs/net/adamcin/oakpal/core/checks/JcrProperties.html">net.adamcin.oakpal.core.checks.JcrProperties</a></dd>
<dt><code>expectPaths</code></dt>
<dd>(skipped, template-only) see <a href="apidocs/net/adamcin/oakpal/core/checks/ExpectPaths.html">net.adamcin.oakpal.core.checks.ExpectPaths</a></dd>
<dt><code>expectAces</code></dt>
<dd>(skipped, template-only) see <a href="apidocs/net/adamcin/oakpal/core/checks/ExpectAces.html">net.adamcin.oakpal.core.checks.ExpectAces</a></dd>
<dt>
<code>paths</code>
(<code>net.adamcin.oakpal.core/basic/paths</code>)
</dt>
<dd>see
<a href="apidocs/net/adamcin/oakpal/core/checks/Paths.html">net.adamcin.oakpal.core.checks.Paths</a>
</dd>
<dt>
<code>subpackages</code>
(<code>net.adamcin.oakpal.core/basic/subpackages</code>)
</dt>
<dd>see
<a href="apidocs/net/adamcin/oakpal/core/checks/Subpackages.html">
net.adamcin.oakpal.core.checks.Subpackages
</a>
</dd>
<dt>
<code>acHandling</code>
(<code>net.adamcin.oakpal.core/basic/acHandling</code>)
</dt>
<dd>see
<a href="apidocs/net/adamcin/oakpal/core/checks/AcHandling.html">
net.adamcin.oakpal.core.checks.AcHandling
</a>
</dd>
<dt>
<code>filterSets</code>
(<code>net.adamcin.oakpal.core/basic/filterSets</code>)
</dt>
<dd>see
<a href="apidocs/net/adamcin/oakpal/core/checks/FilterSets.html">
net.adamcin.oakpal.core.checks.FilterSets
</a>
</dd>
<dt>
<code>overlaps</code>
(<code>net.adamcin.oakpal.core/basic/overlaps</code>)
</dt>
<dd>see
<a href="apidocs/net/adamcin/oakpal/core/checks/Overlaps.html">
net.adamcin.oakpal.core.checks.Overlaps
</a>
</dd>
<dt>
<code>composite-store-alignment</code>
(<code>net.adamcin.oakpal.core/basic/composite-store-alignment</code>)
</dt>
<dd>see
<a href="apidocs/net/adamcin/oakpal/core/checks/CompositeStoreAlignment.html">
net.adamcin.oakpal.core.checks.CompositeStoreAlignment
</a>
</dd>
<dt>
<code>sling-jcr-installer</code>
(<code>net.adamcin.oakpal.core/basic/sling-jcr-installer</code>)
</dt>
<dd>see
<a href="apidocs/net/adamcin/oakpal/core/checks/SlingJcrInstaller.html">
net.adamcin.oakpal.core.checks.SlingJcrInstaller
</a>
</dd>
<dt>
<code>echo</code>
(<code>net.adamcin.oakpal.core/basic/echo</code>)
</dt>
<dd>(skipped, template-only) see
<a href="apidocs/net/adamcin/oakpal/core/checks/Echo.html">net.adamcin.oakpal.core.checks.Echo</a>
</dd>
<dt>
<code>jcrProperties</code>
(<code>net.adamcin.oakpal.core/basic/jcrProperties</code>)
</dt>
<dd>(skipped, template-only) see
<a href="apidocs/net/adamcin/oakpal/core/checks/JcrProperties.html">
net.adamcin.oakpal.core.checks.JcrProperties
</a>
</dd>
<dt>
<code>expectPaths</code>
</dt>
<dd>(skipped, template-only) see
<a href="apidocs/net/adamcin/oakpal/core/checks/ExpectPaths.html">
net.adamcin.oakpal.core.checks.ExpectPaths
</a>
</dd>
<dt>
<code>expectAces</code>
</dt>
<dd>(skipped, template-only) see
<a href="apidocs/net/adamcin/oakpal/core/checks/ExpectAces.html">
net.adamcin.oakpal.core.checks.ExpectAces
</a>
</dd>
</dl>
</section>
</body>
Expand Down

0 comments on commit af4f03c

Please sign in to comment.