mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-24 14:32:01 +00:00
Compare commits
399 Commits
ags-2.6.0.
...
ags-2.7.0.
Author | SHA1 | Date | |
---|---|---|---|
|
35e2523fe6 | ||
|
54285c1fd9 | ||
|
e381b8ba15 | ||
|
5796d0ef11 | ||
|
2ea308da3c | ||
|
1ae5c9a3ef | ||
|
6fb73c0f26 | ||
|
f2c2a970d4 | ||
|
35991c7bf2 | ||
|
d2500ac516 | ||
|
6175e46e24 | ||
|
5a32d48b57 | ||
|
8c37e0ca82 | ||
|
085cb55764 | ||
|
0e9a680ea2 | ||
|
f254a2462e | ||
|
5f940ed287 | ||
|
576cc2d06e | ||
|
d278ed86a9 | ||
|
4c902ebf0e | ||
|
43ad506338 | ||
|
71d353d963 | ||
|
d4721683f6 | ||
|
933904a15c | ||
|
e6ab009ee2 | ||
|
c1ffecb1d6 | ||
|
9e148643ec | ||
|
3eb3983b30 | ||
|
85a3c99b33 | ||
|
f400532496 | ||
|
4c11e48ff3 | ||
|
b641f3807c | ||
|
dc6e2e0e98 | ||
|
603362ddd1 | ||
|
b3df55117e | ||
|
65a3919d2f | ||
|
f838f6a90e | ||
|
280fb0f422 | ||
|
bab3604934 | ||
|
1a48c3e689 | ||
|
6617577e19 | ||
|
b4426f4e27 | ||
|
cfad6fdf74 | ||
|
fdfd6279bd | ||
|
8251588fd1 | ||
|
79873a908d | ||
|
5dd2640674 | ||
|
c68ce588bb | ||
|
233fa33afb | ||
|
e2665e0c2f | ||
|
38ba822d29 | ||
|
0866f80b59 | ||
|
b52bdf395c | ||
|
d80cd3698e | ||
|
0d32715f19 | ||
|
a627422919 | ||
|
e1c5b749ed | ||
|
62f5c84f2e | ||
|
7f904edcfd | ||
|
80c3582878 | ||
|
6a44198d5a | ||
|
cc97785d23 | ||
|
7c41b89cf3 | ||
|
d0c4593a50 | ||
|
e87bfb626b | ||
|
24ced5d13a | ||
|
2345e871e1 | ||
|
081dcddbea | ||
|
888157199d | ||
|
ebd7ac2956 | ||
|
504d85e8d3 | ||
|
ed5fc95bf3 | ||
|
5ff6808ecc | ||
|
b3f9f0bd52 | ||
|
29ab436eaf | ||
|
7b15eb6963 | ||
|
606c1637d3 | ||
|
83635643e6 | ||
|
308e86a4e5 | ||
|
b8af7ba22a | ||
|
3fbc054881 | ||
|
3beaf71bb1 | ||
|
d85ded1a8e | ||
|
9f38cddb3a | ||
|
dc10fcb806 | ||
|
d25e253a27 | ||
|
063792cf58 | ||
|
c462db8e1b | ||
|
7a28007ca2 | ||
|
41643a0509 | ||
|
4a735cde65 | ||
|
230460f8ec | ||
|
646aa49bfe | ||
|
918751f962 | ||
|
a20ccc5705 | ||
|
5b14d7fd4f | ||
|
03579010f1 | ||
|
aa9672cc25 | ||
|
a0ca321bb8 | ||
|
e761227120 | ||
|
9163374076 | ||
|
103fdfedea | ||
|
59b0674a42 | ||
|
12a6063e4b | ||
|
4e27fc92c1 | ||
|
405a7d3502 | ||
|
9d080fabd8 | ||
|
95c8e56673 | ||
|
b37100c477 | ||
|
600ad04c44 | ||
|
71dadbf722 | ||
|
3ee0e2090e | ||
|
04686978b3 | ||
|
524fc7f740 | ||
|
7ed8ef7684 | ||
|
0b44e3fd70 | ||
|
62d4840ae1 | ||
|
535d50edd1 | ||
|
9c1c934d14 | ||
|
4dc86b420d | ||
|
9a8cc02e51 | ||
|
13c4b4c4ae | ||
|
68433857c7 | ||
|
1744dacdc9 | ||
|
9b28e44fa1 | ||
|
5781d71c8f | ||
|
291e29c4bd | ||
|
dc3d239ca0 | ||
|
780d0c152f | ||
|
4eff64617d | ||
|
77e63fce4c | ||
|
2205284f3f | ||
|
62fab7bfe3 | ||
|
d5fcb3ef99 | ||
|
efd1b237f2 | ||
|
3f6f1939aa | ||
|
fb2e857d02 | ||
|
71b5fa7556 | ||
|
ffdaf407aa | ||
|
321d424d40 | ||
|
09ebad77d1 | ||
|
df78730461 | ||
|
44bed4a796 | ||
|
25feb9d5bb | ||
|
8a5746993c | ||
|
7795d3d8b0 | ||
|
91f810e7e8 | ||
|
ddcfe2e8c7 | ||
|
e690c80906 | ||
|
608dfc066c | ||
|
eae3fd403a | ||
|
aa6d0b3ceb | ||
|
18cf69b56e | ||
|
4a10ded602 | ||
|
1075455457 | ||
|
38dd584839 | ||
|
1054fcef62 | ||
|
8d5b2f785d | ||
|
419484719c | ||
|
ba1e480536 | ||
|
e85914c857 | ||
|
9080fc7976 | ||
|
9671416fd5 | ||
|
132b301d8e | ||
|
b537bf6804 | ||
|
9d6bdeaa8b | ||
|
d009244189 | ||
|
490c7d9954 | ||
|
07d494f165 | ||
|
da54db41c7 | ||
|
cb449f532b | ||
|
ec094f8e98 | ||
|
94581b56fa | ||
|
a8be3bdc96 | ||
|
f658688783 | ||
|
d40accb9af | ||
|
6dac611ab1 | ||
|
99f32e08e2 | ||
|
6ebb19abef | ||
|
0378205a68 | ||
|
08d409b554 | ||
|
48f98f56ec | ||
|
5e23cf092c | ||
|
e75852d30c | ||
|
d35ca27ab8 | ||
|
16fafb4262 | ||
|
2faf6dbff6 | ||
|
e9beac0144 | ||
|
ee748e3b68 | ||
|
d22362e3c3 | ||
|
48b26d6b22 | ||
|
3e99d756a3 | ||
|
9e96d0772b | ||
|
aacbc4b1b0 | ||
|
7b7948ccb4 | ||
|
9656a7d4c6 | ||
|
9385959ed9 | ||
|
ec18a96609 | ||
|
26c9d97dcb | ||
|
8c680d4d63 | ||
|
d11efb8c77 | ||
|
bada7c2438 | ||
|
46cf88b223 | ||
|
1fe8242944 | ||
|
2a42637ed7 | ||
|
194928c0da | ||
|
0e869a735f | ||
|
5d80268501 | ||
|
f1e3c0b853 | ||
|
a1c9dbc505 | ||
|
b581d58726 | ||
|
0da89c011c | ||
|
96e3b8d1b2 | ||
|
e1b24791be | ||
|
cbfa402a24 | ||
|
50091181f3 | ||
|
fb87586fa1 | ||
|
e5d42ac653 | ||
|
2c0133d0a2 | ||
|
6d1b54d23d | ||
|
fa973b90f7 | ||
|
9b9dce1db2 | ||
|
29933615d3 | ||
|
a357526160 | ||
|
4bdcbd68b7 | ||
|
46e56fa7a4 | ||
|
4c42b2cdf6 | ||
|
5c17f76656 | ||
|
72b4fc4011 | ||
|
06974177a5 | ||
|
cdf68bc39e | ||
|
2f104e9215 | ||
|
1c222cddf6 | ||
|
0dfc32fc15 | ||
|
0167d75c44 | ||
|
245ffee3e0 | ||
|
69439bb3d8 | ||
|
0de2737529 | ||
|
d466e29dbc | ||
|
c748b65cd9 | ||
|
0393f338ec | ||
|
55472663ba | ||
|
0a54487bcf | ||
|
16d7e961de | ||
|
398f8079fe | ||
|
b1c33ab9a4 | ||
|
e13ef5e0ae | ||
|
a4167525a2 | ||
|
1d144c612b | ||
|
b18561e81e | ||
|
0268299006 | ||
|
4d727df4e1 | ||
|
016b22d6cf | ||
|
350a198837 | ||
|
140ae18493 | ||
|
3fe056004f | ||
|
651140302f | ||
|
1ec820ba4d | ||
|
4378cd3d61 | ||
|
3f3d284423 | ||
|
3a104ac1b7 | ||
|
98d7e4aed4 | ||
|
332173a85c | ||
|
1718a77c9c | ||
|
f69b4f2258 | ||
|
72cf9d05ee | ||
|
9becfe79a5 | ||
|
db4871fd8d | ||
|
20edcae7c4 | ||
|
4fc3b718c1 | ||
|
d7a0a34b53 | ||
|
c5fdf205f8 | ||
|
e5eff8669e | ||
|
7ca167df57 | ||
|
322c48600c | ||
|
be45b4ba37 | ||
|
dbc57451ed | ||
|
4972188311 | ||
|
6825040016 | ||
|
c24ee2ec0f | ||
|
d46ff0b2dd | ||
|
77b5d35685 | ||
|
29e00d1ec2 | ||
|
d7088d1a29 | ||
|
4540456eb8 | ||
|
1cb87e7d6c | ||
|
9ab406504e | ||
|
19dc1d9c55 | ||
|
f908442af2 | ||
|
94594d0b15 | ||
|
5fd6602038 | ||
|
a0e770052b | ||
|
01961c2382 | ||
|
ebfee294df | ||
|
81d3e9e322 | ||
|
49b5218b6f | ||
|
6d75cdcab6 | ||
|
6c5ba7f7ca | ||
|
a66de5c3e9 | ||
|
2e5c4f94a9 | ||
|
2826521209 | ||
|
9e498bd8fe | ||
|
c8da8c9081 | ||
|
06eb2c6ff9 | ||
|
88ac5834c9 | ||
|
6152207725 | ||
|
abbf091bc7 | ||
|
51b11d09cf | ||
|
5a5586aab0 | ||
|
768a002ca1 | ||
|
b0cc81fc2c | ||
|
526f689e64 | ||
|
3383e4c93f | ||
|
c9bb15242b | ||
|
94d9c75635 | ||
|
5e45c444ac | ||
|
0321b5b8d3 | ||
|
defcb53c70 | ||
|
5461e9932a | ||
|
2c6d34d595 | ||
|
1707339d68 | ||
|
24f6fedc24 | ||
|
ab3fa87fa1 | ||
|
87f69c3e2f | ||
|
48e5a6d852 | ||
|
78e9a234f9 | ||
|
3c72bbc0f9 | ||
|
b58d04c9c7 | ||
|
b151bc26d8 | ||
|
09cf94d1ad | ||
|
7abcb683dd | ||
|
3ac76ed95e | ||
|
b80b1647a3 | ||
|
a4f55a4a45 | ||
|
5804a62855 | ||
|
18c954f4d4 | ||
|
aed60aad03 | ||
|
826d6e7610 | ||
|
bee7149e8b | ||
|
56dc5edfa7 | ||
|
ea4b979a5f | ||
|
a265daf8f1 | ||
|
7a04ec01af | ||
|
ce1e6fe7d2 | ||
|
51a47c56c4 | ||
|
eb935954e9 | ||
|
c8932192f9 | ||
|
ca4cf0070f | ||
|
2437ff415c | ||
|
4d6aaff70e | ||
|
83f81da0bd | ||
|
7164253241 | ||
|
3ce7ed8eb9 | ||
|
4f490b4699 | ||
|
7eaf1ad76e | ||
|
0ae59951ef | ||
|
0f5b72599f | ||
|
ffe5429927 | ||
|
097f2d848a | ||
|
9c9f1d6098 | ||
|
a36e1773af | ||
|
915e99394c | ||
|
4fcfdb164e | ||
|
c73f5b9863 | ||
|
d9b6c0d6f5 | ||
|
020b2a6c38 | ||
|
2771022083 | ||
|
33af594d47 | ||
|
31b4115209 | ||
|
a3c5fc26f0 | ||
|
d3ba4d89a2 | ||
|
8765349a80 | ||
|
75469a0f5b | ||
|
3b8f5a4aa9 | ||
|
dd2b4aafbf | ||
|
8fd929abec | ||
|
b882ef25c6 | ||
|
0399a7cca9 | ||
|
7af2e0430b | ||
|
38a6134ce8 | ||
|
7165c0d95e | ||
|
3a1db54876 | ||
|
de4f99d26b | ||
|
0c49d8a0ea | ||
|
e98bf6e062 | ||
|
06e29addce | ||
|
01a818587a | ||
|
dd89c7d2f2 | ||
|
34b863ff16 | ||
|
1866aaaa49 | ||
|
6a2506847f | ||
|
797baf833a | ||
|
7a83088206 | ||
|
730f715dc1 | ||
|
38e6bc80dd | ||
|
4181fe4884 | ||
|
956ecce569 | ||
|
5b510cafb4 | ||
|
cbe65842ce |
73
CODE_OF_CONDUCT.md
Normal file
73
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at katalin.zanaty@alfresco.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
140
README.md
Normal file
140
README.md
Normal file
@@ -0,0 +1,140 @@
|
||||
# Records Management: README
|
||||
|
||||
## Contributing
|
||||
Please refer to our [How to contribute](/CONTRIBUTING.md) guide and our [Contributor Covenant Code of Conduct](/CODE_OF_CONDUCT.md).
|
||||
|
||||
## Configuring and starting Alfresco/Share
|
||||
* Clone the project (e.g. `git clone git@gitlab.alfresco.com:records-management/records-management.git`)
|
||||
* Import the project as a maven project
|
||||
* Start the Alfresco/Share instances with the following commands:
|
||||
|
||||
```
|
||||
mvn clean install -Pstart-repo
|
||||
mvn clean install -Pstart-share
|
||||
```
|
||||
|
||||
(these commands work best if run from the specific directories, e.g. start Share from
|
||||
rm-community/rm-community-share/ or rm-enterprise/rm-enterprise-share/ )
|
||||
|
||||
## Configuring a different DB other than H2 (e.g. MySQL or PostgreSQL)
|
||||
* Create a file called _local.properties_ under src/main/resources in alfresco-rm-enterprise-repo
|
||||
* Add the following properties in this new file
|
||||
|
||||
```
|
||||
my.db.name -> The name of the database schema
|
||||
my.db.port -> The port number for your database (default port number for postgres is 5432 and for mysql it is 3306)
|
||||
```
|
||||
* Run the following commands to start your Alfresco instance:
|
||||
|
||||
to start Alfresco (using Postgres):
|
||||
```
|
||||
mvn clean install -Pstart-repo,use-postgres
|
||||
```
|
||||
|
||||
to start Alfresco (using MySQL):
|
||||
|
||||
```
|
||||
mvn clean install -Pstart-repo,use-mysql
|
||||
```
|
||||
|
||||
## Technical documentation
|
||||
Technical documentation is available at [rm-community/documentation/README.md](/rm-community/documentation/README.md) and [rm-enterprise/documentation/README.md](/rm-enterprise/documentation/README.md). This should be particularly useful for anyone wanting to integrate with or extend RM.
|
||||
|
||||
## Running integration test
|
||||
In order to execute the integration tests run the following command (unit tests will be executed every time before you start Alfresco/Share):
|
||||
|
||||
```
|
||||
mvn clean install -Dskip.integrationtests=false
|
||||
```
|
||||
|
||||
## Running UI Automation tests
|
||||
To run the automated UI tests, change to the rm-automation directory and run:
|
||||
|
||||
```
|
||||
mvn clean install -Dskip.automationtests=false
|
||||
```
|
||||
|
||||
Note: due to Selenium Firefox driver changes, the highest supported Firefox version for UI tests is 43.0.4 (with Selenium 2.52.0).
|
||||
|
||||
It is possible to have multiple versions of Firefox installed onto your workstation (e.g. one for running the UI tests and the other, kept
|
||||
up to date, for everyday browsing) but beware Firefox auto-updates. In this scenario the best approach is to create a non-default profile
|
||||
(default profiles will be shared between your Firefox installations!) for which auto-updates are disabled and forcing the use of this
|
||||
profile in your tests (`-Dwebdriver.firefox.profile="ProfileName"`). If your Firefox 43 install isn't in your path, you can use the
|
||||
`-Dwebdriver.firefox.profile` option set to the full path of its "firefox-bin" executable.
|
||||
|
||||
MacOS X Sierra users: if you experience by order of magnitude slower performance when connected to a WiFi network (e.g. office WiFi)
|
||||
add your workstation to your local /etc/hosts file as described on https://github.com/SeleniumHQ/selenium/issues/2824.
|
||||
|
||||
To use Chrome instead of Firefox:
|
||||
1. copy webdriver.properties from https://github.com/AlfrescoTestAutomation/selenium-grid/tree/master/src/main/resources
|
||||
2. put it under src/test/resource in rm-automation-ui project
|
||||
3. download the chrome driver from http://chromedriver.storage.googleapis.com and extract it
|
||||
4. change the following properties in webdriver.properties: webdriver.browser (Chrome) and webdriver.chrome.server.path (path/to/chrome/driver)
|
||||
5. run the tests as usual
|
||||
|
||||
## Updating License Headers
|
||||
In order to refesh out of date license source headers run the following command:
|
||||
|
||||
```
|
||||
mvn clean install -Dlicense.update.dryrun=false
|
||||
```
|
||||
|
||||
## Running tests against latest Aikau snapshot
|
||||
The latest Aikau snapshot can be pulled by running the following command in rm-community:
|
||||
|
||||
```
|
||||
mvn clean install -DskipTests -Dalfresco.aikau.version=LATEST -U
|
||||
```
|
||||
|
||||
Thereafter start the Share instance and run automation tests as described above.
|
||||
|
||||
## Configuring Outlook Integration
|
||||
To download and run RM with the Outlook Integration AMPs installed on the repo and Share use the following commands:
|
||||
|
||||
```
|
||||
mvn clean install -Pstart-repo,outlook-integration
|
||||
mvn clean install -Pstart-share,outlook-integration
|
||||
```
|
||||
|
||||
Follow these instructions to install licence and Outlook plugin:
|
||||
|
||||
* http://docs.alfresco.com/outlook2.1/tasks/Outlook-license.html
|
||||
* http://docs.alfresco.com/outlook2.1/tasks/Outlook-install_v2.html
|
||||
|
||||
## SNAPSHOT dependencies
|
||||
If you're building Enterprise RM, the base project (Community) is pulled in via a snapshot dependency configured in maven.
|
||||
This dependency will either be loaded from your local .m2 cache, or from Nexus if the version in your .m2 doesn't exist or is old
|
||||
('old' in maven terms is anything over 24 hours old). If maven fetches community dependencies from Nexus, then it's unlikely to contain your changes.
|
||||
You want to always use the version in your local cache - this means either doing a daily build at the root project level
|
||||
that pushes a new copy of the correct version into your cache, or alternatively you could run mvn with the
|
||||
`--no-snapshot-dependency` (or `-nsu`) option, which won't try to download a newer version.
|
||||
|
||||
## Code Formatting
|
||||
This project follows the usual Alfresco Coding Standards. If you use Eclipse or IntelliJ, there are settings inside the ide-config directory for you to import.
|
||||
|
||||
## Surf build errors
|
||||
If you get:
|
||||
```
|
||||
[ERROR] Failed to execute goal on project alfresco-rm-community-share: Could not resolve dependencies for project org.alfresco:alfresco-rm-community-share:amp:2.6-SNAPSHOT: Failed to collect dependencies at org.alfresco.surf:spring-surf-api:jar:6.3 -> org.alfresco.surf:spring-surf:jar:${dependency.surf.version}: Failed to read artifact descriptor for org.alfresco.surf:spring-surf:jar:${dependency.surf.version}: Could not transfer artifact org.alfresco.surf:spring-surf:pom:${dependency.surf.version} from/to alfresco-internal (https://artifacts.alfresco.com/nexus/content/groups/private): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1]
|
||||
```
|
||||
|
||||
then please re-run with `-Ddependency.surf.version=6.3`
|
||||
|
||||
## Install lombok plugin for IDEs
|
||||
To allow automation and benchmark projects to be built within an IDE the lombok 'plugin' needs to be installed.
|
||||
Execute lombok.jar (doubleclick it, or run `java -jar lombok.jar`). Follow the instructions.
|
||||
|
||||
## Use Solr 6 with Alfresco 5.2.x
|
||||
In alfresco-global.properties (depending on the RM edition `/records-management/rm-community/rm-community-repo/src/test/properties/local` or `/records-management/rm-enterprise/rm-enterprise-repo/src/test/properties/local`)
|
||||
change the value for "index.subsystem.name" from "solr4" to "solr6".
|
||||
Add also the following property "solr.port=8983".
|
||||
|
||||
Download the latest Alfresco Search Services from
|
||||
[https://nexus.alfresco.com/nexus/#nexus-search;gav\~\~alfresco-search-services\~\~\~](https://nexus.alfresco.com/nexus/#nexus-search;gav~~alfresco-search-services~~~)
|
||||
Currently it's 1.0.0 (alfresco-search-services-1.0.0.zip)
|
||||
|
||||
Unzip it and change to the "solr" folder within it. Start the Solr server using the following command:
|
||||
```
|
||||
solr start -a "-Dcreate.alfresco.defaults=alfresco,archive"
|
||||
```
|
||||
Start your repository
|
155
README.txt
155
README.txt
@@ -1,155 +0,0 @@
|
||||
Configuring and starting Alfresco/Share:
|
||||
----------------------------------------
|
||||
|
||||
- Clone the project (e.g. git clone git@gitlab.alfresco.com:records-management/records-management.git)
|
||||
|
||||
- Import the project as a maven project
|
||||
|
||||
- Start the Alfresco/Share instances with the following commands:
|
||||
|
||||
mvn clean install -Pstart-repo
|
||||
mvn clean install -Pstart-share
|
||||
|
||||
(these commands work best if run from the specific directories, e.g. start share from
|
||||
rm-enterprise/rm-enterprise-share/ or rm-community/rm-community-share/ )
|
||||
|
||||
|
||||
Configuring a different DB other than H2 (e.g. MySQL or PostgreSQL):
|
||||
--------------------------------------------------------------------
|
||||
|
||||
- Create a file called "local.properties" under src/main/resources in alfresco-rm-enterprise-repo
|
||||
|
||||
- Add the following properties in this new file
|
||||
my.db.name -> The name of the database schema
|
||||
my.db.port -> The port number for your database (default port number for postgres is 5432 and for mysql it is 3306)
|
||||
|
||||
- Run the following commands to start your Alfresco instance:
|
||||
|
||||
to start Alfresco (using Postgres):
|
||||
mvn clean install -Pstart-repo,use-postgres
|
||||
|
||||
to start Alfresco (using MySQL):
|
||||
mvn clean install -Pstart-repo,use-mysql
|
||||
|
||||
|
||||
Technical documentation:
|
||||
------------------------
|
||||
|
||||
Technical documentation is available at rm-community/documentation/README.md and rm-enterprise/documentation/README.md.
|
||||
This should be particularly useful for anyone wanting to integrate with or extend RM.
|
||||
|
||||
|
||||
Running integration test:
|
||||
-------------------------
|
||||
|
||||
In order to execute the integration tests run the following command (unit tests will be executed every time before you start Alfresco/Share):
|
||||
|
||||
mvn clean install -Dskip.integrationtests=false
|
||||
|
||||
|
||||
Running UI Automation tests:
|
||||
----------------------------
|
||||
|
||||
To run the automated UI tests, change to the rm-automation directory and run:
|
||||
|
||||
mvn clean install -Dskip.automationtests=false
|
||||
|
||||
Note: due to Selenium Firefox driver changes, the highest supported Firefox version for UI tests is 43.0.4 (with Selenium 2.52.0).
|
||||
|
||||
It is possible to have multiple versions of Firefox installed onto your workstation (e.g. one for running the UI tests and the other, kept
|
||||
up to date, for everyday browsing) but beware Firefox auto-updates. In this scenario the best approach is to create a non-default profile
|
||||
(default profiles will be shared between your Firefox installations!) for which auto-updates are disabled and forcing the use of this
|
||||
profile in your tests (-Dwebdriver.firefox.profile="ProfileName"). If your Firefox 43 install isn't in your path, you can use the
|
||||
-Dwebdriver.firefox.profile option set to the full path of its "firefox-bin" executable.
|
||||
|
||||
MacOS X Sierra users: if you experience by order of magnitude slower performance when connected to a WiFi network (e.g. office WiFi)
|
||||
add your workstation to your local /etc/hosts file as described on https://github.com/SeleniumHQ/selenium/issues/2824.
|
||||
|
||||
To use Chrome instead of Firefox:
|
||||
- copy webdriver.properties from https://github.com/AlfrescoTestAutomation/selenium-grid/tree/master/src/main/resources
|
||||
- put it under src/test/resource in rm-automation-ui project
|
||||
- download the chrome driver from http://chromedriver.storage.googleapis.com/ and extract it
|
||||
- change the following properties in webdriver.properties: webdriver.browser (Chrome) and webdriver.chrome.server.path (path/to/chrome/driver)
|
||||
- run the tests as usual
|
||||
|
||||
|
||||
Updating License Headers:
|
||||
-------------------------
|
||||
|
||||
In order to refesh out of date license source headers run the following command:
|
||||
|
||||
mvn clean install -Dlicense.update.dryrun=false
|
||||
|
||||
|
||||
Running tests against latest Aikau snapshot:
|
||||
--------------------------------------------
|
||||
|
||||
The latest Aikau snapshot can be pulled by running the following command in rm-community:
|
||||
|
||||
mvn clean install -DskipTests -Dalfresco.aikau.version=LATEST -U
|
||||
|
||||
Thereafter start the Share instance and run automation tests as described above.
|
||||
|
||||
|
||||
Configuring Outlook Integration:
|
||||
-------------------------------
|
||||
|
||||
To download and run RM with the Outlook Integration AMPs installed on the repo and Share use the following commands:
|
||||
|
||||
mvn clean install -Pstart-repo,outlook-integration
|
||||
mvn clean install -Pstart-share,outlook-integration
|
||||
|
||||
Follow these instructions install licence and Outlook plugin:
|
||||
|
||||
- http://docs.alfresco.com/outlook2.1/tasks/Outlook-license.html
|
||||
- http://docs.alfresco.com/outlook2.1/tasks/Outlook-install_v2.html
|
||||
|
||||
|
||||
SNAPSHOT dependencies:
|
||||
----------------------
|
||||
|
||||
If you're building Enterprise RM, the base project (Community) is pulled in via a snapshot dependency configured in maven.
|
||||
This dependency will either be loaded from your local .m2 cache or from Nexus if the version in your .m2 doesn't exist or is old
|
||||
(Old in maven terms is anything over 24hrs old). If maven fetches it from Nexus, your code it's unlikely to be the correct version.
|
||||
You want to always use the version in your local cache - this means either doing a daily build at the root project level
|
||||
that pushes a new copy of the correct version into your cache, or alternatively you could run mvn with the
|
||||
--no-snapshot-dependency (or -nsu) option, which won't try to download a newer version.
|
||||
|
||||
|
||||
Code Formatting:
|
||||
----------------
|
||||
|
||||
This project follows the usual Alfresco Coding Standards. If you use Eclipse or IntelliJ, there are settings inside the ide-config directory for you to import.
|
||||
|
||||
|
||||
Surf build errors:
|
||||
------------------
|
||||
|
||||
If you get:
|
||||
[ERROR] Failed to execute goal on project alfresco-rm-community-share: Could not resolve dependencies for project org.alfresco:alfresco-rm-community-share:amp:2.6-SNAPSHOT: Failed to collect dependencies at org.alfresco.surf:spring-surf-api:jar:6.3 -> org.alfresco.surf:spring-surf:jar:${dependency.surf.version}: Failed to read artifact descriptor for org.alfresco.surf:spring-surf:jar:${dependency.surf.version}: Could not transfer artifact org.alfresco.surf:spring-surf:pom:${dependency.surf.version} from/to alfresco-internal (https://artifacts.alfresco.com/nexus/content/groups/private): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1]
|
||||
|
||||
then please re-run with -Ddependency.surf.version=6.3
|
||||
|
||||
|
||||
Install lombok plugin for IDEs:
|
||||
-------------------------------
|
||||
|
||||
To allow automation and benchmark projects to be built within an IDE the lombok 'plugin' needs to be installed.
|
||||
|
||||
Execute lombok.jar (doubleclick it, or run java -jar lombok.jar). Follow instructions.
|
||||
|
||||
|
||||
Use Solr 6 with Alfresco 5.2.x:
|
||||
-------------------------------
|
||||
In alfresco-global.properties (depending on the RM edition /records-management/rm-community/rm-community-repo/src/test/properties/local or /records-management/rm-enterprise/rm-enterprise-repo/src/test/properties/local)
|
||||
change the value for "index.subsystem.name" from "solr4" to "solr6".
|
||||
Add also the following property "solr.port=8983".
|
||||
|
||||
Download the latest Alfresco Search Services from
|
||||
https://nexus.alfresco.com/nexus/#nexus-search;gav~~alfresco-search-services~~~
|
||||
Currently it's 1.0.0 (alfresco-search-services-1.0.0.zip)
|
||||
|
||||
Unzip it and change to the "solr" folder within it. Start the Solr server using the following command:
|
||||
solr start -a "-Dcreate.alfresco.defaults=alfresco,archive"
|
||||
|
||||
Start your repository
|
14
pom.xml
14
pom.xml
@@ -4,7 +4,7 @@
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-rm</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>2.6.0.1</version>
|
||||
<version>2.7.0.1</version>
|
||||
<name>Alfresco Records Management</name>
|
||||
|
||||
<parent>
|
||||
@@ -24,7 +24,7 @@
|
||||
<connection>scm:git:https://git.alfresco.com/records-management/records-management.git</connection>
|
||||
<developerConnection>scm:git:https://git.alfresco.com/records-management/records-management.git</developerConnection>
|
||||
<url>https://git.alfresco.com/records-management/records-management</url>
|
||||
<tag>V2.6.0.1</tag>
|
||||
<tag>V2.7.0.1</tag>
|
||||
</scm>
|
||||
|
||||
<issueManagement>
|
||||
@@ -200,6 +200,16 @@
|
||||
<license.verbose>false</license.verbose>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>18.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-rm</artifactId>
|
||||
<version>2.6.0.1</version>
|
||||
<version>2.7.0.1</version>
|
||||
</parent>
|
||||
|
||||
<licenses>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-rm-automation</artifactId>
|
||||
<version>2.6.0.1</version>
|
||||
<version>2.7.0.1</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
@@ -73,7 +73,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
public abstract class BaseAPI
|
||||
{
|
||||
// logger
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(BaseAPI.class);
|
||||
protected static final Logger LOGGER = LoggerFactory.getLogger(BaseAPI.class);
|
||||
|
||||
/** exception key in JSON response body */
|
||||
private static final String EXCEPTION_KEY = "exception";
|
||||
@@ -121,6 +121,37 @@ public abstract class BaseAPI
|
||||
return results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to extract the property value for the given nodeRef and property name
|
||||
*
|
||||
* @param result
|
||||
* @param nodeRef
|
||||
* @param propertyName
|
||||
* @return
|
||||
*/
|
||||
protected String getPropertyValue(JSONObject result, String nodeRef, String propertyName)
|
||||
{
|
||||
String propertyValue = "";
|
||||
try
|
||||
{
|
||||
JSONArray items = result.getJSONArray("items");
|
||||
for (int i = 0; i < items.length(); i++)
|
||||
{
|
||||
JSONObject item = items.getJSONObject(i);
|
||||
if(nodeRef.equals(item.getString("nodeRef")))
|
||||
{
|
||||
propertyValue = item.getJSONObject("properties").getString(propertyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (JSONException error)
|
||||
{
|
||||
throw new RuntimeException("Unable to parse result", error);
|
||||
}
|
||||
|
||||
return propertyValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to extract property values from request result and put them in map as a list that corresponds to a unique property value.
|
||||
*
|
||||
@@ -216,6 +247,7 @@ public abstract class BaseAPI
|
||||
client.getAlfrescoUrl(),
|
||||
URLEncodedUtils.format(parameters, "UTF-8"));
|
||||
}
|
||||
LOGGER.info("On GET {}, received following response: ", requestURL);
|
||||
client.close();
|
||||
return doGetRequest(username, password, requestURL);
|
||||
}
|
||||
@@ -309,6 +341,78 @@ public abstract class BaseAPI
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method for PUT requests
|
||||
*
|
||||
* @param adminUser user with administrative privileges
|
||||
* @param adminPassword password for adminUser
|
||||
* @param expectedStatusCode The expected return status code.
|
||||
* @param requestParams zero or more endpoint specific request parameters
|
||||
* @param urlTemplate request URL template
|
||||
* @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i>
|
||||
*/
|
||||
protected HttpResponse doPutJsonRequest(String adminUser,
|
||||
String adminPassword,
|
||||
int expectedStatusCode,
|
||||
JSONObject requestParams,
|
||||
String urlTemplate,
|
||||
String... urlTemplateParams)
|
||||
{
|
||||
AlfrescoHttpClient client = alfrescoHttpClientFactory.getObject();
|
||||
return doPutJsonRequest(adminUser, adminPassword, expectedStatusCode, client.getApiUrl(), requestParams, urlTemplate, urlTemplateParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method for PUT requests
|
||||
*
|
||||
* @param adminUser user with administrative privileges
|
||||
* @param adminPassword password for adminUser
|
||||
* @param expectedStatusCode The expected return status code.
|
||||
* @param urlStart the start of the URL (for example "alfresco/s/slingshot").
|
||||
* @param requestParams zero or more endpoint specific request parameters
|
||||
* @param urlTemplate request URL template
|
||||
* @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i>
|
||||
* @throws AssertionError if the returned status code is not as expected.
|
||||
*/
|
||||
private HttpResponse doPutJsonRequest(String adminUser,
|
||||
String adminPassword,
|
||||
int expectedStatusCode,
|
||||
String urlStart,
|
||||
JSONObject requestParams,
|
||||
String urlTemplate,
|
||||
String... urlTemplateParams)
|
||||
{
|
||||
String requestUrl = formatRequestUrl(urlStart, urlTemplate, urlTemplateParams);
|
||||
try
|
||||
{
|
||||
HttpResponse httpResponse = doRequestJson(HttpPut.class, requestUrl, adminUser, adminPassword, requestParams);
|
||||
assertEquals("PUT request to " + requestUrl + " was not successful.", expectedStatusCode, httpResponse.getStatusLine().getStatusCode());
|
||||
return httpResponse;
|
||||
}
|
||||
catch (InstantiationException | IllegalAccessException error)
|
||||
{
|
||||
throw new IllegalArgumentException("doPutRequest failed", error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill in the parameters for a URL template.
|
||||
*
|
||||
* @param urlStart The start of the URL.
|
||||
* @param urlTemplate The template.
|
||||
* @param urlTemplateParams Any parameters that need to be filled into the URL template.
|
||||
* @return The resultant URL.
|
||||
*/
|
||||
private String formatRequestUrl(String urlStart, String urlTemplate, String[] urlTemplateParams)
|
||||
{
|
||||
if (urlTemplateParams.length == 1)
|
||||
{
|
||||
// The format method needs some help to know not to use the whole array object.
|
||||
return MessageFormat.format(urlTemplate, urlStart, urlTemplateParams[0]);
|
||||
}
|
||||
return MessageFormat.format(urlTemplate, urlStart, urlTemplateParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method for POST requests
|
||||
* @param adminUser user with administrative privileges
|
||||
@@ -402,15 +506,12 @@ public abstract class BaseAPI
|
||||
String urlTemplate,
|
||||
String... urlTemplateParams)
|
||||
{
|
||||
// Ensure the host is part of the request URL.
|
||||
String requestUrl = MessageFormat.format(
|
||||
urlTemplate,
|
||||
urlStart,
|
||||
urlTemplateParams);
|
||||
String requestUrl;
|
||||
requestUrl = formatRequestUrl(urlStart, urlTemplate, urlTemplateParams);
|
||||
try
|
||||
{
|
||||
HttpResponse httpResponse = doRequestJson(HttpPost.class, requestUrl, adminUser, adminPassword, requestParams);
|
||||
assertEquals("POST request to " + requestUrl + " was not successful.", httpResponse.getStatusLine().getStatusCode(), expectedStatusCode);
|
||||
assertEquals("POST request to " + requestUrl + " was not successful.", expectedStatusCode, httpResponse.getStatusLine().getStatusCode());
|
||||
return httpResponse;
|
||||
}
|
||||
catch (InstantiationException | IllegalAccessException error)
|
||||
@@ -452,7 +553,10 @@ public abstract class BaseAPI
|
||||
{
|
||||
((HttpEntityEnclosingRequestBase) request).setEntity(new StringEntity(requestParams.toString()));
|
||||
}
|
||||
LOGGER.info("Sending {} request to {}", requestType.getSimpleName(), requestUrl);
|
||||
LOGGER.info("Request body: {}", requestParams);
|
||||
response = client.execute(adminUser, adminPassword, request);
|
||||
LOGGER.info("Response: {}", response.getStatusLine());
|
||||
|
||||
try
|
||||
{
|
||||
@@ -572,6 +676,9 @@ public abstract class BaseAPI
|
||||
SHELF,
|
||||
BOX,
|
||||
FILE,
|
||||
ORIGINATOR,
|
||||
ORIGINATING_ORGANIZATION,
|
||||
PUBLICATION_DATE
|
||||
}
|
||||
|
||||
public enum RETENTION_SCHEDULE
|
||||
@@ -586,7 +693,7 @@ public abstract class BaseAPI
|
||||
RETENTION_GHOST,
|
||||
RETENTION_ELIGIBLE_FIRST_EVENT,
|
||||
RETENTION_EVENTS,
|
||||
|
||||
COMBINE_DISPOSITION_STEP_CONDITIONS
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -598,6 +705,8 @@ public abstract class BaseAPI
|
||||
CUT_OFF("cutoff"),
|
||||
UNDO_CUT_OFF("undoCutoff"),
|
||||
TRANSFER("transfer"),
|
||||
COMPLETE_EVENT("completeEvent"),
|
||||
UNDO_EVENT("undoEvent"),
|
||||
DESTROY("destroy");
|
||||
String action;
|
||||
|
||||
|
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2018 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.core.v0;
|
||||
|
||||
public enum RMEvents
|
||||
{
|
||||
ABOLISHED("abolished"),
|
||||
ALL_ALLOWANCES_GRANTED_ARE_TERMINATED("all_allowances_granted_are_terminated"),
|
||||
CASE_CLOSED("case_closed"),
|
||||
DECLASSIFICATION_REVIEW("declassification_review"),
|
||||
OBSOLETE("obsolete"),
|
||||
NO_LONGER_NEEDED("no_longer_needed"),
|
||||
STUDY_COMPLETE("study_complete");
|
||||
private String eventName;
|
||||
|
||||
RMEvents(String eventName)
|
||||
{
|
||||
this.eventName = eventName;
|
||||
}
|
||||
|
||||
public String getEventName()
|
||||
{
|
||||
return eventName;
|
||||
}
|
||||
}
|
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2018 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.audit;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* POJO for audit entry
|
||||
*
|
||||
* @author Rodica Sutu
|
||||
* @since 2.7
|
||||
*/
|
||||
@Builder
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties (ignoreUnknown = true)
|
||||
public class AuditEntry extends TestModel
|
||||
{
|
||||
@JsonProperty (required = true)
|
||||
private String nodeName;
|
||||
|
||||
@JsonProperty (required = true)
|
||||
private List<Object> changedValues;
|
||||
|
||||
@JsonProperty (required = true)
|
||||
private String identifier;
|
||||
|
||||
@JsonProperty (required = true)
|
||||
private String path;
|
||||
|
||||
@JsonProperty (required = true)
|
||||
private String nodeRef;
|
||||
|
||||
@JsonProperty (required = true)
|
||||
private String fullName;
|
||||
|
||||
@JsonProperty
|
||||
private String createPerson;
|
||||
|
||||
@JsonProperty (required = true)
|
||||
private String userName;
|
||||
|
||||
@JsonProperty (required = true)
|
||||
private String userRole;
|
||||
|
||||
@JsonProperty (required = true)
|
||||
private String nodeType;
|
||||
|
||||
@JsonProperty (required = true)
|
||||
private String event;
|
||||
|
||||
@JsonProperty (required = true)
|
||||
private String timestamp;
|
||||
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2018 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.audit;
|
||||
|
||||
/**
|
||||
* Enumerates the list of events audited
|
||||
*
|
||||
* @author Rodica Sutu
|
||||
* @since 2.7
|
||||
*
|
||||
*/
|
||||
public enum AuditEvents
|
||||
{
|
||||
CREATE_PERSON("Create Person", "Create User"),
|
||||
DELETE_PERSON("Delete Person", "Delete User"),
|
||||
CREATE_USER_GROUP("Create User Group", "Create User Group"),
|
||||
DELETE_USER_GROUP("Delete User Group", "Delete User Group"),
|
||||
ADD_TO_USER_GROUP("Add To User Group", "Add To User Group"),
|
||||
REMOVE_FROM_USER_GROUP("Remove From User Group", "Remove From User Group"),
|
||||
LOGIN_UNSUCCESSFUL("Login.Failure", "Login Unsuccessful");
|
||||
|
||||
/** event audited */
|
||||
public final String event;
|
||||
|
||||
/** display name for the event audited */
|
||||
public final String eventDisplayName;
|
||||
|
||||
AuditEvents(String event, String displayName)
|
||||
{
|
||||
this.event = event;
|
||||
this.eventDisplayName = displayName;
|
||||
}
|
||||
}
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
@@ -58,6 +58,8 @@ public class FilePlanComponentFields
|
||||
public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_NAME = "rma:recordSearchDispositionActionName";
|
||||
public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS_ELIGIBLE = "rma:recordSearchDispositionEventsEligible";
|
||||
public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS = "rma:recordSearchDispositionInstructions";
|
||||
public static final String PROPERTIES_DECLASSIFICATION_REVIEW_COMPLETED_BY = "rma:declassificationReviewCompletedBy";
|
||||
public static final String PROPERTIES_DECLASSIFICATION_REVIEW_COMPLETED_AT = "rma:declassificationReviewCompletedAt";
|
||||
|
||||
|
||||
/** File plan properties */
|
||||
@@ -74,7 +76,9 @@ public class FilePlanComponentFields
|
||||
public static final String PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD = "rma:recordSearchVitalRecordReviewPeriod";
|
||||
public static final String PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION = "rma:recordSearchVitalRecordReviewPeriodExpression";
|
||||
|
||||
/** Record properties */
|
||||
/**
|
||||
* Record properties
|
||||
*/
|
||||
public static final String PROPERTIES_CLASSIFICATION = "sc:classification";
|
||||
public static final String PROPERTIES_DATE_FILED = "rma:dateFiled";
|
||||
public static final String PROPERTIES_ORIGINAL_NAME = "rma:origionalName";
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
@@ -42,7 +42,6 @@ import lombok.NoArgsConstructor;
|
||||
* @author Rodica Sutu
|
||||
* @since 2.6
|
||||
*/
|
||||
@Builder
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@@ -51,4 +50,13 @@ public class RMSite extends RestSiteModel
|
||||
{
|
||||
@JsonProperty (required = true)
|
||||
private RMSiteCompliance compliance;
|
||||
|
||||
/** Private constructor allowing Lombok to include superclass fields in the builder. */
|
||||
@Builder
|
||||
private RMSite(String title, String description, RMSiteCompliance compliance)
|
||||
{
|
||||
this.setTitle(title);
|
||||
this.setDescription(description);
|
||||
this.compliance = compliance;
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2018 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.user;
|
||||
|
||||
/**
|
||||
* Constants for RM user capabilities
|
||||
*
|
||||
* @author Rodica Sutu
|
||||
* @since 2.7
|
||||
*/
|
||||
public class UserCapabilities
|
||||
{
|
||||
|
||||
/** The id of the view records capability. */
|
||||
public static final String VIEW_RECORDS_CAP = "ViewRecords";
|
||||
/** The id of the declare records capability. */
|
||||
public static final String DECLARE_RECORDS_CAP = "DeclareRecords";
|
||||
}
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
@@ -24,19 +24,32 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.rest.rm.community.model.user;
|
||||
|
||||
/**
|
||||
* Constants for RM user roles
|
||||
*
|
||||
*
|
||||
* @author Kristijan Conkas
|
||||
* @since 2.6
|
||||
*/
|
||||
public class UserRoles
|
||||
public enum UserRoles
|
||||
{
|
||||
public static final String ROLE_RM_ADMIN = "Administrator";
|
||||
public static final String ROLE_RM_MANAGER = "RecordsManager";
|
||||
public static final String ROLE_RM_POWER_USER = "PowerUser";
|
||||
public static final String ROLE_RM_SECURITY_OFFICER = "SecurityOfficer";
|
||||
public static final String ROLE_RM_USER = "User";
|
||||
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;
|
||||
|
||||
UserRoles(String roleId, String displayName)
|
||||
{
|
||||
this.roleId = roleId;
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
@@ -28,9 +28,18 @@ package org.alfresco.rest.rm.community.util;
|
||||
|
||||
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.type.CollectionType;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Utility class for creating the json object
|
||||
@@ -40,6 +49,11 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
*/
|
||||
public class PojoUtility
|
||||
{
|
||||
/**
|
||||
* Logger for the class.
|
||||
*/
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PojoUtility.class);
|
||||
|
||||
/**
|
||||
* see {@link #toJson(Object, Class, Class)}
|
||||
*/
|
||||
@@ -85,4 +99,64 @@ public class PojoUtility
|
||||
return error.toString();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converting json to java object
|
||||
*
|
||||
* @param json The json object to convert
|
||||
* @param classz Class for the java object
|
||||
* @return The converted java object
|
||||
* @throws JsonProcessingException Throws exceptions if the given object doesn't match to the POJO class model
|
||||
*/
|
||||
public static <T> T jsonToObject(JSONObject json, Class<T> classz)
|
||||
{
|
||||
mandatoryObject("model", classz);
|
||||
mandatoryObject("jsonObject", json);
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
T obj = null;
|
||||
try
|
||||
{
|
||||
obj = mapper.readValue(json.toString(), classz);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
LOGGER.error("Unable to convert the json into a java object.", e.toString());
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converting json array into a list of java objects
|
||||
*
|
||||
* @param json The json array to convert
|
||||
* @param classz Class for the java object
|
||||
* @return The list of converted java objects
|
||||
* @throws JsonProcessingException Throws exceptions if the given object doesn't match to the POJO class model
|
||||
*/
|
||||
public static <T> List<T> jsonToObject(JSONArray json, Class<T> classz)
|
||||
{
|
||||
|
||||
mandatoryObject("model", classz);
|
||||
mandatoryObject("jsonObject", json);
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
CollectionType collectionType = mapper.getTypeFactory().constructCollectionType(List.class, classz);
|
||||
List<T> asList = null;
|
||||
try
|
||||
{
|
||||
asList = mapper.readValue(json.toString(), collectionType);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
LOGGER.error("Unable to convert the json array into a java collection.", e.toString());
|
||||
}
|
||||
|
||||
|
||||
return asList;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2018 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.v0;
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import org.alfresco.dataprep.AlfrescoHttpClient;
|
||||
import org.alfresco.dataprep.AlfrescoHttpClientFactory;
|
||||
import org.alfresco.rest.core.v0.BaseAPI;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* The v0 REST API for nodes
|
||||
*
|
||||
* @author jcule
|
||||
* @since 2.7EA1
|
||||
*/
|
||||
@Component
|
||||
public class NodeAPI extends BaseAPI
|
||||
{
|
||||
/** Logger for the class. */
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(NodeAPI.class);
|
||||
|
||||
/** The URI for the get node API. */
|
||||
private static final String GET_NODE_API = "{0}alfresco/s/slingshot/doclib2/node/{1}";
|
||||
|
||||
@Autowired
|
||||
private AlfrescoHttpClientFactory alfrescoHttpClientFactory;
|
||||
|
||||
/**
|
||||
* Get the node metadata using the using the node data webscript: Document List v2 Component
|
||||
*
|
||||
* @param username
|
||||
* @param password
|
||||
* @param nodeId
|
||||
* @return
|
||||
*/
|
||||
public JSONObject getNode(String username, String password, String nodeId)
|
||||
{
|
||||
String requestURL;
|
||||
AlfrescoHttpClient client = alfrescoHttpClientFactory.getObject();
|
||||
requestURL = MessageFormat.format(GET_NODE_API, client.getAlfrescoUrl(), NODE_PREFIX + nodeId);
|
||||
client.close();
|
||||
return doGetRequest(username, password, requestURL);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2018 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.v0;
|
||||
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.rest.core.v0.BaseAPI;
|
||||
import org.alfresco.rest.rm.community.model.audit.AuditEntry;
|
||||
import org.alfresco.rest.rm.community.util.PojoUtility;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* The v0 REST API for rm audit logs
|
||||
*
|
||||
* @author Rodica Sutu
|
||||
* @since 2.7
|
||||
*/
|
||||
@Component
|
||||
public class RMAuditAPI extends BaseAPI
|
||||
{
|
||||
/** Logger for the class. */
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(RMAuditAPI.class);
|
||||
|
||||
/** The URI for the audit API. */
|
||||
private static final String RM_AUDIT_API = "{0}rma/admin/rmauditlog";
|
||||
private static final String RM_AUDIT_LOG_API = RM_AUDIT_API + "?{1}";
|
||||
|
||||
/**
|
||||
* Returns a list of rm audit entries .
|
||||
*
|
||||
* @param user The username of the user to use.
|
||||
* @param password The password of the user.
|
||||
* @param size Maximum number of log entries to return
|
||||
* @param event The name of audit event to be retrieved
|
||||
* @return return Only return log entries matching this event
|
||||
*/
|
||||
public List<AuditEntry> getRMAuditLog(String user, String password, final int size, final String event)
|
||||
{
|
||||
String parameters = null;
|
||||
try
|
||||
{
|
||||
parameters = "size=" + size + (event != null ? "&event=" + URLEncoder.encode(event, "UTF-8"):"");
|
||||
}
|
||||
catch (UnsupportedEncodingException e)
|
||||
{
|
||||
LOGGER.error("Unable to encode the event name" + e.getMessage());
|
||||
}
|
||||
JSONArray auditEntries = doGetRequest(user, password,
|
||||
MessageFormat.format(RM_AUDIT_LOG_API,"{0}", parameters)).getJSONObject("data").getJSONArray("entries");
|
||||
|
||||
return PojoUtility.jsonToObject(auditEntries, AuditEntry.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the list of audit entries.
|
||||
*
|
||||
* @param username The username of the user to use.
|
||||
* @param password The password of the user.
|
||||
* @throws AssertionError If the API call didn't clear the audit log.
|
||||
*/
|
||||
public void clearAuditLog(String username, String password)
|
||||
{
|
||||
JSONObject deleteStatus = doDeleteRequest(username, password, RM_AUDIT_API);
|
||||
|
||||
assertTrue(deleteStatus != null
|
||||
//audit clear and login events are returned
|
||||
&& getRMAuditLog(username, password, 100, null).size() == 2);
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
@@ -35,16 +35,19 @@ import static org.testng.AssertJUnit.fail;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.MessageFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.dataprep.AlfrescoHttpClient;
|
||||
import org.alfresco.dataprep.AlfrescoHttpClientFactory;
|
||||
import org.alfresco.dataprep.ContentService;
|
||||
import org.alfresco.dataprep.UserService;
|
||||
import org.alfresco.rest.core.v0.BaseAPI;
|
||||
import org.alfresco.rest.core.v0.RMEvents;
|
||||
import org.apache.chemistry.opencmis.client.api.CmisObject;
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.http.HttpResponse;
|
||||
@@ -70,6 +73,10 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class RMRolesAndActionsAPI extends BaseAPI
|
||||
{
|
||||
/** The URI to view the configured roles and capabilities. */
|
||||
private static final String RM_ROLES = "{0}rma/admin/rmroles";
|
||||
/** The URI for REST requests about a particular configured role. */
|
||||
private static final String RM_ROLES_ROLE = RM_ROLES + "/{1}";
|
||||
private static final String RM_ROLES_AUTHORITIES = "{0}rm/roles/{1}/authorities/{2}?alf_ticket={3}";
|
||||
|
||||
// logger
|
||||
@@ -88,6 +95,89 @@ public class RMRolesAndActionsAPI extends BaseAPI
|
||||
@Autowired
|
||||
private ContentService contentService;
|
||||
|
||||
/**
|
||||
* Get all the configured RM roles.
|
||||
*
|
||||
* @param adminUser The RM admin user.
|
||||
* @param adminPassword The password of the user.
|
||||
* @return The RM roles in the system (Note that this will be the internal names, not the display labels).
|
||||
*/
|
||||
public Set<String> getConfiguredRoles(String adminUser, String adminPassword)
|
||||
{
|
||||
// Using "is=true" includes the in-place readers and writers.
|
||||
JSONObject jsonObject = doGetRequest(adminUser, adminPassword, RM_ROLES + "?is=true").getJSONObject("data");
|
||||
return jsonObject.toMap().keySet();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the capabilities for a given role.
|
||||
*
|
||||
* @param adminUser The RM admin user.
|
||||
* @param adminPassword The password of the user.
|
||||
* @param role The role to get capabilities for.
|
||||
* @return The set of system names for the capabilities.
|
||||
*/
|
||||
public Set<String> getCapabilitiesForRole(String adminUser, String adminPassword, String role)
|
||||
{
|
||||
JSONObject jsonObject = doGetRequest(adminUser, adminPassword, RM_ROLES + "?is=true").getJSONObject("data");
|
||||
assertTrue("Could not find role '" + role + "' in " + jsonObject.keySet(), jsonObject.has(role));
|
||||
return jsonObject.getJSONObject(role).getJSONObject("capabilities").keySet();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new RM role.
|
||||
*
|
||||
* @param adminUser The username of the admin user.
|
||||
* @param adminPassword The password for the admin user.
|
||||
* @param roleName The name of the new role.
|
||||
* @param roleDisplayLabel A human-readable label for the role.
|
||||
* @param capabilities A list of capabilities for the role.
|
||||
*/
|
||||
public void createRole(String adminUser, String adminPassword, String roleName, String roleDisplayLabel, Set<String> capabilities)
|
||||
{
|
||||
JSONObject requestBody = new JSONObject();
|
||||
requestBody.put("name", roleName);
|
||||
requestBody.put("displayLabel", roleDisplayLabel);
|
||||
JSONArray capabilitiesArray = new JSONArray();
|
||||
capabilities.forEach(capabilitiesArray::put);
|
||||
requestBody.put("capabilities", capabilitiesArray);
|
||||
doPostJsonRequest(adminUser, adminPassword, HttpStatus.SC_OK, requestBody, RM_ROLES);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing RM role.
|
||||
*
|
||||
* @param adminUser The username of the admin user.
|
||||
* @param adminPassword The password for the admin user.
|
||||
* @param roleName The name of the new role.
|
||||
* @param roleDisplayLabel A human-readable label for the role.
|
||||
* @param capabilities A list of capabilities for the role.
|
||||
*/
|
||||
public void updateRole(String adminUser, String adminPassword, String roleName, String roleDisplayLabel, Set<String> capabilities)
|
||||
{
|
||||
JSONObject requestBody = new JSONObject();
|
||||
requestBody.put("name", roleName);
|
||||
requestBody.put("displayLabel", roleDisplayLabel);
|
||||
JSONArray capabilitiesArray = new JSONArray();
|
||||
capabilities.forEach(capabilitiesArray::put);
|
||||
requestBody.put("capabilities", capabilitiesArray);
|
||||
doPutJsonRequest(adminUser, adminPassword, HttpStatus.SC_OK, requestBody, RM_ROLES_ROLE, roleName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a created RM role.
|
||||
*
|
||||
* @param adminUser The username of the admin user.
|
||||
* @param adminPassword The password for the admin user.
|
||||
* @param roleName The name of the role to be deleted.
|
||||
*/
|
||||
public void deleteRole(String adminUser, String adminPassword, String roleName)
|
||||
{
|
||||
doDeleteRequest(adminUser, adminPassword, MessageFormat.format(RM_ROLES_ROLE, "{0}", roleName));
|
||||
boolean success = !getConfiguredRoles(adminUser, adminPassword).contains(roleName);
|
||||
assertTrue("Failed to delete role " + roleName + " with " + adminUser, success);
|
||||
}
|
||||
|
||||
/**
|
||||
* create user and assign to records management role
|
||||
*/
|
||||
@@ -237,9 +327,9 @@ public class RMRolesAndActionsAPI extends BaseAPI
|
||||
/**
|
||||
* Perform an action on the record folder
|
||||
*
|
||||
* @param user the user closing the folder
|
||||
* @param user the user executing the action
|
||||
* @param password the user's password
|
||||
* @param contentName the record folder name
|
||||
* @param contentName the content name
|
||||
* @param date the date to be updated
|
||||
* @return The HTTP response.
|
||||
*/
|
||||
@@ -261,6 +351,56 @@ public class RMRolesAndActionsAPI extends BaseAPI
|
||||
return doPostJsonRequest(user, password, SC_OK, requestParams, RM_ACTIONS_API);
|
||||
}
|
||||
|
||||
/**
|
||||
* Complete an event on the record/record folder
|
||||
*
|
||||
* @param user the user executing the action
|
||||
* @param password the user's password
|
||||
* @param nodeName the node name
|
||||
* @param event the event to be completed
|
||||
* @param date the date to be updated
|
||||
* @return The HTTP response.
|
||||
*/
|
||||
public HttpResponse completeEvent(String user, String password, String nodeName, RMEvents event, Instant date)
|
||||
{
|
||||
String recNodeRef = getNodeRefSpacesStore() + contentService.getNodeRef(user, password, RM_SITE_ID, nodeName);
|
||||
JSONObject requestParams = new JSONObject();
|
||||
requestParams.put("name", RM_ACTIONS.COMPLETE_EVENT.getAction());
|
||||
requestParams.put("nodeRef", recNodeRef);
|
||||
date = (date != null) ? date : Instant.now();
|
||||
String formattedDate = DateTimeFormatter.ISO_INSTANT.format(date);
|
||||
requestParams.put("params", new JSONObject()
|
||||
.put("eventName", event.getEventName())
|
||||
.put("eventCompletedBy", user)
|
||||
.put("eventCompletedAt", new JSONObject()
|
||||
.put("iso8601", formattedDate)
|
||||
)
|
||||
);
|
||||
|
||||
return doPostJsonRequest(user, password, SC_OK, requestParams, RM_ACTIONS_API);
|
||||
}
|
||||
|
||||
/**
|
||||
* Undo an event on the record/record folder
|
||||
*
|
||||
* @param user the user executing the action
|
||||
* @param password the user's password
|
||||
* @param contentName the content name
|
||||
* @param event the event to be undone
|
||||
* @return The HTTP response.
|
||||
*/
|
||||
public HttpResponse undoEvent(String user, String password, String contentName, RMEvents event)
|
||||
{
|
||||
String recNodeRef = getNodeRefSpacesStore() + contentService.getNodeRef(user, password, RM_SITE_ID, contentName);
|
||||
JSONObject requestParams = new JSONObject();
|
||||
requestParams.put("name", RM_ACTIONS.UNDO_EVENT.getAction());
|
||||
requestParams.put("nodeRef", recNodeRef);
|
||||
requestParams.put("params", new JSONObject()
|
||||
.put("eventName", event.getEventName()));
|
||||
|
||||
return doPostJsonRequest(user, password, SC_OK, requestParams, RM_ACTIONS_API);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes every item in the given container
|
||||
*
|
||||
@@ -345,6 +485,10 @@ public class RMRolesAndActionsAPI extends BaseAPI
|
||||
addPropertyToRequest(requestParams, "prop_cm_title", properties, RMProperty.TITLE);
|
||||
addPropertyToRequest(requestParams, "prop_cm_description", properties, RMProperty.DESCRIPTION);
|
||||
addPropertyToRequest(requestParams, "prop_cm_author", properties, RMProperty.AUTHOR);
|
||||
addPropertyToRequest(requestParams, "prop_dod_originator", properties, RMProperty.ORIGINATOR);
|
||||
addPropertyToRequest(requestParams, "prop_dod_originatingOrganization", properties, RMProperty
|
||||
.ORIGINATING_ORGANIZATION);
|
||||
addPropertyToRequest(requestParams, "prop_dod_publicationDate", properties, RMProperty.PUBLICATION_DATE);
|
||||
|
||||
return doPostJsonRequest(username, password, SC_OK, requestParams, MessageFormat.format(UPDATE_METADATA_API, "{0}", itemNodeRef));
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
@@ -51,6 +51,8 @@ public class RecordCategoriesAPI extends BaseAPI
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(RecordCategoriesAPI.class);
|
||||
private static final String RM_ACTIONS_API = "{0}rma/actions/ExecutionQueue";
|
||||
private static final String DISPOSITION_ACTIONS_API = "{0}node/{1}/dispositionschedule/dispositionactiondefinitions";
|
||||
private static final String DISPOSITION_SCHEDULE_API = "{0}node/{1}/dispositionschedule";
|
||||
|
||||
|
||||
/**
|
||||
* Creates a retention schedule for the category given as parameter
|
||||
@@ -71,6 +73,21 @@ public class RecordCategoriesAPI extends BaseAPI
|
||||
return doPostJsonRequest(user, password, SC_OK, requestParams, RM_ACTIONS_API);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the disposition schedule nodeRef
|
||||
*
|
||||
* @param user
|
||||
* @param password
|
||||
* @param categoryName
|
||||
* @return the disposition schedule nodeRef
|
||||
*/
|
||||
public String getDispositionScheduleNodeRef(String user, String password, String categoryName)
|
||||
{
|
||||
String catNodeRef = NODE_PREFIX + getItemNodeRef(user, password, "/" + categoryName);
|
||||
JSONObject dispositionSchedule = doGetRequest(user, password, MessageFormat.format(DISPOSITION_SCHEDULE_API, "{0}", catNodeRef));
|
||||
return dispositionSchedule.getJSONObject("data").getString("nodeRef").replace(getNodeRefSpacesStore(), "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets retention schedule authority and instructions, also if it is applied to records or folders
|
||||
*
|
||||
@@ -108,7 +125,12 @@ public class RecordCategoriesAPI extends BaseAPI
|
||||
addPropertyToRequest(requestParams, "period", properties, RETENTION_SCHEDULE.RETENTION_PERIOD);
|
||||
addPropertyToRequest(requestParams, "ghostOnDestroy", properties, RETENTION_SCHEDULE.RETENTION_GHOST);
|
||||
addPropertyToRequest(requestParams, "periodProperty", properties, RETENTION_SCHEDULE.RETENTION_PERIOD_PROPERTY);
|
||||
addPropertyToRequest(requestParams, "events", properties, RETENTION_SCHEDULE.RETENTION_EVENTS);
|
||||
String events = getPropertyValue(properties, RETENTION_SCHEDULE.RETENTION_EVENTS);
|
||||
if(!events.equals(""))
|
||||
{
|
||||
requestParams.append("events", events);
|
||||
}
|
||||
addPropertyToRequest(requestParams, "combineDispositionStepConditions", properties, RETENTION_SCHEDULE.COMBINE_DISPOSITION_STEP_CONDITIONS);
|
||||
addPropertyToRequest(requestParams, "eligibleOnFirstCompleteEvent", properties, RETENTION_SCHEDULE.RETENTION_ELIGIBLE_FIRST_EVENT);
|
||||
|
||||
return doPostJsonRequest(user, password, SC_OK, requestParams, MessageFormat.format(DISPOSITION_ACTIONS_API, "{0}", catNodeRef));
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
@@ -36,6 +36,7 @@ import org.alfresco.dataprep.CMISUtil.DocumentType;
|
||||
import org.alfresco.dataprep.ContentService;
|
||||
import org.alfresco.rest.core.v0.BaseAPI;
|
||||
import org.apache.chemistry.opencmis.client.api.CmisObject;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
@@ -44,8 +45,6 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javafx.util.Pair;
|
||||
|
||||
/**
|
||||
* Methods to make API requests using v0 API on records
|
||||
*
|
||||
@@ -322,13 +321,13 @@ public class RecordsAPI extends BaseAPI
|
||||
{
|
||||
if (response.has("sharedId"))
|
||||
{
|
||||
return new Pair<>(true, response.getString("sharedId"));
|
||||
return Pair.of(true, response.getString("sharedId"));
|
||||
}
|
||||
} catch (JSONException e)
|
||||
{
|
||||
LOGGER.info("Unable to extract response parameter", e);
|
||||
}
|
||||
return new Pair<>(false, String.valueOf(response.getJSONObject("status").getInt("code")));
|
||||
return Pair.of(false, String.valueOf(response.getJSONObject("status").getInt("code")));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -350,4 +349,17 @@ public class RecordsAPI extends BaseAPI
|
||||
return doPostJsonRequest(user, password, SC_OK, requestParams, ACTIONS_API);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the record's nodeRef
|
||||
*
|
||||
* @param username the user's username
|
||||
* @param password its password
|
||||
* @param recordName the record full name
|
||||
* @param recordPath the String with which the record name starts
|
||||
* @return the record nodeRef in case it exists, empty string otherwise
|
||||
*/
|
||||
public String getRecordNodeRef(String username, String password, String recordName, String recordPath)
|
||||
{
|
||||
return getNodeRefSpacesStore() + getItemNodeRef(username, password, recordPath + "/" + recordName);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
@@ -36,6 +36,7 @@ import org.alfresco.rest.core.v0.BaseAPI;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.utils.URLEncodedUtils;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -56,12 +57,15 @@ public class SearchAPI extends BaseAPI
|
||||
/** faceted search API endpoint */
|
||||
private static final String FACETED_SEARCH_ENDPOINT = "{0}alfresco/s/slingshot/rmsearch/faceted/rmsearch?{1}";
|
||||
|
||||
/** share live search API endpoint */
|
||||
private static final String SHARE_LIVE_SEARCH_DOCS_ENDPOINT = "{0}alfresco/s/slingshot/live-search-docs?{1}";
|
||||
|
||||
/** RM search URL template */
|
||||
private static final String RM_SEARCH_ENDPOINT = "{0}alfresco/s/slingshot/rmsearch/{1}?{2}";
|
||||
|
||||
/** RM document search filters */
|
||||
private static final String RM_DEFAULT_RECORD_FILTERS =
|
||||
"records/true,undeclared/true,vital/false,folders/false,categories/false,frozen/false,cutoff/false";
|
||||
/** RM all nodes search filters */
|
||||
private static final String RM_DEFAULT_NODES_FILTERS =
|
||||
"records/true,undeclared/true,vital/false,folders/{0},categories/{1},frozen/false,cutoff/false";
|
||||
|
||||
/**
|
||||
* Perform search request on search endpoint as a user.
|
||||
@@ -87,6 +91,7 @@ public class SearchAPI extends BaseAPI
|
||||
* @param site
|
||||
* @param query
|
||||
* @param filters
|
||||
* @param sortby
|
||||
* @return search results (see API reference for more details), null for any errors
|
||||
*/
|
||||
public JSONObject rmSearch(
|
||||
@@ -94,11 +99,16 @@ public class SearchAPI extends BaseAPI
|
||||
String password,
|
||||
String site,
|
||||
String query,
|
||||
String filters)
|
||||
String filters,
|
||||
String sortby)
|
||||
{
|
||||
List<BasicNameValuePair> searchParameters = new ArrayList<BasicNameValuePair>();
|
||||
searchParameters.add(new BasicNameValuePair("query", query));
|
||||
searchParameters.add(new BasicNameValuePair("filters", filters));
|
||||
if (sortby != null)
|
||||
{
|
||||
searchParameters.add(new BasicNameValuePair("sortby", sortby));
|
||||
}
|
||||
|
||||
String requestURL = MessageFormat.format(
|
||||
RM_SEARCH_ENDPOINT,
|
||||
@@ -110,22 +120,44 @@ public class SearchAPI extends BaseAPI
|
||||
}
|
||||
|
||||
/**
|
||||
* Search as a user for records on site "rm" matching query, using SearchAPI.RM_DEFAULT_RECORD_FILTERS
|
||||
* Search as a user for nodes on site "rm" matching query, using SearchAPI.RM_DEFAULT_RECORD_FILTERS and sorted
|
||||
* by sortby
|
||||
* <br>
|
||||
* If more fine-grained control of search parameters is required, use rmSearch() directly.
|
||||
*
|
||||
* @param username
|
||||
* @param password
|
||||
* @param query
|
||||
* @return list of record names
|
||||
* @param sortby
|
||||
* @return list of node names
|
||||
*/
|
||||
public List<String> searchForRecordsAsUser(
|
||||
String username,
|
||||
String password,
|
||||
String query)
|
||||
public List<String> searchForNodeNamesAsUser(String username, String password, String query, String sortby,
|
||||
boolean includeCategories, boolean includeFolders)
|
||||
{
|
||||
return getItemNames(rmSearch(username, password, "rm", query, RM_DEFAULT_RECORD_FILTERS));
|
||||
String searchFilterParamaters = MessageFormat.format(RM_DEFAULT_NODES_FILTERS, Boolean.toString(includeFolders),
|
||||
Boolean.toString(includeCategories));
|
||||
return getItemNames(rmSearch(username, password, "rm", query, searchFilterParamaters, sortby));
|
||||
}
|
||||
|
||||
/**
|
||||
* Search as a user for nodes on site "rm" matching query, using SearchAPI.RM_DEFAULT_RECORD_FILTERS and sorted
|
||||
* by sortby and returns the property value for the given nodeRef and property name
|
||||
*
|
||||
* @param username
|
||||
* @param password
|
||||
* @param query
|
||||
* @param sortby
|
||||
* @param includeCategories
|
||||
* @param includeFolders
|
||||
* @return list of node properties
|
||||
*/
|
||||
public String searchForNodePropertyAsUser(String username, String password, String nodeRef, String propertyName, String query, String sortby,
|
||||
boolean includeCategories, boolean includeFolders)
|
||||
{
|
||||
String searchFilterParamaters = MessageFormat.format(RM_DEFAULT_NODES_FILTERS, Boolean.toString(includeFolders),
|
||||
Boolean.toString(includeCategories));
|
||||
return getItemProperty(rmSearch(username, password, "rm", query, searchFilterParamaters, sortby), nodeRef, propertyName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic faceted search.
|
||||
* @param username
|
||||
@@ -138,6 +170,20 @@ public class SearchAPI extends BaseAPI
|
||||
return facetedRequest(username, password, parameters, FACETED_SEARCH_ENDPOINT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute share live search for documents.
|
||||
*
|
||||
* @param searchUser
|
||||
* @param searchPassword
|
||||
* @param searchTerm
|
||||
* @return search results (see API reference for more details)
|
||||
*/
|
||||
public JSONObject liveSearchForDocuments(String searchUser, String searchPassword, String searchTerm)
|
||||
{
|
||||
return facetedRequest(searchUser, searchPassword, Arrays.asList(new BasicNameValuePair("t", searchTerm)),
|
||||
SHARE_LIVE_SEARCH_DOCS_ENDPOINT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute faceted search for term.
|
||||
* @param searchUser
|
||||
@@ -165,14 +211,51 @@ public class SearchAPI extends BaseAPI
|
||||
return getItemNames(facetedSearchForTerm(username, password, term));
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to search for documents as a user using share live search.
|
||||
* @param username to search as
|
||||
* @param password for username
|
||||
* @param term search term
|
||||
* @return list of document names found
|
||||
*/
|
||||
public List<String> liveSearchForDocumentsAsUser(String username, String password, String term) throws JSONException
|
||||
{
|
||||
JSONObject searchResult = liveSearchForDocuments(username, password, term);
|
||||
LOGGER.info(searchResult.toString(3));
|
||||
return getItemNames(searchResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to extract list of names from search result.
|
||||
*
|
||||
* @param searchResult
|
||||
* @return list of document or record names in search result
|
||||
* @throws FileNotFoundException
|
||||
* @throws JsonSyntaxException
|
||||
* @throws JsonIOException
|
||||
* @throws RuntimeException for malformed search response
|
||||
*/
|
||||
/**
|
||||
* Helper method to extract list of names from search result.
|
||||
*
|
||||
* @param searchResult
|
||||
* @param getProperties
|
||||
* @return
|
||||
*/
|
||||
private List<String> getItemNames(JSONObject searchResult)
|
||||
{
|
||||
return getPropertyValues(searchResult, "name");
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to extract list of property values from search result for the given nodeRef.
|
||||
*
|
||||
* @param searchResult
|
||||
* @param getProperties
|
||||
* @return
|
||||
*/
|
||||
private String getItemProperty(JSONObject searchResult, String nodeRef, String propertyName)
|
||||
{
|
||||
return getPropertyValue(searchResult, nodeRef, propertyName);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
|
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2018 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.v0.service;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.alfresco.rest.core.v0.BaseAPI;
|
||||
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
|
||||
import org.alfresco.rest.v0.RecordCategoriesAPI;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* Service for different disposition schedule actions
|
||||
*
|
||||
* @author jcule
|
||||
* @since 2.7.0.1
|
||||
*/
|
||||
@Service
|
||||
public class DispositionScheduleService extends BaseAPI
|
||||
{
|
||||
@Autowired
|
||||
private RecordCategoriesAPI recordCategoriesAPI;
|
||||
|
||||
@Autowired
|
||||
private DataUser dataUser;
|
||||
|
||||
/**
|
||||
* Helper method for adding a cut off after period step
|
||||
*
|
||||
* @param categoryName the category in whose schedule the step will be added
|
||||
* @param period
|
||||
* @return
|
||||
*/
|
||||
public void addCutOffAfterPeriodStep(String categoryName, String period)
|
||||
{
|
||||
HashMap<RETENTION_SCHEDULE, String> cutOffStep = new HashMap<>();
|
||||
cutOffStep.put(RETENTION_SCHEDULE.NAME, "cutoff");
|
||||
cutOffStep.put(RETENTION_SCHEDULE.RETENTION_PERIOD, period);
|
||||
cutOffStep.put(RETENTION_SCHEDULE.DESCRIPTION, "Cut off after a period step");
|
||||
recordCategoriesAPI.addDispositionScheduleSteps(dataUser.getAdminUser().getUsername(),
|
||||
dataUser.getAdminUser().getPassword(), categoryName, cutOffStep);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method for adding a cut off after an event occurs step
|
||||
*
|
||||
* @param categoryName the category in whose schedule the step will be added
|
||||
* @param events
|
||||
*/
|
||||
public void addCutOffAfterEventStep(String categoryName, String events)
|
||||
{
|
||||
HashMap<RETENTION_SCHEDULE, String> cutOffStep = new HashMap<>();
|
||||
cutOffStep.put(RETENTION_SCHEDULE.NAME, "cutoff");
|
||||
cutOffStep.put(RETENTION_SCHEDULE.RETENTION_EVENTS, events);
|
||||
cutOffStep.put(RETENTION_SCHEDULE.DESCRIPTION, "Cut off after event step");
|
||||
|
||||
recordCategoriesAPI.addDispositionScheduleSteps(dataUser.getAdminUser().getUsername(),
|
||||
dataUser.getAdminUser().getPassword(), categoryName, cutOffStep);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method for adding an accession step
|
||||
*
|
||||
* @param timeOrEvent
|
||||
* @param events
|
||||
* @param period
|
||||
* @param periodProperty
|
||||
* @param combineConditions
|
||||
* @return
|
||||
*/
|
||||
public void addAccessionStep(String categoryName, Boolean timeOrEvent, String events, String period, String
|
||||
periodProperty, Boolean combineConditions)
|
||||
{
|
||||
HashMap<RETENTION_SCHEDULE, String> accessionStep = new HashMap<>();
|
||||
accessionStep.put(RETENTION_SCHEDULE.NAME, "accession");
|
||||
accessionStep.put(RETENTION_SCHEDULE.COMBINE_DISPOSITION_STEP_CONDITIONS, Boolean.toString(combineConditions));
|
||||
accessionStep.put(RETENTION_SCHEDULE.RETENTION_PERIOD, period);
|
||||
accessionStep.put(RETENTION_SCHEDULE.RETENTION_PERIOD_PROPERTY, periodProperty);
|
||||
if (!timeOrEvent)
|
||||
{
|
||||
accessionStep.put(RETENTION_SCHEDULE.RETENTION_ELIGIBLE_FIRST_EVENT, Boolean.toString(timeOrEvent));
|
||||
}
|
||||
accessionStep.put(RETENTION_SCHEDULE.RETENTION_EVENTS, events);
|
||||
accessionStep.put(RETENTION_SCHEDULE.DESCRIPTION,
|
||||
"Accession step with time and event conditions.");
|
||||
recordCategoriesAPI.addDispositionScheduleSteps(dataUser.getAdminUser().getUsername(),
|
||||
dataUser.getAdminUser().getPassword(), categoryName, accessionStep);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to create retention schedule with general fields for the given category as admin
|
||||
* and apply it to the records
|
||||
*
|
||||
* @param categoryName
|
||||
* @param appliedToRecords
|
||||
*/
|
||||
public void createCategoryRetentionSchedule(String categoryName, Boolean appliedToRecords)
|
||||
{
|
||||
recordCategoriesAPI.createRetentionSchedule(dataUser.getAdminUser().getUsername(),
|
||||
dataUser.getAdminUser().getPassword(), categoryName);
|
||||
String retentionScheduleNodeRef = recordCategoriesAPI.getDispositionScheduleNodeRef(
|
||||
dataUser.getAdminUser().getUsername(), dataUser.getAdminUser().getPassword(), categoryName);
|
||||
|
||||
HashMap<RETENTION_SCHEDULE, String> retentionScheduleGeneralFields = new HashMap<>();
|
||||
retentionScheduleGeneralFields.put(RETENTION_SCHEDULE.RETENTION_AUTHORITY, "Authority");
|
||||
retentionScheduleGeneralFields.put(RETENTION_SCHEDULE.RETENTION_INSTRUCTIONS, "Instructions");
|
||||
recordCategoriesAPI.setRetentionScheduleGeneralFields(dataUser.getAdminUser().getUsername(),
|
||||
dataUser.getAdminUser().getPassword(), retentionScheduleNodeRef, retentionScheduleGeneralFields,
|
||||
appliedToRecords);
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2018 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.v0.service;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.rest.rm.community.model.user.UserRoles;
|
||||
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
|
||||
import org.alfresco.utility.data.DataUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* Produces processed results from roles API calls
|
||||
*
|
||||
* @author Rodica Sutu
|
||||
* @since 2.6
|
||||
*/
|
||||
@Service
|
||||
public class RoleService
|
||||
{
|
||||
@Autowired
|
||||
private RMRolesAndActionsAPI rmRolesAndActionsAPI;
|
||||
|
||||
@Autowired
|
||||
private DataUser dataUser;
|
||||
|
||||
/**
|
||||
* Add capabilities to a role
|
||||
*
|
||||
* @param role role to be updated
|
||||
* @param capabilities list of capabilities to be added
|
||||
*/
|
||||
public void addCapabilitiesToRole(UserRoles role, Set<String> capabilities)
|
||||
{
|
||||
Set<String> roleCapabilities = new HashSet<>();
|
||||
roleCapabilities.addAll(rmRolesAndActionsAPI.getCapabilitiesForRole(dataUser.getAdminUser().getUsername(),
|
||||
dataUser.getAdminUser().getPassword(), role.roleId));
|
||||
capabilities.stream().forEach(cap -> roleCapabilities.add(cap));
|
||||
|
||||
rmRolesAndActionsAPI.updateRole(dataUser.getAdminUser().getUsername(), dataUser.getAdminUser().getPassword(),
|
||||
role.roleId, role.displayName, roleCapabilities);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove capabilities from a role
|
||||
*
|
||||
* @param role role to be updated
|
||||
* @param capabilities list of capabilities to be removed
|
||||
*/
|
||||
public void removeCapabilitiesFromRole(UserRoles role, Set<String> capabilities)
|
||||
{
|
||||
Set<String> roleCapabilities = rmRolesAndActionsAPI.getCapabilitiesForRole(dataUser.getAdminUser().getUsername(),
|
||||
dataUser.getAdminUser().getPassword(), role.roleId);
|
||||
roleCapabilities.removeAll(capabilities);
|
||||
rmRolesAndActionsAPI.updateRole(dataUser.getAdminUser().getUsername(), dataUser.getAdminUser().getPassword(),
|
||||
role.roleId, role.displayName, roleCapabilities);
|
||||
}
|
||||
}
|
@@ -0,0 +1,174 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2018 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.audit;
|
||||
|
||||
import static org.alfresco.rest.rm.community.model.audit.AuditEvents.ADD_TO_USER_GROUP;
|
||||
import static org.alfresco.rest.rm.community.model.audit.AuditEvents.CREATE_USER_GROUP;
|
||||
import static org.alfresco.rest.rm.community.model.audit.AuditEvents.DELETE_USER_GROUP;
|
||||
import static org.alfresco.rest.rm.community.model.audit.AuditEvents.REMOVE_FROM_USER_GROUP;
|
||||
import static org.alfresco.utility.report.log.Step.STEP;
|
||||
import static org.testng.AssertJUnit.assertTrue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
|
||||
import org.alfresco.rest.rm.community.model.audit.AuditEntry;
|
||||
import org.alfresco.rest.v0.RMAuditAPI;
|
||||
import org.alfresco.test.AlfrescoTest;
|
||||
import org.alfresco.utility.model.GroupModel;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* This class contains the tests that check the group events are audited
|
||||
*
|
||||
* @author Claudia Agache
|
||||
* @since 2.7
|
||||
*/
|
||||
@AlfrescoTest (jira = "RM-5236")
|
||||
public class AuditGroupEventsTests extends BaseRMRestTest
|
||||
{
|
||||
@Autowired
|
||||
private RMAuditAPI rmAuditAPI;
|
||||
|
||||
private GroupModel testGroup;
|
||||
private UserModel testUser;
|
||||
|
||||
@BeforeClass (alwaysRun = true)
|
||||
public void cleanAuditLogs()
|
||||
{
|
||||
//clean audit logs
|
||||
rmAuditAPI.clearAuditLog(getAdminUser().getUsername(), getAdminUser().getPassword());
|
||||
}
|
||||
|
||||
/**
|
||||
* Given I have created a new group
|
||||
* When I view the RM audit
|
||||
* Then there is an entry showing that I created a group
|
||||
*/
|
||||
@Test
|
||||
public void createGroupEventIsAudited()
|
||||
{
|
||||
testGroup = dataGroup.createRandomGroup();
|
||||
|
||||
STEP("Get the list of audit entries for the create group event.");
|
||||
List<AuditEntry> auditEntries = rmAuditAPI.getRMAuditLog(getAdminUser().getUsername(),
|
||||
getAdminUser().getPassword(), 100, CREATE_USER_GROUP.event);
|
||||
|
||||
STEP("Check the audit log contains only the entries for the created group.");
|
||||
assertTrue("The list of events is not filtered by " + CREATE_USER_GROUP.event,
|
||||
auditEntries.stream().allMatch(auditEntry -> auditEntry.getEvent().equals(CREATE_USER_GROUP.eventDisplayName)));
|
||||
|
||||
assertTrue("The group name for the new group created is not audited.",
|
||||
auditEntries.stream().filter(auditEntry -> auditEntry.getEvent().equals(CREATE_USER_GROUP.eventDisplayName))
|
||||
.anyMatch(auditEntry -> auditEntry.getNodeName().equals(testGroup.getGroupIdentifier())));
|
||||
}
|
||||
|
||||
/**
|
||||
* Given I have added a user to a group
|
||||
* When I view the RM audit
|
||||
* Then there is an entry showing that I have added a user to a group
|
||||
*/
|
||||
@Test
|
||||
public void addUserToGroupEventIsAudited()
|
||||
{
|
||||
testGroup = dataGroup.createRandomGroup();
|
||||
testUser = getDataUser().createRandomTestUser();
|
||||
dataGroup.usingUser(testUser).addUserToGroup(testGroup);
|
||||
|
||||
STEP("Get the list of audit entries for the add user to group event.");
|
||||
List<AuditEntry> auditEntries = rmAuditAPI.getRMAuditLog(getAdminUser().getUsername(),
|
||||
getAdminUser().getPassword(), 100, ADD_TO_USER_GROUP.event);
|
||||
|
||||
STEP("Check the audit log contains only the entries for the add user to group event.");
|
||||
assertTrue("The list of events is not filtered by " + ADD_TO_USER_GROUP.event,
|
||||
auditEntries.stream().allMatch(auditEntry -> auditEntry.getEvent().equals(ADD_TO_USER_GROUP.eventDisplayName)));
|
||||
|
||||
assertTrue("The username and destination group are not audited.",
|
||||
auditEntries.stream().filter(auditEntry -> auditEntry.getEvent().equals(ADD_TO_USER_GROUP.eventDisplayName))
|
||||
.anyMatch(auditEntry -> auditEntry.getNodeName().equals(testGroup.getGroupIdentifier())
|
||||
&& auditEntry.getChangedValues().contains(ImmutableMap.of("new", testUser.getUsername(), "previous", "", "name", "User Name"))
|
||||
&& auditEntry.getChangedValues().contains(ImmutableMap.of("new", testGroup.getGroupIdentifier(), "previous", "", "name", "Parent Group"))));
|
||||
}
|
||||
|
||||
/**
|
||||
* Given I have removed a user from a group
|
||||
* When I view the RM audit
|
||||
* Then there is an entry showing that I have removed a user from a group
|
||||
*/
|
||||
@Test
|
||||
public void removeUserFromGroupEventIsAudited()
|
||||
{
|
||||
testGroup = dataGroup.createRandomGroup();
|
||||
testUser = getDataUser().createRandomTestUser();
|
||||
dataGroup.usingUser(testUser).addUserToGroup(testGroup);
|
||||
dataGroup.removeUserFromGroup(testGroup, testUser);
|
||||
|
||||
STEP("Get the list of audit entries for the add user to group event.");
|
||||
List<AuditEntry> auditEntries = rmAuditAPI.getRMAuditLog(getAdminUser().getUsername(),
|
||||
getAdminUser().getPassword(), 100, REMOVE_FROM_USER_GROUP.event);
|
||||
|
||||
STEP("Check the audit log contains only the entries for the remove user from group event.");
|
||||
assertTrue("The list of events is not filtered by " + REMOVE_FROM_USER_GROUP.event,
|
||||
auditEntries.stream().allMatch(auditEntry -> auditEntry.getEvent().equals(REMOVE_FROM_USER_GROUP.eventDisplayName)));
|
||||
|
||||
assertTrue("The username and previous parent group are not audited.",
|
||||
auditEntries.stream().filter(auditEntry -> auditEntry.getEvent().equals(REMOVE_FROM_USER_GROUP.eventDisplayName))
|
||||
.anyMatch(auditEntry -> auditEntry.getNodeName().equals(testGroup.getGroupIdentifier())
|
||||
&& auditEntry.getChangedValues().contains(ImmutableMap.of("new", "", "previous", testUser.getUsername(), "name", "User Name"))
|
||||
&& auditEntry.getChangedValues().contains(ImmutableMap.of("new", "","previous", testGroup.getGroupIdentifier(), "name", "Parent Group"))));
|
||||
}
|
||||
|
||||
/**
|
||||
* Given I have deleted a group
|
||||
* When I view the RM audit
|
||||
* Then there is an entry showing that I have deleted a group
|
||||
*/
|
||||
@Test
|
||||
public void deleteGroupEventIsAudited()
|
||||
{
|
||||
testGroup = dataGroup.createRandomGroup();
|
||||
dataGroup.deleteGroup(testGroup);
|
||||
|
||||
STEP("Get the list of audit entries for the delete group event.");
|
||||
List<AuditEntry> auditEntries = rmAuditAPI.getRMAuditLog(getAdminUser().getUsername(),
|
||||
getAdminUser().getPassword(), 100, DELETE_USER_GROUP.event);
|
||||
|
||||
STEP("Check the audit log contains only the entries for the created group.");
|
||||
assertTrue("The list of events is not filtered by " + DELETE_USER_GROUP.event,
|
||||
auditEntries.stream().allMatch(auditEntry -> auditEntry.getEvent().equals(DELETE_USER_GROUP.eventDisplayName)));
|
||||
|
||||
assertTrue("The group name for the deleted group is not audited.",
|
||||
auditEntries.stream().filter(auditEntry -> auditEntry.getEvent().equals(DELETE_USER_GROUP.eventDisplayName))
|
||||
.anyMatch(auditEntry -> auditEntry.getNodeName().equals(testGroup.getGroupIdentifier())
|
||||
&& auditEntry.getChangedValues().contains(ImmutableMap.of("new", "", "previous", testGroup.getGroupIdentifier(), "name", "authorityDisplayName"))));
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user