Revert ACS-1372

This commit is contained in:
Cezar.Leahu
2021-05-07 00:27:50 +03:00
parent 82195597b6
commit cf538a5e0c
2077 changed files with 273 additions and 253267 deletions

View File

@@ -28,15 +28,16 @@ env:
global:
- TAS_SCRIPTS=../alfresco-community-repo/packaging/tests/scripts
- TAS_ENVIRONMENT=./packaging/tests/environment
- LOG_WARN="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
stages:
- name: test
if: commit_message !~ /\[skip tests\]/
- name: release
if: commit_message !~ /\[no release\]/ AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND fork = false
if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no release\]/
- name: update_downstream
if: commit_message !~ /\[no downstream\]/ AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND fork = false
if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no downstream\]/
- name: trigger_downstream
if: fork = false AND (branch != master AND branch !~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no downstream\]/
before_install: travis_retry bash scripts/travis/init.sh
install: travis_retry travis_wait 40 bash scripts/travis/build.sh
@@ -45,13 +46,11 @@ jobs:
include:
- name: "Core, Data-Model, Repository - AllUnitTestsSuite - Build and test"
if: commit_message !~ /\[skip repo\]/
script:
- travis_retry mvn -B test -pl core,data-model
- travis_retry mvn -B test -pl repository -Dtest=AllUnitTestsSuite
- name: "Repository - AppContext01TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
@@ -59,14 +58,12 @@ jobs:
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext01TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContext02TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext02TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContext03TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
@@ -74,7 +71,6 @@ jobs:
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext03TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContext04TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
@@ -82,7 +78,6 @@ jobs:
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContext05TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
@@ -93,7 +88,6 @@ jobs:
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext05TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "-Didentity-service.auth-server-url=http://${HOST_IP}:8999/auth"
- name: "Repository - AppContext06TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
@@ -101,7 +95,6 @@ jobs:
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext06TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContextExtraTestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
@@ -109,7 +102,6 @@ jobs:
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContextExtraTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - MiscContextTestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
@@ -117,70 +109,68 @@ jobs:
script: travis_wait 20 mvn -B test -pl repository -Dtest=MiscContextTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - SearchTestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=SearchTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dindex.subsystem.name=solr6
- name: "Repository - MariaDB 10.2.18 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/) OR commit_message =~ /\[db\]/
if: commit_message !~ /\[skip db\]/
before_script:
- docker run -d -p 3307:3306 --name mariadb -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mariadb:10.2.18 --transaction-isolation=READ-COMMITTED --max-connections=300 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
- name: "Repository - MariaDB 10.4 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/) OR commit_message =~ /\[db\]/
if: commit_message !~ /\[skip db\]/
before_script:
- docker run -d -p 3307:3306 --name mariadb -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mariadb:10.4 --transaction-isolation=READ-COMMITTED --max-connections=300 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
- name: "Repository - MariaDB 10.5 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/) OR commit_message =~ /\[db\]/
if: commit_message !~ /\[skip db\]/
before_script:
- docker run -d -p 3307:3306 --name mariadb -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mariadb:10.5 --transaction-isolation=READ-COMMITTED --max-connections=300 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
- name: "Repository - MySQL 5.7.23 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/) OR commit_message =~ /\[db\]/
if: commit_message !~ /\[skip db\]/
before_script:
- docker run -d -p 3307:3306 -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mysql:5.7.23 --transaction-isolation='READ-COMMITTED'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - MySQL 8 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/) OR commit_message =~ /\[db\]/
if: commit_message !~ /\[skip db\]/
before_script:
- docker run -d -p 3307:3306 -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mysql:8 --transaction-isolation='READ-COMMITTED'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - PostgreSQL 10.9 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/) OR commit_message =~ /\[db\]/
if: commit_message !~ /\[skip db\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:10.9 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - PostgreSQL 11.7 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/) OR commit_message =~ /\[db\]/
if: commit_message !~ /\[skip db\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - PostgreSQL 12.4 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/) OR commit_message =~ /\[db\]/
if: commit_message !~ /\[skip db\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:12.4 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - PostgreSQL 13.1 tests"
# We only run DB tests on the latest version of PostgreSQL on feature branches
if: commit_message !~ /\[skip db\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
@@ -188,20 +178,17 @@ jobs:
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - Messaging tests"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=CamelRoutesTest,CamelComponentsTest
- name: "Remote-api - AppContext01TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext01TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Remote-api - AppContext02TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
@@ -209,7 +196,6 @@ jobs:
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext02TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Remote-api - AppContext03TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
@@ -217,7 +203,6 @@ jobs:
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext03TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Remote-api - AppContext04TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
@@ -225,104 +210,82 @@ jobs:
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Remote-api - AppContextExtraTestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContextExtraTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "REST API TAS tests part1"
# TAS tests are generally skipped on feature branches as they will be repeated on the enterprise repo or community packaging builds
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
if: branch = master OR commit_message =~ /\[tas\]/
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 60 mvn -B install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part1 -Denvironment=default -DrunBugs=false
script:
- travis_wait 60 mvn -B install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part1 -Denvironment=default -DrunBugs=false
- name: "REST API TAS tests part2"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
if: branch = master OR commit_message =~ /\[tas\]/
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 60 mvn -B install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part2 -Denvironment=default -DrunBugs=false
script:
- travis_wait 60 mvn -B install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part2 -Denvironment=default -DrunBugs=false
- name: "REST API TAS tests part3"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
if: branch = master OR commit_message =~ /\[tas\]/
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 60 mvn -B install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part3 -Denvironment=default -DrunBugs=false
script:
- travis_wait 60 mvn -B install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part3 -Denvironment=default -DrunBugs=false
- name: "CMIS TAS tests - BROWSER binding"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
if: branch = master OR commit_message =~ /\[tas\]/
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-browser -Denvironment=default -DrunBugs=false
script:
- travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-browser -Denvironment=default -DrunBugs=false
- name: "CMIS TAS tests - ATOM binding"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
if: branch = master OR commit_message =~ /\[tas\]/
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-atom -Denvironment=default -DrunBugs=false
script:
- travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-atom -Denvironment=default -DrunBugs=false
- name: "CMIS TAS tests - WEBSERVICES binding"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
if: branch = master OR commit_message =~ /\[tas\]/
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-webservices -Denvironment=default -DrunBugs=false
script:
- travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-webservices -Denvironment=default -DrunBugs=false
- name: "Email TAS tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
if: branch = master OR commit_message =~ /\[tas\]/
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 30 mvn -B install -f packaging/tests/tas-email/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
script:
- travis_wait 30 mvn -B install -f packaging/tests/tas-email/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- name: "WebDAV TAS tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
if: branch = master OR commit_message =~ /\[tas\]/
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 30 mvn -B install -f packaging/tests/tas-webdav/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
script:
- travis_wait 30 mvn -B install -f packaging/tests/tas-webdav/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- name: "Integration TAS tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
if: branch = master OR commit_message =~ /\[tas\]/
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 30 mvn -B install -f packaging/tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- name: "Share Services - ShareServicesTestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
script: travis_wait 20 mvn -B test -pl :alfresco-share-services -Dtest=ShareServicesTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "AGS Unit & Integration Tests (PostgreSQL)"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -f amps/ags/pom.xml ${LOG_WARN}
- name: "AGS Unit & Integration Tests (MySQL) "
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags on MySQL\]/
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -f amps/ags/pom.xml ${LOG_WARN}
- name: "AGS Community Rest API Tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
addons:
artifacts:
paths:
- ./amps/ags/rm-automation/rm-automation-community-rest-api/target/reports/rm-automation-community-rest-api.log
- alfresco.log
- solr.log
target_paths: community/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NAME}
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ./amps/ags/rm-community/rm-community-repo/docker-compose.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco"
script: travis_wait 40 mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false -Pags
after_script: bash amps/ags/travis/scripts/getLogs.sh
script:
- travis_wait 30 mvn -B install -f packaging/tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- name: "Push to Nexus"
stage: release
@@ -334,3 +297,9 @@ jobs:
install: skip
script: bash scripts/travis/update_downstream.sh
- name: "Trigger alfresco-enterprise-repo build"
stage: trigger_downstream
before_install: skip
install: skip
script: bash scripts/travis/trigger_travis.sh "Alfresco" "alfresco-enterprise-repo" "${TRAVIS_BRANCH}"

View File

@@ -121,11 +121,11 @@ git clone git@github.com:Alfresco/acs-community-packaging.git
If you wish to build these projects from the command line, use the following commands.
~~~
cd alfresco-community-repo
mvn clean install -Pbuild-docker-images -DskipTests=true -Dversion.edition=Community
mvn clean install -PcommunityDocker -DskipTests=true -Dversion.edition=Community
cd ..
cd acs-community-packaging
mvn clean install -Pbuild-docker-images -Dmaven.javadoc.skip=true
mvn clean install -PcommunityDocker -Dmaven.javadoc.skip=true
cd ..
~~~
In Intellij IDEA, create a new project using the `work` directory as the source.

View File

@@ -1,15 +0,0 @@
# EditorConfig file: http://editorconfig.org/
# Syntax at: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
# This is the Top level for the RM project
root = true
# All files should use spaces.
[*]
indent_style = space
end_of_line = crlf
trim_trailing_whitespace = true
indent_size = 3
[*.java]
indent_size = 4

View File

@@ -1,29 +0,0 @@
# Automatically detect if no other rule applies.
* text=auto
# Extensions known to be text files.
*.css text
*.editorConfig text
*.ftl text
*.gitattributes text
*.gitignore text
*.html text
*.importorder text
*.java text
*.js text
*.jshintrc text
*.json text
*.properties text
*.txt text
*.xml text
# Alfresco content package.
*.acp binary
# Image files.
*.gif binary
*.jpg binary
*.png binary
# IntelliJ has a jar file as part of its config directory.
*.jar binary

47
amps/ags/.gitignore vendored
View File

@@ -1,47 +0,0 @@
# General ignored files and directories
.ant-targets-build.xml
.classpath
.gradle
.idea
.project
.settings
.history
*.bak
*.eml
*.iml
*.log*
*.tmp
*.war
bin
build.local.properties
dist
explodedDeps
local.properties
rebel.xml
rebel-remote.xml
target
test-output
# /rm-community/
/rm-community/l10n
/rm-community/root
# /rm-community/rm-server/
/rm-community/rm-server/alfresco-solr.zip
/rm-community/rm-server/solr
/rm-community/rm-server/shared
# /rm-community/rm-server/config/
/rm-community/rm-server/config/alfresco-global.properties
# /rm-community/rm-server/config/alfresco/
/rm-community/rm-server/config/alfresco/extension
# /rm-enterprise/rm-automation-enterprise/
/rm-enterprise/rm-automation-enterprise/l10n
/rm-enterprise/rm-automation-enterprise/root
rm-automation/src/test/resources/webdriver.properties
/rm-community/rm-community-rest-api-explorer/overlays
/rm-enterprise/rm-enterprise-rest-api-explorer/overlays

View File

@@ -1,44 +0,0 @@
{
"bitwise": true,
"curly": true,
"eqeqeq": true,
"es3": true,
"forin": true,
"freeze": true,
"funcscope": true,
"immed": true,
"indent": 3,
"iterator": true,
"latedef": true,
"maxcomplexity": 10,
"maxdepth": 50,
"maxerr": 50,
"maxlen": 250,
"maxparams": 50,
"maxstatements": 30,
"newcap": true,
"noarg": true,
"nonbsp": true,
"nonew": true,
"notypeof": true,
"shadow": "outer",
"undef": true,
"unused": true,
"globals": {
"module": false,
"model": true,
"Alfresco": true,
"YAHOO": false,
"appContext": false,
"PDFJS": false,
"AlfrescoUtil": true,
"msg": false
},
"expr": true,
"strict": false,
"browser": true,
"dojo": true
}

View File

@@ -1,73 +0,0 @@
# 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

View File

