├── .gitattributes ├── docs ├── apm-logo.png ├── wtt-logo.png ├── apm-editor.png ├── apm-history.png ├── apm-dashboard.png ├── apm-references.png ├── apm-scripts-0.png ├── apm-scripts-1.png ├── apm-scripts-2.png ├── apm-execution-summary.png ├── aemaacs.md └── README.md ├── app ├── aem │ ├── ui.apps.base │ │ ├── src │ │ │ └── main │ │ │ │ └── content │ │ │ │ └── jcr_root │ │ │ │ └── apps │ │ │ │ ├── apm │ │ │ │ ├── clientlibs │ │ │ │ │ ├── externals │ │ │ │ │ │ └── ace │ │ │ │ │ │ │ ├── js │ │ │ │ │ │ │ ├── mode-text.js │ │ │ │ │ │ │ ├── ext-error_marker.js │ │ │ │ │ │ │ ├── ext-linking.js │ │ │ │ │ │ │ ├── snippets │ │ │ │ │ │ │ │ └── text.js │ │ │ │ │ │ │ ├── ext-statusbar.js │ │ │ │ │ │ │ ├── ext-themelist.js │ │ │ │ │ │ │ ├── ext-spellcheck.js │ │ │ │ │ │ │ └── THIRD-PARTY.txt │ │ │ │ │ │ │ ├── js.txt │ │ │ │ │ │ │ └── .content.xml │ │ │ │ │ └── views │ │ │ │ │ │ ├── editor │ │ │ │ │ │ ├── css.txt │ │ │ │ │ │ ├── js.txt │ │ │ │ │ │ ├── .content.xml │ │ │ │ │ │ └── css │ │ │ │ │ │ │ └── styles.less │ │ │ │ │ │ ├── history │ │ │ │ │ │ ├── js.txt │ │ │ │ │ │ ├── css.txt │ │ │ │ │ │ ├── img │ │ │ │ │ │ │ └── icons │ │ │ │ │ │ │ │ └── summary.png │ │ │ │ │ │ ├── .content.xml │ │ │ │ │ │ └── css │ │ │ │ │ │ │ └── history.less │ │ │ │ │ │ ├── moveItem │ │ │ │ │ │ ├── js.txt │ │ │ │ │ │ └── .content.xml │ │ │ │ │ │ ├── scripts │ │ │ │ │ │ ├── css.txt │ │ │ │ │ │ ├── js.txt │ │ │ │ │ │ ├── .content.xml │ │ │ │ │ │ ├── css │ │ │ │ │ │ │ └── styles.less │ │ │ │ │ │ └── js │ │ │ │ │ │ │ └── view-mode.js │ │ │ │ │ │ ├── summary │ │ │ │ │ │ ├── css.txt │ │ │ │ │ │ ├── css │ │ │ │ │ │ │ └── styles.less │ │ │ │ │ │ └── .content.xml │ │ │ │ │ │ ├── viewer │ │ │ │ │ │ ├── css.txt │ │ │ │ │ │ ├── js.txt │ │ │ │ │ │ ├── .content.xml │ │ │ │ │ │ └── css │ │ │ │ │ │ │ └── styles.less │ │ │ │ │ │ ├── dashboard │ │ │ │ │ │ ├── css.txt │ │ │ │ │ │ ├── css │ │ │ │ │ │ │ └── styles.less │ │ │ │ │ │ └── .content.xml │ │ │ │ │ │ ├── editorGrid │ │ │ │ │ │ ├── css.txt │ │ │ │ │ │ ├── js.txt │ │ │ │ │ │ └── .content.xml │ │ │ │ │ │ └── references │ │ │ │ │ │ ├── css.txt │ │ │ │ │ │ └── .content.xml │ │ │ │ ├── .content.xml │ │ │ │ ├── components │ │ │ │ │ ├── reference │ │ │ │ │ │ └── .content.xml │ │ │ │ │ ├── console │ │ │ │ │ │ ├── .content.xml │ │ │ │ │ │ └── console.html │ │ │ │ │ ├── historyRow │ │ │ │ │ │ └── .content.xml │ │ │ │ │ ├── scriptsRow │ │ │ │ │ │ └── .content.xml │ │ │ │ │ ├── dashboardTile │ │ │ │ │ │ ├── .content.xml │ │ │ │ │ │ └── dashboardTile.html │ │ │ │ │ ├── scriptDetails │ │ │ │ │ │ └── .content.xml │ │ │ │ │ ├── summaryTable │ │ │ │ │ │ └── .content.xml │ │ │ │ │ └── saveAndCloseButton │ │ │ │ │ │ └── .content.xml │ │ │ │ ├── fragments │ │ │ │ │ └── .content.xml │ │ │ │ └── views │ │ │ │ │ └── .content.xml │ │ │ │ └── cq │ │ │ │ └── core │ │ │ │ └── content │ │ │ │ └── nav │ │ │ │ └── tools │ │ │ │ └── security │ │ │ │ └── .content.xml │ │ └── build.gradle.kts │ ├── common │ │ └── package │ │ │ └── defaults │ │ │ └── META-INF │ │ │ └── vault │ │ │ └── definition │ │ │ └── thumbnail.png │ ├── all │ │ ├── src │ │ │ └── main │ │ │ │ └── content │ │ │ │ └── META-INF │ │ │ │ └── vault │ │ │ │ └── filter.xml │ │ └── build.gradle.kts │ ├── ui.apps │ │ └── src │ │ │ └── main │ │ │ └── content │ │ │ ├── jcr_root │ │ │ ├── apps │ │ │ │ └── apm │ │ │ │ │ └── config │ │ │ │ │ ├── org.apache.sling.jcr.base.internal.LoginAdminWhitelist.fragment-apm.config │ │ │ │ │ └── org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-apm-system-user.config │ │ │ ├── conf │ │ │ │ └── apm │ │ │ │ │ └── scripts │ │ │ │ │ └── .content.xml │ │ │ ├── _rep_policy.xml │ │ │ └── home │ │ │ │ └── users │ │ │ │ └── system │ │ │ │ └── apm-system-user │ │ │ │ └── .content.xml │ │ │ └── META-INF │ │ │ └── vault │ │ │ ├── filter.xml │ │ │ └── nodetypes.cnd │ ├── all.cloud │ │ ├── src │ │ │ └── main │ │ │ │ └── content │ │ │ │ └── META-INF │ │ │ │ └── vault │ │ │ │ └── filter.xml │ │ └── build.gradle.kts │ ├── ui.apps.cloud │ │ └── src │ │ │ └── main │ │ │ └── content │ │ │ ├── jcr_root │ │ │ └── apps │ │ │ │ └── apm │ │ │ │ └── config │ │ │ │ ├── org.apache.sling.jcr.repoinit.RepositoryInitializer~conf-apm-scripts.cfg.json │ │ │ │ ├── org.apache.sling.jcr.base.internal.LoginAdminWhitelist.fragment~apm.cfg.json │ │ │ │ ├── org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~apm-system-user.cfg.json │ │ │ │ ├── org.apache.sling.jcr.repoinit.RepositoryInitializer~apm-system-user.cfg.json │ │ │ │ └── org.apache.sling.jcr.repoinit.RepositoryInitializer~apm-script-mixin.cfg.json │ │ │ └── META-INF │ │ │ └── vault │ │ │ └── filter.xml │ ├── core │ │ └── src │ │ │ ├── test │ │ │ ├── resources │ │ │ │ ├── filename.apm │ │ │ │ ├── content.apm │ │ │ │ ├── invalid │ │ │ │ │ ├── invalid1.apm │ │ │ │ │ ├── invalid2.apm │ │ │ │ │ ├── invalid3.apm │ │ │ │ │ ├── invalid4.apm │ │ │ │ │ ├── invalid5.apm │ │ │ │ │ ├── invalid10.apm │ │ │ │ │ ├── invalid13.apm │ │ │ │ │ ├── invalid14.apm │ │ │ │ │ ├── invalid6.apm │ │ │ │ │ ├── invalid8.apm │ │ │ │ │ ├── invalid9.apm │ │ │ │ │ ├── invalid7.apm │ │ │ │ │ ├── invalid11.apm │ │ │ │ │ └── invalid12.apm │ │ │ │ ├── macro.apm │ │ │ │ ├── includes │ │ │ │ │ ├── cycle-a.apm │ │ │ │ │ ├── cycle-b.apm │ │ │ │ │ ├── cycle-c.apm │ │ │ │ │ ├── import-b.apm │ │ │ │ │ ├── run-c.apm │ │ │ │ │ ├── import-c.apm │ │ │ │ │ ├── import-a.apm │ │ │ │ │ ├── run-b.apm │ │ │ │ │ └── run-a.apm │ │ │ │ ├── import-define.apm │ │ │ │ ├── run-macro.apm │ │ │ │ ├── import-and-run2.apm │ │ │ │ ├── import-and-run3.apm │ │ │ │ ├── import-deep-define.apm │ │ │ │ ├── import-and-run1.apm │ │ │ │ ├── import.apm │ │ │ │ ├── define-map.apm │ │ │ │ └── foreach.apm │ │ │ └── groovy │ │ │ │ └── com │ │ │ │ └── cognifide │ │ │ │ └── apm │ │ │ │ └── core │ │ │ │ └── actions │ │ │ │ ├── MapperWithoutAnnotation.groovy │ │ │ │ └── MapperWithWrongReturnType.groovy │ │ │ └── main │ │ │ ├── resources │ │ │ ├── com │ │ │ │ └── cognifide │ │ │ │ │ └── apm │ │ │ │ │ └── core │ │ │ │ │ └── ui │ │ │ │ │ └── models │ │ │ │ │ └── content.apm │ │ │ └── apidefinition │ │ │ │ └── README.md │ │ │ └── java │ │ │ └── com │ │ │ └── cognifide │ │ │ └── apm │ │ │ ├── core │ │ │ ├── Apm.java │ │ │ ├── services │ │ │ │ ├── event │ │ │ │ │ └── EventManager.java │ │ │ │ ├── version │ │ │ │ │ ├── ScriptVersion.java │ │ │ │ │ └── VersionService.java │ │ │ │ └── async │ │ │ │ │ └── AsyncScriptExecutor.java │ │ │ ├── utils │ │ │ │ ├── sling │ │ │ │ │ ├── ResolveException.java │ │ │ │ │ ├── OperateException.java │ │ │ │ │ ├── ResolveCallback.java │ │ │ │ │ └── OperateCallback.java │ │ │ │ ├── PathUtils.java │ │ │ │ ├── CalendarUtils.java │ │ │ │ ├── LabelUtils.java │ │ │ │ └── ResourceMixinUtil.java │ │ │ ├── actions │ │ │ │ ├── scanner │ │ │ │ │ ├── RegistryChangedListener.java │ │ │ │ │ └── BundleUtils.java │ │ │ │ ├── ActionMapperRegistry.java │ │ │ │ ├── executor │ │ │ │ │ └── ActionExecutor.java │ │ │ │ ├── ActionFactory.java │ │ │ │ ├── ArgumentDescription.java │ │ │ │ └── MapperContext.java │ │ │ ├── grammar │ │ │ │ ├── ScriptExecutionException.java │ │ │ │ ├── argument │ │ │ │ │ └── ArgumentResolverException.java │ │ │ │ ├── datasource │ │ │ │ │ ├── DataSource.java │ │ │ │ │ ├── LowerDataSource.java │ │ │ │ │ └── UpperDataSource.java │ │ │ │ ├── ActionInvoker.java │ │ │ │ └── executioncontext │ │ │ │ │ └── ExternalExecutionContext.java │ │ │ ├── logger │ │ │ │ └── Position.java │ │ │ ├── history │ │ │ │ ├── ScriptHistory.java │ │ │ │ └── HistoryEntry.java │ │ │ ├── endpoints │ │ │ │ ├── params │ │ │ │ │ ├── FileName.java │ │ │ │ │ └── RequestParameter.java │ │ │ │ ├── ScriptDeleteForm.java │ │ │ │ └── ScriptExecutionStatusForm.java │ │ │ ├── scripts │ │ │ │ ├── ScriptStorageException.java │ │ │ │ └── ScriptStorage.java │ │ │ ├── crypto │ │ │ │ └── ProtectTextForm.java │ │ │ └── ui │ │ │ │ └── datasources │ │ │ │ └── LaunchModeDatasourceServlet.java │ │ │ ├── api │ │ │ ├── services │ │ │ │ ├── ExecutionMode.java │ │ │ │ ├── RunModesProvider.java │ │ │ │ ├── DefinitionsProvider.java │ │ │ │ ├── ExecutionResult.java │ │ │ │ └── ScriptFinder.java │ │ │ ├── actions │ │ │ │ ├── Action.java │ │ │ │ ├── SessionSavingPolicy.java │ │ │ │ ├── annotations │ │ │ │ │ ├── Flags.java │ │ │ │ │ ├── Mapping.java │ │ │ │ │ ├── Named.java │ │ │ │ │ ├── Mapper.java │ │ │ │ │ ├── Required.java │ │ │ │ │ └── Flag.java │ │ │ │ ├── Message.java │ │ │ │ └── ActionResult.java │ │ │ ├── exceptions │ │ │ │ ├── ActionException.java │ │ │ │ ├── ActionCreationException.java │ │ │ │ ├── AuthorizableNotFoundException.java │ │ │ │ ├── ActionExecutionException.java │ │ │ │ ├── InvalidActionMapperException.java │ │ │ │ └── ExecutionException.java │ │ │ └── scripts │ │ │ │ └── MutableScript.java │ │ │ ├── checks │ │ │ ├── actions │ │ │ │ └── ActionGroup.java │ │ │ └── utils │ │ │ │ ├── ActionUtils.java │ │ │ │ └── MessagingUtils.java │ │ │ ├── main │ │ │ ├── actions │ │ │ │ ├── ActionGroup.java │ │ │ │ ├── CommonFlags.java │ │ │ │ ├── save │ │ │ │ │ └── SaveMapper.java │ │ │ │ ├── removechildrengroups │ │ │ │ │ ├── RemoveChildrenGroupsMapper.java │ │ │ │ │ └── RemoveChildrenGroups.java │ │ │ │ ├── removeparentsgroups │ │ │ │ │ └── RemoveParentsGroupsMapper.java │ │ │ │ └── sessionsave │ │ │ │ │ └── SessionSaveMapper.java │ │ │ ├── utils │ │ │ │ └── PathUtils.java │ │ │ ├── permissions │ │ │ │ └── exceptions │ │ │ │ │ └── PermissionException.java │ │ │ └── RandomPasswordGenerator.java │ │ │ └── runmodes │ │ │ └── services │ │ │ └── RunModesProviderService.java │ └── common.gradle.kts └── common.gradle.kts ├── gradle ├── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties └── gradle.properties ├── examples └── src │ └── main │ └── content │ ├── jcr_root │ └── conf │ │ └── apm │ │ └── scripts │ │ └── examples │ │ ├── to-import │ │ ├── script-to-import.apm │ │ └── script-to-import.apm.dir │ │ │ └── .content.xml │ │ ├── import-and-run.apm │ │ ├── authorizables.apm.dir │ │ └── .content.xml │ │ ├── contexts.apm.dir │ │ └── .content.xml │ │ ├── permissions.apm.dir │ │ └── .content.xml │ │ ├── import-and-run.apm.dir │ │ └── .content.xml │ │ ├── permissions.apm │ │ └── contexts.apm │ └── META-INF │ └── vault │ ├── definition │ └── thumbnail.png │ └── filter.xml ├── settings.gradle.kts ├── .github ├── workflows │ ├── release-drafter.yml │ └── gradle.yml └── release-drafter.yml ├── .gitignore ├── CHANGELOG.md └── gradle.properties /.gitattributes: -------------------------------------------------------------------------------- 1 | * -text -------------------------------------------------------------------------------- /docs/apm-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/docs/apm-logo.png -------------------------------------------------------------------------------- /docs/wtt-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/docs/wtt-logo.png -------------------------------------------------------------------------------- /docs/apm-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/docs/apm-editor.png -------------------------------------------------------------------------------- /docs/apm-history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/docs/apm-history.png -------------------------------------------------------------------------------- /docs/apm-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/docs/apm-dashboard.png -------------------------------------------------------------------------------- /docs/apm-references.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/docs/apm-references.png -------------------------------------------------------------------------------- /docs/apm-scripts-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/docs/apm-scripts-0.png -------------------------------------------------------------------------------- /docs/apm-scripts-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/docs/apm-scripts-1.png -------------------------------------------------------------------------------- /docs/apm-scripts-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/docs/apm-scripts-2.png -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/externals/ace/js/mode-text.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/apm-execution-summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/docs/apm-execution-summary.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/editor/css.txt: -------------------------------------------------------------------------------- 1 | #base=css 2 | styles.less 3 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/editor/js.txt: -------------------------------------------------------------------------------- 1 | #base=js 2 | apm-editor.js 3 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/history/js.txt: -------------------------------------------------------------------------------- 1 | #base=js 2 | apm-history.js -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/moveItem/js.txt: -------------------------------------------------------------------------------- 1 | #base=js 2 | moveitem.js 3 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/scripts/css.txt: -------------------------------------------------------------------------------- 1 | #base=css 2 | styles.less 3 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/summary/css.txt: -------------------------------------------------------------------------------- 1 | #base=css 2 | styles.less 3 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/viewer/css.txt: -------------------------------------------------------------------------------- 1 | #base=css 2 | styles.less 3 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/viewer/js.txt: -------------------------------------------------------------------------------- 1 | #base=js 2 | apm-viewer.js 3 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/dashboard/css.txt: -------------------------------------------------------------------------------- 1 | #base=css 2 | styles.less 3 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/editorGrid/css.txt: -------------------------------------------------------------------------------- 1 | #base=css 2 | styles.less 3 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/history/css.txt: -------------------------------------------------------------------------------- 1 | #base=css 2 | history.less 3 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/editorGrid/js.txt: -------------------------------------------------------------------------------- 1 | #base=js 2 | apm-editor-grid.js 3 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/references/css.txt: -------------------------------------------------------------------------------- 1 | #base=css 2 | references.less 3 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/scripts/js.txt: -------------------------------------------------------------------------------- 1 | #base=js 2 | apm-scripts.js 3 | fileupload.js 4 | view-mode.js 5 | deleteitem.js 6 | -------------------------------------------------------------------------------- /examples/src/main/content/jcr_root/conf/apm/scripts/examples/to-import/script-to-import.apm: -------------------------------------------------------------------------------- 1 | # Script to be used by importing.apm script 2 | 3 | DEFINE var 'imported value' -------------------------------------------------------------------------------- /examples/src/main/content/META-INF/vault/definition/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/examples/src/main/content/META-INF/vault/definition/thumbnail.png -------------------------------------------------------------------------------- /app/aem/common/package/defaults/META-INF/vault/definition/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/app/aem/common/package/defaults/META-INF/vault/definition/thumbnail.png -------------------------------------------------------------------------------- /app/aem/all/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/aem/ui.apps/src/main/content/jcr_root/apps/apm/config/org.apache.sling.jcr.base.internal.LoginAdminWhitelist.fragment-apm.config: -------------------------------------------------------------------------------- 1 | whitelist.name="apm" 2 | whitelist.bundles=["com.cognifide.apm"] 3 | -------------------------------------------------------------------------------- /app/aem/all.cloud/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/aem/ui.apps/src/main/content/jcr_root/apps/apm/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-apm-system-user.config: -------------------------------------------------------------------------------- 1 | user.mapping=["com.cognifide.apm\=apm-system-user"] 2 | -------------------------------------------------------------------------------- /examples/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/externals/ace/js.txt: -------------------------------------------------------------------------------- 1 | #base=js 2 | ace.js 3 | token_tooltip.js 4 | snippets/cqsm.js 5 | ext-language_tools.js 6 | mode-cqsm.js 7 | theme-chrome.js 8 | -------------------------------------------------------------------------------- /app/aem/ui.apps.cloud/src/main/content/jcr_root/apps/apm/config/org.apache.sling.jcr.repoinit.RepositoryInitializer~conf-apm-scripts.cfg.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts":[ 3 | "create path /conf/apm/scripts" 4 | ] 5 | } -------------------------------------------------------------------------------- /app/aem/ui.apps.cloud/src/main/content/jcr_root/apps/apm/config/org.apache.sling.jcr.base.internal.LoginAdminWhitelist.fragment~apm.cfg.json: -------------------------------------------------------------------------------- 1 | { 2 | "whitelist.bundles":[ 3 | "com.cognifide.apm" 4 | ], 5 | "whitelist.name":"apm" 6 | } 7 | -------------------------------------------------------------------------------- /app/aem/ui.apps.cloud/src/main/content/jcr_root/apps/apm/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~apm-system-user.cfg.json: -------------------------------------------------------------------------------- 1 | { 2 | "user.mapping":[ 3 | "com.cognifide.apm=[apm-system-user]" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /app/aem/ui.apps/src/main/content/jcr_root/conf/apm/scripts/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /gradle/gradle.properties: -------------------------------------------------------------------------------- 1 | # Performance tuning 2 | org.gradle.daemon=true 3 | org.gradle.parallel=true 4 | org.gradle.caching=true 5 | 6 | # Cognifide nexus and rshare user 7 | nexusUser= 8 | nexusPassword= 9 | rshareUser= 10 | rsharePass= -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/history/img/icons/summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wttech/APM/HEAD/app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/history/img/icons/summary.png -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/externals/ace/js/ext-error_marker.js: -------------------------------------------------------------------------------- 1 | ; 2 | (function() { 3 | ace.require(["ace/ext/error_marker"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /app/aem/ui.apps.cloud/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | rootProject.name = "apm" 2 | 3 | include(":app:aem:core") 4 | include(":app:aem:ui.apps.base") 5 | include(":app:aem:ui.apps") 6 | include(":app:aem:ui.apps.cloud") 7 | include(":examples") 8 | include(":app:aem:all") 9 | include(":app:aem:all.cloud") 10 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/moveItem/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.cognifide.aem.package") 3 | id("com.cognifide.aem.package.sync") 4 | `maven-publish` 5 | signing 6 | } 7 | 8 | apply(from = rootProject.file("app/common.gradle.kts")) 9 | apply(from = rootProject.file("app/aem/common.gradle.kts")) 10 | -------------------------------------------------------------------------------- /app/aem/ui.apps/src/main/content/jcr_root/_rep_policy.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/components/reference/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/components/console/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/components/historyRow/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/components/scriptsRow/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/components/dashboardTile/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/components/scriptDetails/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/components/summaryTable/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/components/saveAndCloseButton/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/aem/ui.apps.cloud/src/main/content/jcr_root/apps/apm/config/org.apache.sling.jcr.repoinit.RepositoryInitializer~apm-system-user.cfg.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts":[ 3 | "create service user apm-system-user with forced path system/cq:services/apm\nset principal ACL for apm-system-user\nallow jcr:all on /\nallow jcr:all on :repository \nend" 4 | ] 5 | } -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/filename.apm: -------------------------------------------------------------------------------- 1 | DEFINE path "/content/foo/bar" 2 | 3 | CREATE-USER "author" password="secret" 4 | CREATE-GROUP "authors" --IF-NOT-EXISTS 5 | 6 | FOR-GROUP "authors" BEGIN 7 | ALLOW [jcr:read] ON /content 8 | ALLOW [ALL] ON $path 9 | DENY [MODIFY, DELETE] ON "${path}/foo" 10 | DENY [MODIFY, DELETE] ON $path + "/foo/bar" 11 | END -------------------------------------------------------------------------------- /app/aem/ui.apps/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/aem/ui.apps/src/main/content/jcr_root/home/users/system/apm-system-user/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/history/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/scripts/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/editorGrid/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/references/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /.github/workflows/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name: Release Drafter 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | update_release_draft: 10 | runs-on: ubuntu-latest 11 | steps: 12 | # Drafts your next Release notes as Pull Requests are merged into "master" 13 | - uses: release-drafter/release-drafter@v5 14 | env: 15 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/editor/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/viewer/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/content.apm: -------------------------------------------------------------------------------- 1 | # Script description example 2 | # ========================== 3 | 4 | # Variable definitions 5 | DEFINE path "/content/foo/bar" 6 | 7 | # Users & groups creation 8 | CREATE-USER "author" password="secret" 9 | CREATE-GROUP "authors" --IF-NOT-EXISTS 10 | 11 | # Permissions setting 12 | FOR-GROUP "authors" BEGIN 13 | ALLOW $path ["ALL"] 14 | DENY $path + "/foo/bar" ["MODIFY", "DELETE"] 15 | END 16 | -------------------------------------------------------------------------------- /app/aem/core/src/main/resources/com/cognifide/apm/core/ui/models/content.apm: -------------------------------------------------------------------------------- 1 | # Script description example 2 | # ========================== 3 | 4 | # Variable definitions 5 | DEFINE path "/content/foo/bar" 6 | 7 | # Users & groups creation 8 | CREATE-USER "author" password="secret" 9 | CREATE-GROUP "authors" --IF-NOT-EXISTS 10 | 11 | # Permissions setting 12 | FOR-GROUP "authors" BEGIN 13 | ALLOW $path ["ALL"] 14 | DENY $path + "/foo/bar" ["MODIFY", "DELETE"] 15 | END -------------------------------------------------------------------------------- /app/aem/ui.apps/src/main/content/META-INF/vault/nodetypes.cnd: -------------------------------------------------------------------------------- 1 | 2 | 3 | [apm:Script] 4 | mixin 5 | - apm:launchEnabled (boolean) 6 | - apm:launchMode (string) 7 | - apm:launchEnvironment (string) 8 | - apm:launchRunModes (string) multiple 9 | - apm:launchHook (string) 10 | - apm:launchSchedule (date) 11 | - apm:launchCronExpression (string) 12 | - apm:lastExecuted (date) 13 | - apm:checksum (string) 14 | - apm:verified (string) 15 | -------------------------------------------------------------------------------- /examples/src/main/content/jcr_root/conf/apm/scripts/examples/to-import/script-to-import.apm.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /examples/src/main/content/jcr_root/conf/apm/scripts/examples/import-and-run.apm: -------------------------------------------------------------------------------- 1 | # This script provides examples of how scripts can be imported or run from a given script. 2 | # Notice that both actions can be done using relative path as well as absolute path 3 | 4 | # Use IMPORT command to load definitions from another script (see DEFINE command for further information) 5 | IMPORT 'to-import/script-to-import.apm' 6 | 7 | # Use RUN command to run another script 8 | RUN '/conf/apm/scripts/examples/to-import/script-to-import.apm' 9 | -------------------------------------------------------------------------------- /examples/src/main/content/jcr_root/conf/apm/scripts/examples/authorizables.apm.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /docs/aemaacs.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | APM Logo 5 |

