mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Compare commits
59 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7d4b74cab7 | ||
|
b51374532e | ||
|
6e5b64be12 | ||
|
67195f6dda | ||
|
d060c548b3 | ||
|
9de39009a7 | ||
|
b920670ebd | ||
|
94fd1f4c98 | ||
|
5a04dabd72 | ||
|
00eef170ef | ||
|
43dd274b6c | ||
|
842687e25d | ||
|
3306879d8c | ||
|
8276344ce6 | ||
|
bb534040a1 | ||
|
b14526e7e1 | ||
|
7c7c2548aa | ||
|
f0daad17fe | ||
|
b2044531db | ||
|
09cc78f4f3 | ||
|
b734eb6f78 | ||
|
069f886b1f | ||
|
cdfa16093d | ||
|
5474d91dae | ||
|
42d07fe59c | ||
|
231ac79977 | ||
|
8fcdac6d1f | ||
|
534b6f444f | ||
|
31f9883cc8 | ||
|
130e4ff363 | ||
|
5ae22f75d0 | ||
|
1e386f9d98 | ||
|
5d4a859617 | ||
|
01b4859b73 | ||
|
fd0f50d7c9 | ||
|
afff08edfb | ||
|
84c83a1d3f | ||
|
df5607e11b | ||
|
8ff1f976f1 | ||
|
24dee74d77 | ||
|
99db3f275c | ||
|
fd8744af7f | ||
|
bce301d392 | ||
|
f397daf9f1 | ||
|
4b549bf474 | ||
|
e7a8cc2b2b | ||
|
386c33c3c0 | ||
|
45d6a114c6 | ||
|
3f2f654ac9 | ||
|
27e955e947 | ||
|
91a8d6deb2 | ||
|
c9b0389533 | ||
|
27177f6ea3 | ||
|
1c7fb4fa32 | ||
|
ae63f29c1f | ||
|
252f177d8e | ||
|
5df64264ed | ||
|
656f5e29a5 | ||
|
58cb8bf389 |
855
.github/workflows/ci.yml
vendored
855
.github/workflows/ci.yml
vendored
File diff suppressed because it is too large
Load Diff
20
.github/workflows/master_release.yml
vendored
20
.github/workflows/master_release.yml
vendored
@@ -31,15 +31,15 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[no release]') &&
|
||||
github.event_name != 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.24.1
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.16.0
|
||||
with:
|
||||
username: ${{ env.GIT_USERNAME }}
|
||||
email: ${{ env.GIT_EMAIL }}
|
||||
@@ -60,15 +60,15 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[no downstream]') &&
|
||||
github.event_name != 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.24.1
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.16.0
|
||||
with:
|
||||
username: ${{ env.GIT_USERNAME }}
|
||||
email: ${{ env.GIT_EMAIL }}
|
||||
|
32
.github/workflows/precommit_formatter.yml
vendored
32
.github/workflows/precommit_formatter.yml
vendored
@@ -1,32 +0,0 @@
|
||||
name: Pre-Commit formatter
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- precommit/**
|
||||
|
||||
jobs:
|
||||
format-code:
|
||||
name: "Reformat code"
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(github.event.head_commit.message, '[reformat code]')
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Set up Python ${{ inputs.python-version }}
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.9"
|
||||
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
|
||||
continue-on-error: true
|
||||
with:
|
||||
extra_args: --all-files
|
||||
- name: Update secrets baseline
|
||||
run: pip install detect-secrets && detect-secrets scan --baseline .secrets.baseline
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.24.1
|
||||
with:
|
||||
username: ${{ secrets.BOT_GITHUB_USERNAME }}
|
||||
add-options: -u
|
||||
commit-message: "Apply Pre-Commit code formatting"
|
||||
skip-if-no-changes: true
|
||||
- name: Push changes
|
||||
run: git push
|
@@ -127,6 +127,29 @@
|
||||
}
|
||||
],
|
||||
"results": {
|
||||
".github/workflows/ci.yml": [
|
||||
{
|
||||
"type": "Secret Keyword",
|
||||
"filename": ".github/workflows/ci.yml",
|
||||
"hashed_secret": "b86dc2f033a63f2b7b9e7d270ab806d2910d7572",
|
||||
"is_verified": false,
|
||||
"line_number": 293
|
||||
},
|
||||
{
|
||||
"type": "Secret Keyword",
|
||||
"filename": ".github/workflows/ci.yml",
|
||||
"hashed_secret": "1bfb0e20f886150ba59b853bcd49dea893e00966",
|
||||
"is_verified": false,
|
||||
"line_number": 368
|
||||
},
|
||||
{
|
||||
"type": "Secret Keyword",
|
||||
"filename": ".github/workflows/ci.yml",
|
||||
"hashed_secret": "128f14373ccfaff49e3664045d3a11b50cbb7b39",
|
||||
"is_verified": false,
|
||||
"line_number": 901
|
||||
}
|
||||
],
|
||||
".github/workflows/master_release.yml": [
|
||||
{
|
||||
"type": "Secret Keyword",
|
||||
@@ -224,7 +247,7 @@
|
||||
"filename": "core/src/main/java/org/alfresco/encryption/AlfrescoKeyStore.java",
|
||||
"hashed_secret": "a718763bca0f328b0e7ce2a98d9e79fc271bf827",
|
||||
"is_verified": false,
|
||||
"line_number": 34,
|
||||
"line_number": 35,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -234,7 +257,7 @@
|
||||
"filename": "core/src/main/java/org/alfresco/httpclient/HttpClientFactory.java",
|
||||
"hashed_secret": "5d3c708390e5f51413e414393d4ad2a6d0e59a45",
|
||||
"is_verified": false,
|
||||
"line_number": 128,
|
||||
"line_number": 126,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -400,7 +423,7 @@
|
||||
"filename": "packaging/tests/tas-cmis/src/main/java/org/alfresco/cmis/AuthParameterProviderFactory.java",
|
||||
"hashed_secret": "a28cecdb5056cf30135809b921e38a84deb6c345",
|
||||
"is_verified": false,
|
||||
"line_number": 100,
|
||||
"line_number": 102,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -408,7 +431,7 @@
|
||||
"filename": "packaging/tests/tas-cmis/src/main/java/org/alfresco/cmis/AuthParameterProviderFactory.java",
|
||||
"hashed_secret": "5e39d8e2991ef9705998de26b33f11be0f3cdcde",
|
||||
"is_verified": false,
|
||||
"line_number": 101,
|
||||
"line_number": 103,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -516,7 +539,7 @@
|
||||
"filename": "packaging/tests/tas-restapi/src/main/java/org/alfresco/rest/model/RestSitePersonMembershipRequestModelsCollection.java",
|
||||
"hashed_secret": "8b30a14989d7b8093ac29462fe29423d836625b4",
|
||||
"is_verified": false,
|
||||
"line_number": 33,
|
||||
"line_number": 39,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -600,7 +623,7 @@
|
||||
"filename": "remote-api/src/main/java/org/alfresco/repo/web/scripts/tenant/AbstractTenantAdminWebScript.java",
|
||||
"hashed_secret": "889d2688743fdce6115117a5ba7dbc5f33e0ce03",
|
||||
"is_verified": false,
|
||||
"line_number": 39,
|
||||
"line_number": 38,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -610,7 +633,7 @@
|
||||
"filename": "remote-api/src/main/java/org/alfresco/web/app/servlet/AlfrescoX509ServletFilter.java",
|
||||
"hashed_secret": "43d52295ed5cb7e2b772f2b8be9695ddde971c49",
|
||||
"is_verified": false,
|
||||
"line_number": 60,
|
||||
"line_number": 62,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -618,7 +641,7 @@
|
||||
"filename": "remote-api/src/main/java/org/alfresco/web/app/servlet/AlfrescoX509ServletFilter.java",
|
||||
"hashed_secret": "1bd5147ff91b8b1220d2f1ffde850ebabbc5ec8c",
|
||||
"is_verified": false,
|
||||
"line_number": 61,
|
||||
"line_number": 63,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -648,7 +671,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/repo/remoteticket/RemoteAlfrescoTicketServiceTest.java",
|
||||
"hashed_secret": "a926a50b320cea0d6c008a04322627400fe33f55",
|
||||
"is_verified": false,
|
||||
"line_number": 73,
|
||||
"line_number": 74,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -658,7 +681,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/repo/web/scripts/node/NodeWebScripTest.java",
|
||||
"hashed_secret": "a926a50b320cea0d6c008a04322627400fe33f55",
|
||||
"is_verified": false,
|
||||
"line_number": 96,
|
||||
"line_number": 95,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -668,7 +691,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/repo/web/scripts/servlet/RemoteAuthenticatorFactoryAdminConsoleAccessTest.java",
|
||||
"hashed_secret": "4ffa743f28fc949c19e65ab045d7906d0609a2c2",
|
||||
"is_verified": false,
|
||||
"line_number": 268,
|
||||
"line_number": 269,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -678,7 +701,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/repo/web/scripts/solr/SOLRAuthenticationFilterTest.java",
|
||||
"hashed_secret": "76ed0a056aa77060de25754586440cff390791d0",
|
||||
"is_verified": false,
|
||||
"line_number": 59,
|
||||
"line_number": 63,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -688,7 +711,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/repo/webdav/LockMethodTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 108,
|
||||
"line_number": 109,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -708,7 +731,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/AbstractBaseApiTest.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 111,
|
||||
"line_number": 120,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -718,7 +741,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/RepoService.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 412,
|
||||
"line_number": 418,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -728,7 +751,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/TestCMIS.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 175,
|
||||
"line_number": 182,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -738,7 +761,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/TestPeople.java",
|
||||
"hashed_secret": "e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4",
|
||||
"is_verified": false,
|
||||
"line_number": 595,
|
||||
"line_number": 592,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -746,7 +769,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/TestPeople.java",
|
||||
"hashed_secret": "53dad674827218e94c8fe9c1984c8dd9db512a17",
|
||||
"is_verified": false,
|
||||
"line_number": 731,
|
||||
"line_number": 728,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -754,7 +777,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/TestPeople.java",
|
||||
"hashed_secret": "be66cf01c56d963de61462f37a43df2305367216",
|
||||
"is_verified": false,
|
||||
"line_number": 1434,
|
||||
"line_number": 1429,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -762,7 +785,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/TestPeople.java",
|
||||
"hashed_secret": "283d47a9338ed1100b5fe2a5aff2d1f7c799bfd0",
|
||||
"is_verified": false,
|
||||
"line_number": 1435,
|
||||
"line_number": 1430,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -770,7 +793,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/TestPeople.java",
|
||||
"hashed_secret": "425a715491af2bbec1eef2def6fa8d79c3050401",
|
||||
"is_verified": false,
|
||||
"line_number": 1457,
|
||||
"line_number": 1452,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -860,7 +883,7 @@
|
||||
"filename": "repository/src/main/java/org/alfresco/heartbeat/jobs/LockingJob.java",
|
||||
"hashed_secret": "b003370e1497c5003e21f1ec5da89e3d2d819506",
|
||||
"is_verified": false,
|
||||
"line_number": 59,
|
||||
"line_number": 60,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -868,7 +891,7 @@
|
||||
"filename": "repository/src/main/java/org/alfresco/heartbeat/jobs/LockingJob.java",
|
||||
"hashed_secret": "fc99e6a90240c45f46ed33a4d96a3dbecef41c60",
|
||||
"is_verified": false,
|
||||
"line_number": 60,
|
||||
"line_number": 61,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -878,7 +901,7 @@
|
||||
"filename": "repository/src/main/java/org/alfresco/heartbeat/jobs/NonLockingJob.java",
|
||||
"hashed_secret": "b003370e1497c5003e21f1ec5da89e3d2d819506",
|
||||
"is_verified": false,
|
||||
"line_number": 54,
|
||||
"line_number": 52,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -888,7 +911,7 @@
|
||||
"filename": "repository/src/main/java/org/alfresco/repo/admin/patch/impl/AdminUserPatch.java",
|
||||
"hashed_secret": "87a754b00f7ee047d496808125d6259104e9382a",
|
||||
"is_verified": false,
|
||||
"line_number": 62,
|
||||
"line_number": 60,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -908,7 +931,7 @@
|
||||
"filename": "repository/src/main/java/org/alfresco/repo/remoteconnector/RemoteConnectorServiceImpl.java",
|
||||
"hashed_secret": "a172ffc990129fe6f68b50f6037c54a1894ee3fd",
|
||||
"is_verified": false,
|
||||
"line_number": 205,
|
||||
"line_number": 204,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -916,7 +939,7 @@
|
||||
"filename": "repository/src/main/java/org/alfresco/repo/remoteconnector/RemoteConnectorServiceImpl.java",
|
||||
"hashed_secret": "a172ffc990129fe6f68b50f6037c54a1894ee3fd",
|
||||
"is_verified": false,
|
||||
"line_number": 205,
|
||||
"line_number": 204,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -926,7 +949,7 @@
|
||||
"filename": "repository/src/main/java/org/alfresco/repo/security/authentication/ResetPasswordServiceImpl.java",
|
||||
"hashed_secret": "e25df0eeed8d8eb4e198c3464c7bf747bc26eff8",
|
||||
"is_verified": false,
|
||||
"line_number": 91,
|
||||
"line_number": 92,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -936,7 +959,7 @@
|
||||
"filename": "repository/src/main/java/org/alfresco/repo/security/authentication/SimpleAcceptOrRejectAllAuthenticationComponentImpl.java",
|
||||
"hashed_secret": "304de25a3d73b68ad408ca3843356b5cf67f6f14",
|
||||
"is_verified": false,
|
||||
"line_number": 89,
|
||||
"line_number": 93,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -946,7 +969,7 @@
|
||||
"filename": "repository/src/main/java/org/alfresco/repo/transfer/TransferServiceImpl2.java",
|
||||
"hashed_secret": "9ae9f2be7702b726809545808a8a9ba2e5a38410",
|
||||
"is_verified": false,
|
||||
"line_number": 129,
|
||||
"line_number": 130,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1242,7 +1265,7 @@
|
||||
"filename": "repository/src/main/resources/alfresco/repository.properties",
|
||||
"hashed_secret": "1459a56410378e4d3ab470eff570e5eae1742762",
|
||||
"is_verified": false,
|
||||
"line_number": 314,
|
||||
"line_number": 312,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -1250,7 +1273,7 @@
|
||||
"filename": "repository/src/main/resources/alfresco/repository.properties",
|
||||
"hashed_secret": "84551ae5442affc9f1a2d3b4c86ae8b24860149d",
|
||||
"is_verified": false,
|
||||
"line_number": 773,
|
||||
"line_number": 770,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1280,7 +1303,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/filesys/FTPServerTest.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 86,
|
||||
"line_number": 88,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -1288,7 +1311,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/filesys/FTPServerTest.java",
|
||||
"hashed_secret": "c464af817287343305cbd6493c593885695df531",
|
||||
"is_verified": false,
|
||||
"line_number": 90,
|
||||
"line_number": 92,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -1296,7 +1319,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/filesys/FTPServerTest.java",
|
||||
"hashed_secret": "8ad8572a0b3fc4cb3afc1baaebc97a2cae58eb8c",
|
||||
"is_verified": false,
|
||||
"line_number": 91,
|
||||
"line_number": 93,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -1304,7 +1327,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/filesys/FTPServerTest.java",
|
||||
"hashed_secret": "915692b4d7465b0084354173d552ac90145dc315",
|
||||
"is_verified": false,
|
||||
"line_number": 92,
|
||||
"line_number": 94,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1314,7 +1337,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/filesys/repo/ContentDiskDriverTest.java",
|
||||
"hashed_secret": "8c85434f6f339a24b808810bd95629d0f5856355",
|
||||
"is_verified": false,
|
||||
"line_number": 1257,
|
||||
"line_number": 1280,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1324,7 +1347,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/opencmis/CMISTest.java",
|
||||
"hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684",
|
||||
"is_verified": false,
|
||||
"line_number": 4001,
|
||||
"line_number": 4134,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1334,7 +1357,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/coci/CheckOutCheckInServiceImplTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 141,
|
||||
"line_number": 140,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1344,7 +1367,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/i18n/MessageServiceImplTest.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 101,
|
||||
"line_number": 102,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1354,7 +1377,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/imap/ImapMessageTest.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 116,
|
||||
"line_number": 118,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1364,7 +1387,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/imap/ImapServiceImplCacheTest.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 66,
|
||||
"line_number": 68,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1374,7 +1397,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/imap/ImapServiceImplTest.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 111,
|
||||
"line_number": 116,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1384,7 +1407,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/imap/LoadTester.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 79,
|
||||
"line_number": 80,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1394,7 +1417,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/imap/RemoteLoadTester.java",
|
||||
"hashed_secret": "678721c0433c8cf5c9069a0e70784cf1839e866b",
|
||||
"is_verified": false,
|
||||
"line_number": 55,
|
||||
"line_number": 58,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1404,7 +1427,27 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/invitation/site/InviteSenderTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 108,
|
||||
"line_number": 109,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
"repository/src/test/java/org/alfresco/repo/lock/LockBehaviourImplTest.java": [
|
||||
{
|
||||
"type": "Secret Keyword",
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/lock/LockBehaviourImplTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 112,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
"repository/src/test/java/org/alfresco/repo/lock/LockServiceImplTest.java": [
|
||||
{
|
||||
"type": "Secret Keyword",
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/lock/LockServiceImplTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 103,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1440,7 +1483,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/model/filefolder/FileFolderServiceImplTest.java",
|
||||
"hashed_secret": "9e10e28cb9c3e381c13d13fa97dd97148982cdaa",
|
||||
"is_verified": false,
|
||||
"line_number": 590,
|
||||
"line_number": 595,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1450,7 +1493,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/notification/NotificationServiceImplSystemTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 75,
|
||||
"line_number": 74,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1460,7 +1503,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/oauth1/OAuth1CredentialsStoreServiceTest.java",
|
||||
"hashed_secret": "c60646de4c4893cf860a12ecb7ba4f5317b1a1d0",
|
||||
"is_verified": false,
|
||||
"line_number": 62,
|
||||
"line_number": 61,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -1468,7 +1511,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/oauth1/OAuth1CredentialsStoreServiceTest.java",
|
||||
"hashed_secret": "c60646de4c4893cf860a12ecb7ba4f5317b1a1d0",
|
||||
"is_verified": false,
|
||||
"line_number": 62,
|
||||
"line_number": 61,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -1476,7 +1519,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/oauth1/OAuth1CredentialsStoreServiceTest.java",
|
||||
"hashed_secret": "ad8a621976e9a19cc78af501a84638a04fca9b83",
|
||||
"is_verified": false,
|
||||
"line_number": 66,
|
||||
"line_number": 65,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1486,7 +1529,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/oauth2/OAuth2CredentialsStoreServiceTest.java",
|
||||
"hashed_secret": "c60646de4c4893cf860a12ecb7ba4f5317b1a1d0",
|
||||
"is_verified": false,
|
||||
"line_number": 64,
|
||||
"line_number": 70,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1506,7 +1549,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/replication/ReplicationServiceIntegrationTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 1317,
|
||||
"line_number": 1328,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1516,7 +1559,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/AuthenticationServiceImplTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 69,
|
||||
"line_number": 68,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1526,7 +1569,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/AuthenticationTest.java",
|
||||
"hashed_secret": "607e729c2f77c4e821e68e26b4c1f5a4398624e9",
|
||||
"is_verified": false,
|
||||
"line_number": 2121,
|
||||
"line_number": 2129,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1536,7 +1579,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/AuthorizationTest.java",
|
||||
"hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684",
|
||||
"is_verified": false,
|
||||
"line_number": 36,
|
||||
"line_number": 37,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1546,7 +1589,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/CompositePasswordEncoderTest.java",
|
||||
"hashed_secret": "4360136f24381dcec1d35d79fbf7dac4b54dfe97",
|
||||
"is_verified": false,
|
||||
"line_number": 310,
|
||||
"line_number": 301,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1556,7 +1599,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/IdentityServiceFacadeFactoryBeanTest.java",
|
||||
"hashed_secret": "c4b66dbe168ad1d2b19119494a0da063801bc3bb",
|
||||
"is_verified": false,
|
||||
"line_number": 82,
|
||||
"line_number": 83,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -1564,7 +1607,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/IdentityServiceFacadeFactoryBeanTest.java",
|
||||
"hashed_secret": "c5aad1895e1dcff195992938f1bcc9954d575ac9",
|
||||
"is_verified": false,
|
||||
"line_number": 91,
|
||||
"line_number": 92,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1574,7 +1617,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/LazyInstantiatingIdentityServiceFacadeUnitTest.java",
|
||||
"hashed_secret": "12e59296b0d17c1ceb345a7adca98574c835ba24",
|
||||
"is_verified": false,
|
||||
"line_number": 46,
|
||||
"line_number": 45,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1584,7 +1627,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/SpringBasedIdentityServiceFacadeUnitTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 48,
|
||||
"line_number": 46,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1604,7 +1647,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/transfer/HttpClientTransmitterImplTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 73,
|
||||
"line_number": 75,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1614,7 +1657,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/transfer/TransferServiceCallbackTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 658,
|
||||
"line_number": 664,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1624,7 +1667,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/transfer/TransferServiceImplTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 202,
|
||||
"line_number": 203,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -1632,7 +1675,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/transfer/TransferServiceImplTest.java",
|
||||
"hashed_secret": "ad782ecdac770fc6eb9a62e44f90873fb97fb26b",
|
||||
"is_verified": false,
|
||||
"line_number": 512,
|
||||
"line_number": 513,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -1640,7 +1683,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/transfer/TransferServiceImplTest.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 3593,
|
||||
"line_number": 3687,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1650,7 +1693,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/transfer/TransferServiceToBeRefactoredTest.java",
|
||||
"hashed_secret": "8be3c943b1609fffbfc51aad666d0a04adf83c9d",
|
||||
"is_verified": false,
|
||||
"line_number": 2510,
|
||||
"line_number": 2682,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -1658,7 +1701,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/transfer/TransferServiceToBeRefactoredTest.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 3517,
|
||||
"line_number": 3772,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1668,7 +1711,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/transfer/manifest/ManifestIntegrationTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 114,
|
||||
"line_number": 115,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1678,7 +1721,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/transfer/manifest/TransferManifestTest.java",
|
||||
"hashed_secret": "5395ebfd174b0a5617e6f409dfbb3e064e3fdf0a",
|
||||
"is_verified": false,
|
||||
"line_number": 126,
|
||||
"line_number": 127,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1688,7 +1731,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/version/BaseVersionStoreTest.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 144,
|
||||
"line_number": 149,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1708,7 +1751,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/version/VersionServiceImplTest.java",
|
||||
"hashed_secret": "dee17075a8c96d9c57c15d56b1f64e5abc1caf0b",
|
||||
"is_verified": false,
|
||||
"line_number": 121,
|
||||
"line_number": 122,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1718,7 +1761,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/util/test/junitrules/AlfrescoTenant.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 73,
|
||||
"line_number": 67,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1728,7 +1771,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/util/test/testusers/TestUserComponentImpl.java",
|
||||
"hashed_secret": "f73e110427648014568f7144031a6d48060eab0a",
|
||||
"is_verified": false,
|
||||
"line_number": 63,
|
||||
"line_number": 55,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1845,5 +1888,5 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"generated_at": "2025-07-23T08:25:11Z"
|
||||
"generated_at": "2025-03-31T12:42:09Z"
|
||||
}
|
||||
|
@@ -11,8 +11,6 @@ When you make a commit then these hooks will run and check the modified files. I
|
||||
|
||||
#### Code Quality
|
||||
This project uses `spotless` that enforces `alfresco-formatter.xml` to ensure code quality.
|
||||
The code style definition file is taken always form the `master` branch of `alfresco-community-repo`.
|
||||
All downstream projects use this code style definition file as well.
|
||||
|
||||
To check code-style violations you can use:
|
||||
```bash
|
||||
|
@@ -126,3 +126,4 @@ Please use [**this guide**](CONTRIBUTING.md) to make a contribution to the proje
|
||||
|
||||
- [Alfresco Content Services Documentation](https://docs.alfresco.com/content-services/latest/)
|
||||
- [Alfresco Platform](https://www.hyland.com/en/products/alfresco-platform)
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>25.3.0.52</version>
|
||||
<version>23.3.7.4</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>25.3.0.52</version>
|
||||
<version>23.3.7.4</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||
<version>25.3.0.52</version>
|
||||
<version>23.3.7.4</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
@@ -74,6 +74,16 @@
|
||||
<artifactId>alfresco-testng</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.epam.reportportal</groupId>
|
||||
<artifactId>agent-java-testng</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.awaitility</groupId>
|
||||
<artifactId>awaitility</artifactId>
|
||||
@@ -83,12 +93,12 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
<version>4.5.0</version>
|
||||
<version>4.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.docker-java</groupId>
|
||||
<artifactId>docker-java</artifactId>
|
||||
<version>3.4.0</version>
|
||||
<version>3.3.6</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
|
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.rm.community.model;
|
||||
|
||||
public record CapabilityModel(String name, String title, String description, GroupModel group, int index)
|
||||
{}
|
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.rm.community.model;
|
||||
|
||||
public record GroupModel(String id, String title)
|
||||
{}
|
@@ -1,91 +0,0 @@
|
||||
/*-
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.rm.community.model.role;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.rest.rm.community.model.CapabilityModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* POJO for role
|
||||
*/
|
||||
@Builder
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Role extends TestModel
|
||||
{
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private String name;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private List<CapabilityModel> capabilities;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private String displayLabel;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private String groupShortName;
|
||||
|
||||
private List<String> assignedUsers;
|
||||
|
||||
private List<String> assignedGroups;
|
||||
|
||||
private String roleGroupName;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
if (this == o)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Role role = (Role) o;
|
||||
return Objects.equals(name, role.name) && Objects.equals(capabilities, role.capabilities)
|
||||
&& Objects.equals(displayLabel, role.displayLabel) && Objects.equals(groupShortName, role.groupShortName) && Objects.equals(assignedUsers, role.assignedUsers)
|
||||
&& Objects.equals(assignedGroups, role.assignedGroups) && Objects.equals(roleGroupName, role.roleGroupName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash(name, capabilities, displayLabel, groupShortName, assignedUsers, assignedGroups, roleGroupName);
|
||||
}
|
||||
}
|
@@ -1,32 +0,0 @@
|
||||
/*-
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.rm.community.model.role;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
||||
public class RoleCollection extends RestModels<RoleEntry, RoleCollection>
|
||||
{}
|
@@ -1,47 +0,0 @@
|
||||
/*-
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.rm.community.model.role;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
||||
@Builder
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RoleEntry extends RestModels<Role, RoleEntry>
|
||||
{
|
||||
@JsonProperty
|
||||
private Role entry;
|
||||
}
|
@@ -35,7 +35,7 @@ package org.alfresco.rest.rm.community.model.user;
|
||||
*/
|
||||
public enum UserRoles
|
||||
{
|
||||
IN_PLACE_WRITERS("ExtendedWriters", "In-Place Writers"), ROLE_RM_ADMIN("Administrator", "Records Management Administrator"), ROLE_RM_MANAGER("RecordsManager", "Records Management Manager"), ROLE_RM_POWER_USER("PowerUser", "Records Management Power User"), ROLE_RM_SECURITY_OFFICER("SecurityOfficer", "Records Management Security Officer"), ROLE_RM_USER("User", "Records Management User"), IN_PLACE_READERS("ExtendedReaders", "In-Place Readers");
|
||||
IN_PLACE_WRITERS("ExtendedWriters", "In-Place Writers"), ROLE_RM_ADMIN("Administrator", "Records Management Administrator"), ROLE_RM_MANAGER("RecordsManager", "Records Management Manager"), ROLE_RM_POWER_USER("PowerUser", "Records Management Power User"), ROLE_RM_SECURITY_OFFICER("SecurityOfficer", "Records Management Security Officer"), ROLE_RM_USER("User", "Records Management User");
|
||||
|
||||
public final String roleId;
|
||||
public final String displayName;
|
||||
|
@@ -43,7 +43,6 @@ import org.alfresco.rest.rm.community.model.hold.Hold;
|
||||
import org.alfresco.rest.rm.community.model.hold.HoldCollection;
|
||||
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
|
||||
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryCollection;
|
||||
import org.alfresco.rest.rm.community.model.role.RoleCollection;
|
||||
import org.alfresco.rest.rm.community.requests.RMModelRequest;
|
||||
|
||||
/**
|
||||
@@ -304,39 +303,4 @@ public class FilePlanAPI extends RMModelRequest
|
||||
{
|
||||
return getHolds(filePlanId, EMPTY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the roles of a file plan.
|
||||
*
|
||||
* @param filePlanId
|
||||
* The identifier of a file plan
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @return The {Pagination and RoleModel Entries} for the given {@code filePlanId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* <ul>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to read {@code filePlanId}</li>
|
||||
* <li>{@code filePlanId} does not exist</li>
|
||||
* </ul>
|
||||
*/
|
||||
public RoleCollection getFilePlanRoles(String filePlanId, String parameters)
|
||||
{
|
||||
mandatoryString("filePlanId", filePlanId);
|
||||
return getRmRestWrapper().processModels(RoleCollection.class, simpleRequest(
|
||||
GET,
|
||||
"file-plans/{filePlanId}/roles?{parameters}",
|
||||
filePlanId,
|
||||
parameters));
|
||||
}
|
||||
|
||||
/**
|
||||
* See {@link #getFilePlanRoles(String, String)}
|
||||
*/
|
||||
public RoleCollection getFilePlanRoles(String filePlanId)
|
||||
{
|
||||
return getFilePlanRoles(filePlanId, EMPTY);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ import com.github.dockerjava.core.command.LogContainerResultCallback;
|
||||
import com.github.dockerjava.netty.NettyDockerCmdExecFactory;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
import org.apache.commons.lang.SystemUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@@ -93,7 +93,6 @@ import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI;
|
||||
import org.alfresco.rest.search.RestRequestQueryModel;
|
||||
import org.alfresco.rest.search.SearchNodeModel;
|
||||
import org.alfresco.rest.search.SearchRequest;
|
||||
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
|
||||
import org.alfresco.rest.v0.SearchAPI;
|
||||
import org.alfresco.utility.Utility;
|
||||
import org.alfresco.utility.data.DataUserAIS;
|
||||
@@ -128,10 +127,6 @@ public class BaseRMRestTest extends RestTest
|
||||
@Getter(value = PROTECTED)
|
||||
private SearchAPI searchApi;
|
||||
|
||||
@Autowired
|
||||
@Getter(PROTECTED)
|
||||
private RMRolesAndActionsAPI rmRolesAndActionsV0API;
|
||||
|
||||
protected static final String iso8601_DateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
|
||||
|
||||
/**
|
||||
|
@@ -28,7 +28,6 @@ package org.alfresco.rest.rm.community.fileplans;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
import static com.google.common.collect.Sets.newHashSet;
|
||||
import static org.springframework.http.HttpStatus.CONFLICT;
|
||||
import static org.springframework.http.HttpStatus.CREATED;
|
||||
import static org.springframework.http.HttpStatus.FORBIDDEN;
|
||||
@@ -57,27 +56,19 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.UNFILED_CONTAINER_TYPE;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.UNFILED_RECORD_FOLDER_TYPE;
|
||||
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_FILING;
|
||||
import static org.alfresco.rest.rm.community.model.user.UserRoles.IN_PLACE_READERS;
|
||||
import static org.alfresco.rest.rm.community.model.user.UserRoles.IN_PLACE_WRITERS;
|
||||
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_ADMIN;
|
||||
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_MANAGER;
|
||||
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_POWER_USER;
|
||||
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_SECURITY_OFFICER;
|
||||
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_USER;
|
||||
import static org.alfresco.utility.data.RandomData.getRandomAlphanumeric;
|
||||
import static org.alfresco.utility.data.RandomData.getRandomName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Set;
|
||||
|
||||
import org.testng.annotations.DataProvider;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
|
||||
import org.alfresco.rest.rm.community.base.DataProviderClass;
|
||||
import org.alfresco.rest.rm.community.model.CapabilityModel;
|
||||
import org.alfresco.rest.rm.community.model.fileplan.FilePlan;
|
||||
import org.alfresco.rest.rm.community.model.fileplan.FilePlanProperties;
|
||||
import org.alfresco.rest.rm.community.model.hold.Hold;
|
||||
@@ -85,9 +76,6 @@ import org.alfresco.rest.rm.community.model.hold.HoldCollection;
|
||||
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
|
||||
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryCollection;
|
||||
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryProperties;
|
||||
import org.alfresco.rest.rm.community.model.role.Role;
|
||||
import org.alfresco.rest.rm.community.model.role.RoleCollection;
|
||||
import org.alfresco.rest.rm.community.model.user.UserCapabilities;
|
||||
import org.alfresco.rest.rm.community.requests.gscore.api.RMSiteAPI;
|
||||
import org.alfresco.utility.constants.ContainerName;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
@@ -99,7 +87,6 @@ import org.alfresco.utility.report.Bug;
|
||||
* @author Rodica Sutu
|
||||
* @since 2.6
|
||||
*/
|
||||
@SuppressWarnings("PMD.UnitTestShouldIncludeAssert")
|
||||
public class FilePlanTests extends BaseRMRestTest
|
||||
{
|
||||
// ** Number of children (for children creation test) */
|
||||
@@ -607,171 +594,4 @@ public class FilePlanTests extends BaseRMRestTest
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Given that a file plan exists
|
||||
* When rmAdmin user ask the API for roles
|
||||
* It provides list of all default roles
|
||||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void listFilePlanAllDefaultRoles()
|
||||
{
|
||||
List<String> defaultRolesDisplayNames = asList(IN_PLACE_READERS.displayName, ROLE_RM_ADMIN.displayName, ROLE_RM_MANAGER.displayName, ROLE_RM_POWER_USER.displayName, ROLE_RM_USER.displayName, IN_PLACE_WRITERS.displayName, ROLE_RM_SECURITY_OFFICER.displayName);
|
||||
// Call to new API to get the roles and capabilities
|
||||
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI().getFilePlanRoles(FILE_PLAN_ALIAS);
|
||||
assertStatusCode(OK);
|
||||
roleCollection.getEntries().forEach(roleModelEntry -> {
|
||||
Role role = roleModelEntry.getEntry();
|
||||
assertTrue(defaultRolesDisplayNames.contains(role.getDisplayLabel()));
|
||||
assertNotNull(role.getCapabilities());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Given that a file plan exists
|
||||
* When rmAdmin user ask the API for roles with SystemRoles as false
|
||||
* It provides list of all roles excluding SystemRoles
|
||||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void listFilePlanAllRolesExcludeSystemRoles()
|
||||
{
|
||||
String parameters = "where=(systemRoles=false)";
|
||||
List<String> systemRolesDisplayNames = asList(IN_PLACE_WRITERS.displayName, IN_PLACE_READERS.displayName);
|
||||
// Call to new API to get the roles and capabilities
|
||||
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI().getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
|
||||
assertStatusCode(OK);
|
||||
roleCollection.getEntries().forEach(roleModelEntry -> {
|
||||
Role role = roleModelEntry.getEntry();
|
||||
assertFalse(systemRolesDisplayNames.contains(role.getDisplayLabel()));
|
||||
assertNotNull(role.getCapabilities());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Given that a file plan exists
|
||||
* When a non-RM user asks the API for the roles
|
||||
* Then the status code 403 (Permission denied) is return
|
||||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void nonRmUserFilePlanRoles()
|
||||
{
|
||||
// Create a random user
|
||||
UserModel nonRMuser = getDataUser().createRandomTestUser("testUser");
|
||||
// Call to new API to get the roles and capabilities
|
||||
getRestAPIFactory().getFilePlansAPI(nonRMuser).getFilePlanRoles(FILE_PLAN_ALIAS);
|
||||
assertStatusCode(FORBIDDEN);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Given that a file plan exists
|
||||
* When a RM_Manager user asks the API for the roles
|
||||
* returns the RM_Manager role and capabilities
|
||||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void rmManagerFilePlanRolesAndCapabilities()
|
||||
{
|
||||
// Create a random user
|
||||
UserModel managerUser = getDataUser().createRandomTestUser("managerUser");
|
||||
// Assign RecordsManager role to user
|
||||
getRestAPIFactory().getRMUserAPI().assignRoleToUser(managerUser.getUsername(), ROLE_RM_MANAGER.roleId);
|
||||
String parameters = "where=(personId='" + managerUser.getUsername() + "')";
|
||||
// Call to new API to get the roles and capabilities
|
||||
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI(managerUser).getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
|
||||
roleCollection.getEntries().forEach(roleModelEntry -> {
|
||||
Role role = roleModelEntry.getEntry();
|
||||
assertEquals(ROLE_RM_MANAGER.displayName, role.getDisplayLabel());
|
||||
assertNotNull(role.getCapabilities());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Given that a file plan exists
|
||||
* When a User with more than one role asks the API for the roles and relation
|
||||
* returns the roles and capabilities
|
||||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void multipleRoleUserFilePlanRolesAndCapabilities()
|
||||
{
|
||||
// Create a random user
|
||||
UserModel rmUser = getDataUser().createRandomTestUser("rmUser");
|
||||
// Assign rmUser role to user
|
||||
getRestAPIFactory().getRMUserAPI().assignRoleToUser(rmUser.getUsername(), ROLE_RM_USER.roleId);
|
||||
getRestAPIFactory().getRMUserAPI().assignRoleToUser(rmUser.getUsername(), ROLE_RM_POWER_USER.roleId);
|
||||
String parameters = "where=(personId='" + rmUser.getUsername() + "')";
|
||||
// Call to new API to get the roles and capabilities
|
||||
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI(rmUser).getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
|
||||
assertStatusCode(OK);
|
||||
assertEquals(roleCollection.getEntries().size(), 2);
|
||||
roleCollection.getEntries().forEach(roleModelEntry -> {
|
||||
Role role = roleModelEntry.getEntry();
|
||||
assertTrue(role.getDisplayLabel().equals(ROLE_RM_USER.displayName) || role.getDisplayLabel().equals(ROLE_RM_POWER_USER.displayName));
|
||||
assertNotNull(role.getCapabilities());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Given that a file plan exists
|
||||
* When a new user with a new role asks the API for the roles and relation
|
||||
* returns the new role and new capabilities
|
||||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void newRoleUserFilePlanRolesAndCapabilities()
|
||||
{
|
||||
/** A list of capabilities. */
|
||||
Set<String> newCapabilities = newHashSet(UserCapabilities.VIEW_RECORDS_CAP, UserCapabilities.DECLARE_RECORDS_CAP);
|
||||
// Create a new role using old API
|
||||
getRmRolesAndActionsV0API().createRole(getAdminUser().getUsername(), getAdminUser().getPassword(), "NewTestRole",
|
||||
"New Role Label", newCapabilities);
|
||||
// Create a random user
|
||||
UserModel rmNewUser = getDataUser().createRandomTestUser("rmPowerUser");
|
||||
// Assign New role to user
|
||||
getRestAPIFactory().getRMUserAPI().assignRoleToUser(rmNewUser.getUsername(), "NewTestRole");
|
||||
String parameters = "where=(personId='" + rmNewUser.getUsername() + "')";
|
||||
// Call to new API to get the roles and capabilities
|
||||
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI(rmNewUser).getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
|
||||
assertStatusCode(OK);
|
||||
assertEquals(roleCollection.getEntries().size(), 1);
|
||||
roleCollection.getEntries().forEach(roleModelEntry -> {
|
||||
List<CapabilityModel> capabilities = roleModelEntry.getEntry().getCapabilities();
|
||||
capabilities.forEach(capabilityModel -> {
|
||||
assertTrue(newCapabilities.contains(capabilityModel.name()));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Given that a file plan exists
|
||||
* When API call happens with Capability filter
|
||||
* returns roles associated with the capability
|
||||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
public void filePlanRolesAndCapabilitiesFilter()
|
||||
{
|
||||
String parameters = "where=(systemRoles=true and capabilityName in ('ManageRules'))";
|
||||
// Call to new API to get the roles and capabilities, filter by capability, include assigned users
|
||||
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI().getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
|
||||
assertStatusCode(OK);
|
||||
assertEquals(roleCollection.getEntries().size(), 1);
|
||||
roleCollection.getEntries().forEach(roleModelEntry -> {
|
||||
Role role = roleModelEntry.getEntry();
|
||||
assertEquals(ROLE_RM_ADMIN.displayName, role.getDisplayLabel());
|
||||
assertNotNull(role.getCapabilities());
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -134,16 +134,6 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
||||
.until(() -> getRestAPIFactory().getSearchAPI(null).search(searchRequest).getPagination()
|
||||
.getTotalItems() == NUMBER_OF_FILES);
|
||||
|
||||
RestRequestQueryModel ancestorReq = getContentFromFolderAndAllSubfoldersQuery(rootFolder.getNodeRefWithoutVersion());
|
||||
SearchRequest ancestorSearchRequest = new SearchRequest();
|
||||
ancestorSearchRequest.setQuery(ancestorReq);
|
||||
|
||||
STEP("Wait until paths are indexed.");
|
||||
// to improve stability on CI - seems that sometimes during big load we need to wait longer for the condition
|
||||
await().atMost(120, TimeUnit.SECONDS)
|
||||
.until(() -> getRestAPIFactory().getSearchAPI(null).search(ancestorSearchRequest).getPagination()
|
||||
.getTotalItems() == NUMBER_OF_FILES);
|
||||
|
||||
holdBulkOperation = HoldBulkOperation.builder()
|
||||
.query(queryReq)
|
||||
.op(HoldBulkOperationType.ADD).build();
|
||||
|
@@ -37,7 +37,7 @@ import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPr
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.testng.annotations.Test;
|
||||
|
@@ -45,7 +45,7 @@ import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.HttpStatus;
|
||||
|
@@ -0,0 +1 @@
|
||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
@@ -23,7 +23,7 @@ Recorded content can be explicitly destroyed whilst maintaining the original nod
|
||||
* License: Alfresco Community
|
||||
* Issue Tracker Link: [JIRA RM](https://issues.alfresco.com/jira/projects/RM/summary)
|
||||
* Contribution Model: Alfresco Closed Source
|
||||
* Documentation: [docs.alfresco.com (Records Management)](https://support.hyland.com/access?dita:id=job1721300866386&vrm_version=25.1&component=Alfresco%20Governance%20Services%20Community%20Edition)
|
||||
* Documentation: [docs.alfresco.com (Records Management)](http://docs.alfresco.com/rm2.4/concepts/welcome-rm.html)
|
||||
|
||||
***
|
||||
|
||||
|
@@ -21,18 +21,18 @@ RM is split into two main parts - a repository integration and a Share integrati
|
||||
* [Community License](../LICENSE.txt)
|
||||
* [Enterprise License](../../rm-enterprise/LICENSE.txt) (this file will only be present in clones of the Enterprise repository)
|
||||
* [Issue Tracker Link](https://issues.alfresco.com/jira/projects/RM)
|
||||
* [Community Documentation Link](https://support.hyland.com/access?dita:id=job1721300866386&vrm_version=25.1&component=Alfresco%20Governance%20Services%20Community%20Edition)
|
||||
* [Enterprise Documentation Link](https://support.hyland.com/access?dita:id=job1721300866386&vrm_version=25.1)
|
||||
* [Community Documentation Link](http://docs.alfresco.com/rm-community/concepts/welcome-rm.html)
|
||||
* [Enterprise Documentation Link](http://docs.alfresco.com/rm/concepts/welcome-rm.html)
|
||||
* [Contribution Model](../../CONTRIBUTING.md)
|
||||
|
||||
***
|
||||
|
||||
### Prerequisite Knowledge
|
||||
An understanding of Alfresco Content Services is assumed. The following pages from the [developer documentation](https://support.hyland.com/access?dita:id=lsl1724405261585&vrm_version=25.2&component=Alfresco%20Content%20Services%20Community%20Edition) give useful background information:
|
||||
An understanding of Alfresco Content Services is assumed. The following pages from the [developer documentation](http://docs.alfresco.com/5.2/concepts/dev-for-developers.html) give useful background information:
|
||||
|
||||
* [ACS Architecture](https://support.hyland.com/access?dita:id=lfo1719554691023&vrm_version=25.2)
|
||||
* [Platform Extensions](https://support.hyland.com/access?dita:id=ifr1720080387005&vrm_version=25.2)
|
||||
* [Share Extensions](https://support.hyland.com/access?dita:id=wqu1720687386891&vrm_version=25.2)
|
||||
* [ACS Architecture](http://docs.alfresco.com/5.2/concepts/dev-arch-overview.html)
|
||||
* [Platform Extensions](http://docs.alfresco.com/5.2/concepts/dev-platform-extensions.html)
|
||||
* [Share Extensions](http://docs.alfresco.com/5.2/concepts/dev-extensions-share.html)
|
||||
|
||||
***
|
||||
|
||||
@@ -44,12 +44,12 @@ The RM Share module communicates with the repository module via REST APIs. Inter
|
||||
* A DAO layer responsible for CRUD operations against the database.
|
||||
|
||||
#### REST API
|
||||
The REST API endpoints fall into two main types - v0 (Webscripts) and v1. The [v0 API](https://support.hyland.com/access?dita:id=fga1720080409048&vrm_version=25.2) is older and not recommended for integrations. The [v1 API](https://support.hyland.com/access?dita:id=cmm1721136574006&vrm_version=25.2) is newer but isn't yet feature complete. If you are running RM locally then the GS API Explorer will be available at [this link](http://localhost:8080/gs-api-explorer/).
|
||||
The REST API endpoints fall into two main types - v0 (Webscripts) and v1. The [v0 API](http://docs.alfresco.com/5.2/references/dev-extension-points-webscripts.html) is older and not recommended for integrations. The [v1 API](http://docs.alfresco.com/5.1/pra/1/topics/pra-welcome-aara.html) is newer but isn't yet feature complete. If you are running RM locally then the GS API Explorer will be available at [this link](http://localhost:8080/gs-api-explorer/).
|
||||
|
||||
Internally the GS v1 REST API is built on the [Alfresco v1 REST API framework](https://community.alfresco.com/community/ecm/blog/2016/10/11/v1-rest-api-part-1-introduction). It aims to be consistent with this in terms of behaviour and naming.
|
||||
|
||||
#### Java Public API
|
||||
The Java service layer is fronted by a [Java Public API](https://support.hyland.com/access?dita:id=lol1721390191517&vrm_version=25.2), which we will ensure backward compatible with previous releases. Before we remove any methods there will first be a release containing that method deprecated to allow third party integrations to migrate to a new method. The Java Public API also includes a set of POJO objects which are needed to communicate with the services. It is easy to identify classes that are part of the Java Public API as they are annotated `@AlfrescoPublicApi`.
|
||||
The Java service layer is fronted by a [Java Public API](http://docs.alfresco.com/5.2/concepts/java-public-api-list.html), which we will ensure backward compatible with previous releases. Before we remove any methods there will first be a release containing that method deprecated to allow third party integrations to migrate to a new method. The Java Public API also includes a set of POJO objects which are needed to communicate with the services. It is easy to identify classes that are part of the Java Public API as they are annotated `@AlfrescoPublicApi`.
|
||||
|
||||
Each Java service will have at least four beans defined for it:
|
||||
|
||||
@@ -61,7 +61,7 @@ Each Java service will have at least four beans defined for it:
|
||||
#### DAOs
|
||||
The DAOs are not part of the Java Public API, but handle CRUD operations against RM stored data. We have some custom queries to improve performance for particularly heavy operations.
|
||||
|
||||
We use standard Alfresco [data modelling](https://support.hyland.com/access?dita:id=ekx1720080373621&vrm_version=25.2) to store RM metadata. We extend the [Alfresco patching mechanism](https://support.hyland.com/access?dita:id=ato1720080396825&vrm_version=25.2) to provide community and enterprise schema upgrades.
|
||||
We use standard Alfresco [data modelling](http://docs.alfresco.com/5.2/references/dev-extension-points-content-model.html) to store RM metadata. We extend the [Alfresco patching mechanism](http://docs.alfresco.com/5.2/references/dev-extension-points-patch.html) to provide community and enterprise schema upgrades.
|
||||
|
||||
***
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>25.3.0.52</version>
|
||||
<version>23.3.7.4</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -1,3 +1,3 @@
|
||||
SOLR6_TAG=2.0.16
|
||||
POSTGRES_TAG=16.6
|
||||
SOLR6_TAG=2.0.11
|
||||
POSTGRES_TAG=15.4
|
||||
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
|
||||
|
@@ -119,11 +119,6 @@ rm.patch.v35.holdNewChildAssocPatch.batchSize=1000
|
||||
rm.haspermissionmap.read=Read
|
||||
rm.haspermissionmap.write=WriteProperties,AddChildren,ReadContent
|
||||
|
||||
# Extended Permissions
|
||||
# Enable matching the given username with the correct casing username when retrieving an IPR group.
|
||||
# Only needs to be used if there are owners that don't have the username in the correct casing.
|
||||
rm.extendedSecurity.enableUsernameNormalization=false
|
||||
|
||||
#
|
||||
# Extended auto-version behaviour. If true and other auto-version properties are satisfied, then
|
||||
# a document will be auto-versioned when its type is changed.
|
||||
|
@@ -34,7 +34,4 @@
|
||||
<!-- content cleanser -->
|
||||
<bean id="contentCleanser.522022M" class="org.alfresco.module.org_alfresco_module_rm.content.cleanser.ContentCleanser522022M"/>
|
||||
|
||||
<!-- content cleanser -->
|
||||
<bean id="contentCleanser.SevenPass" class="org.alfresco.module.org_alfresco_module_rm.content.cleanser.ContentCleanserSevenPass"/>
|
||||
|
||||
</beans>
|
||||
|
@@ -15,13 +15,6 @@
|
||||
<parameter property="end" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
||||
</parameterMap>
|
||||
|
||||
<parameterMap id="parameter_NodeIdsWhichReferenceContentUrl" type="map">
|
||||
<parameter property="contentUrlShort" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<parameter property="contentUrlCrc" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
||||
<parameter property="localName" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
<parameter property="uri" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
</parameterMap>
|
||||
|
||||
<resultMap id="result_NodeRefEntity" type="org.alfresco.module.org_alfresco_module_rm.query.NodeRefEntity">
|
||||
<result property="row" column="row" jdbcType="BIGINT" javaType="java.lang.Long"/>
|
||||
<result property="protocol" column="protocol" jdbcType="VARCHAR" javaType="java.lang.String"/>
|
||||
@@ -62,21 +55,18 @@
|
||||
|
||||
<!-- Get list of node ids which reference given content url -->
|
||||
<select id="select_NodeIdsWhichReferenceContentUrl"
|
||||
parameterMap="parameter_NodeIdsWhichReferenceContentUrl"
|
||||
parameterType="ContentUrl"
|
||||
resultMap="result_NodeIds">
|
||||
select
|
||||
p.node_id
|
||||
from
|
||||
alf_content_url cu
|
||||
left outer join alf_content_data cd ON (cd.content_url_id = cu.id)
|
||||
left outer join alf_node_properties p ON (p.long_value = cd.id)
|
||||
left outer join alf_qname q ON (q.id = p.qname_id)
|
||||
left outer join alf_namespace n ON (n.id = q.ns_id)
|
||||
where
|
||||
cu.content_url_short = ? and
|
||||
cu.content_url_crc = ? and
|
||||
q.local_name = ? and
|
||||
n.uri = ?
|
||||
LEFT OUTER JOIN alf_content_data cd ON (cd.content_url_id = cu.id)
|
||||
LEFT OUTER JOIN alf_node_properties p ON (p.long_value = cd.id)
|
||||
WHERE
|
||||
content_url_short = #{contentUrlShort} and
|
||||
content_url_crc = #{contentUrlCrc}
|
||||
|
||||
</select>
|
||||
|
||||
<select id="select_RecordFoldersWithSchedules"
|
||||
|
@@ -78,12 +78,6 @@
|
||||
<property name="transactionService" ref="transactionService" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.alfresco.rm.rest.api.fileplans.FilePlanRolesRelation">
|
||||
<property name="apiUtils" ref="apiUtils" />
|
||||
<property name="rmRoles" ref="rm.roles" />
|
||||
<property name="filePlanService" ref="FilePlanService" />
|
||||
</bean>
|
||||
|
||||
<bean class="org.alfresco.rm.rest.api.holds.HoldsEntityResource" >
|
||||
<property name="holdService" ref="HoldService" />
|
||||
<property name="apiUtils" ref="apiUtils" />
|
||||
@@ -234,11 +228,6 @@
|
||||
<property name="siteSurfConfig" ref="rm.siteSurfConfig" />
|
||||
</bean>
|
||||
|
||||
<bean id="rm.roles" class="org.alfresco.rm.rest.api.impl.RMRolesImpl">
|
||||
<property name="nodesModelFactory" ref="nodesModelFactory" />
|
||||
<property name="filePlanRoleService" ref="FilePlanRoleService"/>
|
||||
</bean>
|
||||
|
||||
<bean id="rm.siteSurfConfig" class="org.alfresco.rest.api.impl.SiteSurfConfig">
|
||||
<property name="configPath" value="alfresco/module/org_alfresco_module_rm/bootstrap/site"/>
|
||||
</bean>
|
||||
|
@@ -611,7 +611,6 @@
|
||||
<property name="authorityService" ref="authorityService"/>
|
||||
<property name="permissionService" ref="permissionService"/>
|
||||
<property name="transactionService" ref="transactionService"/>
|
||||
<property name="enableUsernameNormalization" value="${rm.extendedSecurity.enableUsernameNormalization}" />
|
||||
</bean>
|
||||
|
||||
<bean id="ExtendedSecurityService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
|
@@ -35,3 +35,4 @@
|
||||
}
|
||||
</#escape>
|
||||
</#macro>
|
||||
|
||||
|
@@ -219,3 +219,4 @@ function getRecordFolder(recordFolder, parentPath)
|
||||
|
||||
// Start webscript
|
||||
main();
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>25.3.0.52</version>
|
||||
<version>23.3.7.4</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
@@ -84,6 +84,11 @@
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.epam.reportportal</groupId>
|
||||
<artifactId>agent-java-testng</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
@@ -422,7 +427,7 @@
|
||||
<configuration>
|
||||
<images>
|
||||
<image>
|
||||
<name>postgres:16.6</name>
|
||||
<name>postgres:15.4</name>
|
||||
<run>
|
||||
<ports>
|
||||
<port>${postgresql.tests.port}:${postgresql.port}</port>
|
||||
|
@@ -92,12 +92,9 @@ public interface RecordsManagementPolicies
|
||||
interface OnRemoveReference extends ClassPolicy
|
||||
{
|
||||
/**
|
||||
* @param fromNodeRef
|
||||
* from node reference
|
||||
* @param toNodeRef
|
||||
* to node reference
|
||||
* @param reference
|
||||
* name of reference
|
||||
* @param fromNodeRef from node reference
|
||||
* @param toNodeRef to node reference
|
||||
* @param reference name of reference
|
||||
*/
|
||||
void onRemoveReference(NodeRef fromNodeRef, NodeRef toNodeRef, QName reference);
|
||||
}
|
||||
@@ -113,8 +110,7 @@ public interface RecordsManagementPolicies
|
||||
QName QNAME = QName.createQName(NamespaceService.ALFRESCO_URI, "beforeRecordFile");
|
||||
|
||||
/**
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param nodeRef node reference
|
||||
*/
|
||||
void beforeFileRecord(NodeRef nodeRef);
|
||||
}
|
||||
@@ -130,15 +126,13 @@ public interface RecordsManagementPolicies
|
||||
QName QNAME = QName.createQName(NamespaceService.ALFRESCO_URI, "onRecordFile");
|
||||
|
||||
/**
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param nodeRef node reference
|
||||
*/
|
||||
void onFileRecord(NodeRef nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* Before record declaration
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
interface BeforeRecordDeclaration extends ClassPolicy
|
||||
@@ -148,7 +142,6 @@ public interface RecordsManagementPolicies
|
||||
|
||||
/**
|
||||
* On record declaration
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
interface OnRecordDeclaration extends ClassPolicy
|
||||
@@ -158,7 +151,6 @@ public interface RecordsManagementPolicies
|
||||
|
||||
/**
|
||||
* Before record rejection
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
interface BeforeRecordRejection extends ClassPolicy
|
||||
@@ -168,7 +160,6 @@ public interface RecordsManagementPolicies
|
||||
|
||||
/**
|
||||
* On record rejection
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
interface OnRecordRejection extends ClassPolicy
|
||||
|
@@ -77,14 +77,15 @@ public interface RecordsManagementServiceRegistry extends ServiceRegistry
|
||||
@Deprecated
|
||||
QName RECORDS_MANAGEMENT_SECURITY_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "RecordsManagementSecurityService");
|
||||
|
||||
|
||||
/**
|
||||
* @return records management service
|
||||
* @return records management service
|
||||
*/
|
||||
@NotAuditable
|
||||
RecordsManagementService getRecordsManagementService();
|
||||
|
||||
/**
|
||||
* @return record service
|
||||
* @return record service
|
||||
*/
|
||||
@NotAuditable
|
||||
RecordService getRecordService();
|
||||
@@ -96,25 +97,25 @@ public interface RecordsManagementServiceRegistry extends ServiceRegistry
|
||||
DispositionService getDispositionService();
|
||||
|
||||
/**
|
||||
* @return records management admin service
|
||||
* @return records management admin service
|
||||
*/
|
||||
@NotAuditable
|
||||
RecordsManagementAdminService getRecordsManagementAdminService();
|
||||
|
||||
/**
|
||||
* @return records management action service
|
||||
* @return records management action service
|
||||
*/
|
||||
@NotAuditable
|
||||
RecordsManagementActionService getRecordsManagementActionService();
|
||||
|
||||
/**
|
||||
* @return records management event service
|
||||
* @return records management event service
|
||||
*/
|
||||
@NotAuditable
|
||||
RecordsManagementEventService getRecordsManagementEventService();
|
||||
|
||||
/**
|
||||
* @return records management security service
|
||||
* @return records management security service
|
||||
*
|
||||
* @deprecated As of release 2.1, replaced with {@link FilePlanRoleService}, {@link FilePlanPermissionService} and {@link ModelSecurityService}
|
||||
*/
|
||||
@@ -123,20 +124,20 @@ public interface RecordsManagementServiceRegistry extends ServiceRegistry
|
||||
RecordsManagementSecurityService getRecordsManagementSecurityService();
|
||||
|
||||
/**
|
||||
* @return records management audit service
|
||||
* @return records management audit service
|
||||
*/
|
||||
@NotAuditable
|
||||
RecordsManagementAuditService getRecordsManagementAuditService();
|
||||
|
||||
/**
|
||||
* @return capability service
|
||||
* @return capability service
|
||||
* @since 2.0
|
||||
*/
|
||||
@NotAuditable
|
||||
CapabilityService getCapabilityService();
|
||||
|
||||
/**
|
||||
* @return freeze service
|
||||
* @return freeze service
|
||||
* @since 2.1
|
||||
*/
|
||||
@NotAuditable
|
||||
@@ -150,21 +151,21 @@ public interface RecordsManagementServiceRegistry extends ServiceRegistry
|
||||
ExtendedSecurityService getExtendedSecurityService();
|
||||
|
||||
/**
|
||||
* @return file plan service
|
||||
* @return file plan service
|
||||
* @since 2.1
|
||||
*/
|
||||
@NotAuditable
|
||||
FilePlanService getFilePlanService();
|
||||
|
||||
/**
|
||||
* @return file plan role service
|
||||
* @return file plan role service
|
||||
* @since 2.1
|
||||
*/
|
||||
@NotAuditable
|
||||
FilePlanRoleService getFilePlanRoleService();
|
||||
|
||||
/**
|
||||
* @return file plan permission service
|
||||
* @return file plan permission service
|
||||
* @since 2.1
|
||||
*/
|
||||
@NotAuditable
|
||||
@@ -177,14 +178,14 @@ public interface RecordsManagementServiceRegistry extends ServiceRegistry
|
||||
IdentifierService getIdentifierService();
|
||||
|
||||
/**
|
||||
* @return record folder service
|
||||
* @return record folder service
|
||||
* @since 2.2
|
||||
*/
|
||||
@NotAuditable
|
||||
RecordFolderService getRecordFolderService();
|
||||
|
||||
/**
|
||||
* @return transfer service
|
||||
* @return transfer service
|
||||
* @since 2.2
|
||||
*/
|
||||
@NotAuditable
|
||||
|
@@ -51,7 +51,7 @@ import org.alfresco.repo.service.ServiceDescriptorRegistry;
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class RecordsManagementServiceRegistryImpl extends ServiceDescriptorRegistry
|
||||
implements RecordsManagementServiceRegistry
|
||||
implements RecordsManagementServiceRegistry
|
||||
{
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.RecordsManagementServiceRegistry#getRecordsManagementActionService()
|
||||
|
@@ -27,13 +27,12 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService;
|
||||
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
/**
|
||||
* Auditable action executer abstract base
|
||||
@@ -80,8 +79,7 @@ public abstract class AuditableActionExecuterAbstractBase extends ActionExecuter
|
||||
}
|
||||
|
||||
/**
|
||||
* @param auditable
|
||||
* true if auditable, false otherwise
|
||||
* @param auditable true if auditable, false otherwise
|
||||
*/
|
||||
public void setAuditable(boolean auditable)
|
||||
{
|
||||
@@ -89,8 +87,7 @@ public abstract class AuditableActionExecuterAbstractBase extends ActionExecuter
|
||||
}
|
||||
|
||||
/**
|
||||
* @param auditedImmediately
|
||||
* true if to be audited immediately, false to be audited after transaction commits
|
||||
* @param auditedImmediately true if to be audited immediately, false to be audited after transaction commits
|
||||
*/
|
||||
public void setAuditedImmediately(boolean auditedImmediately)
|
||||
{
|
||||
@@ -107,7 +104,7 @@ public abstract class AuditableActionExecuterAbstractBase extends ActionExecuter
|
||||
}
|
||||
|
||||
/**
|
||||
* @return records management audit service
|
||||
* @return records management audit service
|
||||
*/
|
||||
private RecordsManagementAuditService getAuditService()
|
||||
{
|
||||
@@ -145,7 +142,7 @@ public abstract class AuditableActionExecuterAbstractBase extends ActionExecuter
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#execute(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
|
@@ -34,7 +34,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
/**
|
||||
* Extension to action implementation hierarchy to insert parameter substitution processing.
|
||||
*
|
||||
* NOTE: this should eventually be pushed into the core.
|
||||
* NOTE: this should eventually be pushed into the core.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
@@ -64,8 +64,7 @@ public abstract class PropertySubActionExecuterAbstractBase extends AuditableAct
|
||||
}
|
||||
|
||||
/**
|
||||
* @param parameterProcessorComponent
|
||||
* parameter processor component
|
||||
* @param parameterProcessorComponent parameter processor component
|
||||
*/
|
||||
public void setParameterProcessorComponent(ParameterProcessorComponent parameterProcessorComponent)
|
||||
{
|
||||
@@ -73,8 +72,7 @@ public abstract class PropertySubActionExecuterAbstractBase extends AuditableAct
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allowParameterSubstitutions
|
||||
* true if property subs allowed, false otherwise
|
||||
* @param allowParameterSubstitutions true if property subs allowed, false otherwise
|
||||
*/
|
||||
public void setAllowParameterSubstitutions(boolean allowParameterSubstitutions)
|
||||
{
|
||||
@@ -87,10 +85,10 @@ public abstract class PropertySubActionExecuterAbstractBase extends AuditableAct
|
||||
@Override
|
||||
public void execute(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
// do the property subs (if any exist)
|
||||
// do the property subs (if any exist)
|
||||
if (isAllowParameterSubstitutions())
|
||||
{
|
||||
getParameterProcessorComponent().process(action, getActionDefinition(), actionedUponNodeRef);
|
||||
getParameterProcessorComponent().process(action, getActionDefinition(), actionedUponNodeRef);
|
||||
}
|
||||
|
||||
super.execute(action, actionedUponNodeRef);
|
||||
|
@@ -35,10 +35,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
||||
@@ -65,16 +61,19 @@ import org.alfresco.service.cmr.security.OwnableService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.transaction.TransactionService;
|
||||
import org.alfresco.util.PropertyCheck;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Records management action executer base class
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*/
|
||||
public abstract class RMActionExecuterAbstractBase extends PropertySubActionExecuterAbstractBase
|
||||
implements RecordsManagementAction,
|
||||
RecordsManagementModel,
|
||||
BeanNameAware
|
||||
public abstract class RMActionExecuterAbstractBase extends PropertySubActionExecuterAbstractBase
|
||||
implements RecordsManagementAction,
|
||||
RecordsManagementModel,
|
||||
BeanNameAware
|
||||
{
|
||||
/** Namespace service */
|
||||
private NamespaceService namespaceService;
|
||||
@@ -149,8 +148,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set the transaction service
|
||||
*
|
||||
* @param transactionService
|
||||
* The transaction service
|
||||
* @param transactionService The transaction service
|
||||
*/
|
||||
public void setTransactionService(TransactionService transactionService)
|
||||
{
|
||||
@@ -170,8 +168,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set the namespace service
|
||||
*
|
||||
* @param namespaceService
|
||||
* The namespace service
|
||||
* @param namespaceService The namespace service
|
||||
*/
|
||||
public void setNamespaceService(NamespaceService namespaceService)
|
||||
{
|
||||
@@ -191,8 +188,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set the node service
|
||||
*
|
||||
* @param nodeService
|
||||
* The node service
|
||||
* @param nodeService The node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -212,8 +208,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set the dictionary service
|
||||
*
|
||||
* @param dictionaryService
|
||||
* The dictionary service
|
||||
* @param dictionaryService The dictionary service
|
||||
*/
|
||||
public void setDictionaryService(DictionaryService dictionaryService)
|
||||
{
|
||||
@@ -233,8 +228,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set the content service
|
||||
*
|
||||
* @param contentService
|
||||
* The content service
|
||||
* @param contentService The content service
|
||||
*/
|
||||
public void setContentService(ContentService contentService)
|
||||
{
|
||||
@@ -254,8 +248,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set action service
|
||||
*
|
||||
* @param actionService
|
||||
* The action service
|
||||
* @param actionService The action service
|
||||
*/
|
||||
public void setActionService(ActionService actionService)
|
||||
{
|
||||
@@ -275,8 +268,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set the audit service that action details will be sent to
|
||||
*
|
||||
* @param recordsManagementAuditService
|
||||
* The audit service that action details will be sent to
|
||||
* @param recordsManagementAuditService The audit service that action details will be sent to
|
||||
*/
|
||||
public void setRecordsManagementAuditService(RecordsManagementAuditService recordsManagementAuditService)
|
||||
{
|
||||
@@ -296,8 +288,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set records management service
|
||||
*
|
||||
* @param recordsManagementActionService
|
||||
* The records management service
|
||||
* @param recordsManagementActionService The records management service
|
||||
*/
|
||||
public void setRecordsManagementActionService(RecordsManagementActionService recordsManagementActionService)
|
||||
{
|
||||
@@ -317,8 +308,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set the disposition service
|
||||
*
|
||||
* @param dispositionService
|
||||
* The disposition service
|
||||
* @param dispositionService The disposition service
|
||||
*/
|
||||
public void setDispositionService(DispositionService dispositionService)
|
||||
{
|
||||
@@ -338,8 +328,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Sets the vital record service
|
||||
*
|
||||
* @param vitalRecordService
|
||||
* vital record service
|
||||
* @param vitalRecordService vital record service
|
||||
*/
|
||||
public void setVitalRecordService(VitalRecordService vitalRecordService)
|
||||
{
|
||||
@@ -359,8 +348,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set the records management event service
|
||||
*
|
||||
* @param recordsManagementEventService
|
||||
* The records management event service
|
||||
* @param recordsManagementEventService The records management event service
|
||||
*/
|
||||
public void setRecordsManagementEventService(RecordsManagementEventService recordsManagementEventService)
|
||||
{
|
||||
@@ -380,8 +368,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set the ownable service
|
||||
*
|
||||
* @param ownableService
|
||||
* The ownable service
|
||||
* @param ownableService The ownable service
|
||||
*/
|
||||
public void setOwnableService(OwnableService ownableService)
|
||||
{
|
||||
@@ -401,8 +388,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set freeze service
|
||||
*
|
||||
* @param freezeService
|
||||
* freeze service
|
||||
* @param freezeService freeze service
|
||||
*/
|
||||
public void setFreezeService(FreezeService freezeService)
|
||||
{
|
||||
@@ -422,8 +408,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Set record service
|
||||
*
|
||||
* @param recordService
|
||||
* record service
|
||||
* @param recordService record service
|
||||
*/
|
||||
public void setRecordService(RecordService recordService)
|
||||
{
|
||||
@@ -443,8 +428,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Sets the records management admin service
|
||||
*
|
||||
* @param recordsManagementAdminService
|
||||
* records management admin service
|
||||
* @param recordsManagementAdminService records management admin service
|
||||
*/
|
||||
public void setRecordsManagementAdminService(RecordsManagementAdminService recordsManagementAdminService)
|
||||
{
|
||||
@@ -464,8 +448,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Sets the model security service
|
||||
*
|
||||
* @param modelSecurityService
|
||||
* model security service
|
||||
* @param modelSecurityService model security service
|
||||
*/
|
||||
public void setModelSecurityService(ModelSecurityService modelSecurityService)
|
||||
{
|
||||
@@ -485,8 +468,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Sets the record folder service
|
||||
*
|
||||
* @param recordFolderService
|
||||
* record folder service
|
||||
* @param recordFolderService record folder service
|
||||
*/
|
||||
public void setRecordFolderService(RecordFolderService recordFolderService)
|
||||
{
|
||||
@@ -506,8 +488,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Sets the hold service
|
||||
*
|
||||
* @param holdService
|
||||
* hold service
|
||||
* @param holdService hold service
|
||||
*/
|
||||
public void setHoldService(HoldService holdService)
|
||||
{
|
||||
@@ -527,8 +508,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Sets the identifier service
|
||||
*
|
||||
* @param identifierService
|
||||
* the identifier service
|
||||
* @param identifierService the identifier service
|
||||
*/
|
||||
public void setIdentifierService(IdentifierService identifierService)
|
||||
{
|
||||
@@ -538,12 +518,11 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Sets the applicable kinds
|
||||
*
|
||||
* @param applicableKinds
|
||||
* kinds that this action is applicable for
|
||||
* @param applicableKinds kinds that this action is applicable for
|
||||
*/
|
||||
public void setApplicableKinds(String[] applicableKinds)
|
||||
{
|
||||
for (String kind : applicableKinds)
|
||||
for(String kind : applicableKinds)
|
||||
{
|
||||
this.applicableKinds.add(FilePlanComponentKind.valueOf(kind));
|
||||
}
|
||||
@@ -565,7 +544,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
public ActionDefinition getActionDefinition()
|
||||
{
|
||||
ActionDefinition actionDefinition = super.getActionDefinition();
|
||||
((RecordsManagementActionDefinitionImpl) this.actionDefinition).setApplicableKinds(applicableKinds);
|
||||
((RecordsManagementActionDefinitionImpl)this.actionDefinition).setApplicableKinds(applicableKinds);
|
||||
return actionDefinition;
|
||||
}
|
||||
|
||||
@@ -575,7 +554,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
@Override
|
||||
public RecordsManagementActionDefinition getRecordsManagementActionDefinition()
|
||||
{
|
||||
return (RecordsManagementActionDefinition) getActionDefinition();
|
||||
return (RecordsManagementActionDefinition)getActionDefinition();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -603,7 +582,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Indicates whether this records management action is public or not
|
||||
*
|
||||
* @return boolean true if public, false otherwise
|
||||
* @return boolean true if public, false otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean isPublicAction()
|
||||
@@ -699,10 +678,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
/**
|
||||
* Function to pad a string with zero '0' characters to the required length
|
||||
*
|
||||
* @param s
|
||||
* String to pad with leading zero '0' characters
|
||||
* @param len
|
||||
* Length to pad to
|
||||
* @param s String to pad with leading zero '0' characters
|
||||
* @param len Length to pad to
|
||||
*
|
||||
* @return padded string or the original if already at >= len characters
|
||||
*
|
||||
@@ -711,7 +688,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExec
|
||||
@Deprecated
|
||||
protected String padString(String s, int len)
|
||||
{
|
||||
return leftPad(s, len);
|
||||
return leftPad(s, len);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -30,8 +30,6 @@ package org.alfresco.module.org_alfresco_module_rm.action;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
@@ -40,6 +38,7 @@ import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.RegexQNamePattern;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* @author Roy Wetherall
|
||||
@@ -82,7 +81,8 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether we should validate the next disposition action is the action we are trying to execute.
|
||||
* Indicates whether we should validate the next disposition action is the action we are
|
||||
* trying to execute.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -103,20 +103,21 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
NodeRef nextDispositionActionNodeRef = getNextDispostionAction(actionedUponNodeRef);
|
||||
NodeRef nextDispositionActionNodeRef = getNextDispostionAction(actionedUponNodeRef);
|
||||
|
||||
// determine whether we should be raising errors during state checking or not
|
||||
boolean checkError = true;
|
||||
Boolean checkErrorValue = (Boolean) action.getParameterValue(PARAM_NO_ERROR_CHECK);
|
||||
if (checkErrorValue != null)
|
||||
{
|
||||
checkError = checkErrorValue.booleanValue();
|
||||
}
|
||||
boolean checkError = true;
|
||||
Boolean checkErrorValue = (Boolean)action.getParameterValue(PARAM_NO_ERROR_CHECK);
|
||||
if (checkErrorValue != null)
|
||||
{
|
||||
checkError = checkErrorValue.booleanValue();
|
||||
}
|
||||
|
||||
// Check the validity of the action (is it the next action, are we dealing with the correct type of object for
|
||||
// the disposition level?
|
||||
@@ -143,7 +144,7 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
|
||||
executeRecordLevelDisposition(action, actionedUponNodeRef);
|
||||
|
||||
if (getNodeService().exists(nextDispositionActionNodeRef) &&
|
||||
getSetDispositionActionComplete())
|
||||
getSetDispositionActionComplete())
|
||||
{
|
||||
getNodeService().setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_AT, new Date());
|
||||
getNodeService().setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_BY, AuthenticationUtil.getRunAsUser());
|
||||
@@ -173,7 +174,7 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
|
||||
|
||||
// Indicate that the disposition action is compelte
|
||||
if (getNodeService().exists(nextDispositionActionNodeRef) &&
|
||||
getSetDispositionActionComplete())
|
||||
getSetDispositionActionComplete())
|
||||
{
|
||||
getNodeService().setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_AT, new Date());
|
||||
getNodeService().setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_BY, AuthenticationUtil.getRunAsUser());
|
||||
|
@@ -44,44 +44,43 @@ public interface RecordsManagementAction
|
||||
/**
|
||||
* Get the name of the action
|
||||
*
|
||||
* @return String action name
|
||||
* @return String action name
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Get the label of the action
|
||||
*
|
||||
* @return String action label
|
||||
* @return String action label
|
||||
*/
|
||||
String getLabel();
|
||||
|
||||
/**
|
||||
* Get the description of the action
|
||||
*
|
||||
* @return String action description
|
||||
* @return String action description
|
||||
*/
|
||||
String getDescription();
|
||||
|
||||
/**
|
||||
* Indicates whether this is a disposition action or not
|
||||
*
|
||||
* @return boolean true if a disposition action, false otherwise
|
||||
* @return boolean true if a disposition action, false otherwise
|
||||
*/
|
||||
boolean isDispositionAction();
|
||||
|
||||
/**
|
||||
* Execution of the action
|
||||
*
|
||||
* @param filePlanComponent
|
||||
* file plan component the action is executed upon
|
||||
* @param parameters
|
||||
* action parameters
|
||||
* @param filePlanComponent file plan component the action is executed upon
|
||||
* @param parameters action parameters
|
||||
* @return The result of the executed action
|
||||
*/
|
||||
RecordsManagementActionResult execute(NodeRef filePlanComponent, Map<String, Serializable> parameters);
|
||||
|
||||
/**
|
||||
* Some admin-related rmActions execute against a target nodeRef which is not provided by the calling code, but is instead an implementation detail of the action.
|
||||
* Some admin-related rmActions execute against a target nodeRef which is not provided
|
||||
* by the calling code, but is instead an implementation detail of the action.
|
||||
*
|
||||
* @return the target nodeRef
|
||||
*/
|
||||
|
@@ -41,21 +41,21 @@ public interface RecordsManagementActionCondition
|
||||
/**
|
||||
* Get the name of the action condition
|
||||
*
|
||||
* @return String action condition name
|
||||
* @return String action condition name
|
||||
*/
|
||||
String getBeanName();
|
||||
|
||||
/**
|
||||
* Get the label of the action condition
|
||||
*
|
||||
* @return String action condition label
|
||||
* @return String action condition label
|
||||
*/
|
||||
String getLabel();
|
||||
|
||||
/**
|
||||
* Get the description of the action condition
|
||||
*
|
||||
* @return String action condition description
|
||||
* @return String action condition description
|
||||
*/
|
||||
String getDescription();
|
||||
|
||||
|
@@ -40,4 +40,5 @@ import org.alfresco.service.cmr.action.ActionConditionDefinition;
|
||||
*/
|
||||
@AlfrescoPublicApi
|
||||
public interface RecordsManagementActionConditionDefinition extends ActionConditionDefinition
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ import org.alfresco.repo.action.ActionConditionDefinitionImpl;
|
||||
* @since 2.1
|
||||
*/
|
||||
public class RecordsManagementActionConditionDefinitionImpl extends ActionConditionDefinitionImpl
|
||||
implements RecordsManagementActionConditionDefinition
|
||||
implements RecordsManagementActionConditionDefinition
|
||||
{
|
||||
/** Serial Version UID */
|
||||
private static final long serialVersionUID = -7599279732731533610L;
|
||||
@@ -44,8 +44,7 @@ public class RecordsManagementActionConditionDefinitionImpl extends ActionCondit
|
||||
/**
|
||||
* Default constructor.
|
||||
*
|
||||
* @param name
|
||||
* name of the condition
|
||||
* @param name name of the condition
|
||||
*/
|
||||
public RecordsManagementActionConditionDefinitionImpl(String name)
|
||||
{
|
||||
|
@@ -29,8 +29,6 @@ package org.alfresco.module.org_alfresco_module_rm.action;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
@@ -39,6 +37,7 @@ import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.service.cmr.action.ActionConditionDefinition;
|
||||
import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
* Records management action condition evaluator abstract base implementation.
|
||||
@@ -47,8 +46,8 @@ import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
* @since 2.1
|
||||
*/
|
||||
public abstract class RecordsManagementActionConditionEvaluatorAbstractBase extends ActionConditionEvaluatorAbstractBase
|
||||
implements RecordsManagementActionCondition,
|
||||
BeanNameAware
|
||||
implements RecordsManagementActionCondition,
|
||||
BeanNameAware
|
||||
{
|
||||
/** records management action service */
|
||||
private RecordsManagementActionService recordsManagementActionService;
|
||||
@@ -81,8 +80,7 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
||||
}
|
||||
|
||||
/**
|
||||
* @param recordsManagementActionService
|
||||
* records management action service
|
||||
* @param recordsManagementActionService records management action service
|
||||
*/
|
||||
public void setRecordsManagementActionService(RecordsManagementActionService recordsManagementActionService)
|
||||
{
|
||||
@@ -90,17 +88,15 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param retryingTransactionHelper
|
||||
* retrying transaction helper
|
||||
* @param retryingTransactionHelper retrying transaction helper
|
||||
*/
|
||||
public void setRetryingTransactionHelper(RetryingTransactionHelper retryingTransactionHelper)
|
||||
{
|
||||
@@ -116,10 +112,12 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
||||
// override to prevent condition being registered with the core action service
|
||||
|
||||
// run the following code as System
|
||||
AuthenticationUtil.runAs(new RunAsWork<Object>() {
|
||||
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork()
|
||||
{
|
||||
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>() {
|
||||
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>()
|
||||
{
|
||||
public Void execute()
|
||||
{
|
||||
getRecordsManagementActionService().register(RecordsManagementActionConditionEvaluatorAbstractBase.this);
|
||||
@@ -178,7 +176,8 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
||||
/**
|
||||
* @see org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase#getActionConditionDefintion()
|
||||
*
|
||||
* TODO base class should provide "createActionDefinition" method that can be over-ridden like the ActionExecuter base class to prevent duplication of code and a cleaner extension.
|
||||
* TODO base class should provide "createActionDefinition" method that can be over-ridden like the ActionExecuter
|
||||
* base class to prevent duplication of code and a cleaner extension.
|
||||
*/
|
||||
@Override
|
||||
public ActionConditionDefinition getActionConditionDefintion()
|
||||
@@ -186,11 +185,11 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
||||
if (this.actionConditionDefinition == null)
|
||||
{
|
||||
this.actionConditionDefinition = new RecordsManagementActionConditionDefinitionImpl(beanName);
|
||||
((RecordsManagementActionConditionDefinitionImpl) actionConditionDefinition).setTitleKey(getTitleKey());
|
||||
((RecordsManagementActionConditionDefinitionImpl) actionConditionDefinition).setDescriptionKey(getDescriptionKey());
|
||||
((RecordsManagementActionConditionDefinitionImpl) actionConditionDefinition).setAdhocPropertiesAllowed(getAdhocPropertiesAllowed());
|
||||
((RecordsManagementActionConditionDefinitionImpl) actionConditionDefinition).setConditionEvaluator(beanName);
|
||||
((RecordsManagementActionConditionDefinitionImpl) actionConditionDefinition).setLocalizedParameterDefinitions(getLocalizedParameterDefinitions());
|
||||
((RecordsManagementActionConditionDefinitionImpl)actionConditionDefinition).setTitleKey(getTitleKey());
|
||||
((RecordsManagementActionConditionDefinitionImpl)actionConditionDefinition).setDescriptionKey(getDescriptionKey());
|
||||
((RecordsManagementActionConditionDefinitionImpl)actionConditionDefinition).setAdhocPropertiesAllowed(getAdhocPropertiesAllowed());
|
||||
((RecordsManagementActionConditionDefinitionImpl)actionConditionDefinition).setConditionEvaluator(beanName);
|
||||
((RecordsManagementActionConditionDefinitionImpl)actionConditionDefinition).setLocalizedParameterDefinitions(getLocalizedParameterDefinitions());
|
||||
}
|
||||
return this.actionConditionDefinition;
|
||||
}
|
||||
@@ -219,7 +218,7 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
||||
@Override
|
||||
public RecordsManagementActionConditionDefinition getRecordsManagementActionConditionDefinition()
|
||||
{
|
||||
return (RecordsManagementActionConditionDefinition) getActionConditionDefintion();
|
||||
return (RecordsManagementActionConditionDefinition)getActionConditionDefintion();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ import org.alfresco.service.cmr.action.ActionDefinition;
|
||||
public interface RecordsManagementActionDefinition extends ActionDefinition
|
||||
{
|
||||
/**
|
||||
* @return list of applicable file plan component kinds
|
||||
* @return list of applicable file plan component kinds
|
||||
*/
|
||||
Set<FilePlanComponentKind> getApplicableKinds();
|
||||
}
|
||||
|
@@ -49,8 +49,7 @@ public class RecordsManagementActionDefinitionImpl extends ActionDefinitionImpl
|
||||
/**
|
||||
* Default constructor.
|
||||
*
|
||||
* @param name
|
||||
* action definition name
|
||||
* @param name action definition name
|
||||
*/
|
||||
public RecordsManagementActionDefinitionImpl(String name)
|
||||
{
|
||||
@@ -58,8 +57,7 @@ public class RecordsManagementActionDefinitionImpl extends ActionDefinitionImpl
|
||||
}
|
||||
|
||||
/**
|
||||
* @param applicableKinds
|
||||
* applicable kinds
|
||||
* @param applicableKinds applicable kinds
|
||||
*/
|
||||
public void setApplicableKinds(Set<FilePlanComponentKind> applicableKinds)
|
||||
{
|
||||
|
@@ -43,8 +43,7 @@ public class RecordsManagementActionResult
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param value
|
||||
* result value
|
||||
* @param value result value
|
||||
*/
|
||||
public RecordsManagementActionResult(Object value)
|
||||
{
|
||||
@@ -52,7 +51,7 @@ public class RecordsManagementActionResult
|
||||
}
|
||||
|
||||
/**
|
||||
* @return result value
|
||||
* @return result value
|
||||
*/
|
||||
public Object getValue()
|
||||
{
|
||||
|
@@ -34,6 +34,7 @@ import java.util.Map;
|
||||
import org.alfresco.api.AlfrescoPublicApi;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
|
||||
/**
|
||||
* Records management action service interface
|
||||
*
|
||||
@@ -50,7 +51,7 @@ public interface RecordsManagementActionService
|
||||
List<RecordsManagementAction> getRecordsManagementActions();
|
||||
|
||||
/**
|
||||
* Get a list of the available records management action conditions
|
||||
* Get a list of the available records management action conditions
|
||||
*
|
||||
* @return List of records management action conditions
|
||||
* @since 2.1
|
||||
@@ -58,7 +59,8 @@ public interface RecordsManagementActionService
|
||||
List<RecordsManagementActionCondition> getRecordsManagementActionConditions();
|
||||
|
||||
/**
|
||||
* Get a list of the available disposition actions. A disposition action is a records management action that can be used when defining disposition instructions.
|
||||
* Get a list of the available disposition actions. A disposition action is a records
|
||||
* management action that can be used when defining disposition instructions.
|
||||
*
|
||||
* @return List of disposition actions
|
||||
*/
|
||||
@@ -67,8 +69,7 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Gets the named records management action
|
||||
*
|
||||
* @param name
|
||||
* The name of the RM action to retrieve
|
||||
* @param name The name of the RM action to retrieve
|
||||
* @return The RecordsManagementAction or null if it doesn't exist
|
||||
*/
|
||||
RecordsManagementAction getRecordsManagementAction(String name);
|
||||
@@ -76,8 +77,7 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Gets the named disposition action
|
||||
*
|
||||
* @param name
|
||||
* The name of the disposition action to retrieve
|
||||
* @param name The name of the disposition action to retrieve
|
||||
* @return The RecordsManagementAction or null if it doesn't exist
|
||||
*/
|
||||
RecordsManagementAction getDispositionAction(String name);
|
||||
@@ -85,10 +85,8 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Execute a records management action
|
||||
*
|
||||
* @param nodeRef
|
||||
* node reference to a rm container, rm folder or record
|
||||
* @param name
|
||||
* action name
|
||||
* @param nodeRef node reference to a rm container, rm folder or record
|
||||
* @param name action name
|
||||
* @return The result of executed records management action
|
||||
*/
|
||||
RecordsManagementActionResult executeRecordsManagementAction(NodeRef nodeRef, String name);
|
||||
@@ -96,10 +94,8 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Execute a records management action against several nodes
|
||||
*
|
||||
* @param nodeRefs
|
||||
* node references to rm containers, rm folders or records
|
||||
* @param name
|
||||
* action name
|
||||
* @param nodeRefs node references to rm containers, rm folders or records
|
||||
* @param name action name
|
||||
* @return The result of executed records management action against several nodes
|
||||
*/
|
||||
Map<NodeRef, RecordsManagementActionResult> executeRecordsManagementAction(List<NodeRef> nodeRefs, String name);
|
||||
@@ -107,12 +103,9 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Execute a records management action
|
||||
*
|
||||
* @param nodeRef
|
||||
* node reference to a rm container, rm folder or record
|
||||
* @param name
|
||||
* action name
|
||||
* @param parameters
|
||||
* action parameters
|
||||
* @param nodeRef node reference to a rm container, rm folder or record
|
||||
* @param name action name
|
||||
* @param parameters action parameters
|
||||
* @return The result of executed records management action
|
||||
*/
|
||||
RecordsManagementActionResult executeRecordsManagementAction(NodeRef nodeRef, String name, Map<String, Serializable> parameters);
|
||||
@@ -120,23 +113,19 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Execute a records management action against several nodes
|
||||
*
|
||||
* @param nodeRefs
|
||||
* node references to rm containers, rm folders or records
|
||||
* @param name
|
||||
* action name
|
||||
* @param parameters
|
||||
* action parameters
|
||||
* @param nodeRefs node references to rm containers, rm folders or records
|
||||
* @param name action name
|
||||
* @param parameters action parameters
|
||||
* @return The result of executed records management action against several nodes
|
||||
*/
|
||||
Map<NodeRef, RecordsManagementActionResult> executeRecordsManagementAction(List<NodeRef> nodeRefs, String name, Map<String, Serializable> parameters);
|
||||
|
||||
/**
|
||||
* Execute a records management action. The nodeRef against which the action is to be executed must be provided by the RecordsManagementAction implementation.
|
||||
* Execute a records management action. The nodeRef against which the action is to be
|
||||
* executed must be provided by the RecordsManagementAction implementation.
|
||||
*
|
||||
* @param name
|
||||
* action name
|
||||
* @param parameters
|
||||
* action parameters
|
||||
* @param name action name
|
||||
* @param parameters action parameters
|
||||
* @return The result of executed records management action
|
||||
*/
|
||||
RecordsManagementActionResult executeRecordsManagementAction(String name, Map<String, Serializable> parameters);
|
||||
@@ -144,16 +133,14 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Register records management action
|
||||
*
|
||||
* @param rmAction
|
||||
* records management action
|
||||
* @param rmAction records management action
|
||||
*/
|
||||
void register(RecordsManagementAction rmAction);
|
||||
|
||||
/**
|
||||
* Register records management condition
|
||||
*
|
||||
* @param rmCondition
|
||||
* records management condition
|
||||
* @param rmCondition records management condition
|
||||
* @since 2.1
|
||||
*/
|
||||
void register(RecordsManagementActionCondition rmCondition);
|
||||
|
@@ -36,8 +36,6 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementPolicies.BeforeRMActionExecution;
|
||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementPolicies.OnRMActionExecution;
|
||||
@@ -48,6 +46,7 @@ import org.alfresco.repo.policy.PolicyComponent;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Records Management Action Service Implementation
|
||||
@@ -105,8 +104,7 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
}
|
||||
|
||||
/**
|
||||
* @param freezeService
|
||||
* freeze service
|
||||
* @param freezeService freeze service
|
||||
*/
|
||||
public void setFreezeService(FreezeService freezeService)
|
||||
{
|
||||
@@ -121,8 +119,7 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
/**
|
||||
* Set the policy component
|
||||
*
|
||||
* @param policyComponent
|
||||
* policy component
|
||||
* @param policyComponent policy component
|
||||
*/
|
||||
public void setPolicyComponent(PolicyComponent policyComponent)
|
||||
{
|
||||
@@ -132,8 +129,7 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
/**
|
||||
* Set the node service
|
||||
*
|
||||
* @param nodeService
|
||||
* node service
|
||||
* @param nodeService node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -177,12 +173,9 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
/**
|
||||
* Invoke beforeRMActionExecution policy
|
||||
*
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param name
|
||||
* action name
|
||||
* @param parameters
|
||||
* action parameters
|
||||
* @param nodeRef node reference
|
||||
* @param name action name
|
||||
* @param parameters action parameters
|
||||
*/
|
||||
protected void invokeBeforeRMActionExecution(NodeRef nodeRef, String name, Map<String, Serializable> parameters)
|
||||
{
|
||||
@@ -196,12 +189,9 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
/**
|
||||
* Invoke onRMActionExecution policy
|
||||
*
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param name
|
||||
* action name
|
||||
* @param parameters
|
||||
* action parameters
|
||||
* @param nodeRef node reference
|
||||
* @param name action name
|
||||
* @param parameters action parameters
|
||||
*/
|
||||
protected void invokeOnRMActionExecution(NodeRef nodeRef, String name, Map<String, Serializable> parameters)
|
||||
{
|
||||
@@ -236,8 +226,7 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
/**
|
||||
* Gets the disposition actions for the given node
|
||||
*
|
||||
* @param nodeRef
|
||||
* The node reference
|
||||
* @param nodeRef The node reference
|
||||
* @return List of records management action
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
|
@@ -30,18 +30,17 @@ package org.alfresco.module.org_alfresco_module_rm.action;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.ResultSet;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
/**
|
||||
* Scheduled disposition job.
|
||||
@@ -60,78 +59,80 @@ public class ScheduledDispositionJob implements Job
|
||||
*/
|
||||
public void execute(JobExecutionContext context) throws JobExecutionException
|
||||
{
|
||||
RecordsManagementActionService rmActionService = (RecordsManagementActionService) context.getJobDetail().getJobDataMap().get("recordsManagementActionService");
|
||||
NodeService nodeService = (NodeService) context.getJobDetail().getJobDataMap().get("nodeService");
|
||||
RecordsManagementActionService rmActionService
|
||||
= (RecordsManagementActionService)context.getJobDetail().getJobDataMap().get("recordsManagementActionService");
|
||||
NodeService nodeService = (NodeService)context.getJobDetail().getJobDataMap().get("nodeService");
|
||||
|
||||
// Calculate the date range used in the query
|
||||
Calendar cal = Calendar.getInstance();
|
||||
String year = String.valueOf(cal.get(Calendar.YEAR));
|
||||
String month = String.valueOf(cal.get(Calendar.MONTH) + 1);
|
||||
String dayOfMonth = String.valueOf(cal.get(Calendar.DAY_OF_MONTH));
|
||||
|
||||
// TODO These pad() calls are in RMActionExecuterAbstractBase. I've copied them
|
||||
// here as I have no access to that class.
|
||||
// Calculate the date range used in the query
|
||||
Calendar cal = Calendar.getInstance();
|
||||
String year = String.valueOf(cal.get(Calendar.YEAR));
|
||||
String month = String.valueOf(cal.get(Calendar.MONTH) + 1);
|
||||
String dayOfMonth = String.valueOf(cal.get(Calendar.DAY_OF_MONTH));
|
||||
|
||||
final String currentDate = padString(year, 2) + "-" + padString(month, 2) +
|
||||
"-" + padString(dayOfMonth, 2) + "T00:00:00.00Z";
|
||||
//TODO These pad() calls are in RMActionExecuterAbstractBase. I've copied them
|
||||
// here as I have no access to that class.
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
StringBuilder msg = new StringBuilder();
|
||||
msg.append("Executing ")
|
||||
.append(this.getClass().getSimpleName())
|
||||
.append(" with currentDate ")
|
||||
.append(currentDate);
|
||||
logger.debug(msg.toString());
|
||||
}
|
||||
final String currentDate = padString(year, 2) + "-" + padString(month, 2) +
|
||||
"-" + padString(dayOfMonth, 2) + "T00:00:00.00Z";
|
||||
|
||||
// TODO Copied the 1970 start date from the old RM JavaScript impl.
|
||||
String dateRange = "[\"1970-01-01T00:00:00.00Z\" TO \"" + currentDate + "\"]";
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
StringBuilder msg = new StringBuilder();
|
||||
msg.append("Executing ")
|
||||
.append(this.getClass().getSimpleName())
|
||||
.append(" with currentDate ")
|
||||
.append(currentDate);
|
||||
logger.debug(msg.toString());
|
||||
}
|
||||
|
||||
// Execute the query and process the results
|
||||
String query = "+ASPECT:\"rma:record\" +ASPECT:\"rma:dispositionSchedule\" +@rma\\:dispositionAsOf:" + dateRange;
|
||||
//TODO Copied the 1970 start date from the old RM JavaScript impl.
|
||||
String dateRange = "[\"1970-01-01T00:00:00.00Z\" TO \"" + currentDate + "\"]";
|
||||
|
||||
SearchService search = (SearchService) context.getJobDetail().getJobDataMap().get("searchService");
|
||||
ResultSet results = search.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, SearchService.LANGUAGE_FTS_ALFRESCO, query);
|
||||
// Execute the query and process the results
|
||||
String query = "+ASPECT:\"rma:record\" +ASPECT:\"rma:dispositionSchedule\" +@rma\\:dispositionAsOf:" + dateRange;
|
||||
|
||||
List<NodeRef> resultNodes = results.getNodeRefs();
|
||||
results.close();
|
||||
SearchService search = (SearchService)context.getJobDetail().getJobDataMap().get("searchService");
|
||||
ResultSet results = search.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, SearchService.LANGUAGE_FTS_ALFRESCO, query);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
StringBuilder msg = new StringBuilder();
|
||||
msg.append("Found ")
|
||||
.append(resultNodes.size())
|
||||
.append(" records eligible for disposition.");
|
||||
logger.debug(msg.toString());
|
||||
}
|
||||
List<NodeRef> resultNodes = results.getNodeRefs();
|
||||
results.close();
|
||||
|
||||
for (NodeRef node : resultNodes)
|
||||
{
|
||||
String dispActionName = (String) nodeService.getProperty(node, RecordsManagementModel.PROP_DISPOSITION_ACTION_NAME);
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
StringBuilder msg = new StringBuilder();
|
||||
msg.append("Found ")
|
||||
.append(resultNodes.size())
|
||||
.append(" records eligible for disposition.");
|
||||
logger.debug(msg.toString());
|
||||
}
|
||||
|
||||
// Only automatically execute "cutoff" actions.
|
||||
// destroy and transfer and anything else should be manual for now
|
||||
if (dispActionName != null && dispActionName.equalsIgnoreCase("cutoff"))
|
||||
{
|
||||
rmActionService.executeRecordsManagementAction(node, dispActionName);
|
||||
for (NodeRef node : resultNodes )
|
||||
{
|
||||
String dispActionName = (String)nodeService.getProperty(node, RecordsManagementModel.PROP_DISPOSITION_ACTION_NAME);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Performing " + dispActionName + " dispoition action on disposable item " + node.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
// Only automatically execute "cutoff" actions.
|
||||
// destroy and transfer and anything else should be manual for now
|
||||
if (dispActionName != null && dispActionName.equalsIgnoreCase("cutoff"))
|
||||
{
|
||||
rmActionService.executeRecordsManagementAction(node, dispActionName);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Performing " + dispActionName + " dispoition action on disposable item " + node.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO This has been pasted out of RMActionExecuterAbstractBase. To be relocated.
|
||||
//TODO This has been pasted out of RMActionExecuterAbstractBase. To be relocated.
|
||||
private String padString(String s, int len)
|
||||
{
|
||||
String result = s;
|
||||
for (int i = 0; i < (len - s.length()); i++)
|
||||
for (int i=0; i<(len - s.length()); i++)
|
||||
{
|
||||
result = "0" + result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -46,8 +46,7 @@ public class CustomParameterConstraint extends BaseParameterConstraint
|
||||
/**
|
||||
* Sets the parameter values
|
||||
*
|
||||
* @param parameterValues
|
||||
* The parameter values
|
||||
* @param parameterValues The parameter values
|
||||
*/
|
||||
public void setParameterValues(List<String> parameterValues)
|
||||
{
|
||||
|
@@ -68,4 +68,5 @@ public class DispositionActionParameterConstraint extends BaseParameterConstrain
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -71,4 +71,5 @@ public class ManualEventParameterConstraint extends BaseParameterConstraint
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -64,8 +64,7 @@ public class RecordTypeParameterConstraint extends BaseParameterConstraint
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/**
|
||||
* @param recordService
|
||||
* record service
|
||||
* @param recordService record service
|
||||
*/
|
||||
public void setRecordService(RecordService recordService)
|
||||
{
|
||||
@@ -73,8 +72,7 @@ public class RecordTypeParameterConstraint extends BaseParameterConstraint
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dictionaryService
|
||||
* dictionary service
|
||||
* @param dictionaryService dictionary service
|
||||
*/
|
||||
public void setDictionaryService(DictionaryService dictionaryService)
|
||||
{
|
||||
@@ -82,8 +80,7 @@ public class RecordTypeParameterConstraint extends BaseParameterConstraint
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
@@ -95,7 +92,8 @@ public class RecordTypeParameterConstraint extends BaseParameterConstraint
|
||||
*/
|
||||
protected Map<String, String> getAllowableValuesImpl()
|
||||
{
|
||||
return AuthenticationUtil.runAsSystem(new RunAsWork<Map<String, String>>() {
|
||||
return AuthenticationUtil.runAsSystem(new RunAsWork<Map<String, String>>()
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map<String, String> doWork()
|
||||
{
|
||||
@@ -103,7 +101,7 @@ public class RecordTypeParameterConstraint extends BaseParameterConstraint
|
||||
|
||||
// get the file plan
|
||||
// TODO we will likely have to re-implement as a custom control so that context of the file
|
||||
// plan can be correctly determined when setting the rule up
|
||||
// plan can be correctly determined when setting the rule up
|
||||
NodeRef filePlan = filePlanService.getFilePlanBySiteId(FilePlanService.DEFAULT_RM_SITE_ID);
|
||||
|
||||
if (filePlan != null)
|
||||
|
@@ -47,12 +47,12 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
/**
|
||||
* Creates a new record from an existing content object.
|
||||
*
|
||||
* Note: This is a 'normal' dm action, rather than a records management action.
|
||||
* Note: This is a 'normal' dm action, rather than a records management action.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*/
|
||||
public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
implements RecordsManagementModel
|
||||
implements RecordsManagementModel
|
||||
{
|
||||
/** Action name */
|
||||
public static final String NAME = "create-record";
|
||||
@@ -81,8 +81,7 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
private RecordService recordService;
|
||||
|
||||
/**
|
||||
* @param nodeService
|
||||
* node service
|
||||
* @param nodeService node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -90,8 +89,7 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
@@ -99,17 +97,16 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param authenticationUtil
|
||||
* authentication util
|
||||
* @param authenticationUtil authentication util
|
||||
*/
|
||||
public void setAuthenticationUtil(AuthenticationUtil authenticationUtil)
|
||||
{
|
||||
this.authenticationUtil = authenticationUtil;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param recordService
|
||||
* record service
|
||||
* @param recordService record service
|
||||
*/
|
||||
public void setRecordService(RecordService recordService)
|
||||
{
|
||||
@@ -160,8 +157,8 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void addParameterDefinitions(List<ParameterDefinition> params)
|
||||
{
|
||||
// NOTE: commented out for now so that it doesn't appear in the UI ... enable later when multi-file plan support is added
|
||||
// params.add(new ParameterDefinitionImpl(PARAM_FILE_PLAN, DataTypeDefinition.NODE_REF, false, getParamDisplayLabel(PARAM_FILE_PLAN)));
|
||||
// NOTE: commented out for now so that it doesn't appear in the UI ... enable later when multi-file plan support is added
|
||||
//params.add(new ParameterDefinitionImpl(PARAM_FILE_PLAN, DataTypeDefinition.NODE_REF, false, getParamDisplayLabel(PARAM_FILE_PLAN)));
|
||||
params.add(new ParameterDefinitionImpl(PARAM_PATH, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_PATH)));
|
||||
params.add(new ParameterDefinitionImpl(PARAM_HIDE_RECORD, DataTypeDefinition.BOOLEAN, false, getParamDisplayLabel(PARAM_HIDE_RECORD)));
|
||||
}
|
||||
|
@@ -31,10 +31,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.AuditableActionExecuterAbstractBase;
|
||||
@@ -54,16 +50,19 @@ import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Creates a new record from the 'current' document version.
|
||||
*
|
||||
* Note: This is a 'normal' dm action, rather than a records management action.
|
||||
* Note: This is a 'normal' dm action, rather than a records management action.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*/
|
||||
public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstractBase
|
||||
implements RecordsManagementModel
|
||||
implements RecordsManagementModel
|
||||
{
|
||||
/** Logger */
|
||||
private static Log logger = LogFactory.getLog(DeclareAsVersionRecordAction.class);
|
||||
@@ -105,8 +104,7 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
private CapabilityService capabilityService;
|
||||
|
||||
/**
|
||||
* @param nodeService
|
||||
* node service
|
||||
* @param nodeService node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -114,8 +112,7 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
@@ -123,8 +120,7 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dictionaryService
|
||||
* dictionary service
|
||||
* @param dictionaryService dictionary service
|
||||
*/
|
||||
public void setDictionaryService(DictionaryService dictionaryService)
|
||||
{
|
||||
@@ -132,8 +128,7 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
|
||||
/**
|
||||
* @param recordableVersionService
|
||||
* recordable version service
|
||||
* @param recordableVersionService recordable version service
|
||||
*/
|
||||
public void setRecordableVersionService(RecordableVersionService recordableVersionService)
|
||||
{
|
||||
@@ -141,8 +136,7 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
|
||||
/**
|
||||
* @param authenticationUtil
|
||||
* authentication util
|
||||
* @param authenticationUtil authentication util
|
||||
*/
|
||||
public void setAuthenticationUtil(AuthenticationUtil authenticationUtil)
|
||||
{
|
||||
@@ -150,8 +144,7 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
|
||||
/**
|
||||
* @param recordService
|
||||
* record service
|
||||
* @param recordService record service
|
||||
*/
|
||||
public void setRecordService(RecordService recordService)
|
||||
{
|
||||
@@ -159,8 +152,7 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
|
||||
/**
|
||||
* @param capabilityService
|
||||
* capability service
|
||||
* @param capabilityService capability service
|
||||
*/
|
||||
public void setCapabilityService(CapabilityService capabilityService)
|
||||
{
|
||||
@@ -191,7 +183,7 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
else if (isActionEligible(actionedUponNodeRef))
|
||||
{
|
||||
NodeRef filePlan = (NodeRef) action.getParameterValue(PARAM_FILE_PLAN);
|
||||
NodeRef filePlan = (NodeRef)action.getParameterValue(PARAM_FILE_PLAN);
|
||||
if (filePlan == null)
|
||||
{
|
||||
filePlan = RecordActionUtils.getDefaultFilePlan(authenticationUtil, filePlanService, NAME);
|
||||
@@ -243,12 +235,12 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
@Override
|
||||
protected void addParameterDefinitions(List<ParameterDefinition> params)
|
||||
{
|
||||
// NOTE: commented out for now so that it doesn't appear in the UI ... enable later when multi-file plan support is added
|
||||
// params.add(new ParameterDefinitionImpl(PARAM_FILE_PLAN, DataTypeDefinition.NODE_REF, false, getParamDisplayLabel(PARAM_FILE_PLAN)));
|
||||
// NOTE: commented out for now so that it doesn't appear in the UI ... enable later when multi-file plan support is added
|
||||
//params.add(new ParameterDefinitionImpl(PARAM_FILE_PLAN, DataTypeDefinition.NODE_REF, false, getParamDisplayLabel(PARAM_FILE_PLAN)));
|
||||
params.add(new ParameterDefinitionImpl(PARAM_PATH, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_PATH)));
|
||||
}
|
||||
|
||||
/* Check aspects that stop declaring the version as record. */
|
||||
/* Check aspects that stop declaring the version as record.*/
|
||||
private boolean isActionEligible(NodeRef actionedUponNodeRef)
|
||||
{
|
||||
Map<QName, String> mappedAspects = new HashMap<>();
|
||||
|
@@ -37,7 +37,7 @@ import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
/**
|
||||
* Executes a JavaScript
|
||||
*
|
||||
* Note: This is a 'normal' dm action, rather than a records management action.
|
||||
* Note: This is a 'normal' dm action, rather than a records management action.
|
||||
*
|
||||
* @author Craig Tan
|
||||
*/
|
||||
|
@@ -29,9 +29,6 @@ package org.alfresco.module.org_alfresco_module_rm.action.dm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.AuditableActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.record.InplaceRecordService;
|
||||
@@ -39,6 +36,8 @@ import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Hides a record within a collaboration site.
|
||||
@@ -49,7 +48,7 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
* @since 2.1
|
||||
*/
|
||||
public class HideRecordAction extends AuditableActionExecuterAbstractBase
|
||||
implements RecordsManagementModel
|
||||
implements RecordsManagementModel
|
||||
{
|
||||
|
||||
/** Logger */
|
||||
@@ -65,8 +64,7 @@ public class HideRecordAction extends AuditableActionExecuterAbstractBase
|
||||
private InplaceRecordService inplaceRecordService;
|
||||
|
||||
/**
|
||||
* @param nodeService
|
||||
* node service
|
||||
* @param nodeService node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -74,8 +72,7 @@ public class HideRecordAction extends AuditableActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param inplaceRecordService
|
||||
* inplace record service
|
||||
* @param inplaceRecordService inplace record service
|
||||
*/
|
||||
public void setInplaceRecordService(InplaceRecordService inplaceRecordService)
|
||||
{
|
||||
|
@@ -29,10 +29,6 @@ package org.alfresco.module.org_alfresco_module_rm.action.dm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.AuditableActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
@@ -41,9 +37,13 @@ import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Moves a record within a collaboration site. The record can be moved only within the collaboration site where it was declared.
|
||||
* Moves a record within a collaboration site.
|
||||
* The record can be moved only within the collaboration site where it was declared.
|
||||
*
|
||||
* @author Tuna Aksoy
|
||||
* @since 2.3
|
||||
@@ -78,8 +78,7 @@ public class MoveDmRecordAction extends AuditableActionExecuterAbstractBase impl
|
||||
/**
|
||||
* Sets the node service
|
||||
*
|
||||
* @param nodeService
|
||||
* Node service
|
||||
* @param nodeService Node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -99,8 +98,7 @@ public class MoveDmRecordAction extends AuditableActionExecuterAbstractBase impl
|
||||
/**
|
||||
* Sets the inplace record service
|
||||
*
|
||||
* @param inplaceRecordService
|
||||
* Inplace record service
|
||||
* @param inplaceRecordService Inplace record service
|
||||
*/
|
||||
public void setInplaceRecordService(InplaceRecordService inplaceRecordService)
|
||||
{
|
||||
@@ -128,8 +126,7 @@ public class MoveDmRecordAction extends AuditableActionExecuterAbstractBase impl
|
||||
/**
|
||||
* Helper method to get the target node reference from the action parameter
|
||||
*
|
||||
* @param action
|
||||
* The action
|
||||
* @param action The action
|
||||
* @return Node reference of the target
|
||||
*/
|
||||
private NodeRef getTargetNodeRef(Action action)
|
||||
|
@@ -29,10 +29,6 @@ package org.alfresco.module.org_alfresco_module_rm.action.dm;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
@@ -41,6 +37,9 @@ import org.alfresco.module.org_alfresco_module_rm.util.AuthenticationUtil;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Utility class containing helper methods for record
|
||||
@@ -55,7 +54,8 @@ public class RecordActionUtils
|
||||
|
||||
/** Private constructor to prevent instantiation. */
|
||||
private RecordActionUtils()
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
static class Services
|
||||
{
|
||||
@@ -89,10 +89,8 @@ public class RecordActionUtils
|
||||
/**
|
||||
* Helper method to get the target record folder node reference from the action path parameter
|
||||
*
|
||||
* @param filePlan
|
||||
* The filePlan containing the path
|
||||
* @param pathParameter
|
||||
* The path
|
||||
* @param filePlan The filePlan containing the path
|
||||
* @param pathParameter The path
|
||||
* @return The NodeRef of the resolved path
|
||||
*/
|
||||
static NodeRef resolvePath(Services services, NodeRef filePlan, final String pathParameter, String actionName)
|
||||
@@ -126,10 +124,8 @@ public class RecordActionUtils
|
||||
/**
|
||||
* Helper method to recursively get the next path element node reference from the action path parameter
|
||||
*
|
||||
* @param parent
|
||||
* The parent of the path elements
|
||||
* @param pathElements
|
||||
* The path elements still to be resolved
|
||||
* @param parent The parent of the path elements
|
||||
* @param pathElements The path elements still to be resolved
|
||||
* @return The NodeRef of the resolved path element
|
||||
*/
|
||||
static NodeRef resolvePath(NodeService nodeService, NodeRef parent, List<String> pathElements, String actionName)
|
||||
@@ -169,7 +165,8 @@ public class RecordActionUtils
|
||||
// if the file plan is still null, raise an exception
|
||||
if (filePlan == null)
|
||||
{
|
||||
final String logMessage = String.format("Unable to execute %s action, because the fileplan path could not be determined. Make sure at least one file plan has been created.", actionName);
|
||||
final String logMessage =
|
||||
String.format("Unable to execute %s action, because the fileplan path could not be determined. Make sure at least one file plan has been created.", actionName);
|
||||
LOGGER.debug(logMessage);
|
||||
throw new AlfrescoRuntimeException(logMessage);
|
||||
}
|
||||
|
@@ -27,18 +27,15 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.dm;
|
||||
|
||||
import static org.apache.commons.logging.LogFactory.getLog;
|
||||
|
||||
import static org.alfresco.model.ContentModel.ASPECT_VERSIONABLE;
|
||||
import static org.alfresco.model.ContentModel.TYPE_CONTENT;
|
||||
import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.ASPECT_RECORD;
|
||||
import static org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionModel.PROP_RECORDABLE_VERSION_POLICY;
|
||||
import static org.alfresco.service.cmr.dictionary.DataTypeDefinition.TEXT;
|
||||
import static org.apache.commons.logging.LogFactory.getLog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionPolicy;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
|
||||
@@ -48,6 +45,7 @@ import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
/**
|
||||
* Sets the recordable version config for a document within a collaboration site.
|
||||
@@ -87,8 +85,7 @@ public class RecordableVersionConfigAction extends ActionExecuterAbstractBase
|
||||
/**
|
||||
* Sets the node service
|
||||
*
|
||||
* @param nodeService
|
||||
* The node service
|
||||
* @param nodeService The node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -138,8 +135,7 @@ public class RecordableVersionConfigAction extends ActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method to do checks on the actioned upon node reference
|
||||
*
|
||||
* @param actionedUponNodeRef
|
||||
* The actioned upon node reference
|
||||
* @param actionedUponNodeRef The actioned upon node reference
|
||||
* @return <code>true</code> if the actioned upon node reference passes the checks, <code>false</code> otherwise
|
||||
*/
|
||||
private boolean passedChecks(NodeRef actionedUponNodeRef)
|
||||
@@ -162,7 +158,7 @@ public class RecordableVersionConfigAction extends ActionExecuterAbstractBase
|
||||
passedChecks = false;
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
String message = buildLogMessage(actionedUponNodeRef, "' because the type of the node '" + type.getLocalName() + "' is not supported.");
|
||||
String message = buildLogMessage(actionedUponNodeRef, "' because the type of the node '" + type.getLocalName() + "' is not supported.");
|
||||
LOGGER.debug(message);
|
||||
}
|
||||
}
|
||||
@@ -193,10 +189,8 @@ public class RecordableVersionConfigAction extends ActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method to construct log message
|
||||
*
|
||||
* @param actionedUponNodeRef
|
||||
* The actioned upon node reference
|
||||
* @param messagePart
|
||||
* The message which should be appended.
|
||||
* @param actionedUponNodeRef The actioned upon node reference
|
||||
* @param messagePart The message which should be appended.
|
||||
* @return The constructed log message
|
||||
*/
|
||||
private String buildLogMessage(NodeRef actionedUponNodeRef, String messagePart)
|
||||
|
@@ -34,7 +34,8 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.util.ParameterCheck;
|
||||
|
||||
/**
|
||||
* Records management evaluator base implementation that delegates to a configured capability condition implementation.
|
||||
* Records management evaluator base implementation that delegates to a configured capability condition
|
||||
* implementation.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
@@ -45,8 +46,7 @@ public class CapabilityConditionEvaluator extends RecordsManagementActionConditi
|
||||
private CapabilityCondition capabilityCondition;
|
||||
|
||||
/**
|
||||
* @param capabilityCondition
|
||||
* capability condition
|
||||
* @param capabilityCondition capability condition
|
||||
*/
|
||||
public void setCapabilityCondition(CapabilityCondition capabilityCondition)
|
||||
{
|
||||
|
@@ -36,7 +36,8 @@ import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
* Records management action condition who's implementation is delegated to an existing action condition.
|
||||
* Records management action condition who's implementation is delegated to an existing
|
||||
* action condition.
|
||||
* <p>
|
||||
* Useful for creating a RM version of an existing action condition implementation.
|
||||
*
|
||||
@@ -51,8 +52,7 @@ public class DelegateActionCondition extends RecordsManagementActionConditionEva
|
||||
/**
|
||||
* Sets the action condition evaluator
|
||||
*
|
||||
* @param actionConditionEvaluator
|
||||
* The action condition evaluator
|
||||
* @param actionConditionEvaluator The action condition evaluator
|
||||
*/
|
||||
public void setActionConditionEvaluator(ActionConditionEvaluator actionConditionEvaluator)
|
||||
{
|
||||
|
@@ -41,6 +41,8 @@ import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Records management hasDispositionAction evaluator that evaluates whether the given node's disposition schedule has the specified disposition action.
|
||||
*
|
||||
@@ -63,8 +65,7 @@ public class HasDispositionActionEvaluator extends RecordsManagementActionCondit
|
||||
/**
|
||||
* Sets the disposition service
|
||||
*
|
||||
* @param dispositionService
|
||||
* The disposition service
|
||||
* @param dispositionService The disposition service
|
||||
*/
|
||||
public void setDispositionService(DispositionService dispositionService)
|
||||
{
|
||||
@@ -78,6 +79,7 @@ public class HasDispositionActionEvaluator extends RecordsManagementActionCondit
|
||||
String position = ((QName) actionCondition.getParameterValue(PARAM_DISPOSITION_ACTION_RELATIVE_POSITION)).getLocalName();
|
||||
String action = ((QName) actionCondition.getParameterValue(PARAM_DISPOSITION_ACTION)).getLocalName();
|
||||
|
||||
|
||||
if (dispositionService.isDisposableItem(actionedUponNodeRef))
|
||||
{
|
||||
|
||||
|
@@ -38,6 +38,8 @@ import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Records management IsKind evaluator that evaluates according to the file plan
|
||||
* component kind passed in.
|
||||
@@ -65,9 +67,9 @@ public class IsKindEvaluator extends RecordsManagementActionConditionEvaluatorAb
|
||||
FilePlanComponentKind filePlanComponentKind = getFilePlanService().getFilePlanComponentKind(actionedUponNodeRef);
|
||||
|
||||
if (filePlanComponentKind != null &&
|
||||
filePlanComponentKind.toString().equals(kind))
|
||||
filePlanComponentKind.toString().equals(kind))
|
||||
{
|
||||
result = true;
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@@ -62,8 +62,7 @@ public class IsRecordTypeEvaluator extends RecordsManagementActionConditionEvalu
|
||||
/**
|
||||
* Sets the node service
|
||||
*
|
||||
* @param nodeService
|
||||
* The node service
|
||||
* @param nodeService The node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
|
@@ -29,10 +29,6 @@ package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
@@ -40,6 +36,9 @@ import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Action to add types to a record
|
||||
@@ -65,7 +64,8 @@ public class AddRecordTypeAction extends RMActionExecuterAbstractBase
|
||||
public static final String NAME = "addRecordTypes";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
@@ -84,10 +84,14 @@ public class AddRecordTypeAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to check the actioned upon node reference to decide to execute the action The preconditions are: - The node must exist - The node must not be frozen - The node must be record - The node must not be declared
|
||||
* Helper method to check the actioned upon node reference to decide to execute the action
|
||||
* The preconditions are:
|
||||
* - The node must exist
|
||||
* - The node must not be frozen
|
||||
* - The node must be record
|
||||
* - The node must not be declared
|
||||
*
|
||||
* @param actionedUponNodeRef
|
||||
* node reference
|
||||
* @param actionedUponNodeRef node reference
|
||||
* @return Return true if the node reference passes all the preconditions for executing the action, false otherwise
|
||||
*/
|
||||
private boolean eligibleForAction(NodeRef actionedUponNodeRef)
|
||||
@@ -106,8 +110,7 @@ public class AddRecordTypeAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method to get the record types from the action
|
||||
*
|
||||
* @param action
|
||||
* The action
|
||||
* @param action The action
|
||||
* @return An array of record types
|
||||
*/
|
||||
private String[] getRecordTypes(Action action)
|
||||
|
@@ -33,10 +33,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
@@ -46,9 +42,13 @@ import org.alfresco.service.cmr.dictionary.AspectDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* This class applies the aspect specified in the spring bean property customTypeAspect. It is used to apply one of the 4 "custom type" aspects from the DOD 5015 model.
|
||||
* This class applies the aspect specified in the spring bean property customTypeAspect.
|
||||
* It is used to apply one of the 4 "custom type" aspects from the DOD 5015 model.
|
||||
*
|
||||
* @author Neil McErlean
|
||||
*/
|
||||
@@ -106,7 +106,9 @@ public class ApplyCustomTypeAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* This method converts a Map of String, Serializable to a Map of QName, Serializable. To do this, it assumes that each parameter name is a String representing a qname of the form prefix:localName.
|
||||
* This method converts a Map of String, Serializable to a Map of QName, Serializable.
|
||||
* To do this, it assumes that each parameter name is a String representing a qname
|
||||
* of the form prefix:localName.
|
||||
*/
|
||||
private Map<QName, Serializable> getPropertyValues(Action action)
|
||||
{
|
||||
|
@@ -35,9 +35,6 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionActionDefinition;
|
||||
@@ -50,9 +47,13 @@ import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.Period;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Action to implement the consequences of a change to the value of the DispositionActionDefinition properties. When these properties are changed on a disposition schedule, then any associated disposition actions may need to be updated as a consequence.
|
||||
* Action to implement the consequences of a change to the value of the DispositionActionDefinition
|
||||
* properties. When these properties are changed on a disposition schedule, then any associated
|
||||
* disposition actions may need to be updated as a consequence.
|
||||
*
|
||||
* @author Neil McErlean
|
||||
*/
|
||||
@@ -72,7 +73,8 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
@@ -83,7 +85,7 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
return;
|
||||
}
|
||||
|
||||
List<QName> changedProps = (List<QName>) action.getParameterValue(CHANGED_PROPERTIES);
|
||||
List<QName> changedProps = (List<QName>)action.getParameterValue(CHANGED_PROPERTIES);
|
||||
|
||||
// Navigate up the containment hierarchy to get the record category grandparent and schedule.
|
||||
NodeRef dispositionScheduleNode = getNodeService().getPrimaryParent(actionedUponNodeRef).getParentRef();
|
||||
@@ -118,7 +120,7 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
// has been updated
|
||||
DispositionSchedule itemDs = getDispositionService().getDispositionSchedule(disposableItem);
|
||||
if (itemDs != null &&
|
||||
itemDs.getNodeRef().equals(ds.getNodeRef()))
|
||||
itemDs.getNodeRef().equals(ds.getNodeRef()))
|
||||
{
|
||||
if (getNodeService().hasAspect(disposableItem, ASPECT_DISPOSITION_LIFECYCLE))
|
||||
{
|
||||
@@ -139,8 +141,7 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
/**
|
||||
* Manually update the rolled up search properties
|
||||
*
|
||||
* @param disposableItem
|
||||
* disposable item
|
||||
* @param disposableItem disposable item
|
||||
*/
|
||||
private void rollupSearchProperties(NodeRef disposableItem)
|
||||
{
|
||||
@@ -172,21 +173,19 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
{
|
||||
list.add(event.getEventName());
|
||||
}
|
||||
props.put(PROP_RS_DISPOSITION_EVENTS, (Serializable) list);
|
||||
props.put(PROP_RS_DISPOSITION_EVENTS, (Serializable)list);
|
||||
|
||||
getNodeService().setProperties(disposableItem, props);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes all the changes applied to the given disposition action definition node for the given record or folder node.
|
||||
* Processes all the changes applied to the given disposition
|
||||
* action definition node for the given record or folder node.
|
||||
*
|
||||
* @param dispositionActionDef
|
||||
* The disposition action definition node
|
||||
* @param changedProps
|
||||
* The set of properties changed on the action definition
|
||||
* @param recordOrFolder
|
||||
* The record or folder the changes potentially need to be applied to
|
||||
* @param dispositionActionDef The disposition action definition node
|
||||
* @param changedProps The set of properties changed on the action definition
|
||||
* @param recordOrFolder The record or folder the changes potentially need to be applied to
|
||||
*/
|
||||
private void processActionDefinitionChanges(NodeRef dispositionActionDef, List<QName> changedProps, NodeRef recordOrFolder)
|
||||
{
|
||||
@@ -210,23 +209,22 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
|
||||
if (changedProps.contains(PROP_DISPOSITION_ACTION_NAME))
|
||||
{
|
||||
String action = (String) getNodeService().getProperty(dispositionActionDef, PROP_DISPOSITION_ACTION_NAME);
|
||||
String action = (String)getNodeService().getProperty(dispositionActionDef, PROP_DISPOSITION_ACTION_NAME);
|
||||
getNodeService().setProperty(nextAction.getNodeRef(), PROP_DISPOSITION_ACTION, action);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the disposition action definition (step) being updated has any effect on the given next action
|
||||
* Determines whether the disposition action definition (step) being
|
||||
* updated has any effect on the given next action
|
||||
*
|
||||
* @param dispositionActionDef
|
||||
* The disposition action definition node
|
||||
* @param nextAction
|
||||
* The next disposition action
|
||||
* @param dispositionActionDef The disposition action definition node
|
||||
* @param nextAction The next disposition action
|
||||
* @return true if the step change affects the next action
|
||||
*/
|
||||
private boolean doesChangedStepAffectNextAction(NodeRef dispositionActionDef,
|
||||
DispositionAction nextAction)
|
||||
DispositionAction nextAction)
|
||||
{
|
||||
boolean affectsNextAction = false;
|
||||
|
||||
@@ -245,12 +243,11 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
}
|
||||
|
||||
/**
|
||||
* Persists any changes made to the period on the given disposition action definition on the given next action.
|
||||
* Persists any changes made to the period on the given disposition action
|
||||
* definition on the given next action.
|
||||
*
|
||||
* @param dispositionActionDef
|
||||
* The disposition action definition node
|
||||
* @param nextAction
|
||||
* The next disposition action
|
||||
* @param dispositionActionDef The disposition action definition node
|
||||
* @param nextAction The next disposition action
|
||||
*/
|
||||
protected void persistPeriodChanges(NodeRef dispositionActionDef, DispositionAction nextAction)
|
||||
{
|
||||
@@ -261,7 +258,7 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Set disposition as of date for next action '" + nextAction.getName() +
|
||||
"' (" + nextAction.getNodeRef() + ") to: " + newAsOfDate);
|
||||
"' (" + nextAction.getNodeRef() + ") to: " + newAsOfDate);
|
||||
}
|
||||
|
||||
getNodeService().setProperty(nextAction.getNodeRef(), PROP_DISPOSITION_AS_OF, newAsOfDate);
|
||||
|
@@ -44,7 +44,8 @@ public class CloseRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
public static final String PARAM_CLOSE_PARENT = "closeParent";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, final NodeRef actionedUponNodeRef)
|
||||
@@ -52,7 +53,8 @@ public class CloseRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
if (eligibleForAction(actionedUponNodeRef))
|
||||
{
|
||||
// do the work of creating the record as the system user
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>() {
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork()
|
||||
{
|
||||
@@ -65,10 +67,12 @@ public class CloseRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to check the actioned upon node reference to decide to execute the action The preconditions are: - The node must exist - The node must not be frozen
|
||||
* Helper method to check the actioned upon node reference to decide to execute the action
|
||||
* The preconditions are:
|
||||
* - The node must exist
|
||||
* - The node must not be frozen
|
||||
*
|
||||
* @param actionedUponNodeRef
|
||||
* node reference
|
||||
* @param actionedUponNodeRef node reference
|
||||
* @return Return true if the node reference passes all the preconditions for executing the action, false otherwise
|
||||
*/
|
||||
private boolean eligibleForAction(NodeRef actionedUponNodeRef)
|
||||
|
@@ -50,7 +50,7 @@ public class CompleteEventAction extends RMActionExecuterAbstractBase
|
||||
public static final String NAME = "completeEvent";
|
||||
|
||||
/** action parameter names */
|
||||
public static final String PARAM_EVENT_NAME = "eventName";
|
||||
public static final String PARAM_EVENT_NAME = "eventName";
|
||||
public static final String PARAM_EVENT_COMPLETED_BY = "eventCompletedBy";
|
||||
public static final String PARAM_EVENT_COMPLETED_AT = "eventCompletedAt";
|
||||
|
||||
@@ -61,26 +61,27 @@ public class CompleteEventAction extends RMActionExecuterAbstractBase
|
||||
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
|
||||
{
|
||||
paramList.add(new ParameterDefinitionImpl(PARAM_EVENT_NAME,
|
||||
DataTypeDefinition.TEXT,
|
||||
true,
|
||||
getParamDisplayLabel(PARAM_EVENT_NAME),
|
||||
false,
|
||||
"rm-ac-manual-events"));
|
||||
DataTypeDefinition.TEXT,
|
||||
true,
|
||||
getParamDisplayLabel(PARAM_EVENT_NAME),
|
||||
false,
|
||||
"rm-ac-manual-events"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (getNodeService().exists(actionedUponNodeRef) &&
|
||||
!getFreezeService().isFrozen(actionedUponNodeRef))
|
||||
!getFreezeService().isFrozen(actionedUponNodeRef))
|
||||
{
|
||||
/** get parameter values */
|
||||
String eventName = (String) action.getParameterValue(PARAM_EVENT_NAME);
|
||||
String eventCompletedBy = (String) action.getParameterValue(PARAM_EVENT_COMPLETED_BY);
|
||||
Date eventCompletedAt = (Date) action.getParameterValue(PARAM_EVENT_COMPLETED_AT);
|
||||
String eventName = (String)action.getParameterValue(PARAM_EVENT_NAME);
|
||||
String eventCompletedBy = (String)action.getParameterValue(PARAM_EVENT_COMPLETED_BY);
|
||||
Date eventCompletedAt = (Date)action.getParameterValue(PARAM_EVENT_COMPLETED_AT);
|
||||
|
||||
if (this.getNodeService().hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE))
|
||||
{
|
||||
|
@@ -30,10 +30,6 @@ package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
@@ -50,6 +46,9 @@ import org.alfresco.service.cmr.model.FileFolderService;
|
||||
import org.alfresco.service.cmr.model.FileNotFoundException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* File To action implementation.
|
||||
@@ -94,8 +93,7 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
/**
|
||||
* Sets the action mode
|
||||
*
|
||||
* @param mode
|
||||
* Action mode
|
||||
* @param mode Action mode
|
||||
*/
|
||||
protected void setMode(CopyMoveLinkFileToActionMode mode)
|
||||
{
|
||||
@@ -103,8 +101,7 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fileFolderService
|
||||
* file folder service
|
||||
* @param fileFolderService file folder service
|
||||
*/
|
||||
public void setFileFolderService(FileFolderService fileFolderService)
|
||||
{
|
||||
@@ -112,8 +109,7 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
@@ -153,7 +149,7 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
}
|
||||
|
||||
// first look to see if the destination record folder has been specified
|
||||
NodeRef recordFolder = (NodeRef) action.getParameterValue(PARAM_DESTINATION_RECORD_FOLDER);
|
||||
NodeRef recordFolder = (NodeRef)action.getParameterValue(PARAM_DESTINATION_RECORD_FOLDER);
|
||||
if (recordFolder == null)
|
||||
{
|
||||
recordFolder = createOrResolvePath(action, actionedUponNodeRef, targetIsUnfiledRecords);
|
||||
@@ -163,7 +159,8 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
validateActionPostPathResolution(actionedUponNodeRef, recordFolder, actionName, targetIsUnfiledRecords);
|
||||
|
||||
final NodeRef finalRecordFolder = recordFolder;
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>() {
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork()
|
||||
{
|
||||
@@ -204,23 +201,23 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
{
|
||||
// Check that the incoming parameters are valid prior to performing any action
|
||||
boolean okToProceed = false;
|
||||
if (getNodeService().exists(actionedUponNodeRef) && !getFreezeService().isFrozen(actionedUponNodeRef))
|
||||
if(getNodeService().exists(actionedUponNodeRef) && !getFreezeService().isFrozen(actionedUponNodeRef))
|
||||
{
|
||||
QName actionedUponType = getNodeService().getType(actionedUponNodeRef);
|
||||
if (ACTION_FILETO.equals(actionName))
|
||||
if(ACTION_FILETO.equals(actionName))
|
||||
{
|
||||
// file to action can only be performed on unfiled records
|
||||
okToProceed = !getRecordService().isFiled(actionedUponNodeRef) && getDictionaryService().isSubClass(actionedUponType, ContentModel.TYPE_CONTENT);
|
||||
if (!okToProceed && logger.isDebugEnabled())
|
||||
if(!okToProceed && logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Unable to run " + actionName + " action on a node that isn't unfiled and a sub-class of content type");
|
||||
}
|
||||
}
|
||||
else if (ACTION_LINKTO.equals(actionName))
|
||||
else if(ACTION_LINKTO.equals(actionName))
|
||||
{
|
||||
// link to action can only be performed on filed records
|
||||
okToProceed = getRecordService().isFiled(actionedUponNodeRef) && getDictionaryService().isSubClass(actionedUponType, ContentModel.TYPE_CONTENT);
|
||||
if (!okToProceed && logger.isDebugEnabled())
|
||||
if(!okToProceed && logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Unable to run " + actionName + " action on a node that isn't filed and a sub-class of content type");
|
||||
}
|
||||
@@ -249,21 +246,21 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to run " + actionName + " action, because the destination record folder could not be determined.");
|
||||
}
|
||||
if (targetIsUnfiledRecords)
|
||||
if(targetIsUnfiledRecords)
|
||||
{
|
||||
QName targetFolderType = getNodeService().getType(target);
|
||||
if (!TYPE_UNFILED_RECORD_CONTAINER.equals(targetFolderType) && !TYPE_UNFILED_RECORD_FOLDER.equals(targetFolderType))
|
||||
if(!TYPE_UNFILED_RECORD_CONTAINER.equals(targetFolderType) && !TYPE_UNFILED_RECORD_FOLDER.equals(targetFolderType))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to run " + actionName + " action, because the destination record folder is an inappropriate type.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (getRecordFolderService().isRecordFolder(target) && !getDictionaryService().isSubClass(actionedUponType, ContentModel.TYPE_CONTENT) && (getRecordFolderService().isRecordFolder(actionedUponNodeRef) || filePlanService.isRecordCategory(actionedUponNodeRef)))
|
||||
if(getRecordFolderService().isRecordFolder(target) && !getDictionaryService().isSubClass(actionedUponType, ContentModel.TYPE_CONTENT) && (getRecordFolderService().isRecordFolder(actionedUponNodeRef) || filePlanService.isRecordCategory(actionedUponNodeRef)))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to run " + actionName + " action, because the destination record folder is an inappropriate type. A record folder cannot contain another folder or a category");
|
||||
}
|
||||
else if (filePlanService.isRecordCategory(target) && getDictionaryService().isSubClass(actionedUponType, ContentModel.TYPE_CONTENT))
|
||||
else if(filePlanService.isRecordCategory(target) && getDictionaryService().isSubClass(actionedUponType, ContentModel.TYPE_CONTENT))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to run " + actionName + " action, because the destination record folder is an inappropriate type. A record category cannot contain a record");
|
||||
}
|
||||
@@ -275,8 +272,7 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
*
|
||||
* @param action
|
||||
* @param actionedUponNodeRef
|
||||
* @param targetisUnfiledRecords
|
||||
* true is the target is in unfiled records
|
||||
* @param targetisUnfiledRecords true is the target is in unfiled records
|
||||
* @return
|
||||
*/
|
||||
private NodeRef createOrResolvePath(final Action action, final NodeRef actionedUponNodeRef, final boolean targetisUnfiledRecords)
|
||||
@@ -286,18 +282,19 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
NodeRef path = context;
|
||||
|
||||
// get the path we wish to resolve
|
||||
String pathParameter = (String) action.getParameterValue(PARAM_PATH);
|
||||
String pathParameter = (String)action.getParameterValue(PARAM_PATH);
|
||||
final String[] pathElementsArray = StringUtils.tokenizeToStringArray(pathParameter, "/", false, true);
|
||||
if ((pathElementsArray != null) && (pathElementsArray.length > 0))
|
||||
if((pathElementsArray != null) && (pathElementsArray.length > 0))
|
||||
{
|
||||
// get the create parameter
|
||||
Boolean createValue = (Boolean) action.getParameterValue(PARAM_CREATE_RECORD_PATH);
|
||||
Boolean createValue = (Boolean)action.getParameterValue(PARAM_CREATE_RECORD_PATH);
|
||||
final boolean create = createValue == null ? false : createValue.booleanValue();
|
||||
QName type = getNodeService().getType(actionedUponNodeRef);
|
||||
final boolean isRecord = getDictionaryService().isSubClass(type, ContentModel.TYPE_CONTENT);
|
||||
|
||||
// create or resolve the specified path
|
||||
path = getTransactionService().getRetryingTransactionHelper().doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<NodeRef>() {
|
||||
path = getTransactionService().getRetryingTransactionHelper().doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<NodeRef>()
|
||||
{
|
||||
public NodeRef execute() throws Throwable
|
||||
{
|
||||
return createOrResolvePath(action, context, actionedUponNodeRef, isRecord, Arrays.asList(pathElementsArray), targetisUnfiledRecords, create, false);
|
||||
@@ -310,22 +307,14 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
/**
|
||||
* Create or resolve the specified path
|
||||
*
|
||||
* @param action
|
||||
* Action to use for reporting if anything goes wrong
|
||||
* @param parent
|
||||
* Parent of path to be created
|
||||
* @param actionedUponNodeRef
|
||||
* The node subject to the file/move/copy action
|
||||
* @param isRecord
|
||||
* true if node is a CONTENT SubType
|
||||
* @param pathElements
|
||||
* The elements of the path to be created
|
||||
* @param targetisUnfiledRecords
|
||||
* true if the target is within unfiled records
|
||||
* @param create
|
||||
* true if the path should be creeated if it does not exist
|
||||
* @param creating
|
||||
* true if we have already created the parent and therefore can skip the check to see if the next path element already exists
|
||||
* @param action Action to use for reporting if anything goes wrong
|
||||
* @param parent Parent of path to be created
|
||||
* @param actionedUponNodeRef The node subject to the file/move/copy action
|
||||
* @param isRecord true if node is a CONTENT SubType
|
||||
* @param pathElements The elements of the path to be created
|
||||
* @param targetisUnfiledRecords true if the target is within unfiled records
|
||||
* @param create true if the path should be creeated if it does not exist
|
||||
* @param creating true if we have already created the parent and therefore can skip the check to see if the next path element already exists
|
||||
* @return
|
||||
*/
|
||||
private NodeRef createOrResolvePath(Action action, NodeRef parent, NodeRef actionedUponNodeRef, boolean isRecord, List<String> pathElements, boolean targetisUnfiledRecords, boolean create, boolean creating)
|
||||
@@ -333,13 +322,13 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
NodeRef nodeRef = null;
|
||||
String childName = pathElements.get(0);
|
||||
boolean lastPathElement = pathElements.size() == 1;
|
||||
if (!creating)
|
||||
if(!creating)
|
||||
{
|
||||
nodeRef = getChild(parent, childName);
|
||||
}
|
||||
if (nodeRef == null)
|
||||
if(nodeRef == null)
|
||||
{
|
||||
if (create)
|
||||
if(create)
|
||||
{
|
||||
creating = true;
|
||||
boolean lastAsFolder = lastPathElement && isRecord;
|
||||
@@ -353,14 +342,14 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
else
|
||||
{
|
||||
QName nodeType = getNodeService().getType(nodeRef);
|
||||
if (nodeType.equals(RecordsManagementModel.TYPE_HOLD_CONTAINER) ||
|
||||
if(nodeType.equals(RecordsManagementModel.TYPE_HOLD_CONTAINER) ||
|
||||
nodeType.equals(RecordsManagementModel.TYPE_TRANSFER_CONTAINER) ||
|
||||
nodeType.equals(RecordsManagementModel.TYPE_UNFILED_RECORD_CONTAINER))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to execute " + action.getActionDefinitionName() + " action, because the destination path in invalid.");
|
||||
}
|
||||
}
|
||||
if (pathElements.size() > 1)
|
||||
if(pathElements.size() > 1)
|
||||
{
|
||||
nodeRef = createOrResolvePath(action, nodeRef, actionedUponNodeRef, isRecord, pathElements.subList(1, pathElements.size()), targetisUnfiledRecords, create, creating);
|
||||
}
|
||||
@@ -382,16 +371,11 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
/**
|
||||
* Create the specified child of the specified parent
|
||||
*
|
||||
* @param action
|
||||
* Action to use for reporting if anything goes wrong
|
||||
* @param parent
|
||||
* Parent of the child to be created
|
||||
* @param childName
|
||||
* The name of the child to be created
|
||||
* @param targetisUnfiledRecords
|
||||
* true if the child is being created in the unfiled directory (determines type as unfiled container child)
|
||||
* @param lastAsFolder
|
||||
* true if this is the last element of the pathe being created and it should be created as a folder. ignored if targetIsUnfiledRecords is true
|
||||
* @param action Action to use for reporting if anything goes wrong
|
||||
* @param parent Parent of the child to be created
|
||||
* @param childName The name of the child to be created
|
||||
* @param targetisUnfiledRecords true if the child is being created in the unfiled directory (determines type as unfiled container child)
|
||||
* @param lastAsFolder true if this is the last element of the pathe being created and it should be created as a folder. ignored if targetIsUnfiledRecords is true
|
||||
* @return
|
||||
*/
|
||||
private NodeRef createChild(final Action action, final NodeRef parent, final String childName, final boolean targetisUnfiledRecords, final boolean lastAsFolder)
|
||||
@@ -436,11 +420,11 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
private NodeRef getContext(Action action, NodeRef actionedUponNodeRef, boolean targetisUnfiledRecords)
|
||||
{
|
||||
NodeRef context = filePlanService.getFilePlan(actionedUponNodeRef);
|
||||
if (targetisUnfiledRecords && (context != null) && getNodeService().exists(context))
|
||||
if(targetisUnfiledRecords && (context != null) && getNodeService().exists(context))
|
||||
{
|
||||
context = filePlanService.getUnfiledContainer(context);
|
||||
}
|
||||
if ((context == null) || (!getNodeService().exists(context)))
|
||||
if((context == null) || (!getNodeService().exists(context)))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to execute " + action.getActionDefinitionName() + " action, because the path resolution context could not be determined.");
|
||||
}
|
||||
|
@@ -27,13 +27,12 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Create disposition schedule action
|
||||
@@ -49,13 +48,12 @@ public class CreateDispositionScheduleAction extends RMActionExecuterAbstractBas
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/**
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
* @param filePlanService file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
@@ -75,10 +73,12 @@ public class CreateDispositionScheduleAction extends RMActionExecuterAbstractBas
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to check the actioned upon node reference to decide to execute the action The preconditions are: - The node must exist - The node must not be a record category
|
||||
* Helper method to check the actioned upon node reference to decide to execute the action
|
||||
* The preconditions are:
|
||||
* - The node must exist
|
||||
* - The node must not be a record category
|
||||
*
|
||||
* @param actionedUponNodeRef
|
||||
* node reference
|
||||
* @param actionedUponNodeRef node reference
|
||||
* @return Return true if the node reference passes all the preconditions for executing the action, false otherwise
|
||||
*/
|
||||
private boolean eligibleForAction(NodeRef actionedUponNodeRef)
|
||||
|
@@ -48,7 +48,7 @@ public class CutOffAction extends RMDispositionActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeRecordFolderLevelDisposition(Action action, NodeRef recordFolder)
|
||||
{
|
||||
if (checkUncutOffStatus(action, recordFolder))
|
||||
if(checkUncutOffStatus(action, recordFolder))
|
||||
{
|
||||
// Mark the folder as cut off
|
||||
getDispositionService().cutoffDisposableItem(recordFolder);
|
||||
@@ -61,7 +61,7 @@ public class CutOffAction extends RMDispositionActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeRecordLevelDisposition(Action action, NodeRef record)
|
||||
{
|
||||
if (checkUncutOffStatus(action, record))
|
||||
if(checkUncutOffStatus(action, record))
|
||||
{
|
||||
// Mark the record as cut off
|
||||
getDispositionService().cutoffDisposableItem(record);
|
||||
@@ -69,20 +69,20 @@ public class CutOffAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the record or folder has been uncut off. If it has and this cut off action is an automated disposition action then the cut off isn't run. If it has and this is a manual cut off action then the uncut off aspect is removed prior to the uncut action.
|
||||
* Check if the record or folder has been uncut off. If it has and this cut off action is an
|
||||
* automated disposition action then the cut off isn't run. If it has and this is a manual
|
||||
* cut off action then the uncut off aspect is removed prior to the uncut action.
|
||||
*
|
||||
* @param action
|
||||
* The cut off action
|
||||
* @param recordOrFolder
|
||||
* The record or folder to be cut off
|
||||
* @param action The cut off action
|
||||
* @param recordOrFolder The record or folder to be cut off
|
||||
* @return True if the record or folder can be cut off
|
||||
*/
|
||||
private boolean checkUncutOffStatus(Action action, NodeRef recordOrFolder)
|
||||
{
|
||||
boolean okToCutOff = true;
|
||||
if (getNodeService().hasAspect(recordOrFolder, ASPECT_UNCUT_OFF))
|
||||
if(getNodeService().hasAspect(recordOrFolder, ASPECT_UNCUT_OFF))
|
||||
{
|
||||
if (action.getParameterValue(PARAM_NO_ERROR_CHECK) != null)
|
||||
if(action.getParameterValue(PARAM_NO_ERROR_CHECK) != null)
|
||||
{
|
||||
// this exception stops the cut off disposition schedule action taking place and because we're
|
||||
// running from the schedule (PARAM_NO_ERROR_CHECK is set) then the exception will not be reported
|
||||
@@ -95,4 +95,4 @@ public class CutOffAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
return okToCutOff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -54,8 +54,7 @@ public class DeclareRecordAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Sets the record service
|
||||
*
|
||||
* @param recordService
|
||||
* record service
|
||||
* @param recordService record service
|
||||
*/
|
||||
public void setRecordService(RecordService recordService)
|
||||
{
|
||||
|
@@ -45,15 +45,14 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
*/
|
||||
public class DelegateAction extends RMActionExecuterAbstractBase
|
||||
{
|
||||
/** Delegate action executer */
|
||||
/** Delegate action executer*/
|
||||
private ActionExecuter delegateActionExecuter;
|
||||
|
||||
/** should we check whether the node is frozen */
|
||||
private boolean checkFrozen = false;
|
||||
|
||||
/**
|
||||
* @param delegateActionExecuter
|
||||
* delegate action executer
|
||||
* @param delegateActionExecuter delegate action executer
|
||||
*/
|
||||
public void setDelegateAction(ActionExecuter delegateActionExecuter)
|
||||
{
|
||||
@@ -61,8 +60,7 @@ public class DelegateAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param checkFrozen
|
||||
* true if we check whether the actioned upon node reference is frozen, false otherwise
|
||||
* @param checkFrozen true if we check whether the actioned upon node reference is frozen, false otherwise
|
||||
*/
|
||||
public void setCheckFrozen(boolean checkFrozen)
|
||||
{
|
||||
@@ -76,12 +74,12 @@ public class DelegateAction extends RMActionExecuterAbstractBase
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (getNodeService().exists(actionedUponNodeRef) &&
|
||||
(!checkFrozen || !getFreezeService().isFrozen(actionedUponNodeRef)))
|
||||
(!checkFrozen || !getFreezeService().isFrozen(actionedUponNodeRef)))
|
||||
{
|
||||
// do the property subs (if any exist)
|
||||
if (isAllowParameterSubstitutions())
|
||||
{
|
||||
getParameterProcessorComponent().process(action, delegateActionExecuter.getActionDefinition(), actionedUponNodeRef);
|
||||
getParameterProcessorComponent().process(action, delegateActionExecuter.getActionDefinition(), actionedUponNodeRef);
|
||||
}
|
||||
|
||||
delegateActionExecuter.execute(action, actionedUponNodeRef);
|
||||
|
@@ -56,7 +56,7 @@ public class DeleteHoldAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AlfrescoRuntimeException(MSG_DELETE_NOT_HOLD_TYPE, new Object[]{TYPE_HOLD.toString(), actionedUponNodeRef.toString()});
|
||||
throw new AlfrescoRuntimeException(MSG_DELETE_NOT_HOLD_TYPE, new Object[]{ TYPE_HOLD.toString(), actionedUponNodeRef.toString() });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -31,8 +31,6 @@ import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMDispositionActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.content.ContentDestructionComponent;
|
||||
@@ -45,6 +43,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.security.AccessStatus;
|
||||
import org.alfresco.service.cmr.version.Version;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* Destroy action.
|
||||
@@ -72,8 +71,7 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
private boolean ghostingEnabled = true;
|
||||
|
||||
/**
|
||||
* @param contentDestructionComponent
|
||||
* content destruction component
|
||||
* @param contentDestructionComponent content destruction component
|
||||
*/
|
||||
public void setContentDestructionComponent(ContentDestructionComponent contentDestructionComponent)
|
||||
{
|
||||
@@ -81,8 +79,7 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param capabilityService
|
||||
* capability service
|
||||
* @param capabilityService capability service
|
||||
*/
|
||||
public void setCapabilityService(CapabilityService capabilityService)
|
||||
{
|
||||
@@ -90,8 +87,7 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param recordableVersionService
|
||||
* recordable version service
|
||||
* @param recordableVersionService recordable version service
|
||||
*/
|
||||
public void setRecordableVersionService(RecordableVersionService recordableVersionService)
|
||||
{
|
||||
@@ -99,8 +95,7 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param inplaceRecordService
|
||||
* inplace record service
|
||||
* @param inplaceRecordService inplace record service
|
||||
*/
|
||||
public void setInplaceRecordService(InplaceRecordService inplaceRecordService)
|
||||
{
|
||||
@@ -108,8 +103,7 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ghostingEnabled
|
||||
* true if ghosting is enabled, false otherwise
|
||||
* @param ghostingEnabled true if ghosting is enabled, false otherwise
|
||||
*/
|
||||
public void setGhostingEnabled(boolean ghostingEnabled)
|
||||
{
|
||||
@@ -204,7 +198,8 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the ghost on destroy property is set against the definition for the passed action on the specified node
|
||||
* Return true if the ghost on destroy property is set against the
|
||||
* definition for the passed action on the specified node
|
||||
*
|
||||
* @param action
|
||||
* @param nodeRef
|
||||
|
@@ -29,13 +29,12 @@ package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Edit review as of date action.
|
||||
@@ -55,7 +54,8 @@ public class EditDispositionActionAsOfDateAction extends RMActionExecuterAbstrac
|
||||
public static final String PARAM_AS_OF_DATE = "asOfDate";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
@@ -63,7 +63,7 @@ public class EditDispositionActionAsOfDateAction extends RMActionExecuterAbstrac
|
||||
if (this.getNodeService().hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE))
|
||||
{
|
||||
// Get the action parameter
|
||||
Date asOfDate = (Date) action.getParameterValue(PARAM_AS_OF_DATE);
|
||||
Date asOfDate = (Date)action.getParameterValue(PARAM_AS_OF_DATE);
|
||||
if (asOfDate == null)
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_VALID_DATE_DISP_ASOF));
|
||||
|
@@ -27,13 +27,12 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Edit freeze reason Action
|
||||
@@ -42,34 +41,34 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
*/
|
||||
public class EditHoldReasonAction extends RMActionExecuterAbstractBase
|
||||
{
|
||||
private static final String MSG_HOLD_EDIT_REASON_NONE = "rm.action.hold-edit-reason-none";
|
||||
private static final String MSG_HOLD_EDIT_TYPE = "rm.action.hold-edit-type";
|
||||
private static final String MSG_HOLD_EDIT_REASON_NONE = "rm.action.hold-edit-reason-none";
|
||||
private static final String MSG_HOLD_EDIT_TYPE = "rm.action.hold-edit-type";
|
||||
|
||||
/** Parameter names */
|
||||
public static final String PARAM_REASON = "reason";
|
||||
/** Parameter names */
|
||||
public static final String PARAM_REASON = "reason";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (getFreezeService().isHold(actionedUponNodeRef))
|
||||
{
|
||||
// Get the property values
|
||||
String reason = (String) action.getParameterValue(PARAM_REASON);
|
||||
if (StringUtils.isBlank(reason))
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_HOLD_EDIT_REASON_NONE));
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (getFreezeService().isHold(actionedUponNodeRef))
|
||||
{
|
||||
// Get the property values
|
||||
String reason = (String) action.getParameterValue(PARAM_REASON);
|
||||
if (StringUtils.isBlank(reason))
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_HOLD_EDIT_REASON_NONE));
|
||||
}
|
||||
|
||||
// Update hold reason
|
||||
getFreezeService().updateReason(actionedUponNodeRef, reason);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_HOLD_EDIT_TYPE, TYPE_HOLD.toString(), actionedUponNodeRef.toString()));
|
||||
}
|
||||
}
|
||||
// Update hold reason
|
||||
getFreezeService().updateReason(actionedUponNodeRef, reason);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_HOLD_EDIT_TYPE, TYPE_HOLD.toString(), actionedUponNodeRef.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -29,12 +29,11 @@ package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -50,29 +49,30 @@ public class EditReviewAsOfDateAction extends RMActionExecuterAbstractBase
|
||||
|
||||
public static final String PARAM_AS_OF_DATE = "asOfDate";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (getRecordService().isRecord(actionedUponNodeRef) &&
|
||||
getNodeService().hasAspect(actionedUponNodeRef, ASPECT_VITAL_RECORD))
|
||||
{
|
||||
// Get the action parameter
|
||||
Date reviewAsOf = (Date) action.getParameterValue(PARAM_AS_OF_DATE);
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (getRecordService().isRecord(actionedUponNodeRef) &&
|
||||
getNodeService().hasAspect(actionedUponNodeRef, ASPECT_VITAL_RECORD))
|
||||
{
|
||||
// Get the action parameter
|
||||
Date reviewAsOf = (Date)action.getParameterValue(PARAM_AS_OF_DATE);
|
||||
if (reviewAsOf == null)
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_SPECIFY_VALID_DATE));
|
||||
}
|
||||
|
||||
// Set the as of date
|
||||
this.getNodeService().setProperty(actionedUponNodeRef, PROP_REVIEW_AS_OF, reviewAsOf);
|
||||
// Set the as of date
|
||||
this.getNodeService().setProperty(actionedUponNodeRef, PROP_REVIEW_AS_OF, reviewAsOf);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_REVIEW_DETAILS_ONLY));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_REVIEW_DETAILS_ONLY));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,9 +27,6 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
@@ -45,6 +42,8 @@ import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.security.AccessStatus;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* File report generic action.
|
||||
@@ -90,8 +89,7 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reportService
|
||||
* report service
|
||||
* @param reportService report service
|
||||
*/
|
||||
public void setReportService(ReportService reportService)
|
||||
{
|
||||
@@ -99,8 +97,7 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
}
|
||||
|
||||
/**
|
||||
* @param capabilityService
|
||||
* capability service
|
||||
* @param capabilityService capability service
|
||||
*/
|
||||
public void setCapabilityService(CapabilityService capabilityService)
|
||||
{
|
||||
@@ -108,7 +105,8 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
@@ -133,7 +131,8 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
final Report report = getReportService().generateReport(reportType, actionedUponNodeRef, mimetype);
|
||||
|
||||
// file the report as system
|
||||
NodeRef filedReport = AuthenticationUtil.runAsSystem(new RunAsWork<NodeRef>() {
|
||||
NodeRef filedReport = AuthenticationUtil.runAsSystem(new RunAsWork<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public NodeRef doWork()
|
||||
{
|
||||
@@ -149,8 +148,7 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
/**
|
||||
* Checks if the destination is frozen, closed, cut off or not. In case if it is an exception will be thrown.
|
||||
*
|
||||
* @param nodeRef
|
||||
* The destination node reference for which the capability should be checked
|
||||
* @param nodeRef The destination node reference for which the capability should be checked
|
||||
*/
|
||||
private void checkFilingPermissionOnlyCapability(NodeRef nodeRef)
|
||||
{
|
||||
@@ -161,30 +159,25 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the value of the given parameter. If the parameter has not been passed from the UI an error will be thrown
|
||||
* Retrieves the value of the given parameter. If the parameter has not been
|
||||
* passed from the UI an error will be thrown
|
||||
*
|
||||
* @param action
|
||||
* The action
|
||||
* @param parameter
|
||||
* The parameter for which the value should be retrieved
|
||||
* @param action The action
|
||||
* @param parameter The parameter for which the value should be retrieved
|
||||
* @return The value of the given parameter
|
||||
*/
|
||||
private String getParameterValue(Action action, String parameter)
|
||||
{
|
||||
String paramValue = (String) action.getParameterValue(parameter);
|
||||
if (StringUtils.isBlank(paramValue))
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(
|
||||
MSG_PARAM_NOT_SUPPLIED, parameter));
|
||||
}
|
||||
if (StringUtils.isBlank(paramValue)) { throw new AlfrescoRuntimeException(I18NUtil.getMessage(
|
||||
MSG_PARAM_NOT_SUPPLIED, parameter)); }
|
||||
return paramValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method for getting the destination.
|
||||
*
|
||||
* @param action
|
||||
* The action
|
||||
* @param action The action
|
||||
* @return The file plan node reference
|
||||
*/
|
||||
private NodeRef getDestination(Action action)
|
||||
@@ -196,8 +189,7 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
/**
|
||||
* Helper method for getting the report type.
|
||||
*
|
||||
* @param action
|
||||
* The action
|
||||
* @param action The action
|
||||
* @return The report type
|
||||
*/
|
||||
private QName getReportType(Action action)
|
||||
|
@@ -44,34 +44,33 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
*/
|
||||
public class FreezeAction extends RMActionExecuterAbstractBase
|
||||
{
|
||||
/** Parameter names */
|
||||
public static final String PARAM_REASON = "reason";
|
||||
/** Parameter names */
|
||||
public static final String PARAM_REASON = "reason";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase#addParameterDefinitions(java.util.List)
|
||||
*/
|
||||
@Override
|
||||
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
|
||||
{
|
||||
paramList.add(new ParameterDefinitionImpl(PARAM_REASON, DataTypeDefinition.TEXT, true, getParamDisplayLabel(PARAM_REASON)));
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase#addParameterDefinitions(java.util.List)
|
||||
*/
|
||||
@Override
|
||||
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
|
||||
{
|
||||
paramList.add(new ParameterDefinitionImpl(PARAM_REASON, DataTypeDefinition.TEXT, true, getParamDisplayLabel(PARAM_REASON)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
// NOTE: we can only freeze records and record folders so ignore everything else
|
||||
if (getNodeService().exists(actionedUponNodeRef) &&
|
||||
!getNodeService().hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) &&
|
||||
(getRecordService().isRecord(actionedUponNodeRef) ||
|
||||
getRecordFolderService().isRecordFolder(actionedUponNodeRef))
|
||||
&&
|
||||
!getFreezeService().isFrozen(actionedUponNodeRef))
|
||||
{
|
||||
getFreezeService().freeze((String) action.getParameterValue(PARAM_REASON), actionedUponNodeRef);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
// NOTE: we can only freeze records and record folders so ignore everything else
|
||||
if (getNodeService().exists(actionedUponNodeRef) &&
|
||||
!getNodeService().hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) &&
|
||||
(getRecordService().isRecord(actionedUponNodeRef) ||
|
||||
getRecordFolderService().isRecordFolder(actionedUponNodeRef)) &&
|
||||
!getFreezeService().isFrozen(actionedUponNodeRef))
|
||||
{
|
||||
getFreezeService().freeze((String) action.getParameterValue(PARAM_REASON), actionedUponNodeRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,15 +27,14 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Action to re-open the records folder
|
||||
@@ -54,14 +53,15 @@ public class OpenRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
public static final String PARAM_OPEN_PARENT = "openParent";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (getNodeService().exists(actionedUponNodeRef) &&
|
||||
!getFreezeService().isFrozen(actionedUponNodeRef) &&
|
||||
!(getDictionaryService().isSubClass(getNodeService().getType(actionedUponNodeRef), ContentModel.TYPE_CONTENT) && !getRecordService().isFiled(actionedUponNodeRef)))
|
||||
!getFreezeService().isFrozen(actionedUponNodeRef) &&
|
||||
!(getDictionaryService().isSubClass(getNodeService().getType(actionedUponNodeRef), ContentModel.TYPE_CONTENT) && !getRecordService().isFiled(actionedUponNodeRef)))
|
||||
{
|
||||
// TODO move re-open logic into a service method
|
||||
// TODO check that the user in question has the correct permission to re-open a records folder
|
||||
|
@@ -57,9 +57,9 @@ public class RejectAction extends RMActionExecuterAbstractBase
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (getNodeService().exists(actionedUponNodeRef) &&
|
||||
!getNodeService().hasAspect(actionedUponNodeRef, ASPECT_DECLARED_RECORD) &&
|
||||
!getFreezeService().isFrozen(actionedUponNodeRef) &&
|
||||
getNodeService().getProperty(actionedUponNodeRef, PROP_RECORD_ORIGINATING_LOCATION) != null)
|
||||
!getNodeService().hasAspect(actionedUponNodeRef, ASPECT_DECLARED_RECORD) &&
|
||||
!getFreezeService().isFrozen(actionedUponNodeRef) &&
|
||||
getNodeService().getProperty(actionedUponNodeRef, PROP_RECORD_ORIGINATING_LOCATION) != null)
|
||||
{
|
||||
getRecordService().rejectRecord(actionedUponNodeRef, (String) action.getParameterValue(PARAM_REASON));
|
||||
}
|
||||
|
@@ -27,12 +27,11 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Relinquish Hold Action
|
||||
@@ -41,23 +40,23 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
*/
|
||||
public class RelinquishHoldAction extends RMActionExecuterAbstractBase
|
||||
{
|
||||
/** I18N */
|
||||
private static final String MSG_NOT_HOLD_TYPE = "rm.action.not-hold-type";
|
||||
/** I18N */
|
||||
private static final String MSG_NOT_HOLD_TYPE = "rm.action.not-hold-type";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (getFreezeService().isHold(actionedUponNodeRef))
|
||||
{
|
||||
getFreezeService().relinquish(actionedUponNodeRef);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NOT_HOLD_TYPE, TYPE_HOLD.toString(), actionedUponNodeRef.toString()));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (getFreezeService().isHold(actionedUponNodeRef))
|
||||
{
|
||||
getFreezeService().relinquish(actionedUponNodeRef);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NOT_HOLD_TYPE, TYPE_HOLD.toString(), actionedUponNodeRef.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -33,10 +33,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
@@ -49,6 +45,9 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.workflow.RMWorkflowModel;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Request info action for starting a workflow to request more information for an undeclared record
|
||||
@@ -76,8 +75,7 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
private WorkflowService workflowService;
|
||||
|
||||
/**
|
||||
* @param workflowService
|
||||
* workflow service
|
||||
* @param workflowService workflow service
|
||||
*/
|
||||
public void setWorkflowService(WorkflowService workflowService)
|
||||
{
|
||||
@@ -91,9 +89,9 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (getNodeService().exists(actionedUponNodeRef) &&
|
||||
!getNodeService().hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) &&
|
||||
getRecordService().isRecord(actionedUponNodeRef) &&
|
||||
!getRecordService().isDeclared(actionedUponNodeRef))
|
||||
!getNodeService().hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) &&
|
||||
getRecordService().isRecord(actionedUponNodeRef) &&
|
||||
!getRecordService().isDeclared(actionedUponNodeRef))
|
||||
{
|
||||
String workflowDefinitionId = workflowService.getDefinitionByName(REQUEST_INFO_WORKFLOW_DEFINITION_NAME).getId();
|
||||
Map<QName, Serializable> parameters = new HashMap<>();
|
||||
@@ -125,10 +123,8 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method for creating a workflow package to contain the actioned upon nodeRef
|
||||
*
|
||||
* @param action
|
||||
* The request info action
|
||||
* @param actionedUponNodeRef
|
||||
* The actioned upon nodeRef
|
||||
* @param action The request info action
|
||||
* @param actionedUponNodeRef The actioned upon nodeRef
|
||||
* @return Returns a workflow package containing the actioned upon nodeRef
|
||||
*/
|
||||
private NodeRef getWorkflowPackage(Action action, NodeRef actionedUponNodeRef)
|
||||
@@ -143,8 +139,7 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method for getting the assignees from the action
|
||||
*
|
||||
* @param action
|
||||
* The request info action
|
||||
* @param action The request info action
|
||||
* @return Returns a list of {@link NodeRef}s each representing the assignee
|
||||
*/
|
||||
private Serializable getAssignees(Action action)
|
||||
@@ -162,8 +157,7 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method for getting the requested information from the action
|
||||
*
|
||||
* @param action
|
||||
* The request info action
|
||||
* @param action The request info action
|
||||
* @return Returns the requested information
|
||||
*/
|
||||
private Serializable getRequestedInformation(Action action)
|
||||
@@ -174,8 +168,7 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method for getting the rule creator
|
||||
*
|
||||
* @param action
|
||||
* The request info action
|
||||
* @param action The request info action
|
||||
* @return Returns the rule creator
|
||||
*/
|
||||
private Serializable getRuleCreator(Action action)
|
||||
|
@@ -38,6 +38,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import jakarta.mail.MessagingException;
|
||||
import jakarta.mail.Multipart;
|
||||
import jakarta.mail.Part;
|
||||
@@ -45,11 +46,6 @@ import jakarta.mail.internet.ContentType;
|
||||
import jakarta.mail.internet.MimeMessage;
|
||||
import jakarta.mail.internet.MimeUtility;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.model.ImapModel;
|
||||
@@ -67,6 +63,10 @@ import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
|
||||
/**
|
||||
* Split Email Action
|
||||
@@ -105,8 +105,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Sets the relationship service instance
|
||||
*
|
||||
* @param relationshipService
|
||||
* The relationship service instance
|
||||
* @param relationshipService The relationship service instance
|
||||
*/
|
||||
public void setRelationshipService(RelationshipService relationshipService)
|
||||
{
|
||||
@@ -140,7 +139,8 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
@@ -163,7 +163,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
* Check whether the email message has already been split - do nothing if it has already been split
|
||||
*/
|
||||
List<AssociationRef> refs = getNodeService().getTargetAssocs(actionedUponNodeRef, ImapModel.ASSOC_IMAP_ATTACHMENT);
|
||||
if (refs.size() > 0)
|
||||
if(refs.size() > 0)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
@@ -183,7 +183,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
Object content = mimeMessage.getContent();
|
||||
if (content instanceof Multipart)
|
||||
{
|
||||
Multipart multipart = (Multipart) content;
|
||||
Multipart multipart = (Multipart)content;
|
||||
|
||||
for (int i = 0, n = multipart.getCount(); i < n; i++)
|
||||
{
|
||||
@@ -199,7 +199,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NO_READ_MIME_MESSAGE, e.toString()), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_EMAIL_DECLARED, actionedUponNodeRef.toString()));
|
||||
@@ -213,11 +213,8 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
|
||||
/**
|
||||
* Create attachment from Mime Message Part
|
||||
*
|
||||
* @param messageNodeRef
|
||||
* - the node ref of the mime message
|
||||
* @param parentNodeRef
|
||||
* - the node ref of the parent folder
|
||||
* @param messageNodeRef - the node ref of the mime message
|
||||
* @param parentNodeRef - the node ref of the parent folder
|
||||
* @param part
|
||||
* @throws MessagingException
|
||||
* @throws IOException
|
||||
@@ -238,8 +235,8 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
Map<QName, Serializable> messageProperties = getNodeService().getProperties(messageNodeRef);
|
||||
String messageTitle = (String) messageProperties.get(ContentModel.PROP_NAME);
|
||||
if (messageTitle == null)
|
||||
String messageTitle = (String)messageProperties.get(ContentModel.PROP_NAME);
|
||||
if(messageTitle == null)
|
||||
{
|
||||
messageTitle = fileName;
|
||||
}
|
||||
@@ -258,10 +255,10 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
* Create an attachment node in the same folder as the message
|
||||
*/
|
||||
ChildAssociationRef attachmentRef = getNodeService().createNode(parentNodeRef,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, fileName),
|
||||
ContentModel.TYPE_CONTENT,
|
||||
docProps);
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, fileName),
|
||||
ContentModel.TYPE_CONTENT,
|
||||
docProps);
|
||||
|
||||
/**
|
||||
* Write the content into the new attachment node
|
||||
@@ -276,6 +273,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
*/
|
||||
createRMReference(messageNodeRef, attachmentRef.getChildRef());
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -283,7 +281,8 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
*/
|
||||
private void createRMReference(final NodeRef parentRef, final NodeRef childRef)
|
||||
{
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>() {
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork()
|
||||
{
|
||||
|
@@ -52,8 +52,7 @@ public class TransferAction extends RMDispositionActionExecuterAbstractBase
|
||||
/**
|
||||
* Indicates whether this transfer is an accession or not
|
||||
*
|
||||
* @param isAccession
|
||||
* Is the transfer an accession or not
|
||||
* @param isAccession Is the transfer an accession or not
|
||||
*/
|
||||
public void setIsAccession(boolean isAccession)
|
||||
{
|
||||
@@ -63,8 +62,7 @@ public class TransferAction extends RMDispositionActionExecuterAbstractBase
|
||||
/**
|
||||
* Sets the transfer service
|
||||
*
|
||||
* @param transferService
|
||||
* transfer service
|
||||
* @param transferService transfer service
|
||||
*/
|
||||
public void setTransferService(TransferService transferService)
|
||||
{
|
||||
@@ -103,10 +101,8 @@ public class TransferAction extends RMDispositionActionExecuterAbstractBase
|
||||
/**
|
||||
* Create the transfer node and link the disposition lifecycle node beneath it
|
||||
*
|
||||
* @param action
|
||||
* action
|
||||
* @param dispositionLifeCycleNodeRef
|
||||
* disposition lifecycle node
|
||||
* @param action action
|
||||
* @param dispositionLifeCycleNodeRef disposition lifecycle node
|
||||
*/
|
||||
private void doTransfer(Action action, NodeRef dispositionLifeCycleNodeRef)
|
||||
{
|
||||
|
@@ -27,14 +27,13 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.transfer.TransferService;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Transfer complete action
|
||||
@@ -61,8 +60,7 @@ public class TransferCompleteAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param transferService
|
||||
* transfer service
|
||||
* @param transferService transfer service
|
||||
*/
|
||||
public void setTransferService(TransferService transferService)
|
||||
{
|
||||
@@ -70,7 +68,8 @@ public class TransferCompleteAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
@@ -82,8 +81,7 @@ public class TransferCompleteAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Checks if the actioned upon node reference is a sub class of transfer
|
||||
*
|
||||
* @param actionedUponNodeRef
|
||||
* actioned upon node reference
|
||||
* @param actionedUponNodeRef actioned upon node reference
|
||||
*/
|
||||
private void checkTransferSubClass(NodeRef actionedUponNodeRef)
|
||||
{
|
||||
|
@@ -29,13 +29,12 @@ package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* UnCutoff action implementation
|
||||
|
@@ -27,13 +27,12 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Undeclare record action
|
||||
@@ -54,25 +53,25 @@ public class UndeclareRecordAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (getNodeService().exists(actionedUponNodeRef))
|
||||
{
|
||||
if (getRecordService().isRecord(actionedUponNodeRef))
|
||||
{
|
||||
// repoen if already complete and not frozen
|
||||
if (getRecordService().isDeclared(actionedUponNodeRef) &&
|
||||
!getFreezeService().isFrozen(actionedUponNodeRef))
|
||||
{
|
||||
// Remove the declared aspect
|
||||
this.getNodeService().removeAspect(actionedUponNodeRef, ASPECT_DECLARED_RECORD);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isWarnEnabled())
|
||||
{
|
||||
logger.warn(I18NUtil.getMessage(MSG_RECORDS_ONLY_UNDECLARED));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (getNodeService().exists(actionedUponNodeRef))
|
||||
{
|
||||
if (getRecordService().isRecord(actionedUponNodeRef))
|
||||
{
|
||||
// repoen if already complete and not frozen
|
||||
if (getRecordService().isDeclared(actionedUponNodeRef) &&
|
||||
!getFreezeService().isFrozen(actionedUponNodeRef))
|
||||
{
|
||||
// Remove the declared aspect
|
||||
this.getNodeService().removeAspect(actionedUponNodeRef, ASPECT_DECLARED_RECORD);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isWarnEnabled())
|
||||
{
|
||||
logger.warn(I18NUtil.getMessage(MSG_RECORDS_ONLY_UNDECLARED));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ public class UndoEventAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
String eventName = (String) action.getParameterValue(PARAM_EVENT_NAME);
|
||||
String eventName = (String)action.getParameterValue(PARAM_EVENT_NAME);
|
||||
|
||||
if (this.getNodeService().hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE))
|
||||
{
|
||||
|
@@ -38,13 +38,13 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
*/
|
||||
public class UnfreezeAction extends RMActionExecuterAbstractBase
|
||||
{
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
getFreezeService().unFreeze(actionedUponNodeRef);
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
getFreezeService().unFreeze(actionedUponNodeRef);
|
||||
}
|
||||
}
|
||||
|
@@ -55,11 +55,11 @@ public class UnlinkFromAction extends RMActionExecuterAbstractBase
|
||||
{
|
||||
// check that the actioned upon node reference exists and is of the correct type
|
||||
if (getNodeService().exists(actionedUponNodeRef) &&
|
||||
!getNodeService().hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) &&
|
||||
getRecordService().isRecord(actionedUponNodeRef))
|
||||
!getNodeService().hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) &&
|
||||
getRecordService().isRecord(actionedUponNodeRef))
|
||||
{
|
||||
// get the record folder we are unlinking from
|
||||
String recordFolderValue = (String) action.getParameterValue(PARAM_RECORD_FOLDER);
|
||||
String recordFolderValue = (String)action.getParameterValue(PARAM_RECORD_FOLDER);
|
||||
if (recordFolderValue == null || recordFolderValue.isEmpty())
|
||||
{
|
||||
// indicate that the record folder is mandatory
|
||||
|
@@ -27,9 +27,8 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.admin;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Custom metadata exception.
|
||||
|
@@ -27,9 +27,8 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.admin;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Custom metadata exception.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user