@@ -1,60 +0,0 @@
# How to contribute
For the details on the Records Management project see [here](https://community.alfresco.com/docs/DOC-6387-project-overview-records-management).
## Getting started
What you need to get started:
* A [GitHub](https://github.com/) account.
Useful but not necessary:
* An [Alfresco community](https://community.alfresco.com/) account - this is a good place to ask questions and find answers.
* A [Jira](https://issues.alfresco.com/jira/projects/RM/issues/?filter=allopenissues) account - Good place to look at what the team is working on;
## Making changes
We use GitHub's issues to track community contributions and issues. If you are committing a fix for a raised issue please reference the issue number in the pull request.
If you are adding in a new feature or bug fix please raise an issue in the issues tab. By raising an issue in this project you will be agreeing to the Alfresco Contribution Agreement which can be found [here](https://community.alfresco.com/docs/DOC-7070-alfresco-contribution-agreement).
When you are ready to make a change you just need to fork the [records-management](https://github.com/Alfresco/records-management) repository and then make your changes into your copy of the code.
We have a set of standards we follow when writing code. These can be found [here](https://community.alfresco.com/docs/DOC-4658-coding-standards).
When formatting your change please try not to change the format of any other code as this can make the changes difficult to spot and please make sure to use the correct line ending (we use LF).
We ask that when adding/changing code you also add/change the appropriate unit tests and that these tests all run before creating the pull request (these will be run as part of the request, it just saves time if you know they will pass beforehand).
If you are adding any user facing strings be advised these may be change after being reviewed by a member of our UA team. For UI consistency please write to these [guidelines](http://docs.alfresco.com/sites/docs.alfresco.com/files/public/docs_team/u2/Alfresco-Writing-Guide.pdf).
## Submitting changes
When you create a pull request we will run the unit tests using [Travis](https://travis-ci.org/Alfresco/records-management). If these pass a member of the team will look over the change and then assuming there are no issues will accept your change. If there are any issue we will discuss this with you using the pull request.
It really helps speed up the review process if you include a description of the change in the pull request.
After your change has been accepted you can add it to the page [here](https://community.alfresco.com/docs/DOC-5279-featured-contributions) to let other members of the community know. A community account is required to update this page.
Occasionally we may have to revert a change after it has been accepted. This will usually be caused by failing integration or UI tests. If this happens to you then feel free to get in touch for more information.
## Additional info and links
[Alfresco coding standards](https://community.alfresco.com/docs/DOC-4658-coding-standards)
[Alfresco community contributions page](https://community.alfresco.com/docs/DOC-5279-featured-contributions)
[Alfresco community site](https://community.alfresco.com/)
[Alfresco contribution agreement](https://community.alfresco.com/docs/DOC-7070-alfresco-contribution-agreement)
[Alfresco writing guidelines](http://docs.alfresco.com/sites/docs.alfresco.com/files/public/docs_team/u2/Alfresco-Writing-Guide.pdf)
[GitHub "Records Management" code repository](https://github.com/Alfresco/records-management)
[IDE settings for Eclipse and Intellij](https://github.com/Alfresco/records-management/tree/master/ide-config)
[Jira project used by GS team](https://issues.alfresco.com/jira/projects/RM/issues)
[Records Management project details](https://community.alfresco.com/docs/DOC-6387-project-overview-records-management)

View File

@@ -1,241 +0,0 @@
# 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 the ~/.m2/settings.xml file for local development
In order to be able to pull all the necessary project dependencies, the alfresco Nexus
repositories should be added in your local Maven configuration on your workstation.
Update your `~/.m2/settings.xml` file with the _repositories_, _pluginRepositories_ and, optionally,
the _servers_ defined in the following snippet:
```xml
<settings>
<profiles>
<profile>
<id>alfresco-internal</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>alfresco-internal</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<name>Alfresco Internal Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alfresco-internal</id>
<name>Alfresco Internal Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<servers>
<server>
<id>alfresco-internal</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
</servers>
</settings>
```
The `alfresco-internal` server definition is required by the Alfresco _internal_ repository
group, and it should use your own Alfresco Nexus credentials. If only the _public_ repository
group is used (e.g., for the Community build) this server definition can be skipped.
Optionally, you can also re-define the Maven Central repository, to increase the dependency download
speed (look up dependencies first in Maven Central, then in Alfresco Nexus). Define the
_Central Repository_ in both the `<repositories/>` and `<pluginRepositories/>` sections before
the _alfresco-internal_ repository:
```xml
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
```
For additional instructions you can check the official Maven documentation:
* [setting up repositories](https://maven.apache.org/guides/mini/guide-multiple-repositories.html)
* [setting up servers](https://maven.apache.org/settings.html#servers)
* [password encryption](https://maven.apache.org/guides/mini/guide-encryption.html)
## Configuring and starting Alfresco/Share
* Clone the project (e.g. `git clone git@github.com:Alfresco/governance-services.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 -Pstart-db
```
## 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.
## 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
## Build Docker images for RM Repo and Share
A first step is checking that you have installed a working version of Docker that can be downloaded from here:
[https://docs.docker.com/install/]
The second step, in case you already have Docker installed, the current running images must be checked in order to be sure that they are not occupying any of the ports that
ACS and Share use.
To kill and clean all the images and containers the following command can be used:
```
docker system prune --volumes
```
> Note that this will also remove all the stopped containers, containers, networks, volumes and build cache.
Depending on which version of AGS you want to start, Community or Enterprise, **you must first build the docker images**.
From the root folder of the project you can create both the Repo and the Share images for Community and Enterprise.
To build all the images use the following command:
```
mvn install -PbuildDockerImage
```
If only the Community or Enterprise images need to be built than the same command as above must be run either in the rm-community or rm-enterprise modules.
## Start the Docker images
The Docker images of the Repo can be started independently from Share running the following command in the rm-repo-enterprise or rm-repo-community folder which contains the Docker-compose.yml file:
```
docker-compose up
```
> Be aware of the fact that the Share images can not be started independently from Repo
e.g. In order to start an instance of rm-enterprise-repo and rm-enterprise-share, the above command must be run in rm-enterprise-share after the images have been built.
## Start the Docker images with jRebel in remote server mode
If you have a license for jRebel then this can be used from the rm-community-share or rm-enterprise-share directories with:
```
docker-compose -f docker-compose.yml -f jrebel-docker-compose.yml --project-name agsdev up --build --force-recreate
```

View File

@@ -1,291 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="AlfrescoJava" version="12">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="3"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="1"/>
<setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="3"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
</profile>
</profiles>

View File

@@ -1,272 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<profiles version="11">
<profile kind="CodeFormatterProfile" name="AlfrescoJavaScript" version="11">
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.size" value="3"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.wrap_before_binary_operator" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_objlit_initializer" value="next_line"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.line_length" value="80"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block_in_case" value="next_line"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.compiler.problem.enumIdentifier" value="error"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.keep_empty_objlit_initializer_on_one_line" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_source_code" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.indentation.size" value="3"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field" value="0"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.compiler.codegen.targetPlatform" value="1.5"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.indent_root_tags" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.compiler.source" value="1.5"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_objlit_initializer" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_objlit_initializer" value="1"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_comma_in_objlit_initializer" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block" value="next_line"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch" value="next_line"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_object_initializer" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_object_initializer" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.compiler.compliance" value="1.5"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.lineSplit" value="80"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_objlit_initializer" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations" value="0"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.tabulation.char" value="space"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
</profile>
</profiles>

View File

@@ -1,10 +0,0 @@
#Organize Import Order
#Thu Jan 28 11:20:46 GMT 2016
6=com
5=javax
4=java
3=\#org
2=\#com
1=\#javax
0=\#java
7=org

View File

@@ -1,4 +0,0 @@
# Localisation config overrides for Records Management module
MESSAGE_SEARCH_PATH="rm-community/rm-community-repo/config rm-community/rm-community-share rm-community/rm-share/source rm-enterprise/rm-enterprise-repo/src/main rm-enterprise/rm-enterprise-share/src/main "
EXCLUDED_FILES="$EXCLUDED_FILES rm-method-security.properties springloaded.properties file-mapping.properties classified-content-notForTranslating.properties notForTranslating version.properties"
EXTENSION_PREFIX=-RM

View File

@@ -1,18 +0,0 @@
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/>.

View File

@@ -1,165 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

@@ -1 +0,0 @@
Alfresco Records Management Module

View File

@@ -1 +0,0 @@
alfresco_community=Alfresco Community

View File

@@ -1,590 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<packaging>pom</packaging>
<name>Alfresco Governance Services Community Parent</name>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>11.28-SNAPSHOT</version>
</parent>
<modules>
<module>rm-community</module>
<module>rm-automation</module>
</modules>
<properties>
<maven.buildhelper.version>1.9.1</maven.buildhelper.version>
<maven.compiler.version>3.8.0</maven.compiler.version>
<maven.enforcer.plugin>3.0.0-M2</maven.enforcer.plugin>
<maven.resources.version>3.1.0</maven.resources.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<license.update.dryrun>true</license.update.dryrun>
<license.verbose>false</license.verbose>
<app.amp.client.war.folder>${project.build.directory}/${project.build.finalName}-war</app.amp.client.war.folder>
<app.amp.folder>src/main/amp</app.amp.folder>
<app.amp.output.folder>../${project.build.finalName}</app.amp.output.folder>
<app.filtering.enabled>true</app.filtering.enabled>
<app.properties.include>**</app.properties.include>
<app.properties.folder>src/main/properties/local</app.properties.folder>
<app.properties.test.include>**</app.properties.test.include>
<app.properties.test.folder>src/test/properties/local</app.properties.test.folder>
</properties>
<dependencies>
<!-- XML jars removed in Java 11 but are provided by alfresco-content-services -->
<dependency>
<groupId>jakarta.jws</groupId>
<artifactId>jakarta.jws-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-java</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>[${java.version},)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>regex-properties</id>
<goals>
<goal>regex-properties</goal>
</goals>
<configuration>
<regexPropertySettings>
<regexPropertySetting>
<name>ags.module.repo.version.min</name>
<value>${amp.min.version}</value>
<regex>(\d+)\.(\d+).*</regex>
<replacement>$1.$2</replacement>
<failIfNoMatch>false</failIfNoMatch>
</regexPropertySetting>
</regexPropertySettings>
</configuration>
</execution>
<execution>
<id>add-test-source</id>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/unit-test/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*UnitTest.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclint>none</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<configuration>
<doclint>none</doclint>
</configuration>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>default-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>default-install</id>
<phase>install</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
<executions>
<execution>
<id>default-site</id>
<phase>site</phase>
<goals>
<goal>site</goal>
</goals>
</execution>
<execution>
<id>default-deploy</id>
<phase>site-deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.2</version>
</extension>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>2.2</version>
</extension>
</extensions>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>${app.filtering.enabled}</filtering>
</resource>
<resource>
<directory>${app.amp.folder}</directory>
<targetPath>${app.amp.output.folder}</targetPath>
<filtering>${app.filtering.enabled}</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>${app.filtering.enabled}</filtering>
</testResource>
</testResources>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
<executions>
<execution>
<id>default-testCompile</id>
<phase>process-test-sources</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven.enforcer.plugin}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<argLine>
--illegal-access=permit
</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${maven.buildhelper.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<version>1.5</version>
</plugin>
<!-- Maven Release Plugin (Use a recent version for better Git Support) -->
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<tagNameFormat>V@{project.version}</tagNameFormat>
</configuration>
</plugin>
<!-- Disable doclint until RM-3150 is fixed -->
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclint>none</doclint>
<source>${java.version}</source>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>1.16</version>
<configuration>
<verbose>${license.verbose}</verbose>
<addSvnKeyWords>false</addSvnKeyWords>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<!-- header configuration -->
<organizationName>Alfresco Software Limited</organizationName>
<descriptionTemplate>${project.parent.parent.basedir}/license/description.ftl</descriptionTemplate>
<canUpdateCopyright>true</canUpdateCopyright>
<canUpdateDescription>true</canUpdateDescription>
<!-- licence configuration -->
<licenseResolver>file:${project.parent.parent.basedir}/license</licenseResolver>
<!-- dry run options -->
<dryRun>${license.update.dryrun}</dryRun>
<failOnMissingHeader>true</failOnMissingHeader>
<failOnNotUptodateHeader>true</failOnNotUptodateHeader>
<!-- default root -->
<roots>
<root>src</root>
</roots>
<!-- exculsions -->
<excludes>
<exclude>**/package-info.java</exclude>
<exclude>**/*.properties</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*.xml</exclude>
<exclude>**/*.json</exclude>
<exclude>**/*.txt</exclude>
<exclude>**/*.html</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>first</id>
<goals>
<goal>update-file-header</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven.resources.version}</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-filtering</artifactId>
<version>${dependency.maven-filtering.version}</version>
</dependency>
</dependencies>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>ftl</nonFilteredFileExtension>
<nonFilteredFileExtension>acp</nonFilteredFileExtension>
<nonFilteredFileExtension>jpg</nonFilteredFileExtension>
<nonFilteredFileExtension>png</nonFilteredFileExtension>
<nonFilteredFileExtension>gif</nonFilteredFileExtension>
<nonFilteredFileExtension>svg</nonFilteredFileExtension>
<nonFilteredFileExtension>pdf</nonFilteredFileExtension>
<nonFilteredFileExtension>doc</nonFilteredFileExtension>
<nonFilteredFileExtension>docx</nonFilteredFileExtension>
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
<nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
<nonFilteredFileExtension>ppt</nonFilteredFileExtension>
<nonFilteredFileExtension>pptx</nonFilteredFileExtension>
<nonFilteredFileExtension>bin</nonFilteredFileExtension>
<nonFilteredFileExtension>lic</nonFilteredFileExtension>
<nonFilteredFileExtension>swf</nonFilteredFileExtension>
<nonFilteredFileExtension>zip</nonFilteredFileExtension>
<nonFilteredFileExtension>msg</nonFilteredFileExtension>
<nonFilteredFileExtension>jar</nonFilteredFileExtension>
<nonFilteredFileExtension>ttf</nonFilteredFileExtension>
<nonFilteredFileExtension>eot</nonFilteredFileExtension>
<nonFilteredFileExtension>woff</nonFilteredFileExtension>
<nonFilteredFileExtension>woff2</nonFilteredFileExtension>
<nonFilteredFileExtension>css</nonFilteredFileExtension>
<nonFilteredFileExtension>ico</nonFilteredFileExtension>
<nonFilteredFileExtension>psd</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<dependencies>
<!-- Needed when creating the community and enterprise rest api wars -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>${dependency.apache-compress.version}</version>
</dependency>
<dependency>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>${alfresco.maven-plugin.version}</version>
</dependency>
</dependencies>
<configuration>
<archiveClasses>false</archiveClasses>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.2</version>
<configuration>
<skip>${skipTests}</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<execution>
<id>compress-js</id>
<phase>process-resources</phase>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<excludes>
<exclude>**/webscripts/**</exclude>
<exclude>**/site-webscripts/**</exclude>
<exclude>**/*.lib.js</exclude>
<exclude>**/*.css</exclude>
</excludes>
<warSourceDirectory>src/main/resources/META-INF</warSourceDirectory>
<jswarn>false</jswarn>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</plugin>
</plugins>
</reporting>
<profiles>
<!-- Generate the Javadoc for Public API only (filtered on AlfrescoPublicApi annotation) -->
<profile>
<id>publicapi</id>
<properties>
<docflex.version>1.6.1</docflex.version>
</properties>
<!-- Downloads the docflex license -->
<dependencies>
<dependency>
<groupId>com.docflex</groupId>
<artifactId>docflex-alfresco-license</artifactId>
<version>1.0</version>
<type>license</type>
</dependency>
</dependencies>
<!-- Extracts Docflex locally -->
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<!-- Unzips the docflex/javadoc doclet -->
<execution>
<id>default-cli</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.docflex</groupId>
<artifactId>docflex-javadoc</artifactId>
<version>${docflex.version}</version>
<type>zip</type>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclet>com.docflex.javadoc.Doclet</doclet>
<docletPath>${project.build.directory}/docflex-javadoc-${docflex.version}/lib/docflex-javadoc.jar</docletPath>
<doclint>none</doclint>
<additionalOptions>
-license ${settings.localRepository}/com/docflex/docflex-alfresco-license/1.0/docflex-alfresco-license-1.0.license
-template ${project.build.directory}/docflex-javadoc-${docflex.version}/templates/JavadocPro/FramedDoc.tpl
-nodialog
-launchviewer=false
-p:filter.byAnns.include.classes=org.alfresco.api.AlfrescoPublicApi
-p:docTitle "${project.name} ${project.version} Public API"
-p:windowTitle "${project.name} ${project.version} Public API"
</additionalOptions>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!--
The following profile adds the /properties directories as resource directories in the project.
This means we can filter the property files in these directories.
The presence of this /properties directory also activates these profiles.
-->
<profile>
<id>enable-test-properties-filtering</id>
<activation>
<file>
<!-- No properties allowed here. Only hardcoded values are properly interpreted -->
<exists>src/test/properties</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${maven.buildhelper.version}</version>
<executions>
<execution>
<id>add-env-test-properties</id>
<phase>generate-resources</phase>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${app.properties.test.folder}</directory>
<includes>
<include>${app.properties.test.include}</include>
</includes>
<filtering>${app.filtering.enabled}</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@@ -1,42 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<packaging>pom</packaging>
<name>Alfresco Governance Services Automation Community</name>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>11.28-SNAPSHOT</version>
</parent>
<modules>
<module>rm-automation-community-rest-api</module>
</modules>
<properties>
<suiteXmlFile>testng.xml</suiteXmlFile>
<skip.automationtests>true</skip.automationtests>
</properties>
<licenses>
<license>
<name>LGPL 3</name>
</license>
</licenses>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<redirectTestOutputToFile>false</redirectTestOutputToFile>
<suiteXmlFiles>
<suiteXmlFile>${project.build.testOutputDirectory}/${suiteXmlFile}</suiteXmlFile>
</suiteXmlFiles>
<skipTests>${skip.automationtests}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,9 +0,0 @@
/target/
/.settings/
.classpath
.project
/src/test/resources/local.properties
/.idea/
*.iml
/test-output/
.factorypath

View File

@@ -1,3 +0,0 @@
FIXME: Add more info to the README file
In order to change the value of a property in "config.properties" create a file called "local.properties" under src/test/resources and redefine the property with the new value.

View File

@@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-governance-services-automation-community-rest-api</artifactId>
<name>Alfresco Governance Services Automation Community REST API</name>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>11.28-SNAPSHOT</version>
</parent>
<properties>
<dependency.jackson-databind.version>2.7.9.1</dependency.jackson-databind.version> <!-- this should not be overridden - fixes 2 tests -->
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<licenseName>alfresco_community</licenseName>
<licenseResolver>file:${project.parent.parent.basedir}/license</licenseResolver>
<descriptionTemplate>${project.parent.parent.basedir}/license/description.ftl</descriptionTemplate>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.26</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.alfresco.tas</groupId>
<artifactId>restapi</artifactId>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>org.alfresco.tas</groupId>
<artifactId>utility</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.alfresco.tas</groupId>
<artifactId>utility</artifactId>
<version>${dependency.tas-utility.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<!-- FIXME: Remove this dependency once RMUserAPI.java has been refactored -->
<dependency>
<groupId>org.jglue.fluent-json</groupId>
<artifactId>fluent-json</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.alfresco.test</groupId>
<artifactId>alfresco-testng</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>3.0.14</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -1,62 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import lombok.Getter;
/**
* Extends {@link RestProperties} to be able to change/add properties
*
* @author Tuna Aksoy
* @since 2.6
*/
@Getter
@Configuration
@PropertySource(value = {"classpath:default.properties", "classpath:config.properties"})
@PropertySource(value = "classpath:module.properties", ignoreResourceNotFound = true)
@PropertySource(value = "classpath:local.properties", ignoreResourceNotFound = true)
public class RMRestProperties extends RestProperties
{
@Value ("${alfresco.scheme}")
private String scheme;
@Value ("${alfresco.server}")
private String server;
@Value ("${alfresco.port}")
private String port;
@Value ("${rest.rmPath}")
private String restRmPath;
@Value ("${docker.host}")
private String dockerHost;
}

View File

@@ -1,180 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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;
import io.restassured.builder.RequestSpecBuilder;
import org.alfresco.rest.exception.EmptyJsonResponseException;
import org.alfresco.rest.model.RestErrorModel;
import org.alfresco.rest.model.RestHtmlResponse;
import org.alfresco.rest.model.RestSiteModel;
import org.alfresco.rest.model.RestSiteModelsCollection;
import org.alfresco.rest.requests.coreAPI.RestCoreAPI;
import org.alfresco.rest.requests.search.SearchAPI;
import org.alfresco.rest.rm.community.requests.gscore.GSCoreAPI;
import org.alfresco.utility.model.StatusModel;
import org.alfresco.utility.model.UserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import lombok.Getter;
/**
* Extends {@link RestWrapper} in order to call GS APIs with our own properties
*
* @author Tuna Aksoy
* @since 2.6
*/
@Service
@Scope(value = "prototype")
public class RMRestWrapper
{
/** The class that wraps the ReST APIs from core. */
@Autowired
private RestWrapper restWrapper;
@Autowired
@Getter
private RMRestProperties rmRestProperties;
public GSCoreAPI withGSCoreAPI()
{
return new GSCoreAPI(this, getRmRestProperties());
}
/** Get the core class that wraps the ReST APIs. */
public RestWrapper getRestWrapper()
{
return restWrapper;
}
/** Authenticate specific user to Alfresco REST API */
public void authenticateUser(UserModel userModel)
{
restWrapper.authenticateUser(userModel);
}
/** Get the last error thrown (if any). */
public RestErrorModel assertLastError()
{
return restWrapper.assertLastError();
}
/** Process responses for a collection of models as {@link RestSiteModelsCollection}. */
public <T> T processModels(Class<T> classz, RestRequest simpleRequest)
{
return restWrapper.processModels(classz, simpleRequest);
}
/** Process responses for a single model as {@link RestSiteModel}. */
public <T> T processModel(Class<T> classz, RestRequest restRequest)
{
return restWrapper.processModel(classz, restRequest);
}
/** Process a response that has no body - basically will need only the status code from it. */
public void processEmptyModel(RestRequest simpleRequest)
{
restWrapper.processEmptyModel(simpleRequest);
}
/** Get the most recently returned status object. */
public StatusModel getLastStatus()
{
return restWrapper.getLastStatus();
}
/** Get the most recently returned status code. */
public String getStatusCode()
{
return restWrapper.getStatusCode();
}
/** Set the status code. This should only be needed when calling APIs without using the TAS framework. */
public void setStatusCode(String statusCode)
{
restWrapper.setStatusCode(statusCode);
}
/** Assert that a specific status code is returned. */
public void assertStatusCodeIs(HttpStatus statusCode)
{
restWrapper.assertStatusCodeIs(statusCode);
}
/** @return A parameters string that you could pass on the request ?param=value */
public String getParameters()
{
return restWrapper.getParameters();
}
/** Create a {@link UserModel} for a new test user. */
public UserModel getTestUser()
{
return restWrapper.getTestUser();
}
/** Get the Alfresco Core API. */
public RestCoreAPI withCoreAPI()
{
return restWrapper.withCoreAPI();
}
/** Get the Alfresco Search API. */
public SearchAPI withSearchAPI()
{
return restWrapper.withSearchAPI();
}
/**
* You can handle the request sent to server by calling this method.
* If for example you want to sent multipart form data you can use: <pre>
* restClient.configureRequestSpec()
* .addMultiPart("filedata", Utility.getResourceTestDataFile("restapi-resource"))
* .addFormParam("renditions", "doclib")
* .addFormParam("autoRename", true);
*
* restClient.withCoreAPI().usingNode(ContentModel.my()).createNode();
* </pre> This will create the node using the multipart data defined.
*/
public RequestSpecBuilder configureRequestSpec()
{
return restWrapper.configureRequestSpec();
}
/**
* Process a response that returns a html
*
* @throws EmptyJsonResponseException If there is no response from the server.
*/
public RestHtmlResponse processHtmlResponse(RestRequest simpleRequest)
{
return restWrapper.processHtmlResponse(simpleRequest);
}
}

View File

@@ -1,246 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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;
import static lombok.AccessLevel.PROTECTED;
import javax.annotation.Resource;
import lombok.Getter;
import lombok.Setter;
import org.alfresco.rest.requests.Node;
import org.alfresco.rest.requests.coreAPI.RestCoreAPI;
import org.alfresco.rest.requests.search.SearchAPI;
import org.alfresco.rest.rm.community.requests.gscore.GSCoreAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.ActionsExecutionAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.FilePlanAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.FilesAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RMSiteAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RMUserAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordCategoryAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.TransferAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.TransferContainerAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledRecordFolderAPI;
import org.alfresco.utility.data.DataUserAIS;
import org.alfresco.utility.model.RepoTestModel;
import org.alfresco.utility.model.UserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
/**
* REST API Factory which provides access to the APIs
*
* @author Tuna Aksoy
* @since 2.6
*/
@Service
@Scope(value = "prototype")
public class RestAPIFactory
{
@Autowired
@Getter (value = PROTECTED)
private DataUserAIS dataUser;
@Resource(name = "RMRestWrapper")
@Getter
@Setter
private RMRestWrapper rmRestWrapper;
private GSCoreAPI getGSCoreAPI(UserModel userModel)
{
getRmRestWrapper().authenticateUser(userModel != null ? userModel : getDataUser().getAdminUser());
return getRmRestWrapper().withGSCoreAPI();
}
private RestCoreAPI getCoreAPI(UserModel userModel)
{
getRmRestWrapper().authenticateUser(userModel != null ? userModel : getDataUser().getAdminUser());
return getRmRestWrapper().withCoreAPI();
}
public SearchAPI getSearchAPI(UserModel userModel)
{
getRmRestWrapper().authenticateUser(userModel != null ? userModel : getDataUser().getAdminUser());
return getRmRestWrapper().withSearchAPI();
}
/**
* When no user is given the default is set to admin
*/
public SearchAPI getSearchAPI()
{
return getSearchAPI(null);
}
public Node getNodeAPI(RepoTestModel model) throws RuntimeException
{
try
{
return getCoreAPI(null).usingNode(model);
}
catch (Exception e)
{
throw new RuntimeException("Failed to load nodeAPI.", e);
}
}
public Node getNodeAPI(UserModel userModel, RepoTestModel model) throws RuntimeException
{
try
{
return getCoreAPI(userModel).usingNode(model);
}
catch (Exception e)
{
throw new RuntimeException("Failed to load nodeAPI.", e);
}
}
public RMSiteAPI getRMSiteAPI()
{
return getGSCoreAPI(null).usingRMSite();
}
public RMSiteAPI getRMSiteAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingRMSite();
}
public FilePlanAPI getFilePlansAPI()
{
return getGSCoreAPI(null).usingFilePlans();
}
public FilePlanAPI getFilePlansAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingFilePlans();
}
public RecordCategoryAPI getRecordCategoryAPI()
{
return getGSCoreAPI(null).usingRecordCategory();
}
public RecordCategoryAPI getRecordCategoryAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingRecordCategory();
}
public RecordFolderAPI getRecordFolderAPI()
{
return getGSCoreAPI(null).usingRecordFolder();
}
public RecordFolderAPI getRecordFolderAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingRecordFolder();
}
public RecordsAPI getRecordsAPI()
{
return getGSCoreAPI(null).usingRecords();
}
public RecordsAPI getRecordsAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingRecords();
}
public FilesAPI getFilesAPI()
{
return getGSCoreAPI(null).usingFiles();
}
public FilesAPI getFilesAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingFiles();
}
public TransferContainerAPI getTransferContainerAPI()
{
return getGSCoreAPI(null).usingTransferContainer();
}
public TransferContainerAPI getTransferContainerAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingTransferContainer();
}
public TransferAPI getTransferAPI()
{
return getGSCoreAPI(null).usingTransfer();
}
public TransferAPI getTransferAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingTransfer();
}
public RMUserAPI getRMUserAPI()
{
return getGSCoreAPI(null).usingRMUser();
}
public RMUserAPI getRMUserAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingRMUser();
}
public UnfiledContainerAPI getUnfiledContainersAPI()
{
return getGSCoreAPI(null).usingUnfiledContainers();
}
public UnfiledContainerAPI getUnfiledContainersAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingUnfiledContainers();
}
public UnfiledRecordFolderAPI getUnfiledRecordFoldersAPI()
{
return getGSCoreAPI(null).usingUnfiledRecordFolder();
}
public UnfiledRecordFolderAPI getUnfiledRecordFoldersAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingUnfiledRecordFolder();
}
public ActionsExecutionAPI getActionsAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingActionsExecutionsAPI();
}
public ActionsExecutionAPI getActionsAPI()
{
return getGSCoreAPI(null).usingActionsExecutionsAPI();
}
}

View File

@@ -1,94 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.search;
import java.util.List;
import org.alfresco.rest.search.Pagination;
import org.alfresco.rest.search.RestRequestQueryModel;
import org.alfresco.rest.search.SearchRequest;
/**
* Builder class for creating a search api request
*/
public class SearchRequestBuilder extends SearchRequest
{
/**
* Constructor for Search API Request
*/
public SearchRequestBuilder()
{
new SearchRequest();
}
/**
* Set the sql statement for the SearchRequest
*
* @param query sql statement
* @return search request
*/
public SearchRequestBuilder setQueryBuilder(RestRequestQueryModel query)
{
super.setQuery(query);
return this;
}
/**
* Set the paging statement for the SearchRequest
*
* @param paging pagination requested
* @return search request
*/
public SearchRequestBuilder setPagingBuilder(Pagination paging)
{
super.setPaging(paging);
return this;
}
/**
* Set the pagination properties
*/
public Pagination setPagination(Integer maxItems, Integer skipCount)
{
Pagination pagination = new Pagination();
pagination.setMaxItems(maxItems);
pagination.setSkipCount(skipCount);
return pagination;
}
/**
* Set the requested fields for the SearchRequest
*
* @param fields requested fields
* @return search request
*/
public SearchRequestBuilder setFieldsBuilder(List<String> fields)
{
super.setFields(fields);
return this;
}
}

View File

@@ -1,121 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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;
import javax.json.Json;
import javax.json.JsonReader;
import java.io.IOException;
import java.io.InputStream;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.ParseException;
import org.json.JSONException;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Helper methods for use with REST APIs.
*
* @author Tom Page
* @since 2.6
*/
public class APIUtils
{
/** Logger for this class. */
private static final Logger LOGGER = LoggerFactory.getLogger(APIUtils.class);
/** The ISO instant formatter that formats or parses an instant in UTC, such as '2011-12-03T10:15:305Z'
* similar with {@link DateTimeFormatter#ISO_INSTANT}, but with only 3 nanoseconds*/
public static final DateTimeFormatter ISO_INSTANT_FORMATTER =
new DateTimeFormatterBuilder().appendInstant(3).toFormatter();
/** Private constructor for helper class. */
private APIUtils()
{
}
/**
* Extract the body of a HTTP response as a JSON object.
*
* @param httpResponse The HTTP response.
* @return A JSON representation of the object.
*/
public static JSONObject convertHTTPResponseToJSON(HttpResponse httpResponse)
{
String source = null;
try
{
source = IOUtils.toString(httpResponse.getEntity().getContent(), "UTF-8");
}
catch (IOException e)
{
throw new IllegalArgumentException("Could not extract JSON from HTTP response.", e);
}
LOGGER.info("Response body:\n{}", source);
return new JSONObject(source);
}
/**
* Util method to extract the message string from the HTTP response
*
* @param httpResponse http response
* @return error message from the http response
*/
public static String extractErrorMessageFromHttpResponse(HttpResponse httpResponse)
{
final HttpEntity entity = httpResponse.getEntity();
JsonReader reader = null;
try
{
final InputStream responseStream = entity.getContent();
reader = Json.createReader(responseStream);
return reader.readObject().getString("message");
}
catch (JSONException error)
{
LOGGER.error("Converting message body to JSON failed. Body: {}", httpResponse, error);
}
catch (ParseException | IOException error)
{
LOGGER.error("Parsing message body failed.", error);
}
finally
{
if (reader != null)
{
reader.close();
}
}
return null;
}
}

View File

@@ -1,815 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNull;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.alfresco.dataprep.AlfrescoHttpClient;
import org.alfresco.dataprep.AlfrescoHttpClientFactory;
import org.alfresco.dataprep.ContentService;
import org.apache.chemistry.opencmis.client.api.CmisObject;
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.NameValuePair;
import org.apache.http.ParseException;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.entity.StringEntity;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* The base API class containing common methods for making v0 API requests
*
* @author Kristijan Conkas
* @since 2.5
*/
public abstract class BaseAPI
{
// logger
protected static final Logger LOGGER = LoggerFactory.getLogger(BaseAPI.class);
/** exception key in JSON response body */
private static final String EXCEPTION_KEY = "exception";
private static final String MESSAGE_KEY = "message";
public static final String NODE_PREFIX = "workspace/SpacesStore/";
protected static final String UPDATE_METADATA_API = "{0}node/{1}/formprocessor";
protected static final String ACTIONS_API = "{0}actionQueue";
protected static final String RM_ACTIONS_API = "{0}rma/actions/ExecutionQueue";
public static final String RM_SITE_ID = "rm";
protected static final String SHARE_ACTION_API = "{0}internal/shared/share/workspace/SpacesStore/{1}";
private static final String SLINGSHOT_PREFIX = "alfresco/s/slingshot/";
@Autowired
private AlfrescoHttpClientFactory alfrescoHttpClientFactory;
@Autowired
protected ContentService contentService;
public static final String NODE_REF_WORKSPACE_SPACES_STORE = "workspace://SpacesStore/";
private static final String FILE_PLAN_PATH = "/Sites/rm/documentLibrary";
/**
* Helper method to extract list of properties values from result.
*
* @param result the response
* @return list of specified property values in result
* @throws RuntimeException for malformed response
*/
protected List<String> getPropertyValues(JSONObject result, String propertyName)
{
ArrayList<String> results = new ArrayList<>();
try
{
JSONArray items = result.getJSONArray("items");
for (int i = 0; i < items.length(); i++)
{
results.add(items.getJSONObject(i).getString(propertyName));
}
}
catch (JSONException error)
{
throw new RuntimeException("Unable to parse result", error);
}
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.
*
* @param requestResult the request response
* @return a map containing information about multiple properties values that correspond to a unique one
* @throws RuntimeException for malformed response
*/
protected Map<String, List<String>> getPropertyValuesByUniquePropertyValue(JSONObject requestResult, String uniqueProperty, List<String> otherProperties)
{
Map<String, List<String>> valuesByUniqueProperty = new HashMap<>();
try
{
JSONArray items = requestResult.getJSONArray("items");
for (int i = 0; i < items.length(); i++)
{
List<String> otherPropertiesValues = new ArrayList<>();
for (int j = 0; j < otherProperties.size(); j++)
{
otherPropertiesValues.add(items.getJSONObject(i).get(otherProperties.get(j)).toString());
}
valuesByUniqueProperty.put(items.getJSONObject(i).getString(uniqueProperty), otherPropertiesValues);
}
}
catch (JSONException error)
{
throw new RuntimeException("Unable to parse result", error);
}
return valuesByUniqueProperty;
}
/**
* Retrieves the nodeRef of an item (category, folder or record) with the given path
*
* @param username the username
* @param password the password
* @param path the path to the container eg. in case of a category it would be the category name,
* in case of a folder it would be /categoryName/folderName
* when trying to get File Plan, the path would be ""
* @return the container nodeRef
*/
public String getItemNodeRef(String username, String password, String path)
{
return contentService.getNodeRefByPath(username, password, FILE_PLAN_PATH + path);
}
/**
* Retrieve a Cmis object by its path
*
* @param username the user's username
* @param password its password
* @param path the object path
* @return the object in case it exists, null if its does not exist
*/
protected CmisObject getObjectByPath(String username, String password, String path)
{
CmisObject object;
try
{
object = contentService.getCMISSession(username, password).getObjectByPath(path);
} catch (CmisObjectNotFoundException notFoundError)
{
return null;
}
return object;
}
/**
* Generic faceted request.
*
* @param username the username
* @param password the password
* @param parameters if the request has parameters
* @return result object (see API reference for more details), null for any errors
*/
protected JSONObject facetedRequest(String username, String password, List<NameValuePair> parameters, String requestURI)
{
String requestURL;
AlfrescoHttpClient client = alfrescoHttpClientFactory.getObject();
if (parameters == null || parameters.isEmpty())
{
requestURL = MessageFormat.format(
requestURI,
client.getAlfrescoUrl());
}
else
{
requestURL = MessageFormat.format(
requestURI,
client.getAlfrescoUrl(),
URLEncodedUtils.format(parameters, "UTF-8"));
}
LOGGER.info("On GET {}, received following response: ", requestURL);
client.close();
return doGetRequest(username, password, requestURL);
}
/**
* Helper method for GET requests
* @param adminUser user with administrative privileges
* @param adminPassword password for adminUser
* @param urlTemplate request URL template
* @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i>
*/
protected JSONObject doGetRequest(String adminUser,
String adminPassword,
String urlTemplate,
String ... urlTemplateParams)
{
AlfrescoHttpClient client = alfrescoHttpClientFactory.getObject();
String requestUrl = MessageFormat.format(
urlTemplate,
client.getApiUrl(),
urlTemplateParams);
client.close();
try
{
return doRequest(HttpGet.class, requestUrl, adminUser, adminPassword, null);
}
catch (InstantiationException | IllegalAccessException error)
{
throw new IllegalArgumentException("doGetRequest failed", error);
}
}
/**
* Helper method for Delete requests
* @param adminUser user with administrative privileges
* @param adminPassword password for adminUser
* @param urlTemplate request URL template
* @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i>
*/
protected JSONObject doDeleteRequest(String adminUser,
String adminPassword,
String urlTemplate,
String ... urlTemplateParams)
{
AlfrescoHttpClient client = alfrescoHttpClientFactory.getObject();
String requestUrl = MessageFormat.format(
urlTemplate,
client.getApiUrl(),
urlTemplateParams);
client.close();
try
{
return doRequest(HttpDelete.class, requestUrl, adminUser, adminPassword, null);
}
catch (InstantiationException | IllegalAccessException error)
{
throw new IllegalArgumentException("doDeleteRequest failed", error);
}
}
/**
* Helper method for PUT requests
* @param adminUser user with administrative privileges
* @param adminPassword password for adminUser
* @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 JSONObject doPutRequest(String adminUser,
String adminPassword,
JSONObject requestParams,
String urlTemplate,
String ... urlTemplateParams)
{
AlfrescoHttpClient client = alfrescoHttpClientFactory.getObject();
String requestUrl = MessageFormat.format(
urlTemplate,
client.getApiUrl(),
urlTemplateParams);
client.close();
try
{
return doRequest(HttpPut.class, requestUrl, adminUser, adminPassword, requestParams);
}
catch (InstantiationException | IllegalAccessException error)
{
throw new IllegalArgumentException("doPutRequest failed", error);
}
}
/**
* 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
* @param adminPassword password for adminUser
* @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 JSONObject doPostRequest(String adminUser,
String adminPassword,
JSONObject requestParams,
String urlTemplate,
String ... urlTemplateParams)
{
AlfrescoHttpClient client = alfrescoHttpClientFactory.getObject();
String requestUrl = MessageFormat.format(
urlTemplate,
client.getApiUrl(),
urlTemplateParams);
client.close();
try
{
return doRequest(HttpPost.class, requestUrl, adminUser, adminPassword, requestParams);
}
catch (InstantiationException | IllegalAccessException error)
{
throw new IllegalArgumentException("doPostRequest failed", error);
}
}
/**
* Helper method for POST 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 doPostJsonRequest(String adminUser,
String adminPassword,
int expectedStatusCode,
JSONObject requestParams,
String urlTemplate,
String... urlTemplateParams)
{
AlfrescoHttpClient client = alfrescoHttpClientFactory.getObject();
return doPostJsonRequest(adminUser, adminPassword, expectedStatusCode, client.getApiUrl(), requestParams, urlTemplate, urlTemplateParams);
}
/**
* Helper method for POST requests to slingshot.
*
* @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 doSlingshotPostJsonRequest(String adminUser,
String adminPassword,
int expectedStatusCode,
JSONObject requestParams,
String urlTemplate,
String... urlTemplateParams)
{
AlfrescoHttpClient client = alfrescoHttpClientFactory.getObject();
return doPostJsonRequest(adminUser, adminPassword, expectedStatusCode, client.getAlfrescoUrl() + SLINGSHOT_PREFIX, requestParams, urlTemplate, urlTemplateParams);
}
/**
* Helper method for POST 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 doPostJsonRequest(String adminUser,
String adminPassword,
int expectedStatusCode,
String urlStart,
JSONObject requestParams,
String urlTemplate,
String... 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.", expectedStatusCode, httpResponse.getStatusLine().getStatusCode());
return httpResponse;
}
catch (InstantiationException | IllegalAccessException error)
{
throw new IllegalArgumentException("doPostRequest failed", error);
}
}
/**
* Helper method for handling generic HTTP requests
* @param requestType request type (a subclass of {@link HttpRequestBase})
* @param requestUrl URL the request is to be sent to
* @param adminUser user with administrative privileges
* @param adminPassword password for adminUser
* @param requestParams endpoint specific request parameters
* @return response body
* @throws IllegalAccessException for invalid <i>requestType</i>
* @throws InstantiationException for invalid <i>requestType</i>
*/
private <T extends HttpRequestBase> JSONObject doRequest(
Class<T> requestType,
String requestUrl,
String adminUser,
String adminPassword,
JSONObject requestParams) throws InstantiationException, IllegalAccessException
{
AlfrescoHttpClient client = alfrescoHttpClientFactory.getObject();
T request = requestType.newInstance();
JSONObject responseBody = null;
JSONObject returnValues = null;
try
{
request.setURI(new URI(requestUrl));
if (requestParams != null && request instanceof HttpEntityEnclosingRequestBase)
{
((HttpEntityEnclosingRequestBase) request).setEntity(new StringEntity(requestParams.toString()));
}
LOGGER.info("Sending {} request to {}", requestType.getSimpleName(), requestUrl);
LOGGER.info("Request body: {}", requestParams);
HttpResponse response = client.execute(adminUser, adminPassword, request);
LOGGER.info("Response: {}", response.getStatusLine());
try
{
responseBody = new JSONObject(EntityUtils.toString(response.getEntity()));
}
catch (JSONException error)
{
LOGGER.error("Converting message body to JSON failed. Body: {}", responseBody, error);
}
catch (ParseException | IOException error)
{
LOGGER.error("Parsing message body failed.", error);
}
switch (response.getStatusLine().getStatusCode())
{
case HttpStatus.SC_OK:
case HttpStatus.SC_CREATED:
// request successful
if (responseBody != null)
{
returnValues = responseBody;
}
break;
case HttpStatus.SC_INTERNAL_SERVER_ERROR:
if (responseBody != null && responseBody.has(EXCEPTION_KEY))
{
LOGGER.error("Request failed with error message: {}", responseBody.getString(MESSAGE_KEY));
returnValues = responseBody;
}
break;
case HttpStatus.SC_BAD_REQUEST:
case HttpStatus.SC_UNPROCESSABLE_ENTITY:
if (responseBody != null && responseBody.has(EXCEPTION_KEY))
{
LOGGER.error("Request failed: {}", responseBody.getString(EXCEPTION_KEY));
returnValues = responseBody;
}
break;
default:
LOGGER.error("Request returned unexpected HTTP status {}", response.getStatusLine().getStatusCode());
break;
}
}
catch (JSONException error)
{
LOGGER.error("Unable to extract response parameter", error);
}
catch (UnsupportedEncodingException | URISyntaxException error1)
{
LOGGER.error("Unable to construct request", error1);
}
finally
{
if (request != null)
{
request.releaseConnection();
}
client.close();
}
return returnValues;
}
private <T extends HttpRequestBase> HttpResponse doRequestJson(
Class<T> requestType,
String requestUrl,
String adminUser,
String adminPassword,
JSONObject requestParams) throws InstantiationException, IllegalAccessException
{
AlfrescoHttpClient client = alfrescoHttpClientFactory.getObject();
T request = requestType.newInstance();
try
{
request.setURI(new URI(requestUrl));
request.setHeader("Content-Type", "application/json");
if (requestParams != null && request instanceof HttpEntityEnclosingRequestBase)
{
((HttpEntityEnclosingRequestBase) request).setEntity(new StringEntity(requestParams.toString()));
}
LOGGER.info("Sending {} request to {}", requestType.getSimpleName(), requestUrl);
LOGGER.info("Request body: {}", requestParams);
HttpResponse httpResponse = client.execute(adminUser, adminPassword, request);
LOGGER.info("Response: {}", httpResponse.getStatusLine());
return httpResponse;
}
catch (UnsupportedEncodingException | URISyntaxException error1)
{
LOGGER.error("Unable to construct request", error1);
}
finally
{
if (request != null)
{
request.releaseConnection();
}
client.close();
}
return null;
}
/**
* Used to set RM items properties
* including records, categories and folders
*/
public enum RMProperty
{
NAME,
TITLE,
CONTENT,
DESCRIPTION,
AUTHOR,
PHYSICAL_SIZE,
NUMBER_OF_COPIES,
STORAGE_LOCATION,
SHELF,
BOX,
FILE,
ORIGINATOR,
ORIGINATING_ORGANIZATION,
PUBLICATION_DATE
}
public enum RETENTION_SCHEDULE
{
NAME,
DESCRIPTION,
RETENTION_AUTHORITY,
RETENTION_INSTRUCTIONS,
RETENTION_PERIOD,
RETENTION_LOCATION,
RETENTION_PERIOD_PROPERTY,
RETENTION_GHOST,
RETENTION_ELIGIBLE_FIRST_EVENT,
RETENTION_EVENTS,
COMBINE_DISPOSITION_STEP_CONDITIONS
}
/**
* Used to execute rm actions on a node
*/
public enum RM_ACTIONS
{
EDIT_DISPOSITION_DATE("editDispositionActionAsOfDate"),
END_RETENTION("retain"),
CUT_OFF("cutoff"),
UNDO_CUT_OFF("undoCutoff"),
TRANSFER("transfer"),
COMPLETE_EVENT("completeEvent"),
UNDO_EVENT("undoEvent"),
DESTROY("destroy");
String action;
private RM_ACTIONS(String action)
{
this.action = action;
}
public String getAction()
{
return action;
}
}
public enum PermissionType
{
SET_READ,
REMOVE_READ,
SET_READ_AND_FILE,
REMOVE_READ_AND_FILE,
}
/**
* Util to return the property value from a map
*
* @param properties the map containing properties
* @param property to get value for
* @return the property value
*/
public <K extends Enum<?>> String getPropertyValue(Map<K, String> properties, Enum<?> property)
{
String value = properties.get(property);
if (value == null)
{
return "";
}
return value;
}
/**
* Retrieves the property value and decides if that gets to be added to the request
*
* @param requestParams the request parameters
* @param propertyRequestValue the property name in the request, eg. "prop_cm_name"
* @param itemProperties map of item's properties values
* @param property the property in the property map to check value for
* @return the json object used in request with the property with its value added if that is not null or empty
*/
protected <K extends Enum<?>> JSONObject addPropertyToRequest(JSONObject requestParams, String propertyRequestValue, Map<K, String> itemProperties, Enum<?> property) throws JSONException
{
String propertyValue = getPropertyValue(itemProperties, property);
if (!propertyValue.equals(""))
{
requestParams.put(propertyRequestValue, propertyValue);
}
return requestParams;
}
/**
* Deletes the category, folder or record given as parameter
*
* @param username the username with whom the delete is performed
* @param password the user's password
* @param itemPath the path to the item eg. in case of a category it would be the "/" + category name,
* in case of a folder or subCategory it would be /categoryName/folderName or /categoryName/subCategoryName/
* in case of a record /categoryName/folderName/recordName
* @throws AssertionError if the delete was not successful.
*/
protected void deleteItem(String username, String password, String itemPath)
{
CmisObject container = getObjectByPath(username, password, FILE_PLAN_PATH + itemPath);
if (container != null)
{
container.delete();
}
assertNull("Could not delete " + itemPath, getObjectByPath(username, password, itemPath));
}
/**
* Retrieve the node ref spaces store value
*
* @return node ref spaces store
*/
public static String getNodeRefSpacesStore()
{
return NODE_REF_WORKSPACE_SPACES_STORE;
}
/**
* Retrieve the File Plan path
*
* @return the File Plan path
*/
public static String getFilePlanPath()
{
return FILE_PLAN_PATH;
}
}

View File

@@ -1,49 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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;
}
}

View File

@@ -1,89 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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;
}

View File

@@ -1,62 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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"),
LOGIN_SUCCESSFUL("Login.Success", "Login Successful"),
CREATE_HOLD("Create Hold", "Create Hold"),
DELETE_HOLD("Delete Hold", "Delete Hold"),
ADD_TO_HOLD("Add To Hold", "Add To Hold"),
REMOVE_FROM_HOLD("Remove From Hold", "Remove From Hold");
/** 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;
}
}

View File

@@ -1,61 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.common;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* POJO for id/name pair
*
* @author Kristijan Conkas
* @since 2.6
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class IdNamePair
{
@JsonProperty (required = true)
private String id;
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private List<String> aspectNames;
@JsonProperty (required = true)
private String nodeType;
}

View File

@@ -1,51 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.common;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.alfresco.utility.model.TestModel;
/**
* POJO for owner parameter
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
//@NoArgsConstructor
//@AllArgsConstructor
@JsonIgnoreProperties (ignoreUnknown = true)
public class Owner extends TestModel
{
}

View File

@@ -1,62 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.common;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for path parameter
*
* @author Kristijan Conkas
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class Path extends TestModel
{
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private Boolean isComplete;
@JsonProperty (required = true)
private List<IdNamePair> elements;
}

View File

@@ -1,53 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.common;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* POJO for the review period parameter
*
* @author Rodica Sutu
* @since 2.6
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ReviewPeriod
{
@JsonProperty (required = true)
private String periodType;
@JsonProperty (required = true)
private String expression;
}

View File

@@ -1,63 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.custom;
/**
* List of existing records management custom references.
*
* @author Rodica Sutu
* @since 2.6
*/
public enum CustomDefinitions
{
ATTACHMENT("Attachment"),
MESSAGE("Message"),
NEXT_VERSION("Next Version"),
RENDITION("Rendition");
/**
* The name of custom reference.
*/
private String definition;
/**
* Private constructor.
*/
CustomDefinitions(String definition)
{
this.definition = definition;
}
/**
* Get the name of the custom reference.
*
* @return The value of custom reference.
*/
public String getDefinition()
{
return definition;
}
}

View File

@@ -1,99 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.fileplan;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.model.RestByUserModel;
import org.alfresco.rest.rm.community.model.common.Path;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for file plan
*
* @author Ramona Popa
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class FilePlan extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true)
private RestByUserModel createdByUser;
@JsonProperty (required = true)
private String modifiedAt;
@JsonProperty (required = true)
private String nodeType;
@JsonProperty (required = true)
private String parentId;
@JsonProperty (required = true)
private List<String> aspectNames;
@JsonProperty (required = true)
private String createdAt;
@JsonProperty (required = true)
private RestByUserModel modifiedByUser;
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String id;
@JsonProperty (required = true)
private FilePlanProperties properties;
/************************/
/** Optional parameters */
/************************/
@JsonProperty
private List<String> allowableOperations;
@JsonProperty
private Path path;
}

View File

@@ -1,82 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.fileplan;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_COMPONENT_ID;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_COUNT;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_DESCRIPTION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for file plan properties
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class FilePlanProperties extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true, value = PROPERTIES_IDENTIFIER)
private String identifier;
@JsonProperty (required = true, value = PROPERTIES_COMPONENT_ID)
private String componentd;
@JsonProperty (required = true, value = PROPERTIES_ROOT_NODE_REF)
private String rootNodeRef;
/************************/
/** Optional parameters */
/************************/
@JsonProperty (PROPERTIES_COUNT)
private Integer count;
@JsonProperty (PROPERTIES_TITLE)
private String title;
@JsonProperty (PROPERTIES_DESCRIPTION)
private String description;
}

View File

@@ -1,40 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.fileplancomponents;
/**
* File plan component alias
*
* @author Tuna Aksoy
* @since 2.6
*/
public class FilePlanComponentAlias
{
public static final String FILE_PLAN_ALIAS = "-filePlan-";
public static final String TRANSFERS_ALIAS = "-transfers-";
public static final String UNFILED_RECORDS_CONTAINER_ALIAS = "-unfiled-";
}

View File

@@ -1,68 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.fileplancomponents;
/**
* File plan component aspect names constants
*
* @author Kristijan Conkas
* @since 2.6
*/
public class FilePlanComponentAspects
{
/** Private constructor to prevent instantiation. */
private FilePlanComponentAspects()
{
}
// aspect present on completed records
public static final String ASPECTS_COMPLETED_RECORD = "rma:declaredRecord";
// aspect present on record folders/categories with vital records
public static final String ASPECTS_VITAL_RECORD_DEFINITION= "rma:vitalRecordDefinition";
// aspect present on vital records
public static final String ASPECTS_VITAL_RECORD = "rma:vitalRecord";
// Frozen aspect
public static final String FROZEN_ASPECT = "rma:frozen";
// recordSearch aspect
public static final String RECORD_SEARCH_ASPECT = "rma:recordSearch";
// retention schedule cut off aspect
public static final String CUT_OFF_ASPECT = "rma:cutOff";
// declare version as record aspect
public static final String VERSION_AS_RECORD = "rmv:versionRecord";
// WORM store selector aspect
public static final String ASPECT_STORE_SELECTOR = "cm:storeSelector";
// WORM Lock aspect
public static final String ASPECT_WORM_LOCK = "rme:wormLock";
}

View File

@@ -1,139 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.fileplancomponents;
/**
* File plan component field names constants
*
* @author Tuna Aksoy
* @since 2.6
*/
public class FilePlanComponentFields
{
/** Common properties for file plans, record categories, record folders and records */
public static final String PROPERTIES_ROOT_NODE_REF = "rma:rootNodeRef";
public static final String PROPERTIES_IDENTIFIER = "rma:identifier";
/** Common properties for record categories, record folders and records */
// Non-electronic record properties
public static final String PROPERTIES_TITLE = "cm:title";
public static final String PROPERTIES_DESCRIPTION = "cm:description";
/** Common properties for record categories and record folders **/
public static final String PROPERTIES_VITAL_RECORD_INDICATOR = "rma:vitalRecordIndicator";
public static final String PROPERTIES_REVIEW_PERIOD = "rma:reviewPeriod";
public static final String PROPERTIES_OWNER = "cm:owner";
public static final String PROPERTIES_AUTHOR="cm:author";
/** Common properties for record folders and records */
public static final String PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE = "rma:recordSearchHasDispositionSchedule";
public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD_EXPRESSION = "rma:recordSearchDispositionPeriodExpression";
public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY = "rma:recordSearchDispositionAuthority";
public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_AS_OF = "rma:recordSearchDispositionActionAsOf";
public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD = "rma:recordSearchDispositionPeriod";
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_RECORD_SEARCH_DISPOSITION_EVENTS = "rma:recordSearchDispositionEvents";
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 */
public static final String PROPERTIES_COMPONENT_ID = "st:componentId";
public static final String PROPERTIES_COUNT = "rma:count";
/** Record category properties */
// All fields are shared with record folders
/** Record folder properties */
public static final String PROPERTIES_IS_CLOSED = "rma:isClosed"; // not to be confused with IS_CLOSED!
public static final String PROPERTIES_HELD_CHILDREN_COUNT = "rma:heldChildrenCount";
public static final String PROPERTIES_LOCATION = "rma:location";
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
*/
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";
public static final String PROPERTIES_REVIEW_AS_OF = "rma:reviewAsOf";
/** Electronic record properties */
public static final String PROPERTIES_VERSION_TYPE = "cm:versionType";
public static final String PROPERTIES_VERSION_LABEL = "cm:versionLabel";
public static final String PROPERTIES_VERSIONED_NODEREF = "rmv:versionedNodeRef";
public static final String PROPERTIES_RMV_VERSIONED = "rmv:versionLabel";
public static final String PROPERTIES_DATE_TIME_ORIGINAL = "exif:dateTimeOriginal";
public static final String PROPERTIES_EXPOSURE_TIME = "exif:exposureTime";
public static final String PROPERTIES_FLASH = "exif:flash";
public static final String PROPERTIES_F_NUMBER = "exif:fNumber";
public static final String PROPERTIES_FOCAL_LENGTH = "exif:focalLength";
public static final String PROPERTIES_ISO_SPEED_RATINGS = "exif:isoSpeedRatings";
public static final String PROPERTIES_MANUFACTURER = "exif:manufacturer";
public static final String PROPERTIES_MODEL = "exif:model";
public static final String PROPERTIES_ORIENTATION = "exif:orientation";
public static final String PROPERTIES_PIXEL_X_DIMENSION = "exif:pixelXDimension";
public static final String PROPERTIES_PIXEL_Y_DIMENSION = "exif:pixelYDimension";
public static final String PROPERTIES_RESOLUTION_UNIT = "exif:resolutionUnit";
public static final String PROPERTIES_SOFTWARE = "exif:software";
public static final String PROPERTIES_X_RESOLUTION = "exif:xResolution";
public static final String PROPERTIES_Y_RESOLUTION = "exif:yResolution";
public static final String PROPERTIES_RECORD_ORIGINATING_LOCATION = "rma:recordOriginatingLocation";
public static final String PROPERTIES_RECORD_ORIGINATING_USER_ID = "rma:recordOriginatingUserId";
public static final String PROPERTIES_RECORD_ORIGINATING_CREATION_DATE = "rma:recordOriginatingCreationDate";
/** Non-electronic record properties */
public static final String PROPERTIES_SHELF = "rma:shelf";
public static final String PROPERTIES_STORAGE_LOCATION = "rma:storageLocation";
public static final String PROPERTIES_FILE = "rma:file";
public static final String PROPERTIES_BOX = "rma:box";
public static final String PROPERTIES_NUMBER_OF_COPIES = "rma:numberOfCopies";
public static final String PROPERTIES_PHYSICAL_SIZE = "rma:physicalSize";
/** Transfer properties */
public static final String PROPERTIES_PDF_INDICATOR = "rma:transferPDFIndicator";
public static final String PROPERTIES_TRANSFER_LOCATION = "rma:transferLocation";
public static final String PROPERTIES_ACCESSION_INDICATOR = "rma:transferAccessionIndicator";
/** Parameters */
public static final String RELATIVE_PATH = "relativePath";
public static final String INCLUDE = "include";
/** Include options */
public static final String ALLOWABLE_OPERATIONS = "allowableOperations";
public static final String IS_CLOSED = "isClosed";
public static final String IS_COMPLETED = "isCompleted";
public static final String CONTENT = "content";
public static final String PATH = "path";
/** CONTENT STORE property */
public static final String PROPERTIES_STORE = "cm:storeName";
/** WORM Unlock Date */
public static final String PROPERTIES_WORM_UNLOCK_DATE = "rme:wormUnlockDate";
}

View File

@@ -1,48 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.fileplancomponents;
/**
* File plan component type
*
* @author Tuna Aksoy
* @since 2.6
*/
public class FilePlanComponentType
{
public static final String FILE_PLAN_TYPE = "rma:filePlan";
public static final String RECORD_CATEGORY_TYPE = "rma:recordCategory";
public static final String RECORD_FOLDER_TYPE = "rma:recordFolder";
public static final String RECORD_TYPE = "rma:record"; // generic record type
public static final String UNFILED_RECORD_FOLDER_TYPE = "rma:unfiledRecordFolder";
public static final String TRANSFER_TYPE = "rma:transfer";
public static final String TRANSFER_CONTAINER_TYPE = "rma:transferContainer";
public static final String UNFILED_CONTAINER_TYPE = "rma:unfiledRecordContainer";
public static final String FOLDER_TYPE = "cm:folder";
public static final String CONTENT_TYPE = "cm:content";
public static final String NON_ELECTRONIC_RECORD_TYPE = "rma:nonElectronicDocument";
}

View File

@@ -1,56 +0,0 @@
/*-
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.hold;
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 hold entry
*
* @author Rodica Sutu
* @since 3.2
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties (ignoreUnknown = true)
public class HoldEntry extends TestModel
{
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String nodeRef;
}

View File

@@ -1,129 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.record;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.rest.core.assertion.ModelAssertion;
import org.alfresco.rest.model.RestByUserModel;
import org.alfresco.rest.model.RestNodeModel;
import org.alfresco.rest.rm.community.model.common.Path;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for record
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class Record extends TestModel implements IRestModel<RestNodeModel>
{
public final static String CONTENT_NODE_TYPE = "cm:content";
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true)
private String createdAt;
@JsonProperty (required = true)
private RestByUserModel createdByUser;
@JsonProperty (required = true)
private String modifiedAt;
@JsonProperty (required = true)
private RestByUserModel modifiedByUser;
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String id;
@JsonProperty (required = true)
private String nodeType;
@JsonProperty (required = true)
private String parentId;
/************************/
/** Optional parameters */
/************************/
@JsonProperty
private RecordContent content;
@JsonProperty
private Boolean isCompleted;
@JsonProperty
private RecordProperties properties;
@JsonProperty
private List<String> aspectNames;
@JsonProperty
private List<String> allowableOperations;
@JsonProperty
private Path path;
@Override
public ModelAssertion<RestNodeModel> assertThat()
{
return new ModelAssertion<>(this);
}
@Override
public ModelAssertion<RestNodeModel> and()
{
return assertThat();
}
@JsonProperty (value = "entry")
RestNodeModel model;
@Override
public RestNodeModel onModel()
{
return model;
}
}

View File

@@ -1,54 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.record;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for File records
*
* @author Rodica Sutu
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class RecordBodyFile extends TestModel
{
@JsonProperty
private String targetParentId;
}

View File

@@ -1,64 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.record;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for record content field
*
* @author Kristijan Conkas
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class RecordContent extends TestModel
{
@JsonProperty (required = true)
private String mimeType;
@JsonProperty (required = true)
private String mimeTypeName;
@JsonProperty (required = true)
private Integer sizeInBytes;
@JsonProperty (required = true)
private String encoding;
}

View File

@@ -1,268 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.record;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_AUTHOR;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_BOX;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_CLASSIFICATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_DATE_FILED;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_DATE_TIME_ORIGINAL;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_DESCRIPTION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_EXPOSURE_TIME;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_FILE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_FLASH;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_FOCAL_LENGTH;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_F_NUMBER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ISO_SPEED_RATINGS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_MANUFACTURER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_MODEL;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_NUMBER_OF_COPIES;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ORIENTATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ORIGINAL_NAME;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_PHYSICAL_SIZE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_PIXEL_X_DIMENSION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_PIXEL_Y_DIMENSION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_ORIGINATING_CREATION_DATE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_ORIGINATING_LOCATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_ORIGINATING_USER_ID;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_AS_OF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_NAME;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS_ELIGIBLE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD_EXPRESSION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RESOLUTION_UNIT;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_REVIEW_AS_OF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RMV_VERSIONED;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_SHELF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_SOFTWARE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_STORAGE_LOCATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_STORE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VERSIONED_NODEREF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VERSION_LABEL;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VERSION_TYPE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_WORM_UNLOCK_DATE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_X_RESOLUTION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_Y_RESOLUTION;
import java.util.Date;
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.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.alfresco.rest.rm.community.model.common.Owner;
import org.alfresco.utility.model.TestModel;
/**
* POJO for record properties
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class RecordProperties extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true, value = PROPERTIES_ROOT_NODE_REF)
private String rootNodeRef;
@JsonProperty (required = true, value = PROPERTIES_DATE_FILED)
private String dateField;
@JsonProperty (required = true, value = PROPERTIES_IDENTIFIER)
private String identifier;
@JsonProperty (required = true, value = PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE)
private Boolean recordSearchHasDispositionSchedule;
@JsonProperty (required = true, value = PROPERTIES_ORIGINAL_NAME)
private String originalName;
@JsonProperty (PROPERTIES_CLASSIFICATION)
private List<String> classification;
/*********************************/
/** Electronic record parameters */
/*********************************/
@JsonProperty (PROPERTIES_VERSION_TYPE)
private String versionType;
@JsonProperty (PROPERTIES_VERSION_LABEL)
private String versionLabel;
@JsonProperty(PROPERTIES_VERSIONED_NODEREF)
private String versionedNodeRef;
@JsonProperty (PROPERTIES_RMV_VERSIONED)
private String recordVersionLabel;
@JsonProperty (PROPERTIES_DATE_TIME_ORIGINAL)
private String dateTimeOriginal;
@JsonProperty (PROPERTIES_EXPOSURE_TIME)
private Double exposureTime;
@JsonProperty (PROPERTIES_FLASH)
private Boolean flash;
@JsonProperty (PROPERTIES_F_NUMBER)
private Double fNumber;
@JsonProperty (PROPERTIES_FOCAL_LENGTH)
private Double focalLength;
@JsonProperty (PROPERTIES_ISO_SPEED_RATINGS)
private Integer isoSpeedRatings;
@JsonProperty (PROPERTIES_MANUFACTURER)
private String manufacturer;
@JsonProperty (PROPERTIES_MODEL)
private String model;
@JsonProperty (PROPERTIES_ORIENTATION)
private Integer orientation;
@JsonProperty (PROPERTIES_PIXEL_X_DIMENSION)
private Integer pixelXDimension;
@JsonProperty (PROPERTIES_PIXEL_Y_DIMENSION)
private Integer pixelYDimension;
@JsonProperty (PROPERTIES_RESOLUTION_UNIT)
private String resolutionUnit;
@JsonProperty (PROPERTIES_SOFTWARE)
private String software;
@JsonProperty (PROPERTIES_X_RESOLUTION)
private Double xResolution;
@JsonProperty (PROPERTIES_Y_RESOLUTION)
private Double yResolution;
@JsonProperty (PROPERTIES_RECORD_ORIGINATING_LOCATION)
private String originatingLocation;
@JsonProperty (PROPERTIES_RECORD_ORIGINATING_USER_ID)
private String originatingUserId;
@JsonProperty (PROPERTIES_RECORD_ORIGINATING_CREATION_DATE)
private String originatingCreationDate;
/*************************************/
/** Non-electronic record parameters */
/*************************************/
@JsonProperty (PROPERTIES_TITLE)
private String title;
@JsonProperty (PROPERTIES_SHELF)
private String shelf;
@JsonProperty (PROPERTIES_STORAGE_LOCATION)
private String storageLocation;
@JsonProperty (PROPERTIES_FILE)
private String file;
@JsonProperty (PROPERTIES_BOX)
private String box;
@JsonProperty (PROPERTIES_DESCRIPTION)
private String description;
@JsonProperty (PROPERTIES_NUMBER_OF_COPIES)
private Integer numberOfCopies;
@JsonProperty (PROPERTIES_PHYSICAL_SIZE)
private Integer physicalSize;
@JsonProperty (PROPERTIES_OWNER)
private Owner owner;
@JsonProperty(PROPERTIES_AUTHOR)
private String author;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD_EXPRESSION)
private String recordSearchDispositionPeriodExpression;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY)
private String recordSearchDispositionAuthority;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_AS_OF)
private Date recordSearchDispositionActionAsOf;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD)
private String recordSearchDispositionPeriod;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_NAME)
private String recordSearchDispositionActionName;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS_ELIGIBLE)
private Boolean recordSearchDispositionEventsEligible;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS)
private String recordSearchDispositionInstructions;
@JsonProperty (PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD)
private String recordSearchVitalRecordReviewPeriod;
@JsonProperty (PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION)
private String recordSearchVitalRecordReviewPeriodExpression;
@JsonProperty(PROPERTIES_REVIEW_AS_OF)
private Date reviewAsOf;
@JsonProperty (PROPERTIES_STORE)
private String store;
@JsonProperty(PROPERTIES_WORM_UNLOCK_DATE)
private Date wormUnlockDate;
}

