mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-29 15:21:53 +00:00
Compare commits
263 Commits
8.300-TEST
...
repo-5439-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff9e8c6350 | ||
|
|
05be773f47 | ||
|
|
6504e9e74b | ||
|
|
f2c8878581 | ||
|
|
85e226c682 | ||
|
|
0e8b5407fc | ||
|
|
9f48ef0e40 | ||
|
|
6c3b81dcbb | ||
|
|
a202dbc800 | ||
|
|
73a85805d5 | ||
|
|
c19c931cfa | ||
|
|
eeefcf573c | ||
|
|
988484e4f3 | ||
|
|
5d3a683915 | ||
|
|
1effe8f717 | ||
|
|
d491083312 | ||
|
|
3bd0f2f094 | ||
|
|
95f04cbf34 | ||
|
|
0e815ebe1a | ||
|
|
a691577ded | ||
|
|
8da40d0d57 | ||
|
|
9f2c10e6be | ||
|
|
e949437be8 | ||
|
|
64454ddc09 | ||
|
|
bb95c1cba2 | ||
|
|
53fecfb071 | ||
|
|
3b5a9dbcc9 | ||
|
|
f731235d59 | ||
|
|
908157bc01 | ||
|
|
796c887f1b | ||
|
|
a499db20d6 | ||
|
|
c49b6c3369 | ||
|
|
bfffcd3f61 | ||
|
|
2d2b4357f9 | ||
|
|
9e5d38dce1 | ||
|
|
c595196343 | ||
|
|
0b5e6a7f37 | ||
|
|
c0c0b59f1e | ||
|
|
ea4e18d347 | ||
|
|
73c875eac9 | ||
|
|
69fc4fbb01 | ||
|
|
ed4f353f9c | ||
|
|
396a590e56 | ||
|
|
d77dba4c27 | ||
|
|
02e3cb8523 | ||
|
|
081f22e8b3 | ||
|
|
addb4bf760 | ||
|
|
83e20d6c44 | ||
|
|
f721c9cf18 | ||
|
|
16c6e5d228 | ||
|
|
fcf9b13a47 | ||
|
|
753a1e0ecb | ||
|
|
33f37731c7 | ||
|
|
fc0fa4e4b7 | ||
|
|
5366812560 | ||
|
|
8651070b1b | ||
|
|
84dbe8acd8 | ||
|
|
427777a048 | ||
|
|
30da34a683 | ||
|
|
016ad64645 | ||
|
|
f4f7698295 | ||
|
|
c1f9426b05 | ||
|
|
3ce608981c | ||
|
|
7f3788225c | ||
|
|
47ff32b689 | ||
|
|
52e5e4572f | ||
|
|
a35e646c18 | ||
|
|
831854e094 | ||
|
|
1db85cff56 | ||
|
|
09c2c95081 | ||
|
|
1b06e80448 | ||
|
|
4c03182358 | ||
|
|
1804f7943b | ||
|
|
963c874247 | ||
|
|
032d23c76d | ||
|
|
53e87b347e | ||
|
|
5017b305fb | ||
|
|
12f645a71c | ||
|
|
fbb6f422cf | ||
|
|
54922aefbd | ||
|
|
bd839de6dd | ||
|
|
d70790f0c2 | ||
|
|
374bf7aea8 | ||
|
|
f95be4b67a | ||
|
|
c34cd336e0 | ||
|
|
297d1242a5 | ||
|
|
b61f409566 | ||
|
|
72ce0959a9 | ||
|
|
67599ba655 | ||
|
|
181a664085 | ||
|
|
cca20b3b18 | ||
|
|
cdf2630bde | ||
|
|
64bbcafe88 | ||
|
|
62a4d4a026 | ||
|
|
1eeac68561 | ||
|
|
c7c830140d | ||
|
|
3c2dc91a26 | ||
|
|
73b393a541 | ||
|
|
77aac5a5a1 | ||
|
|
b37889283c | ||
|
|
77e96654a0 | ||
|
|
9fb4816fd2 | ||
|
|
8249525ef4 | ||
|
|
ab4cd605a7 | ||
|
|
e172719d17 | ||
|
|
27d5e144a9 | ||
|
|
6d5583c048 | ||
|
|
6e5fcbbe9e | ||
|
|
20680b0d7f | ||
|
|
5bee1ff712 | ||
|
|
e20eedc49a | ||
|
|
0ef4a4c744 | ||
|
|
a80400d240 | ||
|
|
d00e983ab5 | ||
|
|
cd11a9459c | ||
|
|
acac23f29a | ||
|
|
67bbfed474 | ||
|
|
e9d8cdcb2b | ||
|
|
8c511eb4dd | ||
|
|
b00da84e6a | ||
|
|
014f0cd024 | ||
|
|
2e4f67fac9 | ||
|
|
ff8e40a2db | ||
|
|
0f21f71cff | ||
|
|
55048eb160 | ||
|
|
3ba278ab85 | ||
|
|
6ccc4136ed | ||
|
|
ea0e226389 | ||
|
|
687d609789 | ||
|
|
3534a44127 | ||
|
|
33b43ba93f | ||
|
|
73081e43e5 | ||
|
|
d9de437e68 | ||
|
|
73e8cac9d5 | ||
|
|
3ef431ff41 | ||
|
|
2933d45eff | ||
|
|
8bf87153bf | ||
|
|
c60ea4abb5 | ||
|
|
c8dd842e5d | ||
|
|
7208d4963e | ||
|
|
5e0d8cba20 | ||
|
|
094e7d8cc3 | ||
|
|
13597a55eb | ||
|
|
b894bd95d2 | ||
|
|
cbe6a5f2cc | ||
|
|
1a499f5069 | ||
|
|
00ce0e74b8 | ||
|
|
fb39625d8e | ||
|
|
bbf2d06b5c | ||
|
|
22b5963d6d | ||
|
|
5dfd37d359 | ||
|
|
e53e34636e | ||
|
|
55c3e1cf87 | ||
|
|
81768d4bbe | ||
|
|
72de057f16 | ||
|
|
17005491cc | ||
|
|
1afe99c2f4 | ||
|
|
29ff83faba | ||
|
|
7ddcdf5190 | ||
|
|
1a29fabf95 | ||
|
|
7a00465635 | ||
|
|
6438a2732a | ||
|
|
911380265f | ||
|
|
d5a07519d9 | ||
|
|
97a538c4a3 | ||
|
|
dc5d03df1c | ||
|
|
e0ec65b015 | ||
|
|
2fbde6ffc4 | ||
|
|
a3fd5e7ea2 | ||
|
|
36c35f0af2 | ||
|
|
22f1d0eb1b | ||
|
|
445825710e | ||
|
|
b0b2f3bd2d | ||
|
|
b71c8727e0 | ||
|
|
37ada20654 | ||
|
|
3b2f7ffe73 | ||
|
|
38e9e15663 | ||
|
|
8879e2bfc3 | ||
|
|
3d628960bc | ||
|
|
ee34a754b7 | ||
|
|
483eab496c | ||
|
|
d27428b246 | ||
|
|
71855f1b24 | ||
|
|
1065f4e6fb | ||
|
|
ad73ac1a01 | ||
|
|
57191c3b14 | ||
|
|
5618700d16 | ||
|
|
7b66fac26e | ||
|
|
57d0f25b1f | ||
|
|
d01169e9c2 | ||
|
|
9ce6bc95db | ||
|
|
90bf90b255 | ||
|
|
0a770ad30b | ||
|
|
822fa5363a | ||
|
|
76b44ab966 | ||
|
|
1a0eda839e | ||
|
|
02d7193947 | ||
|
|
fdf9e74873 | ||
|
|
43bdc8148a | ||
|
|
36450c0ae5 | ||
|
|
600365c0fd | ||
|
|
86db6e887d | ||
|
|
e837f9507a | ||
|
|
15e0236aa8 | ||
|
|
c583e905a5 | ||
|
|
7ddb31d5e8 | ||
|
|
88cb7a0be2 | ||
|
|
03cb9f442b | ||
|
|
669a177a02 | ||
|
|
9b26b8e79e | ||
|
|
b848c200c4 | ||
|
|
a4c70b772c | ||
|
|
123cd3d22f | ||
|
|
2e48bb46b9 | ||
|
|
a0b42842fc | ||
|
|
bd6290a6ca | ||
|
|
4ae2c46d26 | ||
|
|
c48b1ded12 | ||
|
|
84a1e63547 | ||
|
|
cee36e4eab | ||
|
|
39228ea707 | ||
|
|
f2d5c529b1 | ||
|
|
a5604ff03c | ||
|
|
c0f30603ab | ||
|
|
39d19b6ce9 | ||
|
|
3d3a02a697 | ||
|
|
30892c28d1 | ||
|
|
c59fd7ffe2 | ||
|
|
272891dcca | ||
|
|
24eca8c054 | ||
|
|
5a745710ac | ||
|
|
01b66c392a | ||
|
|
6efc2f72de | ||
|
|
dfd5af550a | ||
|
|
7b99a414b0 | ||
|
|
b9dea2fe1e | ||
|
|
409ae4b03c | ||
|
|
f283acf6f5 | ||
|
|
2da0cf60f5 | ||
|
|
bbaaafde4b | ||
|
|
8480a79380 | ||
|
|
c71837ac15 | ||
|
|
b7d9cfe81e | ||
|
|
764953d7b7 | ||
|
|
5f80dc0d87 | ||
|
|
4e4f10d63e | ||
|
|
3eb4b282ee | ||
|
|
72aa9ec203 | ||
|
|
f6197a2bd4 | ||
|
|
c96cfd801d | ||
|
|
56f926af5d | ||
|
|
7fc31b9c12 | ||
|
|
9838b0fe9e | ||
|
|
1067f9af20 | ||
|
|
994af75526 | ||
|
|
5333c0a619 | ||
|
|
51634eceee | ||
|
|
f9739366b0 | ||
|
|
05a2c588d6 | ||
|
|
53c39f98a0 | ||
|
|
cfd9508585 | ||
|
|
01abc7f3f3 | ||
|
|
8f0d604bf4 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -35,3 +35,6 @@ target
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
|
||||
hs_err_pid*
|
||||
|
||||
# Alfresco runtime
|
||||
alf_data
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<name>Alfresco Internal Repository</name>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
@@ -43,15 +43,5 @@
|
||||
<username>${env.MAVEN_USERNAME}</username>
|
||||
<password>${env.MAVEN_PASSWORD}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>quay.io</id>
|
||||
<username>${env.QUAY_USERNAME}</username>
|
||||
<password>${env.QUAY_PASSWORD}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>docker.io</id>
|
||||
<username>${env.DOCKERHUB_USERNAME}</username>
|
||||
<password>${env.DOCKERHUB_PASSWORD}</password>
|
||||
</server>
|
||||
</servers>
|
||||
</settings>
|
||||
|
||||
82
.travis.yml
82
.travis.yml
@@ -1,5 +1,5 @@
|
||||
---
|
||||
dist: xenial
|
||||
dist: focal
|
||||
language: java
|
||||
jdk: openjdk11
|
||||
|
||||
@@ -21,22 +21,26 @@ branches:
|
||||
only:
|
||||
- master
|
||||
- /release\/.*/
|
||||
- /feature\/.*/
|
||||
- /fix\/.*/
|
||||
|
||||
env:
|
||||
global:
|
||||
- TAS_SCRIPTS=../alfresco-community-repo/packaging/tests/scripts
|
||||
- TAS_ENVIRONMENT=../alfresco-community-repo/packaging/tests/environment
|
||||
- TAS_ENVIRONMENT=./packaging/tests/environment
|
||||
|
||||
stages:
|
||||
- name: test
|
||||
if: commit_message !~ /\[skip tests\]/
|
||||
- name: release
|
||||
if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no-release\]/
|
||||
if: fork = false AND (branch = master OR branch =~ /release\/.*/ OR branch =~ /fix\/.*/) AND type != pull_request AND commit_message !~ /\[no release\]/
|
||||
- name: update_downstream
|
||||
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 type != pull_request AND commit_message !~ /\[no-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 bash scripts/travis/build.sh
|
||||
install: travis_retry travis_wait 40 bash scripts/travis/build.sh
|
||||
|
||||
jobs:
|
||||
include:
|
||||
@@ -66,6 +70,7 @@ jobs:
|
||||
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.15.8
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.6
|
||||
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"
|
||||
@@ -78,14 +83,14 @@ jobs:
|
||||
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.15.8
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.4
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.6
|
||||
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 -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8090/ -Dimg.url=http://localhost:8090/ -Dtika.url=http://localhost:8090/ -Dtransform.misc.url=http://localhost:8090/
|
||||
|
||||
- name: "Repository - AppContext04TestSuite"
|
||||
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.15.8
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.4
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.6
|
||||
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"
|
||||
@@ -95,29 +100,36 @@ jobs:
|
||||
- mkdir -p "${HOME}/tmp"
|
||||
- cp repository/src/test/resources/realms/alfresco-realm.json "${HOME}/tmp"
|
||||
- export HOST_IP=$(hostname -I | cut -f1 -d' ')
|
||||
- docker run -d -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e DB_VENDOR=h2 -p 8999:8080 -e KEYCLOAK_IMPORT=/tmp/alfresco-realm.json -v $HOME/tmp/alfresco-realm.json:/tmp/alfresco-realm.json quay.io/alfresco/alfresco-identity-service:1.2
|
||||
- docker run -d -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e DB_VENDOR=h2 -p 8999:8080 -e KEYCLOAK_IMPORT=/tmp/alfresco-realm.json -v $HOME/tmp/alfresco-realm.json:/tmp/alfresco-realm.json alfresco/alfresco-identity-service:1.2
|
||||
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"
|
||||
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.15.8
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.4
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.6
|
||||
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 -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8090/ -Dimg.url=http://localhost:8090/ -Dtika.url=http://localhost:8090/ -Dtransform.misc.url=http://localhost:8090/
|
||||
|
||||
- name: "Repository - AppContextExtraTestSuite"
|
||||
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.15.8
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.6
|
||||
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"
|
||||
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.15.8
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.4
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.6
|
||||
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 -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8090/ -Dimg.url=http://localhost:8090/ -Dtika.url=http://localhost:8090/ -Dtransform.misc.url=http://localhost:8090/
|
||||
|
||||
- name: "Repository - SearchTestSuite"
|
||||
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.15.8
|
||||
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 - MySQL tests"
|
||||
if: commit_message !~ /\[skip db\]/
|
||||
before_script:
|
||||
@@ -156,12 +168,14 @@ jobs:
|
||||
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.15.8
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.6
|
||||
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"
|
||||
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.15.8
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.6
|
||||
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"
|
||||
@@ -177,7 +191,7 @@ jobs:
|
||||
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"
|
||||
if: 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"
|
||||
@@ -185,7 +199,7 @@ jobs:
|
||||
- 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: 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"
|
||||
@@ -193,23 +207,39 @@ jobs:
|
||||
- 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: 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
|
||||
|
||||
- name: "CMIS TAS tests"
|
||||
if: commit_message =~ /\[tas\]/
|
||||
- name: "CMIS TAS tests - BROWSER binding"
|
||||
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 -Denvironment=default -DrunBugs=false
|
||||
- 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 = 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
|
||||
|
||||
- name: "CMIS TAS tests - WEBSERVICES binding"
|
||||
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
|
||||
|
||||
- name: "Email TAS tests"
|
||||
if: 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"
|
||||
@@ -217,7 +247,7 @@ jobs:
|
||||
- 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: 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"
|
||||
@@ -225,30 +255,26 @@ jobs:
|
||||
- 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: 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
|
||||
|
||||
# TODO enable job
|
||||
- name: "Push to Nexus"
|
||||
stage: release
|
||||
before_script: bash scripts/travis/verify_release_tag.sh
|
||||
script: travis_wait 40 bash scripts/travis/maven_release.sh
|
||||
|
||||
- name: "Update alfresco-enterprise-repo"
|
||||
stage: update_downstream
|
||||
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}"
|
||||
|
||||
# TODO enable or delete job
|
||||
- name: "Trigger acs-community-packaging build"
|
||||
stage: trigger_downstream
|
||||
if: false
|
||||
before_install: skip
|
||||
install: skip
|
||||
script: bash scripts/travis/trigger_travis.sh "Alfresco" "acs-community-packaging" "${TRAVIS_BRANCH}"
|
||||
|
||||
|
||||
233
README.md
233
README.md
@@ -1,29 +1,57 @@
|
||||
# TODO
|
||||
# alfresco-community-repo
|
||||
|
||||
## Create new README for the combined project
|
||||
[](https://travis-ci.com/Alfresco/alfresco-community-repo)
|
||||
|
||||
Original README files:
|
||||
This project contains the bulk of the [Alfresco Content Services Repository](https://community.alfresco.com/docs/DOC-6385-project-overview-repository) code.
|
||||
|
||||
### Alfresco Core
|
||||
[](https://travis-ci.com/Alfresco/alfresco-core)
|
||||
To make the development process simpler, it brings together code historically in `alfresco-core`,
|
||||
`alfresco-data-madel`, `alfresco-repository`, `alfresco-remote-api` and repository specific
|
||||
tests and war file creation from `acs-community-packaging`. They exist as sub projects within the Maven Reactor and still
|
||||
create the same artifacts.
|
||||
|
||||
Alfresco Core is a library packaged as a jar file which is part of [Alfresco Content Services Repository](https://community.alfresco.com/docs/DOC-6385-project-overview-repository).
|
||||
The library contains the following:
|
||||
#### Alfresco Core
|
||||
|
||||
Alfresco Core is a library packaged as a jar file which contains the following:
|
||||
* Various helpers and utils
|
||||
* Canned queries interface and supporting classes
|
||||
* Generic encryption supporting classes
|
||||
|
||||
Version 7 of the library uses Spring 5, Quartz 2.3 and does not have Hibernate dependency.
|
||||
|
||||
### Building and testing
|
||||
The project can be built and tested by running Maven command:
|
||||
#### Alfresco Data Model
|
||||
Data model is a library packaged as a jar file which contains the following:
|
||||
* Dictionary, Repository and Search Services interfaces
|
||||
* Models for data types and Dictionary implementation
|
||||
* Parsers
|
||||
|
||||
#### Alfresco Repository
|
||||
|
||||
Repository is a library packaged as a jar file which contains the following:
|
||||
* DAOs and SQL scripts
|
||||
* Various Service implementations
|
||||
* Utility classes
|
||||
|
||||
Tests are combined into test classes split by test type or Spring application context used in the test, see classes
|
||||
in _src/test/java/org/alfresco_. All of these classes as well as individual tests can be run by specifying the test
|
||||
class name and a set of DB connection properties. Check the travis.yml file for docker images that should be started
|
||||
to provide a sutable test environment. For example:
|
||||
~~~
|
||||
mvn clean install
|
||||
mvn clean test -Dtest=SomeRepoTest -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql:alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
~~~
|
||||
|
||||
### Artifacts
|
||||
#### Alfresco Remote API
|
||||
|
||||
Remote API is a library packaged as a jar file which contains the following:
|
||||
* REST API framework
|
||||
* WebScript implementations including [V1 REST APIs](https://community.alfresco.com/community/ecm/blog/2017/05/02/v1-rest-api-10-things-you-should-know)
|
||||
* [OpenCMIS](https://chemistry.apache.org/java/opencmis.html) implementations
|
||||
|
||||
Like the `alfresco-repository` tests are combined in test classes split by test type or Spring application context used
|
||||
in the test.
|
||||
|
||||
#### Artifacts
|
||||
The artifacts can be obtained by:
|
||||
* downloading from [Alfresco repository](https://artifacts.alfresco.com/nexus/content/groups/public)
|
||||
* downloading from [Alfresco maven repository](https://artifacts.alfresco.com/nexus/content/groups/public)
|
||||
* getting as Maven dependency by adding the dependency to your pom file:
|
||||
~~~
|
||||
<dependency>
|
||||
@@ -31,150 +59,93 @@ The artifacts can be obtained by:
|
||||
<artifactId>alfresco-core</artifactId>
|
||||
<version>version</version>
|
||||
</dependency>
|
||||
~~~
|
||||
and Alfresco repository:
|
||||
~~~
|
||||
<repository>
|
||||
<id>alfresco-maven-repo</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
~~~
|
||||
The SNAPSHOT version of the artifact is **never** published.
|
||||
|
||||
### Old version history
|
||||
The history for older versions can be found in [Alfresco SVN](https://svn.alfresco.com/repos/alfresco-open-mirror/services/alfresco-core/)
|
||||
|
||||
### Contributing guide
|
||||
Please use [this guide](CONTRIBUTING.md) to make a contribution to the project.
|
||||
|
||||
### Alfresco Data Model
|
||||
[](https://travis-ci.com/Alfresco/alfresco-data-model)
|
||||
|
||||
Data model is a library packaged as a jar file which is part of [Alfresco Content Services Repository](https://community.alfresco.com/docs/DOC-6385-project-overview-repository).
|
||||
The library contains the following:
|
||||
* Dictionary, Repository and Search Services interfaces
|
||||
* Models for data types and Dictionary implementation
|
||||
* Parsers
|
||||
|
||||
Please note that the data model uses version 2 of the Jackson libraries.
|
||||
The upgrade from version 1 was not backward compatible, any projects
|
||||
that are dependent on data model using Jackson 1.x should use the data-model 6.N branch.
|
||||
|
||||
Version 8.0 of data-model depends on alfresco-core 7.0 which is based on Spring 5.
|
||||
|
||||
|
||||
### Building and testing
|
||||
The project can be built and tested by running Maven command:
|
||||
~~~
|
||||
mvn clean install
|
||||
~~~
|
||||
|
||||
### Artifacts
|
||||
The artifacts can be obtained by:
|
||||
* downloading from [Alfresco repository](https://artifacts.alfresco.com/nexus/content/groups/public)
|
||||
* getting as Maven dependency by adding the dependency to your pom file:
|
||||
~~~
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-data-model</artifactId>
|
||||
<version>version</version>
|
||||
</dependency>
|
||||
~~~
|
||||
and Alfresco repository:
|
||||
~~~
|
||||
<repository>
|
||||
<id>alfresco-maven-repo</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
~~~
|
||||
The SNAPSHOT version of the artifact is **never** published.
|
||||
|
||||
### Old version history
|
||||
The history for older versions can be found in [Alfresco SVN](https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/data-model)
|
||||
|
||||
### Contributing guide
|
||||
Please use [this guide](CONTRIBUTING.md) to make a contribution to the project.
|
||||
|
||||
### Alfresco Repository
|
||||
[](https://travis-ci.com/Alfresco/alfresco-repository)
|
||||
|
||||
Repository is a library packaged as a jar file which is part of [Alfresco Content Services Repository](https://community.alfresco.com/docs/DOC-6385-project-overview-repository).
|
||||
The library contains the following:
|
||||
* DAOs and SQL scripts
|
||||
* Various Service implementations
|
||||
* Utility classes
|
||||
|
||||
### Building and testing
|
||||
The project can be built by running Maven command:
|
||||
~~~
|
||||
mvn clean install
|
||||
~~~
|
||||
The tests are combined in test classes split by test type or Spring application context used in the test, see classes in _src/test/java/org/alfresco_. All of these classes as well as individual tests can be run by specifying the test class name and a set of DB connection properties, for example:
|
||||
~~~
|
||||
mvn clean test -Dtest=SomeRepoTest -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql:alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
~~~
|
||||
|
||||
### Artifacts
|
||||
The artifacts can be obtained by:
|
||||
* downloading from [Alfresco repository](https://artifacts.alfresco.com/nexus/content/groups/public)
|
||||
* getting as Maven dependency by adding the dependency to your pom file:
|
||||
~~~
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-repository</artifactId>
|
||||
<version>version</version>
|
||||
</dependency>
|
||||
~~~
|
||||
and Alfresco Maven repository:
|
||||
~~~
|
||||
<repository>
|
||||
<id>alfresco-maven-repo</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
~~~
|
||||
The SNAPSHOT version of the artifact is **never** published.
|
||||
|
||||
### Contributing guide
|
||||
Please use [this guide](CONTRIBUTING.md) to make a contribution to the project.
|
||||
|
||||
### Alfresco Remote API
|
||||
[](https://travis-ci.com/Alfresco/alfresco-remote-api)
|
||||
|
||||
Remote API is a library packaged as a jar file which is part of [Alfresco Content Services Repository](https://community.alfresco.com/docs/DOC-6385-project-overview-repository).
|
||||
The library contains the following:
|
||||
* REST API framework
|
||||
* WebScript implementations including [V1 REST APIs](https://community.alfresco.com/community/ecm/blog/2017/05/02/v1-rest-api-10-things-you-should-know)
|
||||
* [OpenCMIS](https://chemistry.apache.org/java/opencmis.html) implementations
|
||||
|
||||
### Building and testing
|
||||
The project can be built by running Maven command:
|
||||
~~~
|
||||
mvn clean install
|
||||
~~~
|
||||
The tests are combined in test classes split by test type or Spring application context used in the test, see classes in _src/test/java/org/alfresco_. All of these classes as well as individual tests can be run by specifying the test class name and a set of DB connection properties, for example:
|
||||
~~~
|
||||
mvn clean test -Dtest=SomeTest -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql:alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
~~~
|
||||
|
||||
### Artifacts
|
||||
The artifacts can be obtained by:
|
||||
* downloading from [Alfresco repository](https://artifacts.alfresco.com/nexus/content/groups/public)
|
||||
* getting as Maven dependency by adding the dependency to your pom file:
|
||||
~~~
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-remote-api</artifactId>
|
||||
<version>version</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>content-services-community</artifactId>
|
||||
<version>version</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
~~~
|
||||
and Alfresco Maven repository:
|
||||
and Alfresco maven repository:
|
||||
~~~
|
||||
<repository>
|
||||
<id>alfresco-maven-repo</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
~~~
|
||||
The SNAPSHOT version of the artifact is **never** published.
|
||||
The SNAPSHOT versions of the artifact are not published.
|
||||
|
||||
All current source versions are held in github. Historic versions can be found in [Alfresco SVN](https://svn.alfresco.com/repos/alfresco-open-mirror/services/alfresco-core/)
|
||||
|
||||
### Contributing guide
|
||||
Please use [this guide](CONTRIBUTING.md) to make a contribution to the project.
|
||||
|
||||
## Setting up your development environment
|
||||
Although it is possible to work on individual github projects, we recommend working on
|
||||
the `alfresco-community-repo`, `alfresco-enterprise-repo`, `acs-packaging` and `acs-community-packaging`
|
||||
in a single Intellij IDEA project. They depend on each other and typically you
|
||||
will want to make changes to all of them if you are changing the repository code.
|
||||
In the case of older branches, there is generally no need for the `acs-community-packaging` as you will
|
||||
not be creating a community release.
|
||||
|
||||
|
||||
Although it is possible to work on individual github projects, we recommend working on the `alfresco-community-repo`
|
||||
and `acs-community-packaging` in a single Intellij IDEA project. They depend on each other and typically you will
|
||||
want to make changes to both of them if you are changing the repository code.
|
||||
|
||||
~~~
|
||||
mkdir work
|
||||
cd works
|
||||
git clone git@github.com:Alfresco/alfresco-community-repo.git
|
||||
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 -PcommunityDocker -DskipTests=true -Dversion.edition=Community
|
||||
cd ..
|
||||
|
||||
cd acs-community-packaging
|
||||
mvn clean install -PcommunityDocker -Dmaven.javadoc.skip=true
|
||||
cd ..
|
||||
~~~
|
||||
In Intellij IDEA, create a new project using the `work` directory as the source.
|
||||
* File > New Project from Existing Sources > .../work > Maven
|
||||
|
||||
## Docker
|
||||
We generally use Docker for testing. In order to reduce the size of images we also supply a squash option that collapses
|
||||
the layers in the image. This is a long-standing experimental feature that we have fould useful. However you will need
|
||||
to enable experimental features in your Docker Engine.
|
||||
~~~
|
||||
{
|
||||
"experimental": true,
|
||||
"debug": true
|
||||
}
|
||||
~~~
|
||||
## Branches
|
||||
As multiple projects have been combined, branch names use the ACS version they are targeting.
|
||||
For example the code used to create the repository in ACS 6.2.1 is a branch called `releases/6.2.1`.
|
||||
|
||||
The actual version number of the **repository artifacts** created by `alfresco-community-repo` are however different.
|
||||
For example `release/6.2.1` artifacts are `7.183.x`. This adds some complexity, but ensures that
|
||||
version numbers do not go backwards in existing releases. It also provides some level of
|
||||
independence between the repository and other ACS components.
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
### Alfresco Core
|
||||
[](https://travis-ci.com/Alfresco/alfresco-core)
|
||||
|
||||
Alfresco Core is a library packaged as a jar file which is part of [Alfresco Content Services Repository](https://community.alfresco.com/docs/DOC-6385-project-overview-repository).
|
||||
The library contains the following:
|
||||
* Various helpers and utils
|
||||
* Canned queries interface and supporting classes
|
||||
* Generic encryption supporting classes
|
||||
|
||||
Version 7 of the library uses Spring 5, Quartz 2.3 and does not have Hibernate dependency.
|
||||
|
||||
### Building and testing
|
||||
The project can be built and tested by running Maven command:
|
||||
~~~
|
||||
mvn clean install
|
||||
~~~
|
||||
|
||||
### Artifacts
|
||||
The artifacts can be obtained by:
|
||||
* downloading from [Alfresco repository](https://artifacts.alfresco.com/nexus/content/groups/public)
|
||||
* getting as Maven dependency by adding the dependency to your pom file:
|
||||
~~~
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-core</artifactId>
|
||||
<version>version</version>
|
||||
</dependency>
|
||||
~~~
|
||||
and Alfresco repository:
|
||||
~~~
|
||||
<repository>
|
||||
<id>alfresco-maven-repo</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
~~~
|
||||
The SNAPSHOT version of the artifact is **never** published.
|
||||
|
||||
### Old version history
|
||||
The history for older versions can be found in [Alfresco SVN](https://svn.alfresco.com/repos/alfresco-open-mirror/services/alfresco-core/)
|
||||
|
||||
### Contributing guide
|
||||
Please use [this guide](CONTRIBUTING.md) to make a contribution to the project.
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>8.300-TEST1</version>
|
||||
<version>repo-5439-M3c1</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -424,6 +424,12 @@ public abstract class AbstractAsynchronouslyRefreshedCache<T>
|
||||
@Override
|
||||
public Void call()
|
||||
{
|
||||
long threadId = Thread.currentThread().getId();
|
||||
logger.debug("Thread # " + threadId + "-> call()");
|
||||
|
||||
logger.debug("Thread # " + threadId + "call()->liveLock.writeLock().lock()");
|
||||
liveLock.writeLock().lock();
|
||||
logger.debug("Thread # " + threadId + "call()->liveLock.writeLock().locked [");
|
||||
try
|
||||
{
|
||||
doCall();
|
||||
@@ -444,6 +450,12 @@ public abstract class AbstractAsynchronouslyRefreshedCache<T>
|
||||
}
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
logger.debug("Thread # " + threadId + "call()->liveLock.writeLock().unlock()");
|
||||
liveLock.writeLock().unlock();
|
||||
logger.debug("Thread # " + threadId + "call()->liveLock.writeLock().unlocked]");
|
||||
}
|
||||
}
|
||||
|
||||
private void doCall() throws Exception
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2020 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -74,6 +74,22 @@ public class VersionNumberTest extends TestCase
|
||||
{
|
||||
// OK
|
||||
}
|
||||
try
|
||||
{
|
||||
new VersionNumber("1.2.3-M4");
|
||||
fail("Should not have created an invalid version");
|
||||
} catch (Exception exception)
|
||||
{
|
||||
// OK
|
||||
}
|
||||
try
|
||||
{
|
||||
new VersionNumber("1.2.3-A4");
|
||||
fail("Should not have created an invalid version");
|
||||
} catch (Exception exception)
|
||||
{
|
||||
// OK
|
||||
}
|
||||
}
|
||||
|
||||
public void testEquals()
|
||||
|
||||
@@ -1,31 +1,28 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 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:
|
||||
*
|
||||
* Copyright (C) 2005-2020 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* 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.apache.lucene.store;
|
||||
|
||||
public class AlfrescoFSDirectory extends FSDirectory
|
||||
{
|
||||
|
||||
}
|
||||
package org.alfresco.util.testing.category;
|
||||
|
||||
/**
|
||||
* Category marker for tests that fail very frequently so are excluded from the build. Only run by developers while
|
||||
* working on a specific feature/class. An issue should be raised to identify and fix the reason the test fails.
|
||||
* @see IntermittentlyFailingTests for tests that fail intermittently but not that frequently
|
||||
*/
|
||||
public interface FrequentlyFailingTests extends NonBuildTests
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2020 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
package org.alfresco.util.testing.category;
|
||||
|
||||
/**
|
||||
* Category marker for tests that intermittently fail, but not that frequently. Still included in the build. If the
|
||||
* instability increases or we have time to investigate, an issue should be raised to investigate and possibly
|
||||
* be switch to {@link FrequentlyFailingTests}. Use by developers to aid in working out if the build job should just be
|
||||
* retried.
|
||||
*/
|
||||
public interface IntermittentlyFailingTests
|
||||
{
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
### Alfresco Data Model
|
||||
[](https://travis-ci.com/Alfresco/alfresco-data-model)
|
||||
|
||||
Data model is a library packaged as a jar file which is part of [Alfresco Content Services Repository](https://community.alfresco.com/docs/DOC-6385-project-overview-repository).
|
||||
The library contains the following:
|
||||
* Dictionary, Repository and Search Services interfaces
|
||||
* Models for data types and Dictionary implementation
|
||||
* Parsers
|
||||
|
||||
Please note that the data model uses version 2 of the Jackson libraries.
|
||||
The upgrade from version 1 was not backward compatible, any projects
|
||||
that are dependent on data model using Jackson 1.x should use the data-model 6.N branch.
|
||||
|
||||
Version 8.0 of data-model depends on alfresco-core 7.0 which is based on Spring 5.
|
||||
|
||||
|
||||
### Building and testing
|
||||
The project can be built and tested by running Maven command:
|
||||
~~~
|
||||
mvn clean install
|
||||
~~~
|
||||
|
||||
### Artifacts
|
||||
The artifacts can be obtained by:
|
||||
* downloading from [Alfresco repository](https://artifacts.alfresco.com/nexus/content/groups/public)
|
||||
* getting as Maven dependency by adding the dependency to your pom file:
|
||||
~~~
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-data-model</artifactId>
|
||||
<version>version</version>
|
||||
</dependency>
|
||||
~~~
|
||||
and Alfresco repository:
|
||||
~~~
|
||||
<repository>
|
||||
<id>alfresco-maven-repo</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
~~~
|
||||
The SNAPSHOT version of the artifact is **never** published.
|
||||
|
||||
### Old version history
|
||||
The history for older versions can be found in [Alfresco SVN](https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/data-model)
|
||||
|
||||
### Contributing guide
|
||||
Please use [this guide](CONTRIBUTING.md) to make a contribution to the project.
|
||||
@@ -7,11 +7,10 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>8.300-TEST1</version>
|
||||
<version>repo-5439-M3c1</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<dependency.tika.version>1.24.1</dependency.tika.version>
|
||||
<!-- Files to exclude from SonarQube analysis -->
|
||||
<sonar.exclusions>
|
||||
source/java/org/alfresco/repo/search/impl/parsers/CMIS*er.java,
|
||||
@@ -139,8 +138,7 @@
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>${dependency.jackson.version}</version>
|
||||
</dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr</artifactId>
|
||||
@@ -190,7 +188,12 @@
|
||||
<groupId>org.codehaus.woodstox</groupId>
|
||||
<artifactId>woodstox-core-asl</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<!-- [ACS-544] Excluded as conflicts with JDK9+ as it includes javax.transaction -->
|
||||
<exclusion>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.chemistry.opencmis</groupId>
|
||||
|
||||
@@ -28,8 +28,8 @@ package org.alfresco.opencmis.dictionary;
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
|
||||
|
||||
@@ -45,14 +45,14 @@ public interface CMISPropertyLuceneBuilder
|
||||
* @return the query - may be null if no query is required
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
|
||||
/**
|
||||
* @param not Boolean
|
||||
* @return the query - may be null if no query is required
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E;
|
||||
|
||||
/**
|
||||
* @param value Serializable
|
||||
@@ -61,7 +61,7 @@ public interface CMISPropertyLuceneBuilder
|
||||
* @return the query - may be null if no query is required
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
|
||||
/**
|
||||
* @param value Serializable
|
||||
@@ -70,7 +70,7 @@ public interface CMISPropertyLuceneBuilder
|
||||
* @return the query - may be null if no query is required
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
|
||||
/**
|
||||
* @param not Boolean
|
||||
@@ -78,7 +78,7 @@ public interface CMISPropertyLuceneBuilder
|
||||
* @return the query - may be null if no query is required
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneIn(LuceneQueryParserAdaptor<Q, S, E> lqpa, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneIn(QueryParserAdaptor<Q, S, E> lqpa, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E;
|
||||
|
||||
/**
|
||||
* @param value PredicateMode
|
||||
@@ -87,7 +87,7 @@ public interface CMISPropertyLuceneBuilder
|
||||
* @return the query - may be null if no query is required
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
|
||||
/**
|
||||
* @param value Serializable
|
||||
@@ -96,7 +96,7 @@ public interface CMISPropertyLuceneBuilder
|
||||
* @return the query - may be null if no query is required
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
|
||||
/**
|
||||
* @param value Serializable
|
||||
@@ -105,7 +105,7 @@ public interface CMISPropertyLuceneBuilder
|
||||
* @return the query - may be null if no query is required
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
|
||||
/**
|
||||
* @param value Serializable
|
||||
@@ -113,14 +113,14 @@ public interface CMISPropertyLuceneBuilder
|
||||
* @return the query - may be null if no query is required
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E;
|
||||
|
||||
/**
|
||||
* @param lqpa TODO
|
||||
* @return the sort field
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa) throws E;
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa) throws E;
|
||||
|
||||
/**
|
||||
* @return the field name
|
||||
|
||||
@@ -27,9 +27,9 @@ package org.alfresco.opencmis.mapping;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -66,13 +66,13 @@ public abstract class AbstractSimpleLuceneBuilder extends BaseLuceneBuilder
|
||||
protected abstract QName getQNameForExists();
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
return lqpa.getFieldQuery(getLuceneFieldName(), getValueAsString(value), AnalysisMode.IDENTIFIER, luceneFunction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
{
|
||||
if (not)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ public abstract class AbstractSimpleLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
@@ -93,7 +93,7 @@ public abstract class AbstractSimpleLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
@@ -101,7 +101,7 @@ public abstract class AbstractSimpleLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
@@ -109,7 +109,7 @@ public abstract class AbstractSimpleLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
@@ -117,7 +117,7 @@ public abstract class AbstractSimpleLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
@@ -131,7 +131,7 @@ public abstract class AbstractSimpleLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa) throws E
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa) throws E
|
||||
{
|
||||
return getLuceneFieldName();
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@ import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.alfresco.opencmis.dictionary.CMISPropertyLuceneBuilder;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserExpressionAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserExpressionAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
|
||||
/**
|
||||
@@ -50,33 +50,33 @@ public class BaseLuceneBuilder implements CMISPropertyLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneIn(LuceneQueryParserAdaptor<Q, S, E> lqpa, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneIn(QueryParserAdaptor<Q, S, E> lqpa, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E
|
||||
{
|
||||
LuceneQueryParserExpressionAdaptor<Q, E> expressionAdaptor = lqpa.getExpressionAdaptor();
|
||||
QueryParserExpressionAdaptor<Q, E> expressionAdaptor = lqpa.getExpressionAdaptor();
|
||||
for(Serializable value : values)
|
||||
{
|
||||
expressionAdaptor.addOptional(buildLuceneEquality(lqpa, value, mode, LuceneFunction.FIELD));
|
||||
@@ -92,25 +92,25 @@ public class BaseLuceneBuilder implements CMISPropertyLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
return lqpa.getNegatedQuery(buildLuceneEquality(lqpa, value, mode, luceneFunction));
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
@@ -122,7 +122,7 @@ public class BaseLuceneBuilder implements CMISPropertyLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa) throws E
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@ import java.io.Serializable;
|
||||
|
||||
import org.alfresco.opencmis.dictionary.CMISDictionaryService;
|
||||
import org.alfresco.opencmis.dictionary.TypeDefinitionWrapper;
|
||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
|
||||
@@ -56,13 +56,13 @@ public class BaseTypeIdLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
return lqpa.getFieldQuery("TYPE", getType(getValueAsString(value)), AnalysisMode.IDENTIFIER, luceneFunction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
{
|
||||
if (not)
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ package org.alfresco.opencmis.mapping;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
@@ -52,7 +52,7 @@ public class DirectLuceneBuilder extends AbstractSimpleLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa) throws E
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa) throws E
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
// need to find the real field to use
|
||||
|
||||
@@ -30,8 +30,8 @@ import java.util.Collection;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.alfresco.util.EqualsHelper;
|
||||
@@ -58,7 +58,7 @@ public class FixedValueLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
if (EqualsHelper.nullSafeEquals(value, value))
|
||||
{
|
||||
@@ -71,7 +71,7 @@ public class FixedValueLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
{
|
||||
if (not)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ public class FixedValueLuceneBuilder extends BaseLuceneBuilder
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
if (value instanceof Comparable)
|
||||
{
|
||||
@@ -122,7 +122,7 @@ public class FixedValueLuceneBuilder extends BaseLuceneBuilder
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
if (value instanceof Comparable)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ public class FixedValueLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneIn(LuceneQueryParserAdaptor<Q, S, E> lqpa, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneIn(QueryParserAdaptor<Q, S, E> lqpa, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E
|
||||
{
|
||||
boolean in = false;
|
||||
for (Serializable value : values)
|
||||
@@ -166,7 +166,7 @@ public class FixedValueLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
if (!EqualsHelper.nullSafeEquals(value, value))
|
||||
{
|
||||
@@ -180,7 +180,7 @@ public class FixedValueLuceneBuilder extends BaseLuceneBuilder
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
if (value instanceof Comparable)
|
||||
{
|
||||
@@ -201,7 +201,7 @@ public class FixedValueLuceneBuilder extends BaseLuceneBuilder
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
if (value instanceof Comparable)
|
||||
{
|
||||
@@ -222,7 +222,7 @@ public class FixedValueLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
@@ -255,7 +255,7 @@ public class FixedValueLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa)
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa)
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@ package org.alfresco.opencmis.mapping;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
@@ -66,7 +66,7 @@ public class ObjectIdLuceneBuilder extends BaseLuceneBuilder
|
||||
return "ID";
|
||||
}
|
||||
|
||||
private <Q, S, E extends Throwable> StoreRef getStore(LuceneQueryParserAdaptor<Q, S, E> lqpa)
|
||||
private <Q, S, E extends Throwable> StoreRef getStore(QueryParserAdaptor<Q, S, E> lqpa)
|
||||
{
|
||||
ArrayList<StoreRef> stores = lqpa.getSearchParameters().getStores();
|
||||
if(stores.size() < 1)
|
||||
@@ -77,7 +77,7 @@ public class ObjectIdLuceneBuilder extends BaseLuceneBuilder
|
||||
return stores.get(0);
|
||||
}
|
||||
|
||||
private <Q, S, E extends Throwable> String getValueAsString(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value)
|
||||
private <Q, S, E extends Throwable> String getValueAsString(QueryParserAdaptor<Q, S, E> lqpa, Serializable value)
|
||||
{
|
||||
String nodeRefStr = null;
|
||||
if(!NodeRef.isNodeRef((String)value))
|
||||
@@ -97,7 +97,7 @@ public class ObjectIdLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(lqpa, value);
|
||||
@@ -105,7 +105,7 @@ public class ObjectIdLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
{
|
||||
if (not)
|
||||
{
|
||||
@@ -117,36 +117,36 @@ public class ObjectIdLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new CmisInvalidArgumentException("Property " + PropertyIds.OBJECT_ID + " can not be used in a 'greater than' comparison");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new CmisInvalidArgumentException("Property " + PropertyIds.OBJECT_ID
|
||||
+ " can not be used in a 'greater than or equals' comparison");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new CmisInvalidArgumentException("Property " + PropertyIds.OBJECT_ID + " can not be used in a 'less than' comparison");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new CmisInvalidArgumentException("Property " + PropertyIds.OBJECT_ID + " can not be used in a 'less than or equals' comparison");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(lqpa, value);
|
||||
@@ -160,7 +160,7 @@ public class ObjectIdLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa)
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa)
|
||||
{
|
||||
return getLuceneFieldName();
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@ import java.io.Serializable;
|
||||
|
||||
import org.alfresco.opencmis.dictionary.CMISDictionaryService;
|
||||
import org.alfresco.opencmis.dictionary.TypeDefinitionWrapper;
|
||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.apache.chemistry.opencmis.commons.PropertyIds;
|
||||
@@ -72,8 +72,8 @@ public class ObjectTypeIdLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
@@ -83,7 +83,7 @@ public class ObjectTypeIdLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
{
|
||||
if (not)
|
||||
{
|
||||
@@ -95,43 +95,43 @@ public class ObjectTypeIdLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new CmisInvalidArgumentException("Property " + PropertyIds.OBJECT_TYPE_ID + " can not be used in a 'greater than' comparison");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new CmisInvalidArgumentException("Property " + PropertyIds.OBJECT_TYPE_ID
|
||||
+ " can not be used in a 'greater than or equals' comparison");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
return lqpa.getNegatedQuery(buildLuceneEquality(lqpa, value, mode, luceneFunction));
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new CmisInvalidArgumentException("Property " + PropertyIds.OBJECT_TYPE_ID + " can not be used in a 'less than' comparison");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new CmisInvalidArgumentException("Property " + PropertyIds.OBJECT_TYPE_ID + " can not be used in a 'less than or equals' comparison");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
@@ -147,7 +147,7 @@ public class ObjectTypeIdLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa)
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa)
|
||||
{
|
||||
return getLuceneFieldName();
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@ package org.alfresco.opencmis.mapping;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
@@ -60,7 +60,7 @@ public class ParentLuceneBuilder extends BaseLuceneBuilder
|
||||
this.dictionaryService = dictionaryService;
|
||||
}
|
||||
|
||||
private <Q, S, E extends Throwable> StoreRef getStore(LuceneQueryParserAdaptor<Q, S, E> lqpa)
|
||||
private <Q, S, E extends Throwable> StoreRef getStore(QueryParserAdaptor<Q, S, E> lqpa)
|
||||
{
|
||||
ArrayList<StoreRef> stores = lqpa.getSearchParameters().getStores();
|
||||
if(stores.size() < 1)
|
||||
@@ -77,7 +77,7 @@ public class ParentLuceneBuilder extends BaseLuceneBuilder
|
||||
return "PARENT";
|
||||
}
|
||||
|
||||
private <Q, S, E extends Throwable> String getValueAsString(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value)
|
||||
private <Q, S, E extends Throwable> String getValueAsString(QueryParserAdaptor<Q, S, E> lqpa, Serializable value)
|
||||
{
|
||||
String nodeRefStr = (String)value;
|
||||
if(!NodeRef.isNodeRef((String)value))
|
||||
@@ -93,8 +93,8 @@ public class ParentLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
|
||||
LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(lqpa, value);
|
||||
@@ -102,7 +102,7 @@ public class ParentLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
|
||||
{
|
||||
if (not)
|
||||
{
|
||||
@@ -114,7 +114,7 @@ public class ParentLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(lqpa, value);
|
||||
@@ -128,7 +128,7 @@ public class ParentLuceneBuilder extends BaseLuceneBuilder
|
||||
}
|
||||
|
||||
@Override
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa)
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa)
|
||||
{
|
||||
return getLuceneFieldName();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
|
||||
import org.alfresco.repo.search.impl.parsers.CMIS_FTSLexer;
|
||||
import org.alfresco.repo.search.impl.parsers.CMIS_FTSParser;
|
||||
import org.alfresco.repo.search.impl.parsers.FTSQueryException;
|
||||
|
||||
@@ -34,9 +34,9 @@ import org.alfresco.opencmis.dictionary.CMISDictionaryService;
|
||||
import org.alfresco.opencmis.dictionary.CMISNodeInfo;
|
||||
import org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper;
|
||||
import org.alfresco.opencmis.dictionary.TypeDefinitionWrapper;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.lucene.QueryConstants;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryConstants;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
@@ -258,8 +258,8 @@ public class CmisFunctionEvaluationContext implements FunctionEvaluationContext
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
|
||||
PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
|
||||
PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
PropertyDefinitionWrapper propertyDef = cmisDictionaryService.findProperty(propertyName);
|
||||
return propertyDef.getPropertyLuceneBuilder().buildLuceneEquality(lqpa, value, mode, luceneFunction);
|
||||
@@ -272,7 +272,7 @@ public class CmisFunctionEvaluationContext implements FunctionEvaluationContext
|
||||
* buildLuceneExists(org.alfresco.repo.search.impl.lucene.LuceneQueryParser,
|
||||
* org.alfresco.service.namespace.QName, java.lang.Boolean)
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Boolean not) throws E
|
||||
{
|
||||
PropertyDefinitionWrapper propertyDef = cmisDictionaryService.findProperty(propertyName);
|
||||
return propertyDef.getPropertyLuceneBuilder().buildLuceneExists(lqpa, not);
|
||||
@@ -287,8 +287,8 @@ public class CmisFunctionEvaluationContext implements FunctionEvaluationContext
|
||||
* org.alfresco.service.namespace.QName, java.io.Serializable,
|
||||
* org.alfresco.repo.search.impl.querymodel.PredicateMode)
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
|
||||
PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
|
||||
PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
PropertyDefinitionWrapper propertyDef = cmisDictionaryService.findProperty(propertyName);
|
||||
return propertyDef.getPropertyLuceneBuilder().buildLuceneGreaterThan(lqpa, value, mode, luceneFunction);
|
||||
@@ -303,8 +303,8 @@ public class CmisFunctionEvaluationContext implements FunctionEvaluationContext
|
||||
* org.alfresco.service.namespace.QName, java.io.Serializable,
|
||||
* org.alfresco.repo.search.impl.querymodel.PredicateMode)
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
|
||||
PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
|
||||
PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
PropertyDefinitionWrapper propertyDef = cmisDictionaryService.findProperty(propertyName);
|
||||
return propertyDef.getPropertyLuceneBuilder().buildLuceneGreaterThanOrEquals(lqpa, value, mode, luceneFunction);
|
||||
@@ -319,8 +319,8 @@ public class CmisFunctionEvaluationContext implements FunctionEvaluationContext
|
||||
* java.lang.Boolean,
|
||||
* org.alfresco.repo.search.impl.querymodel.PredicateMode)
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneIn(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Collection<Serializable> values,
|
||||
Boolean not, PredicateMode mode) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneIn(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Collection<Serializable> values,
|
||||
Boolean not, PredicateMode mode) throws E
|
||||
{
|
||||
PropertyDefinitionWrapper propertyDef = cmisDictionaryService.findProperty(propertyName);
|
||||
return propertyDef.getPropertyLuceneBuilder().buildLuceneIn(lqpa, values, not, mode);
|
||||
@@ -335,8 +335,8 @@ public class CmisFunctionEvaluationContext implements FunctionEvaluationContext
|
||||
* org.alfresco.service.namespace.QName, java.io.Serializable,
|
||||
* org.alfresco.repo.search.impl.querymodel.PredicateMode)
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
|
||||
PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
|
||||
PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
PropertyDefinitionWrapper propertyDef = cmisDictionaryService.findProperty(propertyName);
|
||||
return propertyDef.getPropertyLuceneBuilder().buildLuceneInequality(lqpa, value, mode, luceneFunction);
|
||||
@@ -351,8 +351,8 @@ public class CmisFunctionEvaluationContext implements FunctionEvaluationContext
|
||||
* org.alfresco.service.namespace.QName, java.io.Serializable,
|
||||
* org.alfresco.repo.search.impl.querymodel.PredicateMode)
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
|
||||
PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
|
||||
PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
PropertyDefinitionWrapper propertyDef = cmisDictionaryService.findProperty(propertyName);
|
||||
return propertyDef.getPropertyLuceneBuilder().buildLuceneLessThan(lqpa, value, mode, luceneFunction);
|
||||
@@ -367,8 +367,8 @@ public class CmisFunctionEvaluationContext implements FunctionEvaluationContext
|
||||
* org.alfresco.service.namespace.QName, java.io.Serializable,
|
||||
* org.alfresco.repo.search.impl.querymodel.PredicateMode)
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
|
||||
PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
|
||||
PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
PropertyDefinitionWrapper propertyDef = cmisDictionaryService.findProperty(propertyName);
|
||||
return propertyDef.getPropertyLuceneBuilder().buildLuceneLessThanOrEquals(lqpa, value, mode, luceneFunction);
|
||||
@@ -382,7 +382,7 @@ public class CmisFunctionEvaluationContext implements FunctionEvaluationContext
|
||||
* org.alfresco.service.namespace.QName, java.io.Serializable,
|
||||
* java.lang.Boolean)
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, Boolean not)
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, Boolean not)
|
||||
throws E
|
||||
{
|
||||
PropertyDefinitionWrapper propertyDef = cmisDictionaryService.findProperty(propertyName);
|
||||
@@ -395,7 +395,7 @@ public class CmisFunctionEvaluationContext implements FunctionEvaluationContext
|
||||
* @see org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext#
|
||||
* getLuceneSortField(org.alfresco.service.namespace.QName)
|
||||
*/
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName) throws E
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa, String propertyName) throws E
|
||||
{
|
||||
PropertyDefinitionWrapper propertyDef = cmisDictionaryService.findProperty(propertyName);
|
||||
return propertyDef.getPropertyLuceneBuilder().getLuceneSortField(lqpa);
|
||||
|
||||
@@ -117,12 +117,6 @@ public class CustomModelDefinitionImpl implements CustomModelDefinition
|
||||
return this.active;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAnalyserResourceBundleName()
|
||||
{
|
||||
return m2ModelDefinition.getAnalyserResourceBundleName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAuthor()
|
||||
{
|
||||
|
||||
@@ -280,11 +280,6 @@ public interface DictionaryDAO extends ModelQuery
|
||||
// MT-specific
|
||||
boolean isModelInherited(QName name);
|
||||
|
||||
/**
|
||||
* @return String
|
||||
*/
|
||||
String getDefaultAnalyserResourceBundleName();
|
||||
|
||||
/**
|
||||
* @return ClassLoader
|
||||
*/
|
||||
|
||||
@@ -101,18 +101,6 @@ public class DictionaryDAOImpl implements DictionaryDAO, NamespaceDAO,
|
||||
this.dictionaryRegistryCache = dictionaryRegistryCache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDefaultAnalyserResourceBundleName()
|
||||
{
|
||||
return defaultAnalyserResourceBundleName;
|
||||
}
|
||||
|
||||
public void setDefaultAnalyserResourceBundleName(
|
||||
String defaultAnalyserResourceBundleName)
|
||||
{
|
||||
this.defaultAnalyserResourceBundleName = defaultAnalyserResourceBundleName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
|
||||
@@ -234,15 +234,6 @@ import org.alfresco.service.namespace.QName;
|
||||
return Collections.unmodifiableMap(childassociations);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.dictionary.ClassDefinition#getAnalyserResourceBundleName()
|
||||
*/
|
||||
@Override
|
||||
public String getAnalyserResourceBundleName()
|
||||
{
|
||||
return type.getAnalyserResourceBundleName();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.dictionary.ClassDefinition#getParentClassDefinition()
|
||||
*/
|
||||
|
||||
@@ -48,7 +48,7 @@ public abstract class M2Class
|
||||
private Boolean archive = null;
|
||||
private Boolean includedInSuperTypeQuery = null;
|
||||
private String analyserResourceBundleName = null;
|
||||
|
||||
|
||||
private List<M2Property> properties = new ArrayList<M2Property>();
|
||||
private List<M2PropertyOverride> propertyOverrides = new ArrayList<M2PropertyOverride>();
|
||||
private List<M2ClassAssociation> associations = new ArrayList<M2ClassAssociation>();
|
||||
@@ -270,19 +270,6 @@ public abstract class M2Class
|
||||
{
|
||||
return Collections.unmodifiableList(mandatoryAspects);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String
|
||||
*/
|
||||
public String getAnalyserResourceBundleName()
|
||||
{
|
||||
return analyserResourceBundleName;
|
||||
}
|
||||
|
||||
public void setAnalyserResourceBundleName(String analyserResourceBundleName)
|
||||
{
|
||||
this.analyserResourceBundleName = analyserResourceBundleName;
|
||||
}
|
||||
|
||||
public void setConfigProperties(Properties configProperties)
|
||||
{
|
||||
|
||||
@@ -206,8 +206,6 @@ import org.alfresco.util.EqualsHelper;
|
||||
defaultAspectNames.add(name);
|
||||
}
|
||||
}
|
||||
|
||||
this.analyserResourceBundleName = m2Class.getAnalyserResourceBundleName();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -761,15 +759,6 @@ import org.alfresco.util.EqualsHelper;
|
||||
return modelDiffs;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.dictionary.ClassDefinition#getAnalyserResourceBundleName()
|
||||
*/
|
||||
@Override
|
||||
public String getAnalyserResourceBundleName()
|
||||
{
|
||||
return analyserResourceBundleName;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.dictionary.ClassDefinition#getParentClassDefinition()
|
||||
*/
|
||||
|
||||
@@ -40,86 +40,50 @@ public class M2DataType
|
||||
private String defaultAnalyserClassName = null;
|
||||
private String javaClassName = null;
|
||||
private String analyserResourceBundleName = null;
|
||||
|
||||
|
||||
|
||||
|
||||
/*package*/ M2DataType()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
|
||||
public String getDefaultAnalyserClassName()
|
||||
{
|
||||
return defaultAnalyserClassName;
|
||||
}
|
||||
|
||||
|
||||
public void setDefaultAnalyserClassName(String defaultAnalyserClassName)
|
||||
{
|
||||
this.defaultAnalyserClassName = defaultAnalyserClassName;;
|
||||
}
|
||||
|
||||
|
||||
public String getJavaClassName()
|
||||
{
|
||||
return javaClassName;
|
||||
}
|
||||
|
||||
|
||||
public void setJavaClassName(String javaClassName)
|
||||
{
|
||||
this.javaClassName = javaClassName;;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return String
|
||||
*/
|
||||
public String getAnalyserResourceBundleName()
|
||||
{
|
||||
return analyserResourceBundleName;
|
||||
}
|
||||
|
||||
|
||||
public void setAnalyserResourceBundleName(String analyserResourceBundleName)
|
||||
{
|
||||
this.analyserResourceBundleName = analyserResourceBundleName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ import org.alfresco.service.namespace.QName;
|
||||
throw new DictionaryException(ERR_NOT_DEFINED_NAMESPACE, name.toPrefixString(), name.getNamespaceURI(), model.getName().toPrefixString());
|
||||
}
|
||||
this.dataType = propertyType;
|
||||
this.analyserResourceBundleName = dataType.getAnalyserResourceBundleName();
|
||||
}
|
||||
|
||||
|
||||
@@ -146,108 +145,9 @@ import org.alfresco.service.namespace.QName;
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDefaultAnalyserClassName()
|
||||
{
|
||||
return dataType.getDefaultAnalyserClassName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getJavaClassName()
|
||||
{
|
||||
return dataType.getJavaClassName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAnalyserResourceBundleName()
|
||||
{
|
||||
return analyserResourceBundleName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String resolveAnalyserClassName()
|
||||
{
|
||||
return resolveAnalyserClassName(I18NUtil.getLocale());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param locale Locale
|
||||
* @return String
|
||||
*/
|
||||
@Override
|
||||
public String resolveAnalyserClassName(Locale locale)
|
||||
{
|
||||
ClassLoader resourceBundleClassLoader = getModel().getDictionaryDAO().getResourceClassLoader();
|
||||
if(resourceBundleClassLoader == null)
|
||||
{
|
||||
resourceBundleClassLoader = this.getClass().getClassLoader();
|
||||
}
|
||||
|
||||
StringBuilder keyBuilder = new StringBuilder(64);
|
||||
keyBuilder.append(getModel().getName().toPrefixString());
|
||||
keyBuilder.append(".datatype");
|
||||
keyBuilder.append(".").append(getName().toPrefixString());
|
||||
keyBuilder.append(".analyzer");
|
||||
String key = StringUtils.replace(keyBuilder.toString(), ":", "_");
|
||||
|
||||
String analyserClassName = null;
|
||||
|
||||
String defaultAnalyserResourceBundleName = this.getModel().getDictionaryDAO().getDefaultAnalyserResourceBundleName();
|
||||
if(defaultAnalyserResourceBundleName != null)
|
||||
{
|
||||
ResourceBundle bundle = ResourceBundle.getBundle(defaultAnalyserResourceBundleName, locale, resourceBundleClassLoader);
|
||||
if(bundle.containsKey(key))
|
||||
{
|
||||
analyserClassName = bundle.getString(key);
|
||||
}
|
||||
}
|
||||
|
||||
String analyserResourceBundleName;
|
||||
if(analyserClassName == null)
|
||||
{
|
||||
analyserResourceBundleName = dataType.getAnalyserResourceBundleName();
|
||||
if(analyserResourceBundleName != null)
|
||||
{
|
||||
ResourceBundle bundle = ResourceBundle.getBundle(analyserResourceBundleName, locale, resourceBundleClassLoader);
|
||||
if(bundle.containsKey(key))
|
||||
{
|
||||
analyserClassName = bundle.getString(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(analyserClassName == null)
|
||||
{
|
||||
analyserResourceBundleName = getModel().getAnalyserResourceBundleName();
|
||||
if(analyserResourceBundleName != null)
|
||||
{
|
||||
ResourceBundle bundle = ResourceBundle.getBundle(analyserResourceBundleName, locale, resourceBundleClassLoader);
|
||||
if(bundle.containsKey(key))
|
||||
{
|
||||
analyserClassName = bundle.getString(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(analyserClassName == null)
|
||||
{
|
||||
// MLTEXT should fall back to TEXT for analysis
|
||||
if(name.equals(DataTypeDefinition.MLTEXT))
|
||||
{
|
||||
analyserClassName = model.getDictionaryDAO().getDataType(DataTypeDefinition.TEXT).resolveAnalyserClassName(locale);
|
||||
if(analyserClassName == null)
|
||||
{
|
||||
analyserClassName = dataType.getDefaultAnalyserClassName();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
analyserClassName = dataType.getDefaultAnalyserClassName();
|
||||
}
|
||||
}
|
||||
|
||||
return analyserClassName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -469,21 +469,6 @@ public class M2Model
|
||||
return new ArrayList();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return String
|
||||
*/
|
||||
public String getAnalyserResourceBundleName()
|
||||
{
|
||||
return analyserResourceBundleName;
|
||||
}
|
||||
|
||||
|
||||
public void setAnalyserResourceBundleName(String analyserResourceBundleName)
|
||||
{
|
||||
this.analyserResourceBundleName = analyserResourceBundleName;
|
||||
}
|
||||
|
||||
public void setConfigProperties(Properties configProperties)
|
||||
{
|
||||
if (types != null)
|
||||
|
||||
@@ -55,7 +55,6 @@ public class M2ModelDefinition implements ModelDefinition
|
||||
{
|
||||
this.name = QName.createQName(model.getName(), resolver);
|
||||
this.model = model;
|
||||
this.analyserResourceBundleName = model.getAnalyserResourceBundleName();
|
||||
this.dictionaryDAO = dictionaryDAO;
|
||||
}
|
||||
|
||||
@@ -175,17 +174,6 @@ public class M2ModelDefinition implements ModelDefinition
|
||||
return model.getChecksum(bindingType);
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.dictionary.ModelDefinition#getAnalyserResourceBundleName()
|
||||
*/
|
||||
@Override
|
||||
public String getAnalyserResourceBundleName()
|
||||
{
|
||||
return analyserResourceBundleName;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public DictionaryDAO getDictionaryDAO()
|
||||
{
|
||||
|
||||
@@ -312,20 +312,6 @@ public class M2Property
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String
|
||||
*/
|
||||
public String getAnalyserResourceBundleName()
|
||||
{
|
||||
return analyserResourceBundleName;
|
||||
}
|
||||
|
||||
|
||||
public void setAnalyserResourceBundleName(String analyserResourceBundleName)
|
||||
{
|
||||
this.analyserResourceBundleName = analyserResourceBundleName;
|
||||
}
|
||||
|
||||
public void setConfigProperties(Properties configProperties)
|
||||
{
|
||||
|
||||
@@ -78,7 +78,6 @@ import org.springframework.util.StringUtils;
|
||||
// Resolve Names
|
||||
this.name = QName.createQName(m2Property.getName(), prefixResolver);
|
||||
this.propertyTypeName = QName.createQName(m2Property.getType(), prefixResolver);
|
||||
this.analyserResourceBundleName = m2Property.getAnalyserResourceBundleName();
|
||||
}
|
||||
|
||||
|
||||
@@ -552,19 +551,43 @@ import org.springframework.util.StringUtils;
|
||||
// check mandatory
|
||||
if (isMandatory() != propDef.isMandatory())
|
||||
{
|
||||
isUpdated = true;
|
||||
// Change from mandatory to NON mandatory is an incremental change
|
||||
if (isMandatory() && !propDef.isMandatory())
|
||||
{
|
||||
isUpdatedIncrementally = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
isUpdated = true;
|
||||
}
|
||||
}
|
||||
|
||||
// check mandatory enforced
|
||||
if (isMandatoryEnforced() != propDef.isMandatoryEnforced())
|
||||
{
|
||||
isUpdated = true;
|
||||
{
|
||||
// Change from mandatory enforced to NON mandatory enforced is an incremental change
|
||||
if (isMandatoryEnforced() && ! propDef.isMandatoryEnforced())
|
||||
{
|
||||
isUpdatedIncrementally = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
isUpdated = true;
|
||||
}
|
||||
}
|
||||
|
||||
// check protected
|
||||
if (isProtected() != propDef.isProtected())
|
||||
{
|
||||
isUpdated = true;
|
||||
{
|
||||
// Change from protected to NON protected is an incremental change
|
||||
if (isProtected() && !propDef.isProtected())
|
||||
{
|
||||
isUpdatedIncrementally = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
isUpdated = true;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -665,119 +688,4 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
return modelDiffs;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.dictionary.PropertyDefinition#getAnalyserResourceBundleName()
|
||||
*/
|
||||
@Override
|
||||
public String getAnalyserResourceBundleName()
|
||||
{
|
||||
return analyserResourceBundleName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String resolveAnalyserClassName()
|
||||
{
|
||||
return resolveAnalyserClassName(I18NUtil.getLocale());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.dictionary.PropertyDefinition#getAnalyserClassName(java.lang.String, java.util.Locale)
|
||||
*/
|
||||
@Override
|
||||
public String resolveAnalyserClassName(Locale locale
|
||||
)
|
||||
{
|
||||
ClassLoader resourceBundleClassLoader = getModel().getDictionaryDAO().getResourceClassLoader();
|
||||
if(resourceBundleClassLoader == null)
|
||||
{
|
||||
resourceBundleClassLoader = this.getClass().getClassLoader();
|
||||
}
|
||||
|
||||
StringBuilder keyBuilder = new StringBuilder(64);
|
||||
keyBuilder.append(getDataType().getModel().getName().toPrefixString());
|
||||
keyBuilder.append(".datatype");
|
||||
keyBuilder.append(".").append(getDataType().getName().toPrefixString());
|
||||
keyBuilder.append(".analyzer");
|
||||
String key = StringUtils.replace(keyBuilder.toString(), ":", "_");
|
||||
|
||||
String analyserClassName = null;
|
||||
|
||||
String analyserResourceBundleName = getAnalyserResourceBundleName();
|
||||
if(analyserResourceBundleName != null)
|
||||
{
|
||||
ResourceBundle bundle = ResourceBundle.getBundle(analyserResourceBundleName, locale, resourceBundleClassLoader);
|
||||
if(bundle.containsKey(key))
|
||||
{
|
||||
analyserClassName = bundle.getString(key);
|
||||
}
|
||||
}
|
||||
|
||||
// walk containing class and its hierarchy
|
||||
|
||||
ClassDefinition classDefinition = null;
|
||||
ClassDefinition parentClassDefinition = null;
|
||||
while(analyserClassName == null)
|
||||
{
|
||||
if(classDefinition == null)
|
||||
{
|
||||
classDefinition = getContainerClass();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(parentClassDefinition == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
classDefinition = parentClassDefinition;
|
||||
}
|
||||
}
|
||||
|
||||
parentClassDefinition = classDefinition.getParentClassDefinition();
|
||||
|
||||
analyserResourceBundleName = classDefinition.getAnalyserResourceBundleName();
|
||||
if(analyserResourceBundleName != null)
|
||||
{
|
||||
ResourceBundle bundle = ResourceBundle.getBundle(analyserResourceBundleName, locale, resourceBundleClassLoader);
|
||||
if(bundle.containsKey(key))
|
||||
{
|
||||
analyserClassName = bundle.getString(key);
|
||||
}
|
||||
}
|
||||
if(analyserClassName == null)
|
||||
{
|
||||
if((parentClassDefinition == null) || !classDefinition.getModel().getName().equals(parentClassDefinition.getModel().getName()))
|
||||
{
|
||||
analyserResourceBundleName = classDefinition.getModel().getAnalyserResourceBundleName();
|
||||
if(analyserResourceBundleName != null)
|
||||
{
|
||||
ResourceBundle bundle = ResourceBundle.getBundle(analyserResourceBundleName, locale, resourceBundleClassLoader);
|
||||
if(bundle.containsKey(key))
|
||||
{
|
||||
analyserClassName = bundle.getString(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
String defaultAnalyserResourceBundleName = this.getContainerClass().getModel().getDictionaryDAO().getDefaultAnalyserResourceBundleName();
|
||||
if(analyserClassName == null)
|
||||
{
|
||||
if(defaultAnalyserResourceBundleName != null)
|
||||
{
|
||||
ResourceBundle bundle = ResourceBundle.getBundle(defaultAnalyserResourceBundleName, locale, resourceBundleClassLoader);
|
||||
if(bundle.containsKey(key))
|
||||
{
|
||||
analyserClassName = bundle.getString(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(analyserClassName == null)
|
||||
{
|
||||
analyserClassName = getDataType().resolveAnalyserClassName(locale);
|
||||
}
|
||||
return analyserClassName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<value name="published" field="published" usage="optional"/>
|
||||
<value name="version" field="version" usage="optional"/>
|
||||
<value name="analyserResourceBundleName" field="analyserResourceBundleName" usage="optional"/>
|
||||
|
||||
|
||||
<structure name="imports" usage="optional">
|
||||
<collection field="imports" factory="org.alfresco.repo.dictionary.M2Model.createList">
|
||||
<structure name="import" type="org.alfresco.repo.dictionary.M2Namespace" usage="optional">
|
||||
@@ -37,7 +37,7 @@
|
||||
<value style="attribute" name="name" field="name"/>
|
||||
<value name="title" field="title" usage="optional"/>
|
||||
<value name="description" field="description" usage="optional"/>
|
||||
<value name="default-analyser-class" field="defaultAnalyserClassName"/>
|
||||
<value name="default-analyser-class" field="defaultAnalyserClassName" usage="optional"/>
|
||||
<value name="analyserResourceBundleName" field="analyserResourceBundleName" usage="optional"/>
|
||||
<value name="java-class" field="javaClassName"/>
|
||||
</structure>
|
||||
@@ -179,4 +179,4 @@
|
||||
<value name="propagateTimestamps" field="propagateTimestamps" usage="optional"/>
|
||||
</mapping>
|
||||
|
||||
</binding>
|
||||
</binding>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.repo.search.adaptor.lucene;
|
||||
package org.alfresco.repo.search.adaptor;
|
||||
|
||||
public enum AnalysisMode
|
||||
{
|
||||
@@ -24,7 +24,7 @@
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.repo.search.adaptor.lucene;
|
||||
package org.alfresco.repo.search.adaptor;
|
||||
|
||||
/**
|
||||
* Functions that can be applied to lucene fields
|
||||
@@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.repo.search.adaptor.lucene;
|
||||
package org.alfresco.repo.search.adaptor;
|
||||
|
||||
/**
|
||||
* This class defines
|
||||
@@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.repo.search.adaptor.lucene;
|
||||
package org.alfresco.repo.search.adaptor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -33,8 +33,8 @@ import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
import org.alfresco.service.cmr.search.SearchParameters;
|
||||
|
||||
/**
|
||||
* Adaptor class principally to wrap lucene parser implementations and encapsulate changes between lucene versions
|
||||
* of query building.
|
||||
* Adaptor class to wrap search parser implementations and encapsulate changes between search versions of query
|
||||
* building.
|
||||
*
|
||||
* @param <Q> the query type used by the query engine implementation
|
||||
* @param <S> the sort type used by the query engine implementation
|
||||
@@ -43,7 +43,7 @@ import org.alfresco.service.cmr.search.SearchParameters;
|
||||
* @author Andy
|
||||
*
|
||||
*/
|
||||
public interface LuceneQueryParserAdaptor<Q, S, E extends Throwable>
|
||||
public interface QueryParserAdaptor<Q, S, E extends Throwable>
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -215,9 +215,9 @@ public interface LuceneQueryParserAdaptor<Q, S, E extends Throwable>
|
||||
|
||||
/**
|
||||
* Utility to build conjunctions, disjunctions and negation
|
||||
* @return LuceneQueryParserExpressionAdaptor
|
||||
* @return QueryParserExpressionAdaptor
|
||||
*/
|
||||
LuceneQueryParserExpressionAdaptor<Q, E> getExpressionAdaptor();
|
||||
QueryParserExpressionAdaptor<Q, E> getExpressionAdaptor();
|
||||
|
||||
/**
|
||||
* A query that matches all alfresco nodes (not extra stuff that may be in the underlying index)
|
||||
@@ -23,13 +23,13 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.repo.search.adaptor.lucene;
|
||||
package org.alfresco.repo.search.adaptor;
|
||||
|
||||
/**
|
||||
* @author Andy
|
||||
*
|
||||
*/
|
||||
public interface LuceneQueryParserExpressionAdaptor<Q, E extends Throwable>
|
||||
public interface QueryParserExpressionAdaptor<Q, E extends Throwable>
|
||||
{
|
||||
public void addRequired(Q q) throws E;
|
||||
public void addExcluded(Q q) throws E;
|
||||
@@ -27,7 +27,7 @@ package org.alfresco.repo.search.impl;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.QueryConstants;
|
||||
import org.alfresco.repo.search.adaptor.QueryConstants;
|
||||
import org.alfresco.service.cmr.dictionary.AspectDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.ClassDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
|
||||
@@ -31,9 +31,9 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.repo.dictionary.IndexTokenisationMode;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.lucene.QueryConstants;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryConstants;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
@@ -136,54 +136,54 @@ public class AlfrescoFunctionEvaluationContext implements FunctionEvaluationCont
|
||||
this.defaultNamespace = defaultNamespace;
|
||||
}
|
||||
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Boolean not) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
|
||||
throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public <Q, S, E extends Throwable> Q buildLuceneIn(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneIn(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
|
||||
throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, Boolean not) throws E
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, Boolean not) throws E
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName) throws E
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa, String propertyName) throws E
|
||||
{
|
||||
// Score is special
|
||||
if (propertyName.equalsIgnoreCase("Score"))
|
||||
@@ -263,12 +263,12 @@ public class AlfrescoFunctionEvaluationContext implements FunctionEvaluationCont
|
||||
}
|
||||
|
||||
/**
|
||||
* @param lqpa LuceneQueryParserAdaptor<Q, S, E>
|
||||
* @param lqpa QueryParserAdaptor<Q, S, E>
|
||||
* @param field String
|
||||
* @return ... extends Throwable
|
||||
* @throws E
|
||||
*/
|
||||
private <Q, S, E extends Throwable> String findSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa, String field) throws E
|
||||
private <Q, S, E extends Throwable> String findSortField(QueryParserAdaptor<Q, S, E> lqpa, String field) throws E
|
||||
{
|
||||
return lqpa.getSortField(field);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.Column;
|
||||
import org.alfresco.repo.search.impl.querymodel.Constraint;
|
||||
|
||||
@@ -29,8 +29,8 @@ import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
|
||||
@@ -79,7 +79,7 @@ public interface FunctionEvaluationContext
|
||||
* @return the query
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
|
||||
/**
|
||||
* Note: null and not null are not required to support functions from the spec
|
||||
@@ -88,7 +88,7 @@ public interface FunctionEvaluationContext
|
||||
* @return the query
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Boolean not) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Boolean not) throws E;
|
||||
|
||||
/**
|
||||
* @param propertyName String
|
||||
@@ -98,7 +98,7 @@ public interface FunctionEvaluationContext
|
||||
* @return the query
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
|
||||
/**
|
||||
* @param propertyName String
|
||||
@@ -108,7 +108,7 @@ public interface FunctionEvaluationContext
|
||||
* @return the query
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
|
||||
/**
|
||||
* @param propertyName String
|
||||
@@ -118,7 +118,7 @@ public interface FunctionEvaluationContext
|
||||
* @return the query
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThan(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
|
||||
/**
|
||||
* @param propertyName String
|
||||
@@ -128,7 +128,7 @@ public interface FunctionEvaluationContext
|
||||
* @return the query
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
|
||||
/**
|
||||
* Note: Like is not required to support functions from the spec
|
||||
@@ -138,7 +138,7 @@ public interface FunctionEvaluationContext
|
||||
* @return the query
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, Boolean not) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneLike(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, Boolean not) throws E;
|
||||
|
||||
/**
|
||||
* @param propertyName String
|
||||
@@ -148,7 +148,7 @@ public interface FunctionEvaluationContext
|
||||
* @return the query
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneInequality(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
|
||||
|
||||
/**
|
||||
* Note: In is not required to support functions from the spec
|
||||
@@ -158,14 +158,14 @@ public interface FunctionEvaluationContext
|
||||
* @return the query
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> Q buildLuceneIn(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E;
|
||||
public <Q, S, E extends Throwable> Q buildLuceneIn(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E;
|
||||
|
||||
/**
|
||||
* @param propertyName String
|
||||
* @return the field used for sorting the given property
|
||||
* @throws E
|
||||
*/
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName) throws E;
|
||||
public <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa, String propertyName) throws E;
|
||||
|
||||
/**
|
||||
* @param propertyName String
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserExpressionAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserExpressionAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.Constraint;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
@@ -52,14 +52,14 @@ public class LuceneConjunction<Q, S, E extends Throwable> extends BaseConjunctio
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent#addComponent(java.lang.String,
|
||||
* java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext,
|
||||
* java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext,
|
||||
* org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
|
||||
LuceneQueryParserExpressionAdaptor<Q, E> expressionAdaptor = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
|
||||
QueryParserExpressionAdaptor<Q, E> expressionAdaptor = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
|
||||
boolean must = false;
|
||||
boolean must_not = false;
|
||||
for (Constraint constraint : getConstraints())
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserExpressionAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserExpressionAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.Constraint;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
@@ -54,13 +54,13 @@ public class LuceneDisjunction<Q, S, E extends Throwable> extends BaseDisjunctio
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent#addComponent(java.lang.String,
|
||||
* java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext,
|
||||
* java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext,
|
||||
* org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserExpressionAdaptor<Q, E> expressionBuilder = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
|
||||
QueryParserExpressionAdaptor<Q, E> expressionBuilder = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
|
||||
ArrayList<Pair<Constraint, Q>> queriestoDisjoin = new ArrayList<>();
|
||||
for (Constraint constraint : getConstraints())
|
||||
{
|
||||
@@ -80,7 +80,7 @@ public class LuceneDisjunction<Q, S, E extends Throwable> extends BaseDisjunctio
|
||||
expressionBuilder.addOptional(constraintQuery, constraint.getBoost());
|
||||
break;
|
||||
case EXCLUDE:
|
||||
LuceneQueryParserExpressionAdaptor<Q, E> subExpressionBuilder = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
|
||||
QueryParserExpressionAdaptor<Q, E> subExpressionBuilder = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
|
||||
subExpressionBuilder.addRequired(luceneContext.getLuceneQueryParserAdaptor().getMatchAllNodesQuery());
|
||||
subExpressionBuilder.addExcluded(constraintQuery);
|
||||
expressionBuilder.addOptional(subExpressionBuilder.getQuery(), constraint.getBoost());
|
||||
|
||||
@@ -51,7 +51,7 @@ public class LuceneFunctionalConstraint<Q, S, E extends Throwable> extends BaseF
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent#addComponent(org.apache.lucene.search.BooleanQuery, org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService, java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
|
||||
{
|
||||
Function function = getFunction();
|
||||
if(function != null)
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserExpressionAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserExpressionAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Column;
|
||||
import org.alfresco.repo.search.impl.querymodel.Constraint;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
@@ -67,9 +67,9 @@ public class LuceneQuery<Q, S, E extends Throwable> extends BaseQuery implements
|
||||
*
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilder#buildQuery()
|
||||
*/
|
||||
public Q buildQuery(Set<String> selectors, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
|
||||
public Q buildQuery(Set<String> selectors, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
|
||||
{
|
||||
LuceneQueryParserExpressionAdaptor<Q, E> expressionBuilder = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
|
||||
QueryParserExpressionAdaptor<Q, E> expressionBuilder = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
|
||||
|
||||
boolean must = false;
|
||||
boolean must_not = false;
|
||||
@@ -148,10 +148,10 @@ public class LuceneQuery<Q, S, E extends Throwable> extends BaseQuery implements
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilder#buildSort(java.lang.String,
|
||||
* org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext,
|
||||
* org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext,
|
||||
* org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
|
||||
*/
|
||||
public S buildSort(Set<String> selectors, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
|
||||
public S buildSort(Set<String> selectors, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
|
||||
{
|
||||
if ((getOrderings() == null) || (getOrderings().size() == 0))
|
||||
{
|
||||
@@ -161,7 +161,7 @@ public class LuceneQuery<Q, S, E extends Throwable> extends BaseQuery implements
|
||||
return luceneContext.getLuceneQueryParserAdaptor().buildSort(getOrderings(), functionContext);
|
||||
}
|
||||
|
||||
public List<SortDefinition> buildSortDefinitions(Set<String> selectors, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public List<SortDefinition> buildSortDefinitions(Set<String> selectors, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
{
|
||||
if ((getOrderings() == null) || (getOrderings().size() == 0))
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ public interface LuceneQueryBuilder <Q, S, E extends Throwable>
|
||||
* @return - the query
|
||||
* @throws E
|
||||
*/
|
||||
public Q buildQuery(Set<String> selectors, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E;
|
||||
public Q buildQuery(Set<String> selectors, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E;
|
||||
|
||||
/**
|
||||
* Build the matching lucene sort
|
||||
@@ -55,12 +55,12 @@ public interface LuceneQueryBuilder <Q, S, E extends Throwable>
|
||||
* @return - the sort spec
|
||||
* @throws E
|
||||
*/
|
||||
public S buildSort(Set<String> selectors, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E;
|
||||
public S buildSort(Set<String> selectors, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E;
|
||||
|
||||
/**
|
||||
* Build a sort definition for a sorted result set wrapper
|
||||
* @param functionContext FunctionEvaluationContext
|
||||
*/
|
||||
public List<SortDefinition> buildSortDefinitions(Set<String> selectors, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext);
|
||||
public List<SortDefinition> buildSortDefinitions(Set<String> selectors, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext);
|
||||
|
||||
}
|
||||
|
||||
@@ -42,5 +42,5 @@ public interface LuceneQueryBuilderComponent<Q, S, E extends Throwable>
|
||||
* @return - the lucene query fragment for this component
|
||||
* @throws E
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E;
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E;
|
||||
}
|
||||
|
||||
@@ -28,10 +28,9 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.JoinType;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.BaseSelector;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
@@ -54,9 +53,9 @@ public class LuceneSelector<Q, S, E extends Throwable> extends BaseSelector impl
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent#addComponent(org.apache.lucene.search.BooleanQuery, org.apache.lucene.search.BooleanQuery)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
switch(getJoinType())
|
||||
{
|
||||
case INNER:
|
||||
|
||||
@@ -25,20 +25,20 @@
|
||||
*/
|
||||
package org.alfresco.repo.search.impl.querymodel.impl.lucene;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.service.namespace.NamespacePrefixResolver;
|
||||
|
||||
/**
|
||||
* @author Andy
|
||||
*
|
||||
*/
|
||||
public interface LuceneQueryBuilderContext<Q, S, E extends Throwable>
|
||||
public interface QueryBuilderContext<Q, S, E extends Throwable>
|
||||
{
|
||||
|
||||
/**
|
||||
* @return - the parser
|
||||
*/
|
||||
public abstract LuceneQueryParserAdaptor<Q, S, E> getLuceneQueryParserAdaptor();
|
||||
public abstract QueryParserAdaptor<Q, S, E> getLuceneQueryParserAdaptor();
|
||||
|
||||
/**
|
||||
* @return - the namespace prefix resolver
|
||||
@@ -29,14 +29,14 @@ import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.lucene.QueryConstants;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryConstants;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Child;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
|
||||
@@ -55,7 +55,7 @@ public class LuceneChild<Q, S, E extends Throwable> extends Child implements Luc
|
||||
super();
|
||||
}
|
||||
|
||||
private StoreRef getStore(LuceneQueryBuilderContext<Q, S, E> luceneContext)
|
||||
private StoreRef getStore(QueryBuilderContext<Q, S, E> luceneContext)
|
||||
{
|
||||
ArrayList<StoreRef> stores = luceneContext.getLuceneQueryParserAdaptor().getSearchParameters().getStores();
|
||||
if(stores.size() < 1)
|
||||
@@ -73,10 +73,10 @@ public class LuceneChild<Q, S, E extends Throwable> extends Child implements Luc
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
Argument argument = functionArgs.get(ARG_PARENT);
|
||||
String id = (String) argument.getValue(functionContext);
|
||||
argument = functionArgs.get(ARG_SELECTOR);
|
||||
|
||||
@@ -29,14 +29,14 @@ import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.lucene.QueryConstants;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryConstants;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Descendant;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.Path;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
@@ -56,7 +56,7 @@ public class LuceneDescendant<Q, S, E extends Throwable> extends Descendant impl
|
||||
super();
|
||||
}
|
||||
|
||||
private StoreRef getStore(LuceneQueryBuilderContext<Q, S, E> luceneContext)
|
||||
private StoreRef getStore(QueryBuilderContext<Q, S, E> luceneContext)
|
||||
{
|
||||
ArrayList<StoreRef> stores = luceneContext.getLuceneQueryParserAdaptor().getSearchParameters().getStores();
|
||||
if(stores.size() < 1)
|
||||
@@ -74,10 +74,10 @@ public class LuceneDescendant<Q, S, E extends Throwable> extends Descendant impl
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
Argument argument = functionArgs.get(ARG_ANCESTOR);
|
||||
String id = (String) argument.getValue(functionContext);
|
||||
argument = functionArgs.get(ARG_SELECTOR);
|
||||
|
||||
@@ -28,14 +28,14 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Equals;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -58,10 +58,10 @@ public class LuceneEquals<Q, S, E extends Throwable> extends Equals implements
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
setPropertyAndStaticArguments(functionArgs);
|
||||
|
||||
Q query = functionContext.buildLuceneEquality(lqpa, getPropertyName(), getStaticArgument().getValue(functionContext), PredicateMode.ANY, functionContext.getLuceneFunction(getFunctionArgument()));
|
||||
|
||||
@@ -28,14 +28,14 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PropertyArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Exists;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
|
||||
/**
|
||||
@@ -52,10 +52,10 @@ public class LuceneExists<Q, S, E extends Throwable> extends Exists implements L
|
||||
super();
|
||||
}
|
||||
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
PropertyArgument propertyArgument = (PropertyArgument) functionArgs.get(ARG_PROPERTY);
|
||||
Argument inverseArgument = functionArgs.get(ARG_NOT);
|
||||
Boolean not = DefaultTypeConverter.INSTANCE.convert(Boolean.class, inverseArgument.getValue(functionContext));
|
||||
|
||||
@@ -28,13 +28,13 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PropertyArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.FTSFuzzyTerm;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* Fuzzy matching
|
||||
@@ -59,10 +59,10 @@ public class LuceneFTSFuzzyTerm<Q, S, E extends Throwable> extends FTSFuzzyTerm
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
Argument argument = functionArgs.get(ARG_TERM);
|
||||
String term = (String) argument.getValue(functionContext);
|
||||
argument = functionArgs.get(ARG_MIN_SIMILARITY);
|
||||
|
||||
@@ -28,15 +28,15 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PropertyArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.FTSPhrase;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -59,10 +59,10 @@ public class LuceneFTSPhrase<Q, S, E extends Throwable> extends FTSPhrase implem
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
Argument argument = functionArgs.get(ARG_PHRASE);
|
||||
String term = (String) argument.getValue(functionContext);
|
||||
|
||||
|
||||
@@ -28,14 +28,14 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PropertyArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.FTSPrefixTerm;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* Perfix term
|
||||
@@ -59,10 +59,10 @@ public class LuceneFTSPrefixTerm<Q, S, E extends Throwable> extends FTSPrefixTer
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
Argument argument = functionArgs.get(ARG_TERM);
|
||||
String term = (String) argument.getValue(functionContext);
|
||||
// strip trailing wildcard *
|
||||
|
||||
@@ -28,13 +28,13 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PropertyArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.FTSProximity;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* Proximity
|
||||
@@ -59,10 +59,10 @@ public class LuceneFTSProximity<Q, S, E extends Throwable> extends FTSProximity
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
Argument argument = functionArgs.get(ARG_FIRST);
|
||||
String first = (String) argument.getValue(functionContext);
|
||||
argument = functionArgs.get(ARG_LAST);
|
||||
|
||||
@@ -28,15 +28,15 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PropertyArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.FTSRange;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* Range
|
||||
@@ -60,10 +60,10 @@ public class LuceneFTSRange<Q, S, E extends Throwable> extends FTSRange implemen
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
Argument argument = functionArgs.get(ARG_FROM_INC);
|
||||
Boolean fromInc = (Boolean) argument.getValue(functionContext);
|
||||
argument = functionArgs.get(ARG_FROM);
|
||||
|
||||
@@ -28,15 +28,15 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PropertyArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.FTSTerm;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -58,10 +58,10 @@ public class LuceneFTSTerm<Q, S, E extends Throwable> extends FTSTerm implements
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
Argument argument = functionArgs.get(ARG_TERM);
|
||||
String term = (String) argument.getValue(functionContext);
|
||||
argument = functionArgs.get(ARG_TOKENISATION_MODE);
|
||||
|
||||
@@ -28,14 +28,14 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PropertyArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.FTSWildTerm;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* Wild Card
|
||||
@@ -60,10 +60,10 @@ public class LuceneFTSWildTerm<Q, S, E extends Throwable> extends FTSWildTerm im
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
Argument argument = functionArgs.get(ARG_TERM);
|
||||
String term = (String) argument.getValue(functionContext);
|
||||
|
||||
|
||||
@@ -28,14 +28,14 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.GreaterThan;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -58,10 +58,10 @@ public class LuceneGreaterThan<Q, S, E extends Throwable> extends GreaterThan im
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
setPropertyAndStaticArguments(functionArgs);
|
||||
|
||||
Q query = functionContext.buildLuceneGreaterThan(lqpa, getPropertyName(), getStaticArgument().getValue(functionContext), PredicateMode.ANY, functionContext.getLuceneFunction(getFunctionArgument()));
|
||||
|
||||
@@ -28,14 +28,14 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.GreaterThanOrEquals;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -59,10 +59,10 @@ public class LuceneGreaterThanOrEquals<Q, S, E extends Throwable> extends Greate
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
setPropertyAndStaticArguments(functionArgs);
|
||||
|
||||
Q query = functionContext.buildLuceneGreaterThanOrEquals(lqpa, getPropertyName(), getStaticArgument().getValue(functionContext), PredicateMode.ANY, functionContext.getLuceneFunction(getFunctionArgument()));
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.ListArgument;
|
||||
@@ -40,7 +40,7 @@ import org.alfresco.repo.search.impl.querymodel.PropertyArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.In;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
|
||||
/**
|
||||
@@ -64,10 +64,10 @@ public class LuceneIn<Q, S, E extends Throwable> extends In implements LuceneQue
|
||||
* org.alfresco.service.cmr.dictionary.DictionaryService, java.lang.String)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
PropertyArgument propertyArgument = (PropertyArgument) functionArgs.get(ARG_PROPERTY);
|
||||
Argument inverseArgument = functionArgs.get(ARG_NOT);
|
||||
Boolean not = DefaultTypeConverter.INSTANCE.convert(Boolean.class, inverseArgument.getValue(functionContext));
|
||||
|
||||
@@ -28,14 +28,14 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.LessThan;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -59,10 +59,10 @@ public class LuceneLessThan<Q, S, E extends Throwable> extends LessThan implemen
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
setPropertyAndStaticArguments(functionArgs);
|
||||
|
||||
Q query = functionContext.buildLuceneLessThan(lqpa, getPropertyName(), getStaticArgument().getValue(functionContext), PredicateMode.ANY, functionContext.getLuceneFunction(getFunctionArgument()));
|
||||
|
||||
@@ -28,14 +28,14 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.LessThanOrEquals;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -59,10 +59,10 @@ public class LuceneLessThanOrEquals<Q, S, E extends Throwable> extends LessThanO
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
|
||||
setPropertyAndStaticArguments(functionArgs);
|
||||
|
||||
|
||||
@@ -29,14 +29,14 @@ import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PropertyArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Like;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
|
||||
/**
|
||||
@@ -61,10 +61,10 @@ public class LuceneLike<Q, S, E extends Throwable> extends Like implements Lucen
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
PropertyArgument propertyArgument = (PropertyArgument) functionArgs.get(ARG_PROPERTY);
|
||||
Argument inverseArgument = functionArgs.get(ARG_NOT);
|
||||
Boolean not = DefaultTypeConverter.INSTANCE.convert(Boolean.class, inverseArgument.getValue(functionContext));
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Lower;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -52,10 +52,10 @@ public class LuceneLower<Q, S, E extends Throwable> extends Lower implements Luc
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent#addComponent(java.util.Set,
|
||||
* java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext,
|
||||
* java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext,
|
||||
* org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
throw new QueryModelException("Unsupported function in query " + getName());
|
||||
|
||||
@@ -28,14 +28,14 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene.functions;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
|
||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
|
||||
import org.alfresco.repo.search.impl.querymodel.Argument;
|
||||
import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.NotEquals;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -58,10 +58,10 @@ public class LuceneNotEquals<Q, S, E extends Throwable> extends NotEquals implem
|
||||
* org.apache.lucene.search.BooleanQuery, org.alfresco.service.cmr.dictionary.DictionaryService,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
|
||||
setPropertyAndStaticArguments(functionArgs);
|
||||
|
||||
Q query = functionContext.buildLuceneInequality(lqpa, getPropertyName(), getStaticArgument().getValue(functionContext), PredicateMode.ANY, functionContext
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.PropertyAccessor;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -49,9 +49,9 @@ public class LucenePropertyAccessor<Q, S, E extends Throwable> extends PropertyA
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent#addComponent(java.util.Set, java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext, org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent#addComponent(java.util.Set, java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext, org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
throw new QueryModelException("Unsupported function in query "+getName());
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Score;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -51,9 +51,9 @@ public class LuceneScore<Q, S, E extends Throwable> extends Score implements Luc
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent#addComponent(java.util.Set, java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext, org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent#addComponent(java.util.Set, java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext, org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
throw new QueryModelException("Unsupported function in query "+getName());
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Upper;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -50,9 +50,9 @@ public class LuceneUpper<Q, S, E extends Throwable> extends Upper implements Luc
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent#addComponent(java.util.Set, java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext, org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
|
||||
* @see org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderComponent#addComponent(java.util.Set, java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.QueryBuilderContext, org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
|
||||
*/
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
throw new QueryModelException("Unsupported function in query "+getName());
|
||||
|
||||
@@ -149,12 +149,6 @@ public interface ClassDefinition
|
||||
*/
|
||||
public List<AspectDefinition> getDefaultAspects(boolean inherited);
|
||||
|
||||
/**
|
||||
* Get the name of the property bundle that defines analyser mappings for this class (keyed by the type of the property)
|
||||
* @return the resource or null if not set.
|
||||
*/
|
||||
public String getAnalyserResourceBundleName();
|
||||
|
||||
/**
|
||||
* Get the parent class definition
|
||||
*
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.alfresco.repo.dictionary.CustomModelsInfo;
|
||||
import org.alfresco.repo.dictionary.M2Model;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.Pair;
|
||||
|
||||
/**
|
||||
* Custom model service configuration API.
|
||||
@@ -105,6 +106,14 @@ public interface CustomModelService
|
||||
*/
|
||||
public NodeRef getModelNodeRef(String modelFileName);
|
||||
|
||||
/**
|
||||
* Gets custom model
|
||||
*
|
||||
* @param modelNodeRef the {@code NodeRef} of the custom model
|
||||
* @return m2Model the {@code M2Model} object
|
||||
*/
|
||||
public M2Model getM2Model(NodeRef modelNodeRef);
|
||||
|
||||
/**
|
||||
* Creates custom model
|
||||
*
|
||||
@@ -167,6 +176,8 @@ public interface CustomModelService
|
||||
*/
|
||||
public boolean isNamespaceUriExists(String modelNamespaceUri);
|
||||
|
||||
public boolean isNamespacePrefixExists(NodeRef modelNodeRef);
|
||||
|
||||
/**
|
||||
* Whether a model with the given name exists or not
|
||||
*
|
||||
@@ -175,10 +186,35 @@ public interface CustomModelService
|
||||
*/
|
||||
public boolean isModelExists(String modelFileName);
|
||||
|
||||
/**
|
||||
* Gets custom models' namespace URI and prefix
|
||||
*
|
||||
* @param model the {@code M2Model} object
|
||||
* @return the custom model URI and prefix as a {@code Pair<String, String}
|
||||
* @throws CustomModelException if no namespace or more than one namespace exists
|
||||
*/
|
||||
public Pair<String, String> getModelNamespaceUriPrefix(M2Model model);
|
||||
|
||||
/**
|
||||
* Validates the custom models' namespace prefix
|
||||
*
|
||||
* @param prefix the namespace prefix {@code String}
|
||||
* @throws CustomModelException if the namespace prefix is already in use by another model
|
||||
*/
|
||||
public void validateModelNamespacePrefix(String prefix);
|
||||
|
||||
/**
|
||||
* Validates the custom models' namespace prefix
|
||||
*
|
||||
* @param modelNodeRef the nodeRef of the model whose namespace prefix is to be validated {@code NodeRef}
|
||||
* @throws CustomModelException if the namespace prefix is already in use by another model
|
||||
*/
|
||||
public void validateModelNamespacePrefix(NodeRef modelNodeRef);
|
||||
|
||||
/**
|
||||
* Whether the given namespace prefix has already been used or not
|
||||
*
|
||||
* @param modelNamespaceUri the model namespace prefix
|
||||
* @param modelNamespacePrefix the model namespace prefix
|
||||
* @return true if the prefix has been used, false otherwise
|
||||
*/
|
||||
public boolean isNamespacePrefixExists(String modelNamespacePrefix);
|
||||
|
||||
@@ -98,33 +98,8 @@ public interface DataTypeDefinition
|
||||
*/
|
||||
public String getDescription(MessageLookup messageLookup);
|
||||
|
||||
/**
|
||||
* Get the name of the property bundle that defines analyser mappings for this data type (keyed by the type of the property)
|
||||
* @return the resource or null if not set.
|
||||
*/
|
||||
public String getAnalyserResourceBundleName();
|
||||
|
||||
/**
|
||||
* @return the equivalent java class name (or null, if not mapped)
|
||||
*/
|
||||
public String getJavaClassName();
|
||||
|
||||
/**
|
||||
* Get the default analyser class - used when no resource bundles can be found and no repository default is set.
|
||||
* @return String
|
||||
*/
|
||||
public String getDefaultAnalyserClassName();
|
||||
|
||||
/**
|
||||
* @param locale
|
||||
* @return String
|
||||
*/
|
||||
public String resolveAnalyserClassName(Locale locale);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String resolveAnalyserClassName();
|
||||
|
||||
}
|
||||
|
||||
@@ -105,12 +105,6 @@ public interface ModelDefinition
|
||||
|
||||
public long getChecksum(XMLBindingType bindingType);
|
||||
|
||||
/**
|
||||
* Get the name of the property bundle that defines analyser mappings for this model (keyed by the type of the property)
|
||||
* @return the resource or null if not set.
|
||||
*/
|
||||
public String getAnalyserResourceBundleName();
|
||||
|
||||
/**
|
||||
* @return DictionaryDAO
|
||||
*/
|
||||
|
||||
@@ -161,22 +161,4 @@ public interface PropertyDefinition extends ClassAttributeDefinition
|
||||
* @return Returns a list of property constraint definitions
|
||||
*/
|
||||
public List<ConstraintDefinition> getConstraints();
|
||||
|
||||
/**
|
||||
* Get the name of the property bundle that defines analyser mappings for this class.
|
||||
* @return the resource or null if not set.
|
||||
*/
|
||||
public String getAnalyserResourceBundleName();
|
||||
|
||||
/**
|
||||
* @param locale Locale
|
||||
* @return String
|
||||
*/
|
||||
public String resolveAnalyserClassName(Locale locale);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public String resolveAnalyserClassName();
|
||||
}
|
||||
|
||||
@@ -50,23 +50,36 @@ import org.alfresco.service.namespace.QName;
|
||||
@AlfrescoPublicApi
|
||||
public interface SearchService
|
||||
{
|
||||
public static final String LANGUAGE_LUCENE = "lucene";
|
||||
String LANGUAGE_LUCENE = "lucene";
|
||||
|
||||
public static final String LANGUAGE_XPATH = "xpath";
|
||||
String LANGUAGE_XPATH = "xpath";
|
||||
|
||||
public static final String LANGUAGE_FTS_ALFRESCO = "fts-alfresco";
|
||||
|
||||
public static final String LANGUAGE_SOLR_FTS_ALFRESCO = "solr-fts-alfresco";
|
||||
|
||||
public static final String LANGUAGE_CMIS_STRICT = "cmis-strict";
|
||||
|
||||
public static final String LANGUAGE_CMIS_ALFRESCO = "cmis-alfresco";
|
||||
String LANGUAGE_FTS_ALFRESCO = "fts-alfresco";
|
||||
|
||||
public static final String LANGUAGE_SOLR_CMIS = "solr-cmis";
|
||||
String LANGUAGE_CMIS_STRICT = "cmis-strict";
|
||||
|
||||
public static final String LANGUAGE_SOLR_ALFRESCO = "solr-alfresco";
|
||||
|
||||
public static final String LANGUAGE_SOLR_SQL = "solr-sql";
|
||||
String LANGUAGE_CMIS_ALFRESCO = "cmis-alfresco";
|
||||
|
||||
String LANGUAGE_INDEX_CMIS = "index-cmis";
|
||||
|
||||
String LANGUAGE_INDEX_ALFRESCO = "index-alfresco";
|
||||
|
||||
String LANGUAGE_INDEX_SQL = "index-sql";
|
||||
|
||||
String LANGUAGE_INDEX_FTS_ALFRESCO = "index-fts-alfresco";
|
||||
|
||||
// Old language names for solr subsystems retro compatibility
|
||||
@Deprecated
|
||||
String LANGUAGE_SOLR_FTS_ALFRESCO = "solr-fts-alfresco";
|
||||
|
||||
@Deprecated
|
||||
String LANGUAGE_SOLR_CMIS = "solr-cmis";
|
||||
|
||||
@Deprecated
|
||||
String LANGUAGE_SOLR_ALFRESCO = "solr-alfresco";
|
||||
|
||||
@Deprecated
|
||||
String LANGUAGE_SOLR_SQL = "solr-sql";
|
||||
|
||||
/**
|
||||
* Search against a store. Pulls back all attributes on each node. Does not
|
||||
@@ -81,7 +94,7 @@ public interface SearchService
|
||||
* @return Returns the query results
|
||||
*/
|
||||
@Auditable(parameters = {"store", "language", "query"})
|
||||
public ResultSet query(StoreRef store, String language, String query);
|
||||
ResultSet query(StoreRef store, String language, String query);
|
||||
|
||||
/**
|
||||
* Search against a store.
|
||||
@@ -98,8 +111,8 @@ public interface SearchService
|
||||
* @return Returns the query results
|
||||
*/
|
||||
@Auditable(parameters = {"store", "language", "query", "queryParameterDefinitions"})
|
||||
public ResultSet query(StoreRef store, String language, String query,
|
||||
QueryParameterDefinition[] queryParameterDefinitions);
|
||||
ResultSet query(StoreRef store, String language, String query,
|
||||
QueryParameterDefinition[] queryParameterDefinitions);
|
||||
|
||||
|
||||
/**
|
||||
@@ -114,14 +127,14 @@ public interface SearchService
|
||||
* @return Returns the query results
|
||||
*/
|
||||
@Auditable(parameters = {"store", "queryId", "queryParameters"})
|
||||
public ResultSet query(StoreRef store, QName queryId, QueryParameter[] queryParameters);
|
||||
ResultSet query(StoreRef store, QName queryId, QueryParameter[] queryParameters);
|
||||
|
||||
/**
|
||||
* Search using the given SearchParameters
|
||||
*/
|
||||
|
||||
@Auditable(parameters = {"searchParameters"})
|
||||
public ResultSet query(SearchParameters searchParameters);
|
||||
ResultSet query(SearchParameters searchParameters);
|
||||
|
||||
/**
|
||||
* Select nodes using an xpath expression.
|
||||
@@ -143,8 +156,8 @@ public interface SearchService
|
||||
|
||||
parameters = {"contextNodeRef", "xpath", "parameters", "namespacePrefixResolver", "followAllParentLinks"},
|
||||
recordable = {true, true, true, false, true})
|
||||
public List<NodeRef> selectNodes(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters,
|
||||
NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks)
|
||||
List<NodeRef> selectNodes(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters,
|
||||
NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks)
|
||||
throws InvalidNodeRefException, XPathException;
|
||||
|
||||
/**
|
||||
@@ -169,8 +182,8 @@ public interface SearchService
|
||||
|
||||
parameters = {"contextNodeRef", "xpath", "parameters", "namespacePrefixResolver", "followAllParentLinks", "language"},
|
||||
recordable = {true, true, true, false, true, true})
|
||||
public List<NodeRef> selectNodes(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters,
|
||||
NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks, String language)
|
||||
List<NodeRef> selectNodes(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters,
|
||||
NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks, String language)
|
||||
throws InvalidNodeRefException, XPathException;
|
||||
|
||||
/**
|
||||
@@ -193,9 +206,9 @@ public interface SearchService
|
||||
|
||||
parameters = {"contextNodeRef", "xpath", "parameters", "namespacePrefixResolver", "followAllParentLinks"},
|
||||
recordable = {true, true, true, false, true})
|
||||
public List<Serializable> selectProperties(NodeRef contextNodeRef, String xpath,
|
||||
QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver,
|
||||
boolean followAllParentLinks) throws InvalidNodeRefException, XPathException;
|
||||
List<Serializable> selectProperties(NodeRef contextNodeRef, String xpath,
|
||||
QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver,
|
||||
boolean followAllParentLinks) throws InvalidNodeRefException, XPathException;
|
||||
|
||||
/**
|
||||
* Select properties using an xpath expression
|
||||
@@ -219,9 +232,9 @@ public interface SearchService
|
||||
|
||||
parameters = {"contextNodeRef", "xpath", "parameters", "namespacePrefixResolver", "followAllParentLinks", "language"},
|
||||
recordable = {true, true, true, false, true, true})
|
||||
public List<Serializable> selectProperties(NodeRef contextNodeRef, String xpath,
|
||||
QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver,
|
||||
boolean followAllParentLinks, String language) throws InvalidNodeRefException, XPathException;
|
||||
List<Serializable> selectProperties(NodeRef contextNodeRef, String xpath,
|
||||
QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver,
|
||||
boolean followAllParentLinks, String language) throws InvalidNodeRefException, XPathException;
|
||||
|
||||
/**
|
||||
* Search for string pattern in both the node text (if present) and node
|
||||
@@ -236,7 +249,7 @@ public interface SearchService
|
||||
* @return Returns true if the pattern could be found - uses the default OR operator
|
||||
*/
|
||||
@Auditable(parameters = {"nodeRef", "propertyQName", "googleLikePattern"})
|
||||
public boolean contains(NodeRef nodeRef, QName propertyQName, String googleLikePattern)
|
||||
boolean contains(NodeRef nodeRef, QName propertyQName, String googleLikePattern)
|
||||
throws InvalidNodeRefException;
|
||||
|
||||
/**
|
||||
@@ -252,7 +265,7 @@ public interface SearchService
|
||||
* @return Returns true if the pattern could be found
|
||||
*/
|
||||
@Auditable(parameters = {"nodeRef", "propertyQName", "googleLikePattern", "defaultOperator"})
|
||||
public boolean contains(NodeRef nodeRef, QName propertyQName, String googleLikePattern, SearchParameters.Operator defaultOperator)
|
||||
boolean contains(NodeRef nodeRef, QName propertyQName, String googleLikePattern, SearchParameters.Operator defaultOperator)
|
||||
throws InvalidNodeRefException;
|
||||
|
||||
/**
|
||||
@@ -270,6 +283,6 @@ public interface SearchService
|
||||
* @return Returns true if the pattern could be found
|
||||
*/
|
||||
@Auditable(parameters = {"nodeRef", "propertyQName", "sqlLikePattern", "includeFTS"})
|
||||
public boolean like(NodeRef nodeRef, QName propertyQName, String sqlLikePattern, boolean includeFTS)
|
||||
boolean like(NodeRef nodeRef, QName propertyQName, String sqlLikePattern, boolean includeFTS)
|
||||
throws InvalidNodeRefException;
|
||||
}
|
||||
|
||||
@@ -41,9 +41,6 @@
|
||||
<property name="dictionaryRegistryCache">
|
||||
<ref bean="compiledModelsCache"/>
|
||||
</property>
|
||||
<property name="defaultAnalyserResourceBundleName">
|
||||
<value>${lucene.defaultAnalyserResourceBundleName}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="threadFactory" class="org.alfresco.util.TraceableThreadFactory">
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
# Display labels for Dictionary Model
|
||||
|
||||
d_dictionary.description=Modelo de diccionario Alfresco
|
||||
d_dictionary.description=Alfresco Dictionary Model
|
||||
|
||||
d_dictionary.datatype.d_any.title=Cualquiera
|
||||
d_dictionary.datatype.d_any.description=Cualquiera
|
||||
d_dictionary.datatype.d_text.title=Texto
|
||||
d_dictionary.datatype.d_text.description=Texto
|
||||
d_dictionary.datatype.d_any.title=Any
|
||||
d_dictionary.datatype.d_any.description=Any
|
||||
d_dictionary.datatype.d_text.title=Text
|
||||
d_dictionary.datatype.d_text.description=Text
|
||||
d_dictionary.datatype.d_content.title=Contenido
|
||||
d_dictionary.datatype.d_content.description=Contenido
|
||||
d_dictionary.datatype.d_int.title=Entero
|
||||
d_dictionary.datatype.d_int.description=Entero
|
||||
d_dictionary.datatype.d_long.title=Entero largo
|
||||
d_dictionary.datatype.d_long.description=Entero largo
|
||||
d_dictionary.datatype.d_float.title=Coma flotante
|
||||
d_dictionary.datatype.d_float.description=Coma flotante
|
||||
d_dictionary.datatype.d_double.title=Doble precisi\u00f3n
|
||||
d_dictionary.datatype.d_double.description=Doble precisi\u00f3n
|
||||
d_dictionary.datatype.d_date.title=Fecha
|
||||
d_dictionary.datatype.d_date.description=Fecha
|
||||
d_dictionary.datatype.d_int.title=Integer
|
||||
d_dictionary.datatype.d_int.description=Integer
|
||||
d_dictionary.datatype.d_long.title=Long
|
||||
d_dictionary.datatype.d_long.description=Long
|
||||
d_dictionary.datatype.d_float.title=Float
|
||||
d_dictionary.datatype.d_float.description=Float
|
||||
d_dictionary.datatype.d_double.title=Double
|
||||
d_dictionary.datatype.d_double.description=Double
|
||||
d_dictionary.datatype.d_date.title=Date
|
||||
d_dictionary.datatype.d_date.description=Date
|
||||
d_dictionary.datatype.d_datetime.title=Fecha y hora
|
||||
d_dictionary.datatype.d_datetime.description=Fecha y hora
|
||||
d_dictionary.datatype.d_boolean.title=Booleano
|
||||
d_dictionary.datatype.d_boolean.description=Booleano
|
||||
d_dictionary.datatype.d_qname.title=Nombre cualificado
|
||||
d_dictionary.datatype.d_qname.description=Nombre cualificado
|
||||
d_dictionary.datatype.d_guid.title=Identificador \u00fanico
|
||||
d_dictionary.datatype.d_guid.description=Identificador \u00fanico
|
||||
d_dictionary.datatype.d_boolean.title=Boolean
|
||||
d_dictionary.datatype.d_boolean.description=Boolean
|
||||
d_dictionary.datatype.d_qname.title=Qualified Name
|
||||
d_dictionary.datatype.d_qname.description=Qualified Name
|
||||
d_dictionary.datatype.d_guid.title=Unique Identifier
|
||||
d_dictionary.datatype.d_guid.description=Unique Identifier
|
||||
d_dictionary.datatype.d_category.title=Categor\u00eda
|
||||
d_dictionary.datatype.d_category.description=Categor\u00eda
|
||||
d_dictionary.datatype.d_noderef.title=Referencia
|
||||
d_dictionary.datatype.d_noderef.description=Referencia
|
||||
d_dictionary.datatype.d_path.title=Ruta
|
||||
d_dictionary.datatype.d_path.description=Ruta
|
||||
d_dictionary.datatype.d_path.title=Path
|
||||
d_dictionary.datatype.d_path.description=Path
|
||||
|
||||
@@ -16,16 +16,19 @@
|
||||
<data-types>
|
||||
|
||||
<data-type name="cmis:id">
|
||||
<!-- Analysers are EOLed, left here for backwards compatibility -->
|
||||
<default-analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser</default-analyser-class>
|
||||
<java-class>java.lang.String</java-class>
|
||||
</data-type>
|
||||
|
||||
<data-type name="cmis:uri">
|
||||
<!-- Analysers are EOLed, left here for backwards compatibility -->
|
||||
<default-analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser</default-analyser-class>
|
||||
<java-class>java.lang.String</java-class>
|
||||
</data-type>
|
||||
|
||||
<data-type name="cmis:html">
|
||||
<!-- Analysers are EOLed, left here for backwards compatibility -->
|
||||
<default-analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser</default-analyser-class>
|
||||
<java-class>java.lang.String</java-class>
|
||||
</data-type>
|
||||
@@ -436,4 +439,4 @@
|
||||
|
||||
</types>
|
||||
|
||||
</model>
|
||||
</model>
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_any.analyzer=org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
|
||||
d_dictionary.datatype.d_text.analyzer=org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
|
||||
d_dictionary.datatype.d_content.analyzer=org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
|
||||
d_dictionary.datatype.d_int.analyzer=org.alfresco.repo.search.impl.lucene.analysis.IntegerAnalyser
|
||||
d_dictionary.datatype.d_long.analyzer=org.alfresco.repo.search.impl.lucene.analysis.LongAnalyser
|
||||
d_dictionary.datatype.d_float.analyzer=org.alfresco.repo.search.impl.lucene.analysis.FloatAnalyser
|
||||
d_dictionary.datatype.d_double.analyzer=org.alfresco.repo.search.impl.lucene.analysis.DoubleAnalyser
|
||||
d_dictionary.datatype.d_date.analyzer=org.alfresco.repo.search.impl.lucene.analysis.DateAnalyser
|
||||
d_dictionary.datatype.d_datetime.analyzer=org.alfresco.repo.search.impl.lucene.analysis.DateAnalyser
|
||||
d_dictionary.datatype.d_boolean.analyzer=org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
|
||||
d_dictionary.datatype.d_qname.analyzer=org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
|
||||
d_dictionary.datatype.d_guid.analyzer=org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
|
||||
d_dictionary.datatype.d_category.analyzer=org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
|
||||
d_dictionary.datatype.d_noderef.analyzer=org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
|
||||
d_dictionary.datatype.d_path.analyzer=org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
|
||||
d_dictionary.datatype.d_locale.analyzer=org.alfresco.repo.search.impl.lucene.analysis.LowerCaseVerbatimAnalyser
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.apache.lucene.analysis.cz.CzechAnalyzer
|
||||
d_dictionary.datatype.d_content.analyzer=org.apache.lucene.analysis.cz.CzechAnalyzer
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.alfresco.repo.search.impl.lucene.analysis.DanishSnowballAnalyser
|
||||
d_dictionary.datatype.d_content.analyzer=org.alfresco.repo.search.impl.lucene.analysis.DanishSnowballAnalyser
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.apache.lucene.analysis.de.GermanAnalyzer
|
||||
d_dictionary.datatype.d_content.analyzer=org.apache.lucene.analysis.de.GermanAnalyzer
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.apache.lucene.analysis.el.GreekAnalyzer
|
||||
d_dictionary.datatype.d_content.analyzer=org.apache.lucene.analysis.el.GreekAnalyzer
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
|
||||
d_dictionary.datatype.d_content.analyzer=org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.alfresco.repo.search.impl.lucene.analysis.SpanishSnowballAnalyser
|
||||
d_dictionary.datatype.d_content.analyzer=org.alfresco.repo.search.impl.lucene.analysis.SpanishSnowballAnalyser
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.alfresco.repo.search.impl.lucene.analysis.FinnishSnowballAnalyser
|
||||
d_dictionary.datatype.d_content.analyzer=org.alfresco.repo.search.impl.lucene.analysis.FinnishSnowballAnalyser
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.apache.lucene.analysis.fr.FrenchAnalyzer
|
||||
d_dictionary.datatype.d_content.analyzer=org.apache.lucene.analysis.fr.FrenchAnalyzer
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.alfresco.repo.search.impl.lucene.analysis.ItalianSnowballAnalyser
|
||||
d_dictionary.datatype.d_content.analyzer=org.alfresco.repo.search.impl.lucene.analysis.ItalianSnowballAnalyser
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.apache.lucene.analysis.cjk.CJKAnalyzer
|
||||
d_dictionary.datatype.d_content.analyzer=org.apache.lucene.analysis.cjk.CJKAnalyzer
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.apache.lucene.analysis.cjk.CJKAnalyzer
|
||||
d_dictionary.datatype.d_content.analyzer=org.apache.lucene.analysis.cjk.CJKAnalyzer
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.apache.lucene.analysis.nl.DutchAnalyzer
|
||||
d_dictionary.datatype.d_content.analyzer=org.apache.lucene.analysis.nl.DutchAnalyzer
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.alfresco.repo.search.impl.lucene.analysis.NorwegianSnowballAnalyser
|
||||
d_dictionary.datatype.d_content.analyzer=org.alfresco.repo.search.impl.lucene.analysis.NorwegianSnowballAnalyser
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.alfresco.repo.search.impl.lucene.analysis.PortugueseSnowballAnalyser
|
||||
d_dictionary.datatype.d_content.analyzer=org.alfresco.repo.search.impl.lucene.analysis.PortugueseSnowballAnalyser
|
||||
@@ -1,4 +0,0 @@
|
||||
# Data Type Index Analyzers
|
||||
|
||||
d_dictionary.datatype.d_text.analyzer=org.apache.lucene.analysis.br.BrazilianAnalyzer
|
||||
d_dictionary.datatype.d_content.analyzer=org.apache.lucene.analysis.br.BrazilianAnalyzer
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user