6 | 7 | # Immutable content 8 | For immutable parts of the repository (`/apps`, `/libs`), based on Adobe recommendation, use Repoinit. 9 | Usually there is a few of really needed permissions, you can close those permissions 10 | in a dedicated user group, that can be then used as composition in other final user groups. 11 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/cq/core/content/nav/tools/security/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 13 | -------------------------------------------------------------------------------- /app/aem/ui.apps.cloud/src/main/content/jcr_root/apps/apm/config/org.apache.sling.jcr.repoinit.RepositoryInitializer~apm-script-mixin.cfg.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts":[ 3 | "register nodetypes\n<<===\n\n\n[apm:Script]\nmixin\n- apm:launchEnabled (boolean)\n- apm:launchMode (string)\n- apm:launchEnvironment (string)\n- apm:launchRunModes (string) multiple\n- apm:launchHook (string)\n- apm:launchSchedule (date)\n- apm:launchCronExpression (string)\n- apm:lastExecuted (date)\n- apm:checksum (string)\n- apm:verified (string)\n===>>" 4 | ] 5 | } -------------------------------------------------------------------------------- /examples/src/main/content/jcr_root/conf/apm/scripts/examples/contexts.apm.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /examples/src/main/content/jcr_root/conf/apm/scripts/examples/permissions.apm.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /examples/src/main/content/jcr_root/conf/apm/scripts/examples/import-and-run.apm.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .gitignore support plugin (hsz.mobi) 2 | 3 | ### Java template 4 | *.class 5 | target/ 6 | build/ 7 | generated/ 8 | .gradle/ 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.ear 17 | 18 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 19 | hs_err_pid* 20 | 21 | # IDE files 22 | *.iml 23 | .idea/ 24 | 25 | # Generated and temporary files 26 | *.log 27 | log.txt 28 | *.project 29 | atlassian-ide-plugin.xml 30 | 31 | #eclipse 32 | .settings 33 | .classpath 34 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | APM Logo 5 |