View File

@@ -1,103 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.recordcategory;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.model.RestByUserModel;
import org.alfresco.rest.rm.community.model.common.Path;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for record category
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class RecordCategory extends TestModel
{
public static final String DEFAULT_FILE_PLAN_ALIAS = "-filePlan-";
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true)
private RestByUserModel createdByUser;
@JsonProperty (required = true)
private String modifiedAt;
@JsonProperty (required = true)
private String nodeType;
@JsonProperty (required = true)
private String parentId;
@JsonProperty (required = true)
private List<String> aspectNames;
@JsonProperty (required = true)
private String createdAt;
@JsonProperty (required = true)
private RestByUserModel modifiedByUser;
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String id;
@JsonProperty (required = true)
private RecordCategoryProperties properties;
/************************/
/** Optional parameters */
/************************/
@JsonProperty
private Boolean hasRetentionSchedule;
@JsonProperty
private List<String> allowableOperations;
@JsonProperty
private Path path;
}

View File

@@ -1,114 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.recordcategory;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.model.RestByUserModel;
import org.alfresco.rest.rm.community.model.common.Path;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for record category child
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class RecordCategoryChild extends TestModel
{
public static final String RECORD_FOLDER_NODE_TYPE = "rma:recordFolder";
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true)
private String createdAt;
@JsonProperty (required = true)
private RestByUserModel createdByUser;
@JsonProperty (required = true)
private String modifiedAt;
@JsonProperty (required = true)
private RestByUserModel modifiedByUser;
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String id;
@JsonProperty (required = true)
private String nodeType;
@JsonProperty (required = true)
private String parentId;
/************************/
/** Optional parameters */
/************************/
@JsonProperty
private Boolean isRecordCategory;
@JsonProperty
private Boolean isRecordFolder;
@JsonProperty
private RecordCategoryChildProperties properties;
@JsonProperty
private List<String> aspectNames;
@JsonProperty
private Boolean hasRetentionSchedule;
@JsonProperty
private Boolean isClosed;
@JsonProperty
private List<String> allowableOperations;
@JsonProperty
private Path path;
@JsonProperty
private String relativePath;
}

