Adobe-Consulting-Services/acs-aem-commons — pull request #234 by davidjgonzalez (2014-06-12 02:59:23+00:00)
Title: Package Replication Status Updater (Previously #188)

Cleaned up #188 commit history; Based on discussions in #102

Replication Status Updater (Activate/Deactivate/Clear) with Package Activation event handler.

ReplicationStatusManager service used to update Replication state of resources. Only resources whose nodeTypes are of the osgi configured node-types are candidates

node-types defaults to: cq:ReplicationStatus, rep:User, re
p:Group, cq:PageContent, dam:AssetContent (the last 2 should actually always match based on cq:ReplicationStatus nodeType check)

JcrPackageReplicationStatusEventHandlerImpl event handler listens for replication events on JcrPackage resources (~ `/etc/packages/.+\.zip`)

Currently get the package contents via package "coverage" (though I think this is different than "contents" which is what is preferable; need to investigate this some more).

OSGi configurable:
* replicated-at: Current Time or Package Last Modified
* replicated-by (Defaults to: Package Replication)
* node-tyoes: List of nodetypes that are candidates for to update with replication status

Example folder (/content/dam/geometrixx/banners) that was replicated via package. Event handler was configured to `replicate-at: CURRENT_TIME`

![aem_wcm___banners](https://cloud.githubusercontent.com/assets/1451868/3253630/677ccb1e-f1dd-11e3-88c1-c30b30dc8072.png)