6 | 7 | # Documentation 8 | * [UI](ui.md) - quick tour for APM user's interface. 9 | * [Grammar](grammar.md) - syntax of APM scripts, and description of main actions. 10 | * [Permissions](permissions.md) - actions used for adding and revoking access to resources. 11 | * [Launchers](launchers.md) - configuring auto execution of scripts. 12 | * [Backend API](backend-api.md) - executing scripts from backend services. 13 | * [Custom actions](custom-actions.md) - implement your own action. 14 | -------------------------------------------------------------------------------- /.github/workflows/gradle.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Gradle 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle 3 | 4 | name: Java CI with Gradle 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Set up JDK 1.8 20 | uses: actions/setup-java@v1 21 | with: 22 | java-version: 1.8 23 | - name: Grant execute permission for gradlew 24 | run: chmod +x gradlew 25 | - name: Build with Gradle 26 | run: ./gradlew build --stacktrace 27 | -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name-template: 'Release APM $RESOLVED_VERSION' 2 | tag-template: 'apm-$RESOLVED_VERSION' 3 | template: | 4 | $CHANGES 5 | 6 | All contributors: $CONTRIBUTORS 7 | 8 | categories: 9 | - title: '🚀 Features' 10 | labels: 11 | - 'feature' 12 | - 'enhancement' 13 | - title: '🐛 Bug Fixes' 14 | labels: 15 | - 'fix' 16 | - 'bugfix' 17 | - 'bug' 18 | - title: '🧰 Maintenance' 19 | labels: 20 | - 'maintenance' 21 | - 'documentation' 22 | - 'other' 23 | version-resolver: 24 | major: 25 | labels: 26 | - 'major' 27 | minor: 28 | labels: 29 | - 'minor' 30 | patch: 31 | labels: 32 | - 'patch' 33 | default: patch 34 | exclude-labels: 35 | - 'skip-changelog' -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/externals/ace/js/ext-linking.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var t=e.editor,n=e.getAccelKey();if(n){var t=e.editor,r=e.getDocumentPosition(),i=t.session,s=i.getTokenAt(r.row,r.column);t._emit("linkHover",{position:r,token:s})}}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("ace/editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}})}); 2 | (function() { 3 | ace.require(["ace/ext/linking"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid1.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | DEFINE $ nana 21 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid2.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | DEFINE / nana 21 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/macro.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | REQUIRE param 21 | SHOW $param 22 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/includes/cycle-a.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | RUN 'cycle-b.apm' -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/includes/cycle-b.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | RUN 'cycle-c.apm' -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/includes/cycle-c.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | RUN 'cycle-a.apm' -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/import-define.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | DEFINE var 'imported val' -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/includes/import-b.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | IMPORT 'import-c.apm' -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/includes/run-c.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | DEFINE var 'imported val' -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/includes/import-c.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | DEFINE var 'imported value' -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid3.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | // define variable 21 | DEFINE / nana 22 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid4.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | / define variable 21 | DEFINE / nana 22 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid5.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | /x define variable 21 | DEFINE / nana 22 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid10.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | DEFINE nana "nana" 21 | /x define variable 22 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid13.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | "define variable" 21 | DEFINE nana "nana" 22 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid14.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | DEFINE nana "nana" 21 | "define variable" 22 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid6.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | /* define variable 21 | */ 22 | DEFINE / nana 23 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid8.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | DEFINE nana "nana" 21 | // define variable 22 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid9.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | DEFINE nana "nana" 21 | / define variable 22 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/includes/import-a.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | IMPORT 'import-b.apm' 20 | RUN 'run-b.apm' -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/includes/run-b.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | IMPORT 'import-b.apm' 20 | RUN 'run-c.apm' -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid7.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | 22 | DEFINE / nana 23 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid11.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | DEFINE nana "nana" 21 | /* define variable 22 | */ 23 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/invalid/invalid12.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | DEFINE nana "nana" 21 | 23 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/run-macro.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | RUN '/macro.apm' param='abc' 21 | RUN '/macro.apm' param='123' 22 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/import-and-run2.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | RUN '/includes/cycle-a.apm' 20 | 21 | RUN '/includes/run-a.apm' 22 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/includes/run-a.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | DEFINE var 'imported val' 20 | IMPORT '/includes/non-existing.apm' 21 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/import-and-run3.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | 20 | IMPORT '/includes/import-a.apm' AS namespace 21 | IMPORT '/includes/import-b.apm' AS namespace 22 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/import-deep-define.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | IMPORT '/import-define.apm' AS deeperNamespace 20 | DEFINE deepVar 'imported val + ' + $deeperNamespace.var -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## [Unreleased] 8 | 9 | ## 5.0.0-RC5 10 | 11 | ### Fixed 12 | - #267 - Fixed path in index definition 13 | 14 | ### Changed 15 | - #269 - Changed names of indexes due to the requirements of AEM as Cloud 16 | 17 | ## 5.0.0-RC4 18 | 19 | ### Fixed 20 | - #265 - Shortened bundles' names 21 | 22 | ## 5.0.0-RC3 23 | 24 | ### Fixed 25 | - #262 - Excluded classes generated by lombok from javadoc task 26 | 27 | ### Changed 28 | - #263 - Added CQ Actions bundles to APM package. Removed redundant private packages 29 | 30 | ## 5.0.0-RC2 31 | 32 | ### Fixed 33 | - #258 - Fixed actions which use @Flag annotation 34 | 35 | ### Changed 36 | - #260 - Updated GAP to the latest version. Fixed default task to deploy packages in proper order. Changed antlr and kotlin bundles to private packages -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/import-and-run1.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | IMPORT '/includes/import-a.apm' AS namespace 20 | IMPORT '/includes/import-b.apm' AS deepNamespace 21 | 22 | RUN '/includes/run-a.apm' -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/editor/css/styles.less: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 - 2016 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | .apm-edit { 21 | height: 100%; 22 | 23 | form { 24 | height: 100%; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/viewer/css/styles.less: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 - 2016 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | .apm-view { 21 | height: 100%; 22 | 23 | form { 24 | height: 100%; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/Apm.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core; 21 | 22 | public final class Apm { 23 | 24 | private Apm() { 25 | } 26 | 27 | public static final String FILE_EXT = ".apm"; 28 | } 29 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/externals/ace/js/snippets/text.js: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 - 2016 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | ace.define("ace/snippets/text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="text"}) -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/services/ExecutionMode.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.services; 21 | 22 | public enum ExecutionMode { 23 | 24 | RUN, AUTOMATIC_RUN, DRY_RUN, VALIDATION 25 | 26 | } 27 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/services/event/EventManager.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core.services.event; 21 | 22 | public interface EventManager { 23 | 24 | void trigger(ApmEvent event); 25 | } 26 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/checks/actions/ActionGroup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.checks.actions; 22 | 23 | public class ActionGroup { 24 | 25 | public static final String CHECKS = "checks"; 26 | } 27 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/services/RunModesProvider.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.services; 21 | 22 | import java.util.Set; 23 | 24 | public interface RunModesProvider { 25 | 26 | Set getRunModes(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/externals/ace/js/ext-statusbar.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("ace/lib/dom"),i=e("ace/lib/lang"),s=function(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this));e.on("changeStatus",function(){n.schedule(100)}),e.on("changeSelection",function(){n.schedule(100)})};(function(){this.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];e.$vimModeHandler?n(e.$vimModeHandler.getStatusText()):e.commands.recording&&n("REC");var r=e.selection.lead;n(r.row+":"+r.column," ");if(!e.selection.isEmpty()){var i=e.getSelectionRange();n("("+(i.end.row-i.start.row)+":"+(i.end.column-i.start.column)+")")}t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s}); 2 | (function() { 3 | ace.require(["ace/ext/statusbar"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/services/version/ScriptVersion.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core.services.version; 21 | 22 | public interface ScriptVersion { 23 | 24 | String getScriptPath(); 25 | 26 | String getLastChecksum(); 27 | } 28 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/services/DefinitionsProvider.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.services; 21 | 22 | import java.util.Map; 23 | 24 | public interface DefinitionsProvider { 25 | 26 | Map getPredefinedDefinitions(); 27 | } 28 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/utils/sling/ResolveException.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core.utils.sling; 21 | 22 | public class ResolveException extends Exception { 23 | 24 | public ResolveException(String message, Exception e) { 25 | super(message, e); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/aem/all/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.cognifide.aem.package") 3 | `maven-publish` 4 | signing 5 | } 6 | 7 | description = "APM (AEM Permission Management) - AEM All-In-One Package" 8 | 9 | evaluationDependsOn(":app:aem:ui.apps") 10 | 11 | apply(from = rootProject.file("app/common.gradle.kts")) 12 | apply(from = rootProject.file("app/aem/common.gradle.kts")) 13 | 14 | aem { 15 | tasks { 16 | packageCompose { 17 | nestPackageProject(":app:aem:ui.apps") { 18 | dirPath.set("/apps/apm-packages/application/install") 19 | } 20 | } 21 | } 22 | } 23 | 24 | publishing { 25 | publications { 26 | register("apmCrx") { 27 | groupId = project.group.toString() + ".crx" 28 | artifact(tasks["packageCompose"]) 29 | afterEvaluate { 30 | artifactId = "apm-" + project.name 31 | version = rootProject.version 32 | } 33 | pom { 34 | name.set("APM - " + project.name) 35 | description.set(project.description) 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/utils/sling/OperateException.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core.utils.sling; 21 | 22 | public class OperateException extends Exception { 23 | 24 | public OperateException(String message, Exception e) { 25 | super(message, e); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/utils/sling/ResolveCallback.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core.utils.sling; 21 | 22 | import org.apache.sling.api.resource.ResourceResolver; 23 | 24 | public interface ResolveCallback { 25 | 26 | T resolve(ResourceResolver resolver); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/aem/core/src/test/resources/import.apm: -------------------------------------------------------------------------------- 1 | 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | IMPORT /import-define.apm 20 | IMPORT '/import-define.apm' AS namespace 21 | IMPORT '/import-deep-define.apm' AS deepNamespace 22 | 23 | SHOW $var 24 | SHOW $namespace.var 25 | SHOW $deepNamespace.deeperNamespace.var 26 | SHOW $deepNamespace.deepVar 27 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/main/actions/ActionGroup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.main.actions; 22 | 23 | public class ActionGroup { 24 | 25 | public static final String CORE = "core"; 26 | 27 | public static final String DATASOURCE = "datasource"; 28 | } 29 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/utils/sling/OperateCallback.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core.utils.sling; 21 | 22 | import org.apache.sling.api.resource.ResourceResolver; 23 | 24 | public interface OperateCallback { 25 | 26 | void operate(ResourceResolver resolver) throws Exception; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/aem/all.cloud/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.cognifide.aem.package") 3 | `maven-publish` 4 | signing 5 | } 6 | 7 | description = "APM (AEM Permission Management) - AEM All-In-One Package (Cloud)" 8 | 9 | evaluationDependsOn(":app:aem:ui.apps.cloud") 10 | 11 | apply(from = rootProject.file("app/common.gradle.kts")) 12 | apply(from = rootProject.file("app/aem/common.gradle.kts")) 13 | 14 | aem { 15 | tasks { 16 | packageCompose { 17 | nestPackageProject(":app:aem:ui.apps.cloud") { 18 | dirPath.set("/apps/apm-packages/application/install") 19 | } 20 | } 21 | } 22 | } 23 | 24 | publishing { 25 | publications { 26 | register("apmCrx") { 27 | groupId = project.group.toString() + ".crx" 28 | artifact(tasks["packageCompose"]) 29 | afterEvaluate { 30 | artifactId = "apm-" + project.name 31 | version = rootProject.version 32 | } 33 | pom { 34 | name.set("APM - " + project.name) 35 | description.set(project.description) 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/components/console/console.html: -------------------------------------------------------------------------------- 1 | 20 | 21 |
22 | 23 |
24 | 25 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/fragments/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/views/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/actions/scanner/RegistryChangedListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.core.actions.scanner; 22 | 23 | import java.util.List; 24 | 25 | public interface RegistryChangedListener { 26 | 27 | void registryChanged(List> registeredClasses); 28 | } 29 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/grammar/ScriptExecutionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.core.grammar; 22 | 23 | public class ScriptExecutionException extends RuntimeException { 24 | 25 | public ScriptExecutionException(String message) { 26 | super(message); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/summary/css/styles.less: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | .coral-Table-body, ._coral-Table-body { 21 | .entry-error { 22 | .coral-Table-cell, ._coral-Table-cell { 23 | background-color: rgba(221, 52, 52, 0.7); 24 | } 25 | } 26 | } 27 | 28 | li { 29 | white-space: pre-wrap; 30 | } 31 | -------------------------------------------------------------------------------- /examples/src/main/content/jcr_root/conf/apm/scripts/examples/permissions.apm: -------------------------------------------------------------------------------- 1 | # This script provides example actions for permission manipulation. 2 | 3 | # This action will create group only if this group do not exist 4 | CREATE-GROUP "test_group" 5 | 6 | # Change current context to specified authorizable 7 | FOR-GROUP "test_group" BEGIN 8 | 9 | # CLEAR-PERMISSIONS will remove all permission for current context for whole subtree, starting from specified path as root 10 | CLEAR-PERMISSIONS "/content/dam" 11 | 12 | # Allow and deny are common actions that can be used for setting privileges. 13 | ALLOW "/apps" ["READ"] 14 | ALLOW "/libs" ["READ"] 15 | ALLOW "/tmp" ["READ"] 16 | ALLOW "/var" ["READ"] 17 | ALLOW "/etc" ["READ"] 18 | 19 | ALLOW "/content/site/en" ["READ"] --IF-EXISTS 20 | ALLOW "/content/site/fr" ["READ"] --IF-EXISTS 21 | ALLOW "/content/site/es" ["READ"] glob="/*" --IF-EXISTS 22 | DENY "/content/site/en" ["REPLICATE", "DELETE", "MODIFY", "CREATE"] --IF-EXISTS 23 | DENY "/content/site/fr" ["REPLICATE", "DELETE", "MODIFY", "CREATE"] --IF-EXISTS 24 | DENY "/content/site/es" ["DELETE"] glob="/*" --IF-EXISTS 25 | DENY "/content/site/it" ["ALL"] glob="/*" --IF-EXISTS 26 | END -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/grammar/argument/ArgumentResolverException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.core.grammar.argument; 22 | 23 | public class ArgumentResolverException extends RuntimeException { 24 | 25 | public ArgumentResolverException(String message) { 26 | super(message); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/scripts/css/styles.less: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 - 2016 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | .coral-Table-cell, ._coral-Table-cell { 21 | a ~ time { 22 | display: inline-block; 23 | margin-left: 10px; 24 | } 25 | } 26 | 27 | .granite-collection-selectionbar { 28 | z-index: 100; 29 | } 30 | 31 | #view-root { 32 | height: 100%; 33 | } 34 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/logger/Position.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.core.logger; 22 | 23 | public class Position { 24 | 25 | private final int line; 26 | 27 | public Position(int line) { 28 | this.line = line; 29 | } 30 | 31 | public int getLine() { 32 | return line; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/main/actions/CommonFlags.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.main.actions; 22 | 23 | public final class CommonFlags { 24 | 25 | public static final String IF_EXISTS = "IF-EXISTS"; 26 | public static final String IF_NOT_EXISTS = "IF-NOT-EXISTS"; 27 | public static final String ERROR_IF_EXISTS = "ERROR-IF-EXISTS"; 28 | } 29 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/actions/Action.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.actions; 21 | 22 | import com.cognifide.apm.api.exceptions.ActionExecutionException; 23 | 24 | public interface Action { 25 | 26 | ActionResult simulate(Context context) throws ActionExecutionException; 27 | 28 | ActionResult execute(Context context) throws ActionExecutionException; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/actions/ActionMapperRegistry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.core.actions; 22 | 23 | import java.util.Collection; 24 | import java.util.Optional; 25 | 26 | public interface ActionMapperRegistry { 27 | 28 | Optional getMapper(String name); 29 | 30 | Collection getMappers(); 31 | } 32 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/utils/PathUtils.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core.utils; 21 | 22 | public final class PathUtils { 23 | 24 | private PathUtils() { 25 | // intentionally empty 26 | } 27 | 28 | public static boolean isAppsOrLibsPath(String path) { 29 | return path.startsWith("/apps") || path.startsWith("/libs"); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/main/utils/PathUtils.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.main.utils; 21 | 22 | public final class PathUtils { 23 | 24 | private PathUtils() { 25 | // intentionally empty 26 | } 27 | 28 | public static boolean isAppsOrLibsPath(String path) { 29 | return path.startsWith("/apps") || path.startsWith("/libs"); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/dashboard/css/styles.less: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | .foundation-layout-panel-content { 21 | coral-card-asset { 22 | background-color: #ffffff; 23 | color: #e0e0e0; 24 | 25 | coral-icon { 26 | font-size: 100px; 27 | text-align: center; 28 | } 29 | } 30 | 31 | coral-card-content { 32 | background-color: #e0e0e0; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/history/css/history.less: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 - 2018 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | .summary { 21 | background: url(../img/icons/summary.png) no-repeat center left; 22 | } 23 | 24 | .icon { 25 | padding-left: 21px; 26 | } 27 | 28 | .last-dry-execution-status, .last-execution-status { 29 | vertical-align: middle; 30 | 31 | .instance { 32 | text-transform: capitalize; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/exceptions/ActionException.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.exceptions; 21 | 22 | public class ActionException extends ExecutionException { 23 | 24 | public ActionException(final String message) { 25 | super(message); 26 | } 27 | 28 | public ActionException(final String message, final Throwable throwable) { 29 | super(message, throwable); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/main/permissions/exceptions/PermissionException.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.main.permissions.exceptions; 21 | 22 | public class PermissionException extends Exception { 23 | 24 | public PermissionException(String message) { 25 | super(message); 26 | } 27 | 28 | public PermissionException(String message, Throwable cause) { 29 | super(message, cause); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/externals/ace/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 27 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/actions/SessionSavingPolicy.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.actions; 21 | 22 | import javax.jcr.RepositoryException; 23 | import javax.jcr.Session; 24 | 25 | public interface SessionSavingPolicy { 26 | 27 | void setMode(SessionSavingMode mode); 28 | 29 | void save(Session session, SessionSavingMode sessionSavingMode) throws RepositoryException; 30 | } 31 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/grammar/datasource/DataSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core.grammar.datasource; 21 | 22 | import com.cognifide.apm.core.grammar.ApmType; 23 | import java.util.List; 24 | import org.apache.sling.api.resource.ResourceResolver; 25 | 26 | public interface DataSource { 27 | 28 | String getName(); 29 | 30 | ApmType determine(ResourceResolver resolver, List parameters); 31 | } 32 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/dashboard/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 27 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/summary/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 27 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/exceptions/ActionCreationException.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.exceptions; 21 | 22 | public class ActionCreationException extends ActionException { 23 | 24 | public ActionCreationException(final String message) { 25 | super(message); 26 | } 27 | 28 | public ActionCreationException(final String message, final Throwable throwable) { 29 | super(message, throwable); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/exceptions/AuthorizableNotFoundException.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.exceptions; 21 | 22 | public class AuthorizableNotFoundException extends ActionException { 23 | 24 | public AuthorizableNotFoundException(String message) { 25 | super(message); 26 | } 27 | 28 | public AuthorizableNotFoundException(String message, Throwable throwable) { 29 | super(message, throwable); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/exceptions/ActionExecutionException.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.exceptions; 21 | 22 | public class ActionExecutionException extends ActionException { 23 | 24 | public ActionExecutionException(final String message) { 25 | super(message); 26 | } 27 | 28 | public ActionExecutionException(final String message, final Throwable throwable) { 29 | super(message, throwable); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/actions/executor/ActionExecutor.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core.actions.executor; 21 | 22 | import com.cognifide.apm.api.actions.ActionResult; 23 | import com.cognifide.apm.api.actions.Context; 24 | import com.cognifide.apm.core.actions.ActionDescriptor; 25 | 26 | public interface ActionExecutor { 27 | 28 | ActionResult execute(ActionDescriptor actionDescriptor); 29 | 30 | Context getContext(); 31 | } 32 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/views/scripts/js/view-mode.js: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 - 2016 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | (function (window, $) { 21 | $(document).on('coral-cyclebutton:change', '.granite-toggleable-control-view', function(e) { 22 | $('#' + e.originalEvent.detail.selection.dataset.showview).removeAttr('hidden'); 23 | $('#' + e.originalEvent.detail.selection.dataset.hideview).attr('hidden', 'hidden'); 24 | }); 25 | 26 | })(window, jQuery); -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/history/ScriptHistory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.core.history; 22 | 23 | public interface ScriptHistory { 24 | 25 | String getScriptPath(); 26 | 27 | String getLastChecksum(); 28 | 29 | String getLastLocalRunPath(); 30 | 31 | String getLastLocalDryRunPath(); 32 | 33 | HistoryEntry getLastLocalRun(); 34 | 35 | HistoryEntry getLastLocalDryRun(); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/exceptions/InvalidActionMapperException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.exceptions; 21 | 22 | public class InvalidActionMapperException extends RuntimeException { 23 | 24 | public InvalidActionMapperException(final String message) { 25 | super(message); 26 | } 27 | 28 | public InvalidActionMapperException(final String message, final Throwable throwable) { 29 | super(message, throwable); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/endpoints/params/FileName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.core.endpoints.params; 22 | 23 | import java.lang.annotation.ElementType; 24 | import java.lang.annotation.Retention; 25 | import java.lang.annotation.RetentionPolicy; 26 | import java.lang.annotation.Target; 27 | 28 | @Target({ElementType.FIELD, ElementType.PARAMETER}) 29 | @Retention(RetentionPolicy.RUNTIME) 30 | public @interface FileName { 31 | } 32 | -------------------------------------------------------------------------------- /app/common.gradle.kts: -------------------------------------------------------------------------------- 1 | /** 2 | * Common configuration for all application artifacts 3 | */ 4 | import org.gradle.api.tasks.testing.logging.TestExceptionFormat 5 | 6 | repositories { 7 | mavenLocal() 8 | jcenter() 9 | maven("https://repo.adobe.com/nexus/content/groups/public") 10 | } 11 | 12 | tasks { 13 | withType().configureEach { 14 | with(options) { 15 | sourceCompatibility = "1.8" 16 | targetCompatibility = "1.8" 17 | encoding = "UTF-8" 18 | } 19 | } 20 | 21 | withType().configureEach { 22 | useJUnitPlatform() 23 | testLogging { 24 | events("passed", "skipped", "failed") 25 | exceptionFormat = TestExceptionFormat.SHORT 26 | } 27 | } 28 | } 29 | 30 | plugins.withType(JavaPlugin::class) { 31 | dependencies { 32 | "testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:5.6.0") 33 | "testRuntimeOnly"("org.junit.vintage:junit-vintage-engine:5.6.0") 34 | "testImplementation"("org.junit.jupiter:junit-jupiter-api:5.6.0") 35 | "testImplementation"("org.mockito:mockito-core:1.9.5") 36 | "testImplementation"("org.codehaus.groovy:groovy-all:2.5.7") 37 | "testImplementation"("org.spockframework:spock-core:1.3-groovy-2.5") 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # ========================LICENSE_START================================= 3 | # AEM Permission Management 4 | # %% 5 | # Copyright (C) 2013 Wunderman Thompson Technology 6 | # %% 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # =========================LICENSE_END================================== 19 | # 20 | 21 | # AEM configuration 22 | instance.local-author.httpUrl=http://localhost:4502 23 | instance.local-author.type=remote 24 | instance.local-author.user=admin 25 | instance.local-author.password=admin 26 | 27 | instance.local-publish.httpUrl=http://localhost:4503 28 | instance.local-publish.type=remote 29 | instance.local-publish.user=admin 30 | instance.local-publish.password=admin 31 | 32 | # Performance tuning 33 | org.gradle.daemon=true 34 | org.gradle.parallel=true 35 | org.gradle.caching=true -------------------------------------------------------------------------------- /examples/src/main/content/jcr_root/conf/apm/scripts/examples/contexts.apm: -------------------------------------------------------------------------------- 1 | # This script provides how blocks works with authorizable 2 | 3 | DEFINE groups ["test_group_1", "test_group_2", "test_group_3"] 4 | 5 | # No authorizable available here 6 | 7 | FOR-EACH group IN $groups BEGIN 8 | 9 | # No authorizable available here 10 | 11 | CREATE-GROUP $group BEGIN # Puts authorizable group on the stack 12 | ALLOW "/content/site/en" ["READ"] --IF-EXISTS 13 | END # Removes group from the stack 14 | 15 | # No authorizable available here 16 | END 17 | 18 | # No authorizable available here 19 | 20 | FOR-GROUP "test_group_1" BEGIN # Puts authorizable "test-group_1" on the stack 21 | # Authorizable set to "test-group1" 22 | ALLOW "/content/site/fr" ["READ"] --IF-EXISTS 23 | 24 | CREATE-USER "test_user_1" BEGIN # Puts authorizable "test_user_1" on the stack 25 | ADD-PARENTS ["test_group_1"] 26 | END # Removes "test_user_1" from the stack 27 | 28 | ALLOW "/content/site/hr" ["READ"] --IF-EXISTS 29 | END # Removes "test_group_1" from the stack 30 | 31 | # No authorizable available here 32 | 33 | # "DELETE-USER" do not need context to work. We can delete specified users. 34 | DELETE-USER ["test_user_1"] 35 | 36 | # "DELETE-GROUP" do not need context to work. We can delete specified groups. 37 | DELETE-GROUP ["test_group_1", "test_group_2", "test_group_3"] -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/actions/ActionFactory.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core.actions; 21 | 22 | import com.cognifide.apm.api.exceptions.ActionCreationException; 23 | import com.cognifide.apm.core.grammar.argument.Arguments; 24 | import java.util.List; 25 | 26 | public interface ActionFactory { 27 | 28 | ActionDescriptor evaluate(String command, Arguments arguments) throws ActionCreationException; 29 | 30 | List getCommandDescriptions(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/services/async/AsyncScriptExecutor.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core.services.async; 21 | 22 | import com.cognifide.apm.api.scripts.Script; 23 | import com.cognifide.apm.api.services.ExecutionMode; 24 | import java.util.Map; 25 | 26 | public interface AsyncScriptExecutor { 27 | 28 | String process(Script script, ExecutionMode executionMode, Map customDefinitions, String executor); 29 | 30 | ExecutionStatus checkStatus(String id); 31 | } 32 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/grammar/ActionInvoker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.core.grammar; 22 | 23 | import com.cognifide.apm.api.status.Status; 24 | import com.cognifide.apm.core.grammar.argument.Arguments; 25 | import com.cognifide.apm.core.grammar.executioncontext.ExternalExecutionContext; 26 | 27 | public interface ActionInvoker { 28 | 29 | Status runAction(ExternalExecutionContext executionContext, String commandName, Arguments arguments); 30 | } 31 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/actions/annotations/Flags.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.api.actions.annotations; 22 | 23 | import java.lang.annotation.ElementType; 24 | import java.lang.annotation.Retention; 25 | import java.lang.annotation.RetentionPolicy; 26 | import java.lang.annotation.Target; 27 | 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Target(ElementType.PARAMETER) 30 | public @interface Flags { 31 | 32 | Flag[] value() default {}; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/actions/annotations/Mapping.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.actions.annotations; 21 | 22 | import java.lang.annotation.ElementType; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | import java.lang.annotation.Target; 26 | 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface Mapping { 30 | 31 | String[] examples() default {}; 32 | 33 | String reference() default ""; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/exceptions/ExecutionException.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.exceptions; 21 | 22 | public class ExecutionException extends Exception { 23 | 24 | public ExecutionException(final String message) { 25 | super(message); 26 | } 27 | 28 | public ExecutionException(final Throwable throwable) { 29 | super(throwable); 30 | } 31 | 32 | public ExecutionException(final String message, final Throwable throwable) { 33 | super(message, throwable); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/actions/annotations/Named.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.api.actions.annotations; 22 | 23 | import java.lang.annotation.ElementType; 24 | import java.lang.annotation.Retention; 25 | import java.lang.annotation.RetentionPolicy; 26 | import java.lang.annotation.Target; 27 | 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Target(ElementType.PARAMETER) 30 | public @interface Named { 31 | 32 | String value(); 33 | 34 | String description() default ""; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/scripts/ScriptStorageException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.core.scripts; 22 | 23 | import java.util.List; 24 | 25 | public class ScriptStorageException extends RuntimeException { 26 | 27 | private final List errors; 28 | 29 | public ScriptStorageException(String message, List errors) { 30 | super(message); 31 | this.errors = errors; 32 | } 33 | 34 | public List getErrors() { 35 | return errors; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/actions/annotations/Mapper.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.api.actions.annotations; 21 | 22 | import java.lang.annotation.ElementType; 23 | import java.lang.annotation.Inherited; 24 | import java.lang.annotation.Retention; 25 | import java.lang.annotation.RetentionPolicy; 26 | import java.lang.annotation.Target; 27 | 28 | @Target(ElementType.TYPE) 29 | @Retention(RetentionPolicy.RUNTIME) 30 | @Inherited 31 | public @interface Mapper { 32 | 33 | String value(); 34 | 35 | String group() default ""; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/api/actions/annotations/Required.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | 21 | package com.cognifide.apm.api.actions.annotations; 22 | 23 | import java.lang.annotation.ElementType; 24 | import java.lang.annotation.Retention; 25 | import java.lang.annotation.RetentionPolicy; 26 | import java.lang.annotation.Target; 27 | 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Target(ElementType.PARAMETER) 30 | public @interface Required { 31 | 32 | String value() default ""; 33 | 34 | String description() default ""; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/clientlibs/externals/ace/js/ext-themelist.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(e,t,n){"use strict";e("ace/lib/fixoldbrowsers");var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})}); 2 | (function() { 3 | ace.require(["ace/ext/themelist"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /app/aem/ui.apps.base/src/main/content/jcr_root/apps/apm/components/dashboardTile/dashboardTile.html: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | ${model.title} 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/aem/core/src/main/java/com/cognifide/apm/core/services/version/VersionService.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * ========================LICENSE_START================================= 3 | * AEM Permission Management 4 | * %% 5 | * Copyright (C) 2013 Wunderman Thompson Technology 6 | * %% 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================LICENSE_END================================== 19 | */ 20 | package com.cognifide.apm.core.services.version; 21 | 22 | import com.cognifide.apm.api.scripts.Script; 23 | import org.apache.sling.api.resource.ResourceResolver; 24 | 25 | public interface VersionService { 26 | 27 | ScriptVersion getScriptVersion(ResourceResolver resolver, Script script); 28 | 29 | String getVersionPath(Script script); 30 | 31 | void updateVersionIfNeeded(ResourceResolver resolver, Script... scripts); 32 | 33 | String countChecksum(Iterable