View File

@@ -1,41 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.recordcategory;
import org.alfresco.rest.core.RestModels;
/**
* Handle collection of {@link RecordCategoryChildEntry}
*
* @author Kristijan Conkas
* @author Tuna Aksoy
* @since 2.6
*/
public class RecordCategoryChildCollection extends RestModels<RecordCategoryChildEntry, RecordCategoryChildCollection>
{
}

View File

@@ -1,48 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.recordcategory;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.RestModels;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* POJO for record category child entry
*
* @author Tuna Aksoy
* @since 2.6
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class RecordCategoryChildEntry extends RestModels<RecordCategory, RecordCategoryChildEntry>
{
@JsonProperty
private RecordCategoryChild entry;
}

View File

@@ -1,142 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.recordcategory;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_DESCRIPTION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_HELD_CHILDREN_COUNT;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IS_CLOSED;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_LOCATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD_EXPRESSION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_AS_OF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_NAME;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS_ELIGIBLE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_REVIEW_PERIOD;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VITAL_RECORD_INDICATOR;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.alfresco.rest.rm.community.model.common.Owner;
import org.alfresco.rest.rm.community.model.common.ReviewPeriod;
import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for record category child properties
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class RecordCategoryChildProperties extends TestModel
{
/**************************************************************************/
/** Mandatory parameters - Shared by record categories and record folders */
/**************************************************************************/
@JsonProperty (required = true, value = PROPERTIES_TITLE)
private String title;
@JsonProperty (required = true, value = PROPERTIES_VITAL_RECORD_INDICATOR)
private Boolean vitalRecordIndicator;
@JsonProperty (required = true, value = PROPERTIES_ROOT_NODE_REF)
private String rootNodeRef;
@JsonProperty (required = true, value = PROPERTIES_IDENTIFIER)
private String identifier;
@JsonProperty (required = true, value = PROPERTIES_REVIEW_PERIOD)
@JsonSerialize (using = ReviewPeriodSerializer.class)
private ReviewPeriod reviewPeriod;
@JsonProperty (required = true, value = PROPERTIES_DESCRIPTION)
private String description;
/*********************************************************/
/** Optional parameters - Applies only to record folders */
/*********************************************************/
@JsonProperty (PROPERTIES_HELD_CHILDREN_COUNT)
private Integer heldChildrenCount;
@JsonProperty (PROPERTIES_LOCATION)
private String location;
@JsonProperty (PROPERTIES_IS_CLOSED)
private Boolean isClosed;
@JsonProperty (PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE)
private Boolean recordSearchHasDispositionSchedule;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD_EXPRESSION)
private String recordSearchDispositionPeriodExpression;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY)
private String recordSearchDispositionAuthority;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_AS_OF)
private Date recordSearchDispositionActionAsOf;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD)
private String recordSearchDispositionPeriod;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_NAME)
private String recordSearchDispositionActionName;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS_ELIGIBLE)
private Boolean recordSearchDispositionEventsEligible;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS)
private String recordSearchDispositionInstructions;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS)
private Boolean recordSearchDispositionEvents;
@JsonProperty (PROPERTIES_OWNER)
private Owner owner;
}

View File

@@ -1,41 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.recordcategory;
import org.alfresco.rest.core.RestModels;
/**
* Handle collection of {@link RecordCategoryEntry}
*
* @author Ramona Popa
* @author Tuna Aksoy
* @since 2.6
*/
public class RecordCategoryCollection extends RestModels<RecordCategoryEntry, RecordCategoryCollection>
{
}

View File

@@ -1,50 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.recordcategory;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.RestModels;
import org.alfresco.rest.rm.community.model.fileplan.FilePlan;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* POJO for file plan entry
*
* @author Ramona Popa
* @author Tuna Aksoy
* @since 2.6
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class RecordCategoryEntry extends RestModels<FilePlan, RecordCategoryEntry>
{
@JsonProperty
private RecordCategory entry;
}

View File

@@ -1,100 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.recordcategory;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_CLASSIFICATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_DESCRIPTION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_REVIEW_PERIOD;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VITAL_RECORD_INDICATOR;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.alfresco.rest.rm.community.model.common.Owner;
import org.alfresco.rest.rm.community.model.common.ReviewPeriod;
import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for record category properties
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties (ignoreUnknown = true)
public class RecordCategoryProperties extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true, value = PROPERTIES_IDENTIFIER)
private String identifier;
@JsonProperty (required = true, value = PROPERTIES_REVIEW_PERIOD)
@JsonSerialize (using = ReviewPeriodSerializer.class)
private ReviewPeriod reviewPeriod;
@JsonProperty (required = true, value = PROPERTIES_VITAL_RECORD_INDICATOR)
private Boolean vitalRecordIndicator;
/************************/
/** Optional parameters */
/************************/
@JsonProperty (PROPERTIES_TITLE)
private String title;
@JsonProperty (PROPERTIES_ROOT_NODE_REF)
private String rootNodeRef;
@JsonProperty (PROPERTIES_DESCRIPTION)
private String description;
@JsonProperty (PROPERTIES_OWNER)
private Owner owner;
@JsonProperty (PROPERTIES_CLASSIFICATION)
private List<String> classification;
}

View File

@@ -1,100 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.recordfolder;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.model.RestByUserModel;
import org.alfresco.rest.rm.community.model.common.Path;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for record folder
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class RecordFolder extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true)
private RestByUserModel createdByUser;
@JsonProperty (required = true)
private String modifiedAt;
@JsonProperty (required = true)
private String nodeType;
@JsonProperty (required = true)
private String parentId;
@JsonProperty (required = true)
private List<String> aspectNames;
@JsonProperty (required = true)
private String createdAt;
@JsonProperty (required = true)
private RestByUserModel modifiedByUser;
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String id;
@JsonProperty (required = true)
private RecordFolderProperties properties;
/************************/
/** Optional parameters */
/************************/
@JsonProperty
private Boolean isClosed;
@JsonProperty
private List<String> allowableOperations;
@JsonProperty
private Path path;
}

View File

@@ -1,41 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.recordfolder;
import org.alfresco.rest.core.RestModels;
/**
* Handle collection of {@link RecordFolderEntry}
*
* @author Kristijan Conkas
* @author Tuna Aksoy
* @since 2.6
*/
public class RecordFolderCollection extends RestModels<RecordFolderEntry, RecordFolderCollection>
{
}

View File

@@ -1,55 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.recordfolder;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.RestModels;
import org.alfresco.rest.rm.community.model.record.Record;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for record folder entry
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class RecordFolderEntry extends RestModels<RecordFolder, RecordFolderEntry>
{
@JsonProperty
private Record entry;
}

View File

@@ -1,134 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.recordfolder;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_CLASSIFICATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_DESCRIPTION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_HELD_CHILDREN_COUNT;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IS_CLOSED;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_LOCATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields
.PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields
.PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_REVIEW_PERIOD;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VITAL_RECORD_INDICATOR;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.alfresco.rest.rm.community.model.common.Owner;
import org.alfresco.rest.rm.community.model.common.ReviewPeriod;
import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for record folder properties
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties (ignoreUnknown = true)
public class RecordFolderProperties extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true, value = PROPERTIES_IS_CLOSED)
private Boolean isClosed;
@JsonProperty (required = true, value = PROPERTIES_IDENTIFIER)
private String identifier;
@JsonProperty (required = true, value = PROPERTIES_HELD_CHILDREN_COUNT)
private Integer heldChildrenCount;
/************************/
/** Optional parameters */
/************************/
@JsonProperty (PROPERTIES_TITLE)
private String title;
@JsonProperty (PROPERTIES_VITAL_RECORD_INDICATOR)
private Boolean vitalRecordIndicator;
@JsonProperty (PROPERTIES_ROOT_NODE_REF)
private String rootNodeRef;
@JsonProperty (PROPERTIES_LOCATION)
private String location;
@JsonProperty (PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE)
private Boolean recordSearchHasDispositionSchedule;
@JsonProperty (PROPERTIES_REVIEW_PERIOD)
@JsonSerialize (using = ReviewPeriodSerializer.class)
private ReviewPeriod reviewPeriod;
@JsonProperty (PROPERTIES_CLASSIFICATION)
private List<String> classification;
@JsonProperty (PROPERTIES_DESCRIPTION)
private String description;
@JsonProperty (PROPERTIES_OWNER)
private Owner owner;
@JsonProperty (PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD)
private String recordSearchVitalRecordReviewPeriod;
@JsonProperty (PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION)
private String recordSearchVitalRecordReviewPeriodExpression;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY)
private String recordSearchDispositionAuthority;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS)
private String recordSearchDispositionInstructions;
}

