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 |
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