View File

@@ -1,66 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.rules;
/**
* Action values.
*/
public enum ActionsOnRule
{
COMPLETE_RECORD("declareRecord"),
REOPEN_RECORD("undeclareRecord"),
OPEN_RECORD_FOLDER("openRecordFolder"),
CLOSE_RECORD_FOLDER("closeRecordFolder"),
FILE_TO("fileTo"),
COPY_TO("copyTo"),
MOVE_TO("moveTo"),
LINK_TO("linkTo"),
REJECT("reject"),
REQUEST_INFORMATION("requestInfo"),
COMPLETE_EVENT("completeEvent"),
ADD_RECORD_TYPES("addRecordTypes"),
EXECUTE_SCRIPT("executeScript"),
SEND_EMAIL("sendEmail"),
SET_PROPERTY_VALUE_COLL_SITE("set-property-value"),
SET_PROPERTY_VALUE_RM("setPropertyValue"),
HIDE_RECORD("hide-record"),
DECLARE_VERSION_AS_RECORD("declare-as-version-record"),
DECLARE_AS_RECORD("create-record"),
WORM_LOCK("wormLock");
private String actionValue;
ActionsOnRule(String value)
{
this.actionValue = value;
}
public String getActionValue()
{
return actionValue;
}
}

View File

@@ -1,48 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.rules;
/**
* enum used to find the when condition names options by their value
*/
public enum ConditionsOnRule
{
UPDATE("update"),
ADDED("inbound"),
REMOVED("outbound");
private String whenConditionValue;
ConditionsOnRule(String value)
{
this.whenConditionValue = value;
}
public String getWhenConditionValue()
{
return whenConditionValue;
}
}

View File

@@ -1,203 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.rules;
import java.util.List;
/**
* A class describing the rule
*/
public class RuleDefinition
{
private String id = "";
private String title;
private String description = "";
private boolean disabled = false;
private boolean applyToChildren = false;
private boolean runInBackground = false;
private String ruleType = ConditionsOnRule.ADDED.getWhenConditionValue();
private String path;
private Boolean createRecordPath;
private String contentTitle;
private String contentDescription;
private String rejectReason;
private List<String> actions;
/**
* Creates a new object of type Rule Definition
*
* @return the object
*/
public static RuleDefinition createNewRule()
{
return new RuleDefinition();
}
public String getId()
{
return id;
}
public RuleDefinition id(String id)
{
this.id = id;
return this;
}
public String getTitle()
{
return title;
}
public RuleDefinition title(String title)
{
this.title = title;
return this;
}
public String getDescription()
{
return description;
}
public RuleDefinition description(String description)
{
this.description = description;
return this;
}
public boolean isDisabled()
{
return disabled;
}
public RuleDefinition disabled(boolean disabled)
{
this.disabled = disabled;
return this;
}
public boolean isApplyToChildren()
{
return applyToChildren;
}
public RuleDefinition applyToChildren(boolean applyToChildren)
{
this.applyToChildren = applyToChildren;
return this;
}
public boolean getRunInBackground()
{
return runInBackground;
}
public RuleDefinition runInBackground(boolean runInBackground)
{
this.runInBackground = runInBackground;
return this;
}
public String getRuleType()
{
return ruleType;
}
public RuleDefinition ruleType(String ruleType)
{
this.ruleType = ruleType;
return this;
}
public String getPath()
{
return path;
}
public RuleDefinition path(String path)
{
this.path = path;
return this;
}
public Boolean getCreateRecordPath()
{
return createRecordPath;
}
public RuleDefinition createRecordPath(boolean createRecordPath)
{
this.createRecordPath = createRecordPath;
return this;
}
public String getContentTitle()
{
return contentTitle;
}
public RuleDefinition contentTitle(String contentTitle)
{
this.contentTitle = contentTitle;
return this;
}
public String getContentDescription()
{
return contentDescription;
}
public RuleDefinition contentDescription(String contentDescription)
{
this.contentDescription = contentDescription;
return this;
}
public String getRejectReason()
{
return rejectReason;
}
public RuleDefinition rejectReason(String rejectReason)
{
this.rejectReason = rejectReason;
return this;
}
public List<String> getActions()
{
return actions;
}
public RuleDefinition actions(List<String> actions)
{
this.actions = actions;
return this;
}
}

View File

@@ -1,62 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.site;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.model.RestSiteModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for RM Site component
*
* @author Rodica Sutu
* @since 2.6
*/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
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;
}
}

View File

@@ -1,39 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.site;
/**
* RM Site compliance
*
* @author Tuna Aksoy
* @since 2.6
*/
public enum RMSiteCompliance
{
STANDARD,
DOD5015
}

View File

@@ -1,52 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.site;
/**
*RM Site properties from the RM Model Schema
*"entry": {
* "id": "string",
* "guid": "string",
* "title": "string",
* "description": "string",
* "visibility": "{@link org.springframework.social.alfresco.api.entities.Site.Visibility}",
* "compliance": "{@link RMSiteCompliance}",
* "role": "{@link org.alfresco.utility.constants.UserRole}"
*}
* @author Tuna Aksoy
* @author Rodica Sutu
* @since 2.6
*/
public class RMSiteFields
{
public static final String ID = "id";
public static final String COMPLIANCE = "compliance";
public static final String TITLE = "title";
public static final String DESCRIPTION = "description";
public static final String VISIBILITY ="visibility";
public static final String ROLE = "role";
}

View File

@@ -1,88 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.transfer;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.model.RestByUserModel;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for Transfer
*
* @author Silviu Dinuta
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class Transfer extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true)
private RestByUserModel createdByUser;
@JsonProperty (required = true)
private String nodeType;
@JsonProperty (required = true)
private String parentId;
@JsonProperty (required = true)
private List<String> aspectNames;
@JsonProperty (required = true)
private String createdAt;
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String id;
@JsonProperty (required = true)
private TransferProperties properties;
/************************/
/** Optional parameters */
/************************/
@JsonProperty
private List<String> allowableOperations;
}

View File

@@ -1,110 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.transfer;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.model.RestByUserModel;
import org.alfresco.rest.rm.community.model.common.Path;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for transfer child
*
* @author Silviu Dinuta
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class TransferChild extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true)
private String createdAt;
@JsonProperty (required = true)
private RestByUserModel createdByUser;
@JsonProperty (required = true)
private String modifiedAt;
@JsonProperty (required = true)
private RestByUserModel modifiedByUser;
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String id;
@JsonProperty (required = true)
private String nodeType;
@JsonProperty (required = true)
private String parentId;
/************************/
/** Optional parameters */
/************************/
@JsonProperty
private TransferChildProperties properties;
@JsonProperty
private Boolean isRecord;
@JsonProperty
private Boolean isRecordFolder;
@JsonProperty
private List<String> aspectNames;
@JsonProperty
private Boolean isCompleted;
@JsonProperty
private Boolean isClosed;
@JsonProperty
private List<String> allowableOperations;
@JsonProperty
private Path path;
}

View File

@@ -1,40 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.transfer;
import org.alfresco.rest.core.RestModels;
/**
* Handle collection of {@link TransferChildEntry}
* @author Silviu Dinuta
* @since 2.6
*/
public class TransferChildCollection extends RestModels<TransferChildEntry, TransferChildCollection>
{
}

View File

@@ -1,55 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.transfer;
import org.alfresco.rest.core.RestModels;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for transfer child entry
*
* @author Silviu Dinuta
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class TransferChildEntry extends RestModels<Transfer, TransferChildEntry>
{
@JsonProperty
private TransferChild entry;
}

View File

@@ -1,219 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.transfer;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_BOX;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_DATE_FILED;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_DATE_TIME_ORIGINAL;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_DESCRIPTION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_EXPOSURE_TIME;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_FILE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_FLASH;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_FOCAL_LENGTH;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_F_NUMBER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_HELD_CHILDREN_COUNT;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ISO_SPEED_RATINGS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IS_CLOSED;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_LOCATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_MANUFACTURER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_MODEL;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_NUMBER_OF_COPIES;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ORIENTATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ORIGINAL_NAME;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_PHYSICAL_SIZE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_PIXEL_X_DIMENSION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_PIXEL_Y_DIMENSION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RESOLUTION_UNIT;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_REVIEW_PERIOD;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_SHELF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_SOFTWARE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_STORAGE_LOCATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VERSION_LABEL;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VERSION_TYPE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VITAL_RECORD_INDICATOR;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_X_RESOLUTION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_Y_RESOLUTION;
import org.alfresco.rest.rm.community.model.common.Owner;
import org.alfresco.rest.rm.community.model.common.ReviewPeriod;
import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for transfer child properties
*
* @author Silviu Dinuta
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class TransferChildProperties extends TestModel
{
/**************************************************************************/
/** Mandatory parameters - Shared by record folders and records*/
/**************************************************************************/
@JsonProperty (PROPERTIES_TITLE)
private String title;
@JsonProperty (required = true, value = PROPERTIES_ROOT_NODE_REF)
private String rootNodeRef;
@JsonProperty (required = true, value = PROPERTIES_IDENTIFIER)
private String identifier;
@JsonProperty (PROPERTIES_DESCRIPTION)
private String description;
/*********************************************************/
/** Optional parameters - Applies only to record folders */
/*********************************************************/
@JsonProperty (PROPERTIES_VITAL_RECORD_INDICATOR)
private Boolean vitalRecordIndicator;
@JsonProperty (PROPERTIES_REVIEW_PERIOD)
@JsonSerialize (using = ReviewPeriodSerializer.class)
private ReviewPeriod reviewPeriod;
@JsonProperty (PROPERTIES_HELD_CHILDREN_COUNT)
private Integer heldChildrenCount;
@JsonProperty (PROPERTIES_LOCATION)
private String location;
@JsonProperty (PROPERTIES_IS_CLOSED)
private Boolean isClosed;
/*********************************************************/
/** Optional parameters - Applies only to records */
/*********************************************************/
@JsonProperty (PROPERTIES_DATE_FILED)
private String dateField;
@JsonProperty (PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE)
private Boolean recordSearchHasDispositionSchedule;
@JsonProperty (PROPERTIES_ORIGINAL_NAME)
private String originalName;
/*********************************/
/** Electronic record parameters */
/*********************************/
@JsonProperty (PROPERTIES_VERSION_TYPE)
private String versionType;
@JsonProperty (PROPERTIES_VERSION_LABEL)
private String versionLabel;
@JsonProperty (PROPERTIES_DATE_TIME_ORIGINAL)
private String dateTimeOriginal;
@JsonProperty (PROPERTIES_EXPOSURE_TIME)
private Double exposureTime;
@JsonProperty (PROPERTIES_FLASH)
private Boolean flash;
@JsonProperty (PROPERTIES_F_NUMBER)
private Double fNumber;
@JsonProperty (PROPERTIES_FOCAL_LENGTH)
private Double focalLength;
@JsonProperty (PROPERTIES_ISO_SPEED_RATINGS)
private Integer isoSpeedRatings;
@JsonProperty (PROPERTIES_MANUFACTURER)
private String manufacturer;
@JsonProperty (PROPERTIES_MODEL)
private String model;
@JsonProperty (PROPERTIES_ORIENTATION)
private Integer orientation;
@JsonProperty (PROPERTIES_PIXEL_X_DIMENSION)
private Integer pixelXDimension;
@JsonProperty (PROPERTIES_PIXEL_Y_DIMENSION)
private Integer pixelYDimension;
@JsonProperty (PROPERTIES_RESOLUTION_UNIT)
private String resolutionUnit;
@JsonProperty (PROPERTIES_SOFTWARE)
private String software;
@JsonProperty (PROPERTIES_X_RESOLUTION)
private Double xResolution;
@JsonProperty (PROPERTIES_Y_RESOLUTION)
private Double yResolution;
/*************************************/
/** Non-electronic record parameters */
/*************************************/
@JsonProperty (PROPERTIES_SHELF)
private String shelf;
@JsonProperty (PROPERTIES_STORAGE_LOCATION)
private String storageLocation;
@JsonProperty (PROPERTIES_FILE)
private String file;
@JsonProperty (PROPERTIES_BOX)
private String box;
@JsonProperty (PROPERTIES_NUMBER_OF_COPIES)
private Integer numberOfCopies;
@JsonProperty (PROPERTIES_PHYSICAL_SIZE)
private Integer physicalSize;
@JsonProperty (PROPERTIES_OWNER)
private Owner owner;
}

View File

@@ -1,40 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.transfer;
import org.alfresco.rest.core.RestModels;
/**
* Handle collection of {@link TransferEntry}
* @author Silviu Dinuta
* @since 2.6
*/
public class TransferCollection extends RestModels<TransferEntry, TransferCollection>
{
}

View File

@@ -1,56 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.transfer;
import org.alfresco.rest.core.RestModels;
import org.alfresco.rest.rm.community.model.transfercontainer.TransferContainer;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for transfer entry
*
* @author Silviu Dinuta
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class TransferEntry extends RestModels<TransferContainer, TransferEntry>
{
@JsonProperty
private Transfer entry;
}

View File

@@ -1,84 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.transfer;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_PDF_INDICATOR;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TRANSFER_LOCATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ACCESSION_INDICATOR;
import org.alfresco.rest.rm.community.model.common.Owner;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for Transfer properties
*
* @author Dinuta Silviu
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class TransferProperties extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true, value = PROPERTIES_IDENTIFIER)
private String identifier;
/************************/
/** Optional parameters */
/************************/
@JsonProperty (PROPERTIES_ROOT_NODE_REF)
private String rootNodeRef;
@JsonProperty (PROPERTIES_OWNER)
private Owner owner;
@JsonProperty (PROPERTIES_PDF_INDICATOR)
private Boolean pdfIndicator;
@JsonProperty (PROPERTIES_TRANSFER_LOCATION)
private String transferLocation;
@JsonProperty (PROPERTIES_ACCESSION_INDICATOR)
private Boolean accessionIndicator;
}

View File

@@ -1,94 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.transfercontainer;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.model.RestByUserModel;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for Transfer Container
*
* @author Silviu Dinuta
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class TransferContainer extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true)
private RestByUserModel createdByUser;
@JsonProperty (required = true)
private String modifiedAt;
@JsonProperty (required = true)
private String nodeType;
@JsonProperty (required = true)
private String parentId;
@JsonProperty (required = true)
private List<String> aspectNames;
@JsonProperty (required = true)
private String createdAt;
@JsonProperty (required = true)
private RestByUserModel modifiedByUser;
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String id;
@JsonProperty (required = true)
private TransferContainerProperties properties;
/************************/
/** Optional parameters */
/************************/
@JsonProperty
private List<String> allowableOperations;
}

View File

@@ -1,72 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.transfercontainer;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_COUNT;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for Transfer Container properties
*
* @author Dinuta Silviu
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class TransferContainerProperties extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true, value = PROPERTIES_IDENTIFIER)
private String identifier;
/************************/
/** Optional parameters */
/************************/
@JsonProperty (PROPERTIES_ROOT_NODE_REF)
private String rootNodeRef;
@JsonProperty (PROPERTIES_COUNT)
private Integer count;
}

View File

@@ -1,97 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.unfiledcontainer;
import java.util.List;
import org.alfresco.rest.model.RestByUserModel;
import org.alfresco.rest.rm.community.model.common.Path;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for unfiled container
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class UnfiledContainer extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true)
private RestByUserModel createdByUser;
@JsonProperty (required = true)
private String modifiedAt;
@JsonProperty (required = true)
private String nodeType;
@JsonProperty (required = true)
private String parentId;
@JsonProperty (required = true)
private List<String> aspectNames;
@JsonProperty (required = true)
private String createdAt;
@JsonProperty (required = true)
private RestByUserModel modifiedByUser;
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String id;
@JsonProperty (required = true)
private UnfiledContainerProperties properties;
/************************/
/** Optional parameters */
/************************/
@JsonProperty
private List<String> allowableOperations;
@JsonProperty
private Path path;
}

View File

@@ -1,118 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.unfiledcontainer;
import java.util.List;
import org.alfresco.rest.model.RestByUserModel;
import org.alfresco.rest.rm.community.model.common.Path;
import org.alfresco.rest.rm.community.model.record.RecordContent;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for record category child
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties (ignoreUnknown = true)
public class UnfiledContainerChild extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true)
private String createdAt;
@JsonProperty (required = true)
private Boolean isUnfiledRecordFolder;
@JsonProperty (required = true)
private Boolean isRecord;
@JsonProperty (required = true)
private RestByUserModel createdByUser;
@JsonProperty (required = true)
private String modifiedAt;
@JsonProperty (required = true)
private RestByUserModel modifiedByUser;
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String id;
@JsonProperty (required = true)
private String nodeType;
@JsonProperty (required = true)
private String parentId;
/************************/
/** Optional parameters */
/************************/
@JsonProperty
private UnfiledContainerChildProperties properties;
@JsonProperty
private List<String> aspectNames;
@JsonProperty
private Boolean isClosed;
@JsonProperty
private List<String> allowableOperations;
@JsonProperty
private Path path;
@JsonProperty
private String relativePath;
@JsonProperty
private RecordContent content;
@JsonProperty
private Boolean isCompleted;
}

View File

@@ -1,41 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.unfiledcontainer;
import org.alfresco.rest.core.RestModels;
/**
* Handle collection of {@link UnfiledContainerChildEntry}
*
* @author Kristijan Conkas
* @author Tuna Aksoy
* @since 2.6
*/
public class UnfiledContainerChildCollection extends RestModels<UnfiledContainerChildEntry, UnfiledContainerChildCollection>
{
}

View File

@@ -1,48 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.unfiledcontainer;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.RestModels;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* POJO for record category child entry
*
* @author Tuna Aksoy
* @since 2.6
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class UnfiledContainerChildEntry extends RestModels<UnfiledContainer, UnfiledContainerChildEntry>
{
@JsonProperty
private UnfiledContainerChild entry;
}

View File

@@ -1,194 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.unfiledcontainer;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_BOX;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_DATE_TIME_ORIGINAL;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_DESCRIPTION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_EXPOSURE_TIME;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_FILE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_FLASH;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_FOCAL_LENGTH;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_F_NUMBER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ISO_SPEED_RATINGS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_MANUFACTURER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_MODEL;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_NUMBER_OF_COPIES;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ORIENTATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ORIGINAL_NAME;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_PHYSICAL_SIZE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_PIXEL_X_DIMENSION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_PIXEL_Y_DIMENSION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RESOLUTION_UNIT;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RMV_VERSIONED;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_SHELF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_SOFTWARE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_STORAGE_LOCATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VERSIONED_NODEREF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VERSION_LABEL;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VERSION_TYPE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_X_RESOLUTION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_Y_RESOLUTION;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.rm.community.model.common.Owner;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for record category child properties
*
* @author Tuna Aksoy
* @author Ana Bozianu
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties (ignoreUnknown = true)
public class UnfiledContainerChildProperties extends TestModel
{
/**************************************************************************/
/** Mandatory parameters - Shared by unfiled record folder and records */
/**************************************************************************/
@JsonProperty (required = true, value = PROPERTIES_TITLE)
private String title;
@JsonProperty (required = true, value = PROPERTIES_ROOT_NODE_REF)
private String rootNodeRef;
@JsonProperty (required = true, value = PROPERTIES_IDENTIFIER)
private String identifier;
@JsonProperty (required = true, value = PROPERTIES_DESCRIPTION)
private String description;
@JsonProperty (value = PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE)
private Boolean recordSearchHasDispositionSchedule;
/*********************************/
/** Electronic record parameters */
/*********************************/
@JsonProperty (PROPERTIES_VERSION_TYPE)
private String versionType;
@JsonProperty (PROPERTIES_VERSION_LABEL)
private String versionLabel;
@JsonProperty(PROPERTIES_VERSIONED_NODEREF)
private String versionedNodeRef;
@JsonProperty (PROPERTIES_RMV_VERSIONED)
private String recordVersionLabel;
@JsonProperty (PROPERTIES_DATE_TIME_ORIGINAL)
private String dateTimeOriginal;
@JsonProperty (PROPERTIES_EXPOSURE_TIME)
private Double exposureTime;
@JsonProperty (PROPERTIES_FLASH)
private Boolean flash;
@JsonProperty (PROPERTIES_F_NUMBER)
private Double fNumber;
@JsonProperty (PROPERTIES_FOCAL_LENGTH)
private Double focalLength;
@JsonProperty (PROPERTIES_ISO_SPEED_RATINGS)
private Integer isoSpeedRatings;
@JsonProperty (PROPERTIES_MANUFACTURER)
private String manufacturer;
@JsonProperty (PROPERTIES_MODEL)
private String model;
@JsonProperty (PROPERTIES_ORIENTATION)
private Integer orientation;
@JsonProperty (PROPERTIES_PIXEL_X_DIMENSION)
private Integer pixelXDimension;
@JsonProperty (PROPERTIES_PIXEL_Y_DIMENSION)
private Integer pixelYDimension;
@JsonProperty (PROPERTIES_RESOLUTION_UNIT)
private String resolutionUnit;
@JsonProperty (PROPERTIES_SOFTWARE)
private String software;
@JsonProperty (PROPERTIES_X_RESOLUTION)
private Double xResolution;
@JsonProperty (PROPERTIES_Y_RESOLUTION)
private Double yResolution;
@JsonProperty (PROPERTIES_ORIGINAL_NAME)
private String originalName;
/*************************************/
/** Non-electronic record parameters */
/*************************************/
@JsonProperty (PROPERTIES_SHELF)
private String shelf;
@JsonProperty (PROPERTIES_STORAGE_LOCATION)
private String storageLocation;
@JsonProperty (PROPERTIES_FILE)
private String file;
@JsonProperty (PROPERTIES_BOX)
private String box;
@JsonProperty (PROPERTIES_NUMBER_OF_COPIES)
private Integer numberOfCopies;
@JsonProperty (PROPERTIES_PHYSICAL_SIZE)
private Integer physicalSize;
@JsonProperty (PROPERTIES_OWNER)
private Owner owner;
}

View File

@@ -1,65 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.unfiledcontainer;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for file plan properties
*
* @author Tuna Aksoy
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties (ignoreUnknown = true)
public class UnfiledContainerProperties extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true, value = PROPERTIES_IDENTIFIER)
private String identifier;
@JsonProperty (required = true, value = PROPERTIES_ROOT_NODE_REF)
private String rootNodeRef;
}

View File

@@ -1,113 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.unfiledcontainer;
import java.util.List;
import org.alfresco.rest.model.RestByUserModel;
import org.alfresco.rest.rm.community.model.common.Path;
import org.alfresco.rest.rm.community.model.record.RecordContent;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* POJO for unfiled container
*
* @author Ramona Popa
* @since 2.6
*/
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class UnfiledRecordFolder extends TestModel
{
/*************************/
/** Mandatory parameters */
/*************************/
@JsonProperty (required = true)
private String createdAt;
@JsonProperty (required = true)
private RestByUserModel createdByUser;
@JsonProperty (required = true)
private String modifiedAt;
@JsonProperty (required = true)
private RestByUserModel modifiedByUser;
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String id;
@JsonProperty (required = true)
private String nodeType;
@JsonProperty (required = true)
private String parentId;
/************************/
/** Optional parameters */
/************************/
@JsonProperty
private UnfiledContainerChildProperties properties;
@JsonProperty
private List<String> aspectNames;
@JsonProperty
private Boolean hasRetentionSchedule;
@JsonProperty
private Boolean isClosed;
@JsonProperty
private List<String> allowableOperations;
@JsonProperty
private Path path;
@JsonProperty
private String relativePath;
@JsonProperty
private RecordContent content;
@JsonProperty
private Boolean isCompleted;
}

View File

@@ -1,42 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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";
}

View File

@@ -1,47 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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 Kristijan Conkas
* @since 2.6
*/
public enum UserPermissions
{
PERMISSION_FILING("Filing"),
PERMISSION_READ_RECORDS("ReadRecords"),
PERMISSION_FILE_RECORDS("FileRecords");
public final String permissionId;
UserPermissions(String permissionId)
{
this.permissionId = permissionId;
}
}

View File

@@ -1,55 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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 roles
*
* @author Kristijan Conkas
* @since 2.6
*/
public enum UserRoles
{
IN_PLACE_WRITERS("ExtendedWriters", "In-Place Writers"),
ROLE_RM_ADMIN("Administrator", "Records Management Administrator"),
ROLE_RM_MANAGER("RecordsManager", "Records Management Manager"),
ROLE_RM_POWER_USER("PowerUser", "Records Management Power User"),
ROLE_RM_SECURITY_OFFICER("SecurityOfficer", "Records Management Security Officer"),
ROLE_RM_USER("User", "Records Management User");
public final String roleId;
public final String displayName;
UserRoles(String roleId, String displayName)
{
this.roleId = roleId;
this.displayName = displayName;
}
}

View File

@@ -1,58 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests;
import static lombok.AccessLevel.PRIVATE;
import static lombok.AccessLevel.PROTECTED;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.requests.ModelRequest;
import lombok.Getter;
import lombok.Setter;
/**
* Extends {@link ModelRequest} to set {@link RMRestWrapper}
*
* @author Tuna Aksoy
* @since 2.6
*/
public abstract class RMModelRequest<Request> extends ModelRequest<Request>
{
@Getter (value = PROTECTED)
@Setter (value = PRIVATE)
private RMRestWrapper rmRestWrapper;
/**
* @param rmRestWrapper
*/
public RMModelRequest(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper.getRestWrapper());
setRmRestWrapper(rmRestWrapper);
}
}

View File

@@ -1,193 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore;
import static java.lang.Integer.parseInt;
import static java.lang.String.format;
import io.restassured.RestAssured;
import org.alfresco.rest.core.RMRestProperties;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.requests.gscore.api.ActionsExecutionAPI;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
import org.alfresco.rest.rm.community.requests.gscore.api.FilePlanAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.FilesAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RMSiteAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RMUserAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordCategoryAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.TransferAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.TransferContainerAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledRecordFolderAPI;
/**
* Defines the entire GS Core API
* {@link http://host:port/gs-api-explorer} select "GS Core API"
*
* @author Tuna Aksoy
* @since 2.6
*/
public class GSCoreAPI extends RMModelRequest
{
/**
* Constructor
*
* @param rmRestWrapper RM REST Wrapper
* @param rmRestProperties RM REST Properties
*/
public GSCoreAPI(RMRestWrapper rmRestWrapper, RMRestProperties rmRestProperties)
{
super(rmRestWrapper);
RestAssured.baseURI = format("%s://%s", rmRestProperties.getScheme(), rmRestProperties.getServer());
RestAssured.port = parseInt(rmRestProperties.getPort());
RestAssured.basePath = rmRestProperties.getRestRmPath();
restWrapper.configureRequestSpec().setBasePath(RestAssured.basePath);
}
/**
* Provides DSL on all REST calls under <code>ig-sites/rm/...</code> API path
*
* @return {@link RMSiteAPI}
*/
public RMSiteAPI usingRMSite()
{
return new RMSiteAPI(getRmRestWrapper());
}
/**
* Provides DSL on all REST calls under <code>file-plans/...</code> API path
*
* @return {@link FilePlanAPI}
*/
public FilePlanAPI usingFilePlans()
{
return new FilePlanAPI(getRmRestWrapper());
}
/**
* Provides DSL on all REST calls under <code>record-categories/...</code> API path
*
* @return {@link RecordCategoryAPI}
*/
public RecordCategoryAPI usingRecordCategory()
{
return new RecordCategoryAPI(getRmRestWrapper());
}
/**
* Provides DSL on all REST calls under <code>record-folders/...</code> API path
*
* @return {@link RecordFolderAPI}
*/
public RecordFolderAPI usingRecordFolder()
{
return new RecordFolderAPI(getRmRestWrapper());
}
/**
* Provides DSL on all REST calls under <code>records/...</code> API path
*
* @return {@link RecordsAPI}
*/
public RecordsAPI usingRecords()
{
return new RecordsAPI(getRmRestWrapper());
}
/**
* Provides DSL on all REST calls under <code>files/...</code> API path
*
* @return {@link FilesAPI}
*/
public FilesAPI usingFiles()
{
return new FilesAPI(getRmRestWrapper());
}
/**
* Provides DSL on all REST calls under <code>transfer-containers/...</code> API path
*
* @return {@link TransferContainerAPI}
*/
public TransferContainerAPI usingTransferContainer()
{
return new TransferContainerAPI(getRmRestWrapper());
}
/**
* Provides DSL on all REST calls under <code>transfers/...</code> API path
*
* @return {@link TransferAPI}
*/
public TransferAPI usingTransfer()
{
return new TransferAPI(getRmRestWrapper());
}
/**
* Provides DSL for RM unfiled container API
*
* @return {@link UnfiledContainerAPI}
*/
public UnfiledContainerAPI usingUnfiledContainers()
{
return new UnfiledContainerAPI(getRmRestWrapper());
}
/**
* Provides DSL for RM unfiled record folders API
*
* @return {@link UnfiledRecordFolderAPI}
*/
public UnfiledRecordFolderAPI usingUnfiledRecordFolder()
{
return new UnfiledRecordFolderAPI(getRmRestWrapper());
}
/**
* Provides DSL for RM user management API
*
* @return {@link RMUserAPI}
*/
public RMUserAPI usingRMUser()
{
return new RMUserAPI(getRmRestWrapper());
}
/**
* Provides DSL for ActionExecution API
*
* @return {@link ActionsExecutionAPI}
*/
public ActionsExecutionAPI usingActionsExecutionsAPI()
{
return new ActionsExecutionAPI(getRmRestWrapper());
}
}

View File

@@ -1,134 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore.api;
import com.google.common.collect.ImmutableMap;
import lombok.SneakyThrows;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.rules.ActionsOnRule;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
import org.alfresco.utility.model.RepoTestModel;
import org.json.JSONObject;
/**
* Produces processed results from Core Actions API calls
*
* @author Claudia Agache
* @since 3.1
*/
public class ActionsExecutionAPI extends RMModelRequest
{
/**
* @param rmRestWrapper RM REST Wrapper
*/
public ActionsExecutionAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* Declares and files a document as record to a record folder using v1 actions api
*
* @param targetNode the node on which the action is executed
* @param destinationPath the path to the record folder
* @throws Exception
*/
public JSONObject declareAndFile(RepoTestModel targetNode, String destinationPath) throws Exception
{
return getRmRestWrapper().withCoreAPI().usingActions()
.executeAction(ActionsOnRule.DECLARE_AS_RECORD.getActionValue(), targetNode,
ImmutableMap.of("path", destinationPath));
}
/**
* Declares a document as record using v1 actions api
*
* @param targetNode the node on which the action is executed
* @throws Exception
*/
public JSONObject declareAsRecord(RepoTestModel targetNode) throws Exception
{
return getRmRestWrapper().withCoreAPI().usingActions()
.executeAction(ActionsOnRule.DECLARE_AS_RECORD.getActionValue(), targetNode);
}
/**
* Declares and file a document version as record to a record folder using v1 actions api
*
* @param targetNode the node on which the action is executed
* @param destinationPath the path to the record folder
* @throws Exception
*/
public JSONObject declareAndFileVersionAsRecord(RepoTestModel targetNode, String destinationPath) throws Exception
{
return getRmRestWrapper().withCoreAPI().usingActions()
.executeAction(ActionsOnRule.DECLARE_VERSION_AS_RECORD.getActionValue(), targetNode,
ImmutableMap.of("path", destinationPath));
}
/**
* Declares a document version as record using v1 actions api
*
* @param targetNode the node on which the action is executed
* @throws Exception
*/
public JSONObject declareVersionAsRecord(RepoTestModel targetNode) throws Exception
{
return getRmRestWrapper().withCoreAPI().usingActions()
.executeAction(ActionsOnRule.DECLARE_VERSION_AS_RECORD.getActionValue(), targetNode);
}
/**
* Add WORM lock to a node using v1 actions api
*
* @param targetNode the node on which the action is executed
* @throws Exception
*/
@SneakyThrows
public JSONObject addWORMLock(RepoTestModel targetNode)
{
return getRmRestWrapper().withCoreAPI().usingActions()
.executeAction(ActionsOnRule.WORM_LOCK.getActionValue(), targetNode);
}
/**
* WORM lock a node for a period of days
*
* @param targetNode the node on which the action is executed
* @param retentionPeriod the retention period in days for the WORM lock
* @throws Exception
*/
@SneakyThrows
public JSONObject addWORMLock(RepoTestModel targetNode, int retentionPeriod)
{
return getRmRestWrapper().withCoreAPI().usingActions()
.executeAction(ActionsOnRule.WORM_LOCK.getActionValue(), targetNode,
ImmutableMap.of("retentionPeriod", String.valueOf(retentionPeriod)));
}
}

View File

@@ -1,216 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore.api;
import static org.alfresco.rest.core.RestRequest.requestWithBody;
import static org.alfresco.rest.core.RestRequest.simpleRequest;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString;
import static org.alfresco.rest.rm.community.util.PojoUtility.toJson;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.http.HttpMethod.POST;
import static org.springframework.http.HttpMethod.PUT;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.fileplan.FilePlan;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryCollection;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
/**
* File plan REST API Wrapper
*
* @author Ramona Popa
* @author Tuna Aksoy
* @since 2.6
*/
public class FilePlanAPI extends RMModelRequest
{
/**
* Constructor.
*
* @param rmRestWrapper RM REST Wrapper
*/
public FilePlanAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* see {@link #getFilePlan(String, String)}
*/
public FilePlan getFilePlan(String filePlanId)
{
mandatoryString("filePlanId", filePlanId);
return getFilePlan(filePlanId, EMPTY);
}
/**
* Gets a file plan.
*
* @param filePlanId The identifier of a file plan
* @param parameters The URL parameters to add
* @return The {@link FilePlan} for the given {@code filePlanId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code filePlanId} is not a valid format</li>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code filePlanId}</li>
* <li>{@code filePlanId} does not exist</li>
* </ul>
*/
public FilePlan getFilePlan(String filePlanId, String parameters)
{
mandatoryString("filePlanId", filePlanId);
return getRmRestWrapper().processModel(FilePlan.class, simpleRequest(
GET,
"/file-plans/{filePlanId}?{parameters}",
filePlanId,
parameters
));
}
/**
* see {@link #getRootRecordCategories(String, String)}
*/
public RecordCategoryCollection getRootRecordCategories(String filePlanId)
{
mandatoryString("filePlanId", filePlanId);
return getRootRecordCategories(filePlanId, EMPTY);
}
/**
* Gets the children (root categories) of a file plan.
*
* @param filePlanId The identifier of a file plan
* @param parameters The URL parameters to add
* @return The {@link RecordCategoryCollection} for the given {@code filePlanId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code filePlanId}</li>
* <li>{@code filePlanId} does not exist</li>
*</ul>
*/
public RecordCategoryCollection getRootRecordCategories(String filePlanId, String parameters)
{
mandatoryString("filePlanId", filePlanId);
return getRmRestWrapper().processModels(RecordCategoryCollection.class, simpleRequest(
GET,
"file-plans/{filePlanId}/categories?{parameters}",
filePlanId,
parameters
));
}
/**
* see {@link #createRootRecordCategory(RecordCategory, String, String)}
*/
public RecordCategory createRootRecordCategory(RecordCategory recordCategoryModel, String filePlanId)
{
mandatoryObject("recordCategoryModel", recordCategoryModel);
mandatoryString("filePlanId", filePlanId);
return createRootRecordCategory(recordCategoryModel, filePlanId, EMPTY);
}
/**
* Creates a root record category.
*
* @param recordCategoryModel The record category model which holds the information
* @param filePlanId The identifier of a file plan
* @param parameters The URL parameters to add
* @return The created {@link RecordCategory}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code filePlanId} is not a valid format or {@code filePlanId} is invalid</li>
* <li>authentication fails</li>
* <li>current user does not have permission to add children to {@code filePlanId}</li>
* <li>{@code filePlanIds} does not exist</li>
* <li>new name clashes with an existing node in the current parent container</li>
* <li>model integrity exception, including node name with invalid characters</li>
* </ul>
*/
public RecordCategory createRootRecordCategory(RecordCategory recordCategoryModel, String filePlanId, String parameters)
{
mandatoryObject("recordCategoryModel", recordCategoryModel);
mandatoryString("filePlanId", filePlanId);
return getRmRestWrapper().processModel(RecordCategory.class, requestWithBody(
POST,
toJson(recordCategoryModel),
"file-plans/{filePlanId}/categories?{parameters}",
filePlanId,
parameters
));
}
/**
* see {@link #updateFilePlan(FilePlan, String, String)
*/
public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId)
{
mandatoryObject("filePlanModel", filePlanModel);
mandatoryString("filePlanId", filePlanId);
return updateFilePlan(filePlanModel, filePlanId, EMPTY);
}
/**
* Updates a file plan.
*
* @param filePlanModel The file plan model which holds the information
* @param filePlanId The identifier of the file plan
* @param parameters The URL parameters to add
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code filePlanId} is not a valid format or {@code filePlanModel} is invalid</li>
* <li>authentication fails</li>
* <li>current user does not have permission to update {@code filePlanId}</li>
* <li>{@code filePlanId} does not exist</li>
* <li>model integrity exception, including file name with invalid characters</li>
* </ul>
*/
public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId, String parameters)
{
mandatoryObject("filePlanModel", filePlanModel);
mandatoryString("filePlanId", filePlanId);
return getRmRestWrapper().processModel(FilePlan.class, requestWithBody(
PUT,
toJson(filePlanModel),
"file-plans/{filePlanId}?{parameters}",
filePlanId,
parameters));
}
}

View File

@@ -1,74 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore.api;
import static org.alfresco.rest.core.RestRequest.simpleRequest;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString;
import static org.springframework.http.HttpMethod.POST;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.record.Record;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
/**
* Files REST API Wrapper
*
* @author Kristijan Conkas
* @since 2.6
*/
public class FilesAPI extends RMModelRequest<FilesAPI>
{
public static final String PARENT_ID_PARAM = "parentId";
/**
* @param rmRestWrapper RM REST Wrapper
*/
public FilesAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* Declare file as record
*
* @param fileId The Id of a file to declare as record
* @return The {@link Record} for created record
* @throws RuntimeException for malformed JSON responses
*/
public Record declareAsRecord(String fileId)
{
mandatoryString("fileId", fileId);
return getRmRestWrapper().processModel(Record.class, simpleRequest(
POST,
"/files/{fileId}/declare?{parameters}",
fileId,
getRmRestWrapper().getParameters()
));
}
}

View File

@@ -1,166 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore.api;
import static org.alfresco.rest.core.RestRequest.requestWithBody;
import static org.alfresco.rest.core.RestRequest.simpleRequest;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject;
import static org.alfresco.rest.rm.community.util.PojoUtility.toJson;
import static org.springframework.http.HttpMethod.DELETE;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.http.HttpMethod.POST;
import static org.springframework.http.HttpMethod.PUT;
import static org.springframework.http.HttpStatus.OK;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.site.RMSite;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
/**
* RM Site REST API Wrapper
*
* @author Tuna Aksoy
* @since 2.6
*/
public class RMSiteAPI extends RMModelRequest
{
/**
* Constructor
*
* @param rmRestWrapper RM REST Wrapper
*/
public RMSiteAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* Get the RM site
*
* @return The {@link RMSite} for the given file plan component id
* @throws RuntimeException for the following cases:
* <ul>
* <li>Api Response code 400 Invalid parameter: GET request is supported only for the RM site</li>
* <li>Api Response code 401 If authentication failed</li>
* <li>Api Response code 409 If RM Site does not exist</li>
* <li>Api Response code default Unexpected error</li>
* </ul>
*/
public RMSite getSite()
{
return getRmRestWrapper().processModel(RMSite.class, simpleRequest(
GET,
"gs-sites/rm"
));
}
/**
* Create the RM site
*
* @param rmSiteModel The properties of the rm site to be created
* @return The {@link RMSite} with the given properties
* @throws RuntimeException for the following cases:
* <ul>
* <li>Api Response code 400 Invalid parameter: title, or description exceed the maximum length; or siteBodyCreate invalid</li>
* <li>Api Response code 401 If authentication failed</
* <li>Api Response code 409 RM Site already exists</li>
* <li>Api Response code default Unexpected error</li>
* </ul>
*/
public RMSite createRMSite(RMSite rmSiteModel)
{
mandatoryObject("rmSiteModel", rmSiteModel);
return getRmRestWrapper().processModel(RMSite.class, requestWithBody(
POST,
toJson(rmSiteModel),
"gs-sites"
));
}
/**
* Delete RM site
* @throws RuntimeException for the following cases:
* <ul>
* <li>Api Response code 400 Invalid parameter: DELETE request is supported only for the RM site</li>
* <li>Api Response code 401 If authentication failed</
* <li>Api Response code 403 Current user does not have permission to delete the site that is visible to them.</li>
* <li>Api Response code 404 RM site does not exist</li>
* <li>Api Response code default Unexpected error</li>
* </ul>
*/
public void deleteRMSite()
{
getRmRestWrapper().processEmptyModel(simpleRequest(
DELETE,
"gs-sites/rm"
));
}
/**
* Update RM site
*
* @param rmSiteModel The properties to be updated
* @return The updated {@link RMSite}
* @throws RuntimeException for the following cases:
* <ul>
* <li>Api Response code 400 the update request is invalid {@code rmSiteModel} is invalid</li>
* <li>Api Response code 401 If authentication fails</li>
* <li>Api Response code 403 does not have permission to update {@code RMSite}</li>
* <li>Api Response code 404 {@code RMSiteModel} does not exist</li>
* <li>Api Response code default Unexpected error,model integrity exception</li>
* </ul>
*/
public RMSite updateRMSite(RMSite rmSiteModel)
{
mandatoryObject("rmSiteProperties", rmSiteModel);
return getRmRestWrapper().processModel(RMSite.class, requestWithBody(
PUT,
toJson(rmSiteModel),
"gs-sites/rm"
));
}
/**
* Checks if the RM site exists or not
*
* @return <code>true</code> if the RM site exists, <code>false</code> otherwise
* @throws RuntimeException for the following cases:
* <ul>
* <li>Api Response code 400 Invalid parameter: GET request is supported only for the RM site</li>
* <li>Api Response code 401 If authentication failed</li>
* <li>Api Response code 409 If RM Site does not exist</li>
* <li>Api Response code default Unexpected error</li>
* </ul>
*/
public boolean existsRMSite()
{
getSite();
return getRmRestWrapper().getStatusCode().equals(String.valueOf(OK.value()));
}
}

View File

@@ -1,243 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore.api;
import static org.jglue.fluentjson.JsonBuilderFactory.buildObject;
import static org.springframework.http.HttpStatus.OK;
import com.google.gson.JsonObject;
import io.restassured.builder.RequestSpecBuilder;
import io.restassured.http.ContentType;
import io.restassured.response.Response;
import io.restassured.specification.RequestSpecification;
import static io.restassured.RestAssured.basic;
import static io.restassured.RestAssured.given;
import org.alfresco.dataprep.AlfrescoHttpClient;
import org.alfresco.dataprep.AlfrescoHttpClientFactory;
import org.alfresco.rest.core.RMRestProperties;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.user.UserPermissions;
import org.alfresco.rest.rm.community.model.user.UserRoles;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
import org.alfresco.utility.model.UserModel;
/**
* RM user management API
*
* @author Kristijan Conkas
* @since 2.6
*/
// FIXME: As of December 2016 there is no v1-style API for managing RM users and users'
// roles/permissions. Until such APIs have become available, methods in this class are just proxies to
// "old-style" API calls.
public class RMUserAPI extends RMModelRequest
{
/**
* @param rmRestWrapper RM REST Wrapper
*/
public RMUserAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* Helper method to obtain {@link AlfrescoHttpClient}
* @return Initialized {@link AlfrescoHttpClient} instance
*/
private AlfrescoHttpClient getAlfrescoHttpClient()
{
RMRestProperties properties = getRmRestWrapper().getRmRestProperties();
AlfrescoHttpClientFactory factory = new AlfrescoHttpClientFactory();
factory.setHost(properties.getServer());
factory.setPort(Integer.parseInt(properties.getPort()));
factory.setScheme(properties.getScheme());
return factory.getObject();
}
/**
* Assign RM role to user
*
* @param userName User's username
* @param userRole User's RM role, one of {@link UserRoles} roles
* @throws RuntimeException for failed requests
*/
public void assignRoleToUser(String userName, String userRole)
{
UserModel adminUser = getRmRestWrapper().getTestUser();
// get an "old-style" REST API client
AlfrescoHttpClient client = getAlfrescoHttpClient();
// override v1 baseURI and basePath
RequestSpecification spec = new RequestSpecBuilder()
.setBaseUri(client.getApiUrl())
.setBasePath("/")
.build();
Response response = given()
.spec(spec)
.log().all()
.pathParam("role", userRole)
.pathParam("authority", userName)
.param("alf_ticket", client.getAlfTicket(adminUser.getUsername(),
adminUser.getPassword()))
.when()
.post("/rm/roles/{role}/authorities/{authority}")
.prettyPeek()
.andReturn();
getRmRestWrapper().setStatusCode(Integer.toString(response.getStatusCode()));
}
/**
* Helper method to add permission on a component to user
* @param filePlanComponentId The id of the file plan component on which permission should be given
* @param user {@link UserModel} for a user to be granted permission
* @param permission {@link UserPermissions} to be granted
*/
public void addUserPermission(String filePlanComponentId, UserModel user, UserPermissions permission)
{
UserModel adminUser = getRmRestWrapper().getTestUser();
// get an "old-style" REST API client
AlfrescoHttpClient client = getAlfrescoHttpClient();
JsonObject bodyJson = buildObject()
.addArray("permissions")
.addObject()
.add("authority", user.getUsername())
.add("role", permission.permissionId)
.end()
.getJson();
// override v1 baseURI and basePath
RequestSpecification spec = new RequestSpecBuilder()
.setBaseUri(client.getApiUrl())
.setBasePath("/")
.build();
// execute an "old-style" API call
Response response = given()
.spec(spec)
.auth().basic(adminUser.getUsername(), adminUser.getPassword())
.contentType(ContentType.JSON)
.body(bodyJson.toString())
.pathParam("nodeId", filePlanComponentId)
.log().all()
.when()
.post("/node/workspace/SpacesStore/{nodeId}/rmpermissions")
.prettyPeek()
.andReturn();
getRmRestWrapper().setStatusCode(Integer.toString(response.getStatusCode()));
}
/**
* Helper method to set permission inheritance on a file plan component
*
* @param filePlanComponentId The id of the file plan component on which inherited permission should be set
* @param isInherited true if the permission is inherited
* false if the permission inheritance is disabled
*/
public void setUserPermissionInheritance(String filePlanComponentId, Boolean isInherited)
{
final UserModel adminUser = getRmRestWrapper().getTestUser();
// get an "old-style" REST API client
final AlfrescoHttpClient client = getAlfrescoHttpClient();
final JsonObject bodyJson = buildObject()
.addArray("permissions")
.end()
.add("isInherited", isInherited)
.getJson();
// override v1 baseURI and basePath
RequestSpecification spec = new RequestSpecBuilder()
.setBaseUri(client.getApiUrl())
.setBasePath("/")
.build();
// execute an "old-style" API call
final Response response = given()
.spec(spec)
.auth().basic(adminUser.getUsername(), adminUser.getPassword())
.contentType(ContentType.JSON)
.body(bodyJson.toString())
.pathParam("nodeId", filePlanComponentId)
.log().all()
.when()
.post("/node/workspace/SpacesStore/{nodeId}/rmpermissions")
.prettyPeek()
.andReturn();
getRmRestWrapper().setStatusCode(Integer.toString(response.getStatusCode()));
}
/**
* Creates a user with the given name using the old APIs
*
* @param userName The user name
* @param userPassword The user's password
* @param userEmail The user's e-mail address
* @return <code>true</code> if the user was created successfully, <code>false</code> otherwise.
*/
public boolean createUser(String userName, String userPassword, String userEmail)
{
UserModel adminUser = getRmRestWrapper().getTestUser();
final AlfrescoHttpClient client = getAlfrescoHttpClient();
JsonObject body = buildObject()
.add("userName", userName)
.add("firstName", userName)
.add("lastName", userName)
.add("password", userPassword)
.add("email", userEmail)
.getJson();
final RequestSpecification spec = new RequestSpecBuilder()
.setBaseUri(client.getApiUrl())
.setBasePath("/")
.setAuth(basic(adminUser.getUsername(), adminUser.getPassword()))
.setContentType(ContentType.JSON)
.setBody(body.toString())
.build();
// create POST request to "people" endpoint
Response response = given()
.spec(spec)
.log().all()
.when()
.post("people")
.prettyPeek()
.andReturn();
return (response.getStatusCode() == OK.value());
}
}

View File

@@ -1,242 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore.api;
import static org.alfresco.rest.core.RestRequest.requestWithBody;
import static org.alfresco.rest.core.RestRequest.simpleRequest;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString;
import static org.alfresco.rest.rm.community.util.PojoUtility.toJson;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.springframework.http.HttpMethod.DELETE;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.http.HttpMethod.POST;
import static org.springframework.http.HttpMethod.PUT;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChildCollection;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
/**
* Record category REST API Wrapper
*
* @author Tuna Aksoy
* @since 2.6
*/
public class RecordCategoryAPI extends RMModelRequest
{
/**
* Constructor.
*
* @param rmRestWrapper RM REST Wrapper
*/
public RecordCategoryAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* Deletes a record category.
*
* @param recordCategoryId The identifier of a record category
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordCategoryId} is not a valid format</li>
* <li>authentication fails</li>
* <li>current user does not have permission to delete {@code recordCategoryId}</li>
* <li>{@code recordCategoryId} does not exist</li>
* <li>{@code recordCategoryId} is locked and cannot be deleted</li>
* </ul>
*/
public void deleteRecordCategory(String recordCategoryId)
{
mandatoryString("recordCategoryId", recordCategoryId);
getRmRestWrapper().processEmptyModel(simpleRequest(
DELETE,
"record-categories/{recordCategoryId}",
recordCategoryId
));
}
/**
* see {@link #getRecordCategory(String, String)}
*/
public RecordCategory getRecordCategory(String recordCategoryId)
{
mandatoryString("recordCategoryId", recordCategoryId);
return getRecordCategory(recordCategoryId, EMPTY);
}
/**
* Gets a record category.
*
* @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add
* @return The {@link RecordCategory} for the given {@code recordCategoryId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordCategoryId} is not a valid format</li>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code recordCategoryId}</li>
* <li>{@code recordCategoryId} does not exist</li>
* </ul>
*/
public RecordCategory getRecordCategory(String recordCategoryId, String parameters)
{
mandatoryString("recordCategoryId", recordCategoryId);
return getRmRestWrapper().processModel(RecordCategory.class, simpleRequest(
GET,
"record-categories/{recordCategoryId}?{parameters}",
recordCategoryId,
parameters
));
}
/**
* see {@link #updateRecordCategory(RecordCategory, String, String)
*/
public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId)
{
mandatoryObject("recordCategoryModel", recordCategoryModel);
mandatoryString("recordCategoryId", recordCategoryId);
return updateRecordCategory(recordCategoryModel, recordCategoryId, EMPTY);
}
/**
* Updates a record category.
*
* @param recordCategoryModel The record category model which holds the information
* @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add
* @param returns The updated {@link RecordCategory}
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code recordCategoryId} is not a valid format or {@code recordCategoryModel} is invalid</li>
* <li>authentication fails</li>
* <li>current user does not have permission to update {@code recordCategoryId}</li>
* <li>{@code recordCategoryId} does not exist</li>
* <li>the updated name clashes with an existing record category in the current parent category</li>
* <li>model integrity exception, including file name with invalid characters</li>
* </ul>
*/
public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId, String parameters)
{
mandatoryObject("recordCategoryModel", recordCategoryModel);
mandatoryString("recordCategoryId", recordCategoryId);
return getRmRestWrapper().processModel(RecordCategory.class, requestWithBody(
PUT,
toJson(recordCategoryModel),
"record-categories/{recordCategoryId}?{parameters}",
recordCategoryId,
parameters
));
}
/**
* see {@link #getRecordCategoryChildren(String, String)}
*/
public RecordCategoryChildCollection getRecordCategoryChildren(String recordCategoryId)
{
mandatoryString("recordCategoryId", recordCategoryId);
return getRecordCategoryChildren(recordCategoryId, EMPTY);
}
/**
* Gets the children of a record category.
*
* @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add
* @return The {@link RecordCategoryChildCollection} for the given {@code recordCategoryId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code recordCategoryId}</li>
* <li>{@code recordCategoryId} does not exist</li>
*</ul>
*/
public RecordCategoryChildCollection getRecordCategoryChildren(String recordCategoryId, String parameters)
{
mandatoryString("recordCategoryId", recordCategoryId);
return getRmRestWrapper().processModels(RecordCategoryChildCollection.class, simpleRequest(
GET,
"record-categories/{recordCategoryId}/children?{parameters}",
recordCategoryId,
parameters
));
}
/**
* see {@link #createRecordCategoryChild(RecordCategoryChild, String, String)}
*/
public RecordCategoryChild createRecordCategoryChild(RecordCategoryChild recordCategoryChildModel, String recordCategoryId)
{
mandatoryObject("recordCategoryChildModel", recordCategoryChildModel);
mandatoryString("recordCategoryId", recordCategoryId);
return createRecordCategoryChild(recordCategoryChildModel, recordCategoryId, EMPTY);
}
/**
* Creates a record category child. Can be a record category or a record folder.
*
* @param recordCategoryChildModel The record category child model which holds the information
* @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add
* @return The created {@link RecordCategoryChild}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordCategoryId} is not a valid format or {@code recordCategoryChildModel} is invalid</li>
* <li>authentication fails</li>
* <li>current user does not have permission to add children to {@code recordCategoryId}</li>
* <li>{@code recordCategoryId} does not exist</li>
* <li>new name clashes with an existing node in the current parent container</li>
* <li>model integrity exception, including node name with invalid characters</li>
* </ul>
*/
public RecordCategoryChild createRecordCategoryChild(RecordCategoryChild recordCategoryChildModel, String recordCategoryId, String parameters)
{
mandatoryObject("filePlanComponentProperties", recordCategoryChildModel);
mandatoryString("recordCategoryId", recordCategoryId);
return getRmRestWrapper().processModel(RecordCategoryChild.class, requestWithBody(
POST,
toJson(recordCategoryChildModel),
"record-categories/{recordCategoryId}/children?{parameters}",
recordCategoryId,
parameters
));
}
}

View File

@@ -1,300 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore.api;
import static org.alfresco.rest.core.RestRequest.requestWithBody;
import static org.alfresco.rest.core.RestRequest.simpleRequest;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString;
import static org.alfresco.rest.rm.community.util.PojoUtility.toJson;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.springframework.http.HttpMethod.DELETE;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.http.HttpMethod.POST;
import static org.springframework.http.HttpMethod.PUT;
import static org.testng.Assert.fail;
import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.restassured.builder.RequestSpecBuilder;
import io.restassured.http.ContentType;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.record.Record;
import org.alfresco.rest.rm.community.model.recordfolder.RecordFolder;
import org.alfresco.rest.rm.community.model.recordfolder.RecordFolderCollection;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
import org.alfresco.rest.rm.community.util.FilePlanComponentMixIn;
/**
* Record folder REST API Wrapper
*
* @author Tuna Aksoy
* @since 2.6
*/
public class RecordFolderAPI extends RMModelRequest
{
/**
* Constructor.
*
* @param rmRestWrapper RM REST Wrapper
*/
public RecordFolderAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* Deletes a record folder.
*
* @param recordFolderId The identifier of a record folder
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordFolderId} is not a valid format</li>
* <li>authentication fails</li>
* <li>current user does not have permission to delete {@code recordFolderId}</li>
* <li>{@code recordFolderId} does not exist</li>
* <li>{@code recordFolderId} is locked and cannot be deleted</li>
* </ul>
*/
public void deleteRecordFolder(String recordFolderId)
{
mandatoryString("recordFolderId", recordFolderId);
getRmRestWrapper().processEmptyModel(simpleRequest(
DELETE,
"record-folders/{recordFolderId}",
recordFolderId
));
}
/**
* see {@link #getRecordFolder(String, String)}
*/
public RecordFolder getRecordFolder(String recordFolderId)
{
mandatoryString("recordFolderId", recordFolderId);
return getRecordFolder(recordFolderId, EMPTY);
}
/**
* Gets a record folder.
*
* @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add
* @return The {@link RecordFolder} for the given {@code recordFolderId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordFolderId} is not a valid format</li>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code recordFolderId}</li>
* <li>{@code recordFolderId} does not exist</li>
* </ul>
*/
public RecordFolder getRecordFolder(String recordFolderId, String parameters)
{
mandatoryString("recordFolderId", recordFolderId);
return getRmRestWrapper().processModel(RecordFolder.class, simpleRequest(
GET,
"record-folders/{recordFolderId}?{parameters}",
recordFolderId,
parameters
));
}
/**
* see {@link #updateRecordFolder(RecordFolder, String, String)
*/
public RecordFolder updateRecordFolder(RecordFolder recordFolderModel, String recordFolderId)
{
mandatoryObject("recordFolderModel", recordFolderModel);
mandatoryString("recordFolderId", recordFolderId);
return updateRecordFolder(recordFolderModel, recordFolderId, EMPTY);
}
/**
* Updates a record folder.
*
* @param recordFolderModel The record folder model which holds the information
* @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add
* @param returns The updated {@link RecordFolder}
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code recordFolderId} is not a valid format or {@code recordFolderModel} is invalid</li>
* <li>authentication fails</li>
* <li>current user does not have permission to update {@code recordFolderId}</li>
* <li>{@code recordFolderId} does not exist</li>
* <li>the updated name clashes with an existing record folder in the current parent category</li>
* <li>model integrity exception, including file name with invalid characters</li>
* </ul>
*/
public RecordFolder updateRecordFolder(RecordFolder recordFolderModel, String recordFolderId, String parameters)
{
mandatoryObject("recordFolderModel", recordFolderModel);
mandatoryString("recordFolderId", recordFolderId);
return getRmRestWrapper().processModel(RecordFolder.class, requestWithBody(
PUT,
toJson(recordFolderModel),
"record-folders/{recordFolderId}?{parameters}",
recordFolderId,
parameters
));
}
/**
* see {@link #getRecordFolderChildren(String, String)}
*/
public RecordFolderCollection getRecordFolderChildren(String recordFolderId)
{
mandatoryString("recordFolderId", recordFolderId);
return getRecordFolderChildren(recordFolderId, EMPTY);
}
/**
* Gets the children of a record folder.
*
* @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add
* @return The {@link RecordFolderCollection} for the given {@code recordFolderId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code recordFolderId}</li>
* <li>{@code recordFolderId} does not exist</li>
*</ul>
*/
public RecordFolderCollection getRecordFolderChildren(String recordFolderId, String parameters)
{
mandatoryString("recordFolderId", recordFolderId);
return getRmRestWrapper().processModels(RecordFolderCollection.class, simpleRequest(
GET,
"record-folders/{recordFolderId}/records?{parameters}",
recordFolderId,
parameters
));
}
/**
* see {@link #createRecord(Record, String, String)}
*/
public Record createRecord(Record recordModel, String recordFolderId)
{
mandatoryObject("recordModel", recordModel);
mandatoryString("recordFolderId", recordFolderId);
return createRecord(recordModel, recordFolderId, EMPTY);
}
/**
* Create a record from file resource
*
* @param recordModel {@link Record} for electronic record to be created
* @param recordContent {@link File} pointing to the content of the electronic record to be created
* @param recordFolderId The identifier of a record folder
* @return newly created {@link Record}
* @throws RuntimeException for invalid recordModel JSON strings
*/
public Record createRecord(Record recordModel, String recordFolderId, File recordContent) throws RuntimeException
{
mandatoryString("recordFolderId", recordFolderId);
mandatoryObject("recordContent", recordContent);
mandatoryObject("recordModel", recordModel);
if (!recordModel.getNodeType().equals(CONTENT_TYPE))
{
fail("Only electronic records are supported");
}
/*
* For file uploads nodeBodyCreate is ignored hence can't be used. Append all Record fields
* to the request.
*/
RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec();
JsonNode root;
try
{
root = new ObjectMapper().readTree(toJson(recordModel, Record.class, FilePlanComponentMixIn.class));
}
catch (IOException e)
{
throw new RuntimeException("Failed to convert model to JSON.", e);
}
// add request fields
Iterator<String> fieldNames = root.fieldNames();
while (fieldNames.hasNext())
{
String fieldName = fieldNames.next();
builder.addMultiPart(fieldName, root.get(fieldName).asText(), ContentType.JSON.name());
}
builder.addMultiPart("filedata", recordContent, ContentType.BINARY.name());
// create node with given content
return createRecord(recordModel, recordFolderId);
}
/**
* Creates a record in a record folder child, i.e. a record.
*
* @param recordModel The record model which holds the information
* @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add
* @return The created {@link Record}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordFolderId is not a valid format or {@code recordModel} is invalid</li>
* <li>authentication fails</li>
* <li>current user does not have permission to add children to {@code recordFolderId}</li>
* <li>{@code recordFolderId} does not exist</li>
* <li>model integrity exception, including node name with invalid characters</li>
* </ul>
*/
public Record createRecord(Record recordModel, String recordFolderId, String parameters)
{
mandatoryObject("recordModel", recordModel);
mandatoryString("recordFolderId", recordFolderId);
return getRmRestWrapper().processModel(Record.class, requestWithBody(
POST,
toJson(recordModel),
"record-folders/{recordFolderId}/records?{parameters}",
recordFolderId,
parameters
));
}
}

View File

@@ -1,280 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore.api;
import static org.alfresco.rest.core.RestRequest.requestWithBody;
import static org.alfresco.rest.core.RestRequest.simpleRequest;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString;
import static org.alfresco.rest.rm.community.util.PojoUtility.toJson;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.springframework.http.HttpMethod.DELETE;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.http.HttpMethod.POST;
import static org.springframework.http.HttpMethod.PUT;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.record.Record;
import org.alfresco.rest.rm.community.model.record.RecordBodyFile;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
import io.restassured.response.ResponseBody;
/**
* Records REST API Wrapper
*
* @author Rodica Sutu
* @since 2.6
*/
public class RecordsAPI extends RMModelRequest
{
/**
* @param rmRestWrapper RM REST Wrapper
*/
public RecordsAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* Get the content for the electronic record
*
* @param recordId The id of the electronic record
* @return {@link ResponseBody} representing content for the given record id
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordId} has no content</li>
* <li> {@code recordId} is not a valid format, or is not a record</li>
* <li>authentication fails</li>
* <li>{@code recordId} does not exist</li>
* </ul>
*/
public ResponseBody<?> getRecordContent(String recordId)
{
mandatoryString("recordId", recordId);
return getRmRestWrapper()
.processHtmlResponse(simpleRequest(GET,"records/{recordId}/content", recordId))
.getBody();
}
/**
* File the record recordId into file plan structure based on the location sent via the request body
*
* @param recordBodyFile The properties where to file the record
* @param recordId The id of the record to file
* @return The {@link Record} with the given properties
* @throws RuntimeException for the following cases:
* <ul>
* <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li>
* <li>authentication fails</li>
* <li>current user does not have permission to file to {@code fileplanComponentId}</li>
* <li>{@code recordId} does not exist</li>
* <li>targetParentId from recordBodyFile does not exist</li>
* <li>model integrity exception: the action breaks system's integrity restrictions</li>
* </ul>
*
*/
public Record fileRecord(RecordBodyFile recordBodyFile, String recordId)
{
mandatoryObject("recordBodyFile", recordBodyFile);
mandatoryString("recordId", recordId);
return fileRecord(recordBodyFile, recordId, EMPTY);
}
/**
* File the record recordId into file plan structure based on the location sent via the request body
*
* @param recordBodyFile The properties where to file the record
* @param recordId The id of the record to file
* @return The {@link Record} with the given properties
* @throws RuntimeException for the following cases:
* <ul>
* <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li>
* <li>authentication fails</li>
* <li>current user does not have permission to file to {@code fileplanComponentId}</li>
* <li>{@code recordId} does not exist</li>
* <li>targetParentId from recordBodyFile does not exist</li>
* <li>model integrity exception: the action breaks system's integrity restrictions</li>
* </ul>
*
*/
public Record fileRecord(RecordBodyFile recordBodyFile, String recordId, String parameters)
{
mandatoryObject("requestBodyFile", recordBodyFile);
mandatoryString("recordId", recordId);
return getRmRestWrapper().processModel(Record.class, requestWithBody(
POST,
toJson(recordBodyFile),
"/records/{recordId}/file?{parameters}",
recordId,
parameters
));
}
/**
* see {@link #completeRecord(String, String)
*/
public Record completeRecord(String recordId)
{
mandatoryString("recordId", recordId);
return completeRecord(recordId, EMPTY);
}
/**
* Complete the record recordId
*
* @param recordId The id of the record to complete
* @return The completed {@link Record} with the given properties
* @throws RuntimeException for the following cases:
* <ul>
* <li>Invalid parameter: {@code recordId} is not a record</li>
* <li>authentication fails</li>
* <li>current user does not have permission to complete {@code recordId}</li>
* <li>{@code recordId} does not exist or is frozen</li>
* <li>model integrity exception: the record is already completed</li>
* <li>model integrity exception: the record has missing meta-data</li>
* </ul>
*/
public Record completeRecord(String recordId, String parameters)
{
mandatoryString("recordId", recordId);
return getRmRestWrapper().processModel(Record.class, simpleRequest(
POST,
"/records/{recordId}/complete?{parameters}",
recordId,
parameters
));
}
/**
* Deletes a record.
*
* @param recordId The identifier of a record
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordId} is not a valid format</li>
* <li>authentication fails</li>
* <li>current user does not have permission to delete {@code recordId}</li>
* <li>{@code recordId} does not exist</li>
* <li>{@code recordId} is locked and cannot be deleted</li>
* </ul>
*/
public void deleteRecord(String recordId)
{
mandatoryString("recordId", recordId);
getRmRestWrapper().processEmptyModel(simpleRequest(
DELETE,
"records/{recordId}",
recordId
));
}
/**
* see {@link #getRecord(String, String)}
*/
public Record getRecord(String recordId)
{
mandatoryString("recordId", recordId);
return getRecord(recordId, EMPTY);
}
/**
* Gets a record.
*
* @param recordId The identifier of a record
* @param parameters The URL parameters to add
* @return The {@link Record} for the given {@code recordId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordId} is not a valid format</li>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code recordId}</li>
* <li>{@code recordId} does not exist</li>
* </ul>
*/
public Record getRecord(String recordId, String parameters)
{
mandatoryString("recordId", recordId);
return getRmRestWrapper().processModel(Record.class, simpleRequest(
GET,
"records/{recordId}?{parameters}",
recordId,
parameters
));
}
/**
* see {@link #updateRecord(Record, String, String)
*/
public Record updateRecord(Record recordModel, String recordId)
{
mandatoryObject("recordModel", recordModel);
mandatoryString("recordId", recordId);
return updateRecord(recordModel, recordId, EMPTY);
}
/**
* Updates a record.
*
* @param recordModel The record model which holds the information
* @param recordId The identifier of a record
* @param parameters The URL parameters to add
* @return The updated {@link Record}
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code recordId} is not a valid format or {@code recordModel} is invalid</li>
* <li>authentication fails</li>
* <li>current user does not have permission to update {@code recordId}</li>
* <li>{@code recordId} does not exist</li>
* <li>the updated name clashes with an existing record in the current parent folder</li>
* <li>model integrity exception, including file name with invalid characters</li>
* </ul>
*/
public Record updateRecord(Record recordModel, String recordId, String parameters)
{
mandatoryObject("recordModel", recordModel);
mandatoryString("recordId", recordId);
return getRmRestWrapper().processModel(Record.class, requestWithBody(
PUT,
toJson(recordModel),
"records/{recordId}?{parameters}",
recordId,
parameters
));
}
}

View File

@@ -1,125 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore.api;
import static org.alfresco.rest.core.RestRequest.simpleRequest;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.springframework.http.HttpMethod.GET;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.transfer.Transfer;
import org.alfresco.rest.rm.community.model.transfer.TransferChildCollection;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
/**
* Transfer REST API Wrapper
*
* @author Silviu Dinuta
* @since 2.6
*/
public class TransferAPI extends RMModelRequest
{
/**
* @param rmRestWrapper RM REST Wrapper
*/
public TransferAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* see {@link #getTransfer(String, String)}
*/
public Transfer getTransfer(String transferId)
{
mandatoryString("transferId", transferId);
return getTransfer(transferId, EMPTY);
}
/**
* Gets a transfer.
*
* @param transferId The identifier of a transfer
* @param parameters The URL parameters to add
* @return The {@link Transfer} for the given {@code transferId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code transferId} is not a valid format</li>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code transferId}</li>
* <li>{@code transferId} does not exist</li>
* </ul>
*/
public Transfer getTransfer(String transferId, String parameters)
{
mandatoryString("transferId", transferId);
return getRmRestWrapper().processModel(Transfer.class, simpleRequest(
GET,
"/transfers/{transferId}?{parameters}",
transferId,
parameters
));
}
/**
* see {@link #getTransfersChildren(String, String)}
*/
public TransferChildCollection getTransfersChildren(String transferId)
{
mandatoryString("transferId", transferId);
return getTransfersChildren(transferId, EMPTY);
}
/**
* Gets the children (record folder or record) of a transfer.
*
* @param transferId The identifier of a transfer
* @param parameters The URL parameters to add
* @return The {@link TransferChildCollection} for the given {@code transferId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code transferId}</li>
* <li>{@code filePlanId} does not exist</li>
*</ul>
*/
public TransferChildCollection getTransfersChildren(String transferId, String parameters)
{
mandatoryString("transferId", transferId);
return getRmRestWrapper().processModels(TransferChildCollection.class, simpleRequest(
GET,
"transfers/{filePlanId}/children?{parameters}",
transferId,
parameters
));
}
}

View File

@@ -1,172 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore.api;
import static org.alfresco.rest.core.RestRequest.requestWithBody;
import static org.alfresco.rest.core.RestRequest.simpleRequest;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString;
import static org.alfresco.rest.rm.community.util.PojoUtility.toJson;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.http.HttpMethod.PUT;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.transfer.TransferCollection;
import org.alfresco.rest.rm.community.model.transfercontainer.TransferContainer;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
/**
* Transfer Container REST API Wrapper
*
* @author Silviu Dinuta
* @since 2.6
*/
public class TransferContainerAPI extends RMModelRequest
{
/**
* @param rmRestWrapper RM REST Wrapper
*/
public TransferContainerAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* see {@link #getTransferContainer(String, String)}
*/
public TransferContainer getTransferContainer(String transferContainerId)
{
mandatoryString("transferContainerId", transferContainerId);
return getTransferContainer(transferContainerId, EMPTY);
}
/**
* Gets a transfer container.
*
* @param transferContainerId The identifier of a transfer container
* @param parameters The URL parameters to add
* @return The {@link TransferContainer} for the given {@code transferContainerId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code transferContainerId} is not a valid format</li>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code transferContainerId}</li>
* <li>{@code transferContainerId} does not exist</li>
* </ul>
*/
public TransferContainer getTransferContainer(String transferContainerId, String parameters)
{
mandatoryString("transferContainerId", transferContainerId);
return getRmRestWrapper().processModel(TransferContainer.class, simpleRequest(
GET,
"/transfer-containers/{transferContainerId}?{parameters}",
transferContainerId,
parameters
));
}
/**
* see {@link #updateTransferContainer(TransferContainer, String, String)
*/
public TransferContainer updateTransferContainer(TransferContainer transferContainerModel, String transferContainerId)
{
mandatoryObject("transferContainerModel", transferContainerModel);
mandatoryString("transferContainerId", transferContainerId);
return updateTransferContainer(transferContainerModel, transferContainerId, EMPTY);
}
/**
* Updates a transfer container.
*
* @param transferContainerModel The transfer container model which holds the information
* @param transferContainerId The identifier of a transfer container
* @param parameters The URL parameters to add
* @param returns The updated {@link TransferContainer}
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code transferContainerId} is not a valid format or {@code transferContainerModel} is invalid</li>
* <li>authentication fails</li>
* <li>current user does not have permission to update {@code transferContainerId}</li>
* <li>{@code transferContainerId} does not exist</li>
* <li>the updated name clashes with an existing transfer container in the current file plan</li>
* <li>model integrity exception, including transfer container name with invalid characters</li>
* </ul>
*/
public TransferContainer updateTransferContainer(TransferContainer transferContainerModel, String transferContainerId, String parameters)
{
mandatoryObject("transferContainerModel", transferContainerModel);
mandatoryString("transferContainerId", transferContainerId);
return getRmRestWrapper().processModel(TransferContainer.class, requestWithBody(
PUT,
toJson(transferContainerModel),
"transfer-containers/{transferContainerId}?{parameters}",
transferContainerId,
parameters
));
}
/**
* see {@link #getTransfers(String, String)}
*/
public TransferCollection getTransfers(String transferContainerId)
{
mandatoryString("transferContainerId", transferContainerId);
return getTransfers(transferContainerId, EMPTY);
}
/**
* Gets the children (transfers) of a transfer container.
*
* @param transferContainerId The identifier of a transfer container
* @param parameters The URL parameters to add
* @return The {@link TransferCollection} for the given {@code transferContainerId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code transferContainerId}</li>
* <li>{@code filePlanId} does not exist</li>
*</ul>
*/
public TransferCollection getTransfers(String transferContainerId, String parameters)
{
mandatoryString("transferContainerId", transferContainerId);
return getRmRestWrapper().processModels(TransferCollection.class, simpleRequest(
GET,
"transfer-containers/{filePlanId}/transfers?{parameters}",
transferContainerId,
parameters
));
}
}

View File

@@ -1,277 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore.api;
import static org.alfresco.rest.core.RestRequest.requestWithBody;
import static org.alfresco.rest.core.RestRequest.simpleRequest;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString;
import static org.alfresco.rest.rm.community.util.PojoUtility.toJson;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.http.HttpMethod.POST;
import static org.springframework.http.HttpMethod.PUT;
import static org.testng.Assert.fail;
import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.restassured.builder.RequestSpecBuilder;
import io.restassured.http.ContentType;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainer;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChild;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChildCollection;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
import org.alfresco.rest.rm.community.util.UnfiledContainerChildMixin;
/**
* Unfiled Container REST API Wrapper
*
* @author Tuna Aksoy
* @author Ana Bozianu
* @since 2.6
*/
public class UnfiledContainerAPI extends RMModelRequest
{
/**
* @param rmRestWrapper RM REST Wrapper
*/
public UnfiledContainerAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* see {@link #getUnfiledContainer(String, String)}
*/
public UnfiledContainer getUnfiledContainer(String unfiledContainerId)
{
mandatoryString("unfiledContainerId", unfiledContainerId);
return getUnfiledContainer(unfiledContainerId, EMPTY);
}
/**
* Gets an unfiled record container.
*
* @param unfiledContainerId The identifier of a unfiled record container
* @param parameters The URL parameters to add
* @return The {@link UnfiledContainer} for the given {@code unfiledContainerId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code unfiledContainerId} is not a valid format</li>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code unfiledContainerId}</li>
* <li>{@code unfiledContainerId} does not exist</li>
* </ul>
*/
public UnfiledContainer getUnfiledContainer(String unfiledContainerId, String parameters)
{
mandatoryString("unfiledContainerId", unfiledContainerId);
return getRmRestWrapper().processModel(UnfiledContainer.class, simpleRequest(
GET,
"unfiled-containers/{unfiledContainerId}?{parameters}",
unfiledContainerId,
parameters
));
}
/**
* see {@link #getUnfiledContainerChildren(String)} (String, String)}
*/
public UnfiledContainerChildCollection getUnfiledContainerChildren(String unfiledContainerId)
{
mandatoryString("unfiledContainerId", unfiledContainerId);
return getUnfiledContainerChildren(unfiledContainerId, EMPTY);
}
/**
* Gets the children of an unfiled records container
*
* @param unfiledContainerId The identifier of an unfiled records container
* @param parameters The URL parameters to add
* @return The {@link UnfiledContainerChildCollection} for the given {@code unfiledContainerId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code unfiledContainerId}</li>
* <li>{@code unfiledContainerId} does not exist</li>
*</ul>
*/
public UnfiledContainerChildCollection getUnfiledContainerChildren(String unfiledContainerId, String parameters)
{
mandatoryString("unfiledContainerId", unfiledContainerId);
return getRmRestWrapper().processModels(UnfiledContainerChildCollection.class, simpleRequest(
GET,
"unfiled-containers/{unfiledContainerId}/children?{parameters}",
unfiledContainerId,
parameters
));
}
/**
* see {@link #createUnfiledContainerChild(UnfiledContainerChild, String, String)}
*/
public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId)
{
mandatoryObject("unfiledContainerChildModel", unfiledContainerChildModel);
mandatoryString("unfiledContainerId", unfiledContainerId);
return createUnfiledContainerChild(unfiledContainerChildModel, unfiledContainerId, EMPTY);
}
/**
* Creates an unfiled container child. Can be a record or an unfiled record folder.
*
* @param unfiledContainerChildModel The unfiled container child model which holds the information
* @param unfiledContainerId The identifier of an unfiled container
* @param parameters The URL parameters to add
* @return The created {@link UnfiledContainerChild}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code unfiledContainerId} is not a valid format or {@code unfiledContainerChildModel} is invalid</li>
* <li>authentication fails</li>
* <li>current user does not have permission to add children to {@code unfiledContainerId}</li>
* <li>{@code unfiledContainerId} does not exist</li>
* <li>new name clashes with an existing node in the current parent container</li>
* <li>model integrity exception, including node name with invalid characters</li>
* </ul>
*/
public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, String parameters)
{
mandatoryObject("unfiledContainerChildModel", unfiledContainerChildModel);
mandatoryString("unfiledContainerId", unfiledContainerId);
return getRmRestWrapper().processModel(UnfiledContainerChild.class, requestWithBody(
POST,
toJson(unfiledContainerChildModel),
"unfiled-containers/{unfiledContainerId}/children?{parameters}",
unfiledContainerId,
parameters
));
}
/**
* Create a record from file resource
*
* @param unfiledContainerChildModel {@link UnfiledContainerChild} for electronic record to be created
* @param unfiledContainerChildContent {@link File} pointing to the content of the electronic record to be created
* @param unfiledContainerId The identifier of a unfiled container
* @return newly created {@link UnfiledContainerChild}
* @throws RuntimeException for invalid recordModel JSON strings
*/
public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, File unfiledContainerChildContent)
{
mandatoryObject("unfiledContainerChildModel", unfiledContainerChildModel);
mandatoryObject("unfiledContainerChildContent", unfiledContainerChildContent);
mandatoryString("unfiledContainerId", unfiledContainerId);
if (!unfiledContainerChildModel.getNodeType().equals(CONTENT_TYPE))
{
fail("Only electronic records are supported");
}
/*
* For file uploads nodeBodyCreate is ignored hence can't be used. Append all Record fields
* to the request.
*/
RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec();
JsonNode root;
try
{
root = new ObjectMapper().readTree(toJson(unfiledContainerChildModel, UnfiledContainerChild.class, UnfiledContainerChildMixin.class));
}
catch (IOException e)
{
throw new RuntimeException("Failed to convert model to JSON.", e);
}
// add request fields
Iterator<String> fieldNames = root.fieldNames();
while (fieldNames.hasNext())
{
String fieldName = fieldNames.next();
builder.addMultiPart(fieldName, root.get(fieldName).asText(), ContentType.JSON.name());
}
builder.addMultiPart("filedata", unfiledContainerChildContent, ContentType.BINARY.name());
// create node with given content
return createUnfiledContainerChild(unfiledContainerChildModel, unfiledContainerId);
}
/**
* see {@link #updateUnfiledContainer(UnfiledContainer, String, String)
*/
public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId)
{
mandatoryObject("unfiledContainerModel", unfiledContainerModel);
mandatoryString("unfiledContainerId", unfiledContainerId);
return updateUnfiledContainer(unfiledContainerModel, unfiledContainerId, EMPTY);
}
/**
* Updates an unfiled record container
*
* @param unfiledContainerModel The unfiled record container model which holds the information
* @param unfiledContainerId The identifier of an unfiled record container
* @param parameters The URL parameters to add
* @param returns The updated {@link UnfiledContainer}
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code unfiledContainerId} is not a valid format or {@code unfiledContainerModel} is invalid</li>
* <li>authentication fails</li>
* <li>current user does not have permission to update {@code unfiledContainerId}</li>
* <li>{@code unfiledContainerId} does not exist</li>
* <li>the updated name clashes with an existing root category of special container in the current fileplan</li>
* <li>model integrity exception, including file name with invalid characters</li>
* </ul>
*/
public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId, String parameters)
{
mandatoryObject("unfiledContainerModel", unfiledContainerModel);
mandatoryString("unfiledContainerId", unfiledContainerId);
return getRmRestWrapper().processModel(UnfiledContainer.class, requestWithBody(
PUT,
toJson(unfiledContainerModel),
"unfiled-containers/{unfiledContainerId}?{parameters}",
unfiledContainerId,
parameters
));
}
}

View File

@@ -1,300 +0,0 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 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.requests.gscore.api;
import static org.alfresco.rest.core.RestRequest.requestWithBody;
import static org.alfresco.rest.core.RestRequest.simpleRequest;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject;
import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString;
import static org.alfresco.rest.rm.community.util.PojoUtility.toJson;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.springframework.http.HttpMethod.DELETE;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.http.HttpMethod.POST;
import static org.springframework.http.HttpMethod.PUT;
import static org.testng.Assert.fail;
import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.restassured.builder.RequestSpecBuilder;
import io.restassured.http.ContentType;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChild;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChildCollection;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledRecordFolder;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
import org.alfresco.rest.rm.community.util.UnfiledContainerChildMixin;
/**
* Unfiled Record Folders REST API Wrapper
*
* @author Ramona Popa
* @since 2.6
*/
public class UnfiledRecordFolderAPI extends RMModelRequest
{
/**
* @param rmRestWrapper RM REST Wrapper
*/
public UnfiledRecordFolderAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* see {@link #getUnfiledRecordFolder(String, String)}
*/
public UnfiledRecordFolder getUnfiledRecordFolder(String unfiledRecordFolderId)
{
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
return getUnfiledRecordFolder(unfiledRecordFolderId, EMPTY);
}
/**
* Gets an unfiled record folder.
*
* @param unfiledRecordFolderId The identifier of a unfiled record folder
* @param parameters The URL parameters to add
* @return The {@link UnfiledRecordFolder} for the given {@code unfiledRecordFolderId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code unfiledRecordFolderId} is not a valid format</li>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code unfiledRecordFolderId}</li>
* <li>{@code unfiledRecordFolderId} does not exist</li>
* </ul>
*/
public UnfiledRecordFolder getUnfiledRecordFolder(String unfiledRecordFolderId, String parameters)
{
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
return getRmRestWrapper().processModel(UnfiledRecordFolder.class, simpleRequest(
GET,
"unfiled-record-folders/{unfiledRecordFolderId}?{parameters}",
unfiledRecordFolderId,
parameters
));
}
/**
* see {@link #getUnfiledRecordFolderChildren(String, String)}
*/
public UnfiledContainerChildCollection getUnfiledRecordFolderChildren(String unfiledRecordFolderId)
{
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
return getUnfiledRecordFolderChildren(unfiledRecordFolderId, EMPTY);
}
/**
* Gets the children of an unfiled record folder
*
* @param unfiledRecordFolderId The identifier of an unfiled records folder
* @param parameters The URL parameters to add
* @return The {@link UnfiledRecordFolderChildCollection} for the given {@code unfiledRecordFolderId}
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code unfiledRecordFolderId}</li>
* <li>{@code unfiledRecordFolderId} does not exist</li>
*</ul>
*/
public UnfiledContainerChildCollection getUnfiledRecordFolderChildren(String unfiledRecordFolderId, String parameters)
{
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
return getRmRestWrapper().processModels(UnfiledContainerChildCollection.class, simpleRequest(
GET,
"unfiled-record-folders/{unfiledRecordFolderId}/children?{parameters}",
unfiledRecordFolderId,
parameters
));
}
/**
* see {@link #createUnfiledRecordFolderChild(UnfiledContainerChild, String, String)}
*/
public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId)
{
mandatoryObject("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
return createUnfiledRecordFolderChild(unfiledRecordFolderChildModel, unfiledRecordFolderId, EMPTY);
}
/**
* Creates an unfiled record folder child. Can be a record or an unfiled record folder.
*
* @param unfiledRecordFolderChildModel The unfiled folder child model which holds the information
* @param unfiledRecordFolderId The identifier of an unfiled folder
* @param parameters The URL parameters to add
* @return The created {@link UnfiledRecordFolderChild}
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderChildModel} is invalid</li>
* <li>authentication fails</li>
* <li>current user does not have permission to add children to {@code unfiledRecordFolderId}</li>
* <li>{@code unfiledRecordFolderId} does not exist</li>
* <li>new name clashes with an existing node in the current parent container</li>
* <li>model integrity exception, including node name with invalid characters</li>
* </ul>
*/
public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, String parameters)
{
mandatoryObject("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
return getRmRestWrapper().processModel(UnfiledContainerChild.class, requestWithBody(
POST,
toJson(unfiledRecordFolderChildModel),
"unfiled-record-folders/{unfiledRecordFolderId}/children?{parameters}",
unfiledRecordFolderId,
parameters
));
}
/**
* Create a record from file resource
*
* @param unfiledRecordFolderChildModel {@link UnfiledContainerChild} for electronic record to be created
* @param unfiledRecordFolderChildContent {@link File} pointing to the content of the electronic record to be created
* @param unfiledRecordFolderId The identifier of a unfiled record folder
* @return newly created {@link UnfiledContainerChild}
* @throws RuntimeException for invalid recordModel JSON strings
*/
public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, File unfiledRecordFolderChildContent)
{
mandatoryObject("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel);
mandatoryObject("unfiledRecordFolderChildContent", unfiledRecordFolderChildContent);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
if (!unfiledRecordFolderChildModel.getNodeType().equals(CONTENT_TYPE))
{
fail("Only electronic records are supported");
}
/*
* For file uploads nodeBodyCreate is ignored hence can't be used. Append all Record fields
* to the request.
*/
RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec();
JsonNode root;
try
{
root = new ObjectMapper().readTree(toJson(unfiledRecordFolderChildModel, UnfiledContainerChild.class, UnfiledContainerChildMixin.class));
}
catch (IOException e)
{
throw new RuntimeException("Failed to convert model to JSON.", e);
}
// add request fields
Iterator<String> fieldNames = root.fieldNames();
while (fieldNames.hasNext())
{
String fieldName = fieldNames.next();
builder.addMultiPart(fieldName, root.get(fieldName).asText(), ContentType.JSON.name());
}
builder.addMultiPart("filedata", unfiledRecordFolderChildContent, ContentType.BINARY.name());
// create node with given content
return createUnfiledRecordFolderChild(unfiledRecordFolderChildModel, unfiledRecordFolderId);
}
/**
* see {@link #updateUnfiledRecordFolder(UnfiledRecordFolder, String, String)
*/
public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId)
{
mandatoryObject("unfiledRecordFolderModel", unfiledRecordFolderModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
return updateUnfiledRecordFolder(unfiledRecordFolderModel, unfiledRecordFolderId, EMPTY);
}
/**
* Updates an unfiled record folder
*
* @param unfiledRecordFolderModel The unfiled record folder model which holds the information
* @param unfiledRecordFolderId The identifier of an unfiled record folder
* @param parameters The URL parameters to add
* @param returns The updated {@link UnfiledRecordFolder}
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderModel} is invalid</li>
* <li>authentication fails</li>
* <li>current user does not have permission to update {@code unfiledRecordFolderId}</li>
* <li>{@code unfiledRecordFolderId} does not exist</li>
* <li>the updated name clashes with an existing root category of special container in the current fileplan</li>
* <li>model integrity exception, including file name with invalid characters</li>
* </ul>
*/
public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId, String parameters)
{
mandatoryObject("unfiledRecordFolderModel", unfiledRecordFolderModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
return getRmRestWrapper().processModel(UnfiledRecordFolder.class, requestWithBody(
PUT,
toJson(unfiledRecordFolderModel),
"unfiled-record-folders/{unfiledRecordFolderId}?{parameters}",
unfiledRecordFolderId,
parameters
));
}
/**
* Deletes an unfiled record folder.
*
* @param unfiledRecordFolderId The identifier of a unfiled record folder
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code unfiledRecordFolderId} is not a valid format</li>
* <li>authentication fails</li>
* <li>current user does not have permission to delete {@code unfiledRecordFolderId}</li>
* <li>{@code unfiledRecordFolderId} does not exist</li>
* <li>{@code unfiledRecordFolderId} is locked and cannot be deleted</li>
* </ul>
*/
public void deleteUnfiledRecordFolder(String unfiledRecordFolderId)
{
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
getRmRestWrapper().processEmptyModel(simpleRequest(
DELETE,
"unfiled-record-folders/{recordFolderId}",
unfiledRecordFolderId
));
}
}

Some files were not shown because too many files have changed in this diff Show More