mirror of
				https://github.com/Alfresco/alfresco-community-repo.git
				synced 2025-10-29 15:21:53 +00:00 
			
		
		
		
	Compare commits
	
		
			419 Commits
		
	
	
		
			11.17
			...
			7.183.300-
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					9830d532d0 | ||
| 
						 | 
					9981d87f12 | ||
| 
						 | 
					e473b7d87f | ||
| 
						 | 
					f90caf8d66 | ||
| 
						 | 
					bad162c91f | ||
| 
						 | 
					b467a1b62e | ||
| 
						 | 
					c3f9603772 | ||
| 
						 | 
					52517b937c | ||
| 
						 | 
					8f50904785 | ||
| 
						 | 
					508b5dfb3d | ||
| 
						 | 
					9609c51231 | ||
| 
						 | 
					b69f312a48 | ||
| 
						 | 
					6d061be2ae | ||
| 
						 | 
					c08438844f | ||
| 
						 | 
					70c2fec31e | ||
| 
						 | 
					cc2d6d687d | ||
| 
						 | 
					dc6e32269e | ||
| 
						 | 
					566d0a2bee | ||
| 
						 | 
					597540d02b | ||
| 
						 | 
					b3296dea32 | ||
| 
						 | 
					165738c594 | ||
| 
						 | 
					b0a76fd82f | ||
| 
						 | 
					0d61ae6002 | ||
| 
						 | 
					bbd3994e7c | ||
| 
						 | 
					a297b46a2c | ||
| 
						 | 
					5d0daf6609 | ||
| 
						 | 
					5797d34aea | ||
| 
						 | 
					4e24ac2689 | ||
| 
						 | 
					a7423f6158 | ||
| 
						 | 
					bb44aeb286 | ||
| 
						 | 
					21a34010c9 | ||
| 
						 | 
					7931a542b5 | ||
| 
						 | 
					a2da3fcac8 | ||
| 
						 | 
					b0b83d5f00 | ||
| 
						 | 
					fd62c1765f | ||
| 
						 | 
					6465306038 | ||
| 
						 | 
					00d1b56d67 | ||
| 
						 | 
					2956e61ad7 | ||
| 
						 | 
					2ab8cf8b1e | ||
| 
						 | 
					9ea4a0a643 | ||
| 
						 | 
					2d5c67fa27 | ||
| 
						 | 
					bffdcf2d99 | ||
| 
						 | 
					570c221f66 | ||
| 
						 | 
					8af0322223 | ||
| 
						 | 
					6a5b80e889 | ||
| 
						 | 
					e403345bea | ||
| 
						 | 
					c60c165b7c | ||
| 
						 | 
					5230c2ab2b | ||
| 
						 | 
					7ae3204c2a | ||
| 
						 | 
					4a3f1631c5 | ||
| 
						 | 
					debd0dad26 | ||
| 
						 | 
					501b9691a4 | ||
| 
						 | 
					bfffa040c3 | ||
| 
						 | 
					94aab58b77 | ||
| 
						 | 
					b4e3bca479 | ||
| 
						 | 
					1f8dc69ce7 | ||
| 
						 | 
					1015001c4f | ||
| 
						 | 
					66d7a4ff6f | ||
| 
						 | 
					6708a538a8 | ||
| 
						 | 
					aeb86f7c3b | ||
| 
						 | 
					e744098ed9 | ||
| 
						 | 
					5cf1bf8b65 | ||
| 
						 | 
					fa8fd5b348 | ||
| 
						 | 
					34caf837dd | ||
| 
						 | 
					a290c20f88 | ||
| 
						 | 
					59cb203762 | ||
| 
						 | 
					f530f4f27a | ||
| 
						 | 
					bc53b1c89e | ||
| 
						 | 
					57ae90489c | ||
| 
						 | 
					273f68ef0a | ||
| 
						 | 
					2ff344aa6e | ||
| 
						 | 
					88314a10fd | ||
| 
						 | 
					08f1fee170 | ||
| 
						 | 
					8aca8b45ca | ||
| 
						 | 
					3608c9f2bf | ||
| 
						 | 
					7f9c671524 | ||
| 
						 | 
					3a5d8c96f6 | ||
| 
						 | 
					cab66e441d | ||
| 
						 | 
					a2ec0f7a1f | ||
| 
						 | 
					82d99d68cd | ||
| 
						 | 
					778e5146fb | ||
| 
						 | 
					92bfc91852 | ||
| 
						 | 
					d5470a3e15 | ||
| 
						 | 
					f1f9d6d4a7 | ||
| 
						 | 
					171f772071 | ||
| 
						 | 
					41b3843935 | ||
| 
						 | 
					df5dce7fdb | ||
| 
						 | 
					2667243e27 | ||
| 
						 | 
					0156f669ee | ||
| 
						 | 
					7a2c97950b | ||
| 
						 | 
					2a9682cf50 | ||
| 
						 | 
					df1c08d230 | ||
| 
						 | 
					f2cf9fde80 | ||
| 
						 | 
					e158c0af23 | ||
| 
						 | 
					e15e5f32c6 | ||
| 
						 | 
					9ca368a1e5 | ||
| 
						 | 
					bd5683f2e8 | ||
| 
						 | 
					878323a92d | ||
| 
						 | 
					39558f9030 | ||
| 
						 | 
					cefc9b216a | ||
| 
						 | 
					54c801efef | ||
| 
						 | 
					26b4a41f9f | ||
| 
						 | 
					45aa6a10b1 | ||
| 
						 | 
					38e71f5e30 | ||
| 
						 | 
					b482ffa8f9 | ||
| 
						 | 
					1b15b546b1 | ||
| 
						 | 
					2ff2cda897 | ||
| 
						 | 
					66a4999041 | ||
| 
						 | 
					426e4b498d | ||
| 
						 | 
					d573a6905d | ||
| 
						 | 
					eeac8f88b5 | ||
| 
						 | 
					e2d10eaa50 | ||
| 
						 | 
					979ece477e | ||
| 
						 | 
					867eac0c54 | ||
| 
						 | 
					a37d69f6bf | ||
| 
						 | 
					a609b7705e | ||
| 
						 | 
					6ce6afa1c3 | ||
| 
						 | 
					ddaa08685b | ||
| 
						 | 
					6db970feba | ||
| 
						 | 
					1e538ea3f2 | ||
| 
						 | 
					915f67750b | ||
| 
						 | 
					39d5a07b5d | ||
| 
						 | 
					e879e3813f | ||
| 
						 | 
					75b87de6bc | ||
| 
						 | 
					5cd6cbb956 | ||
| 
						 | 
					7b57864f85 | ||
| 
						 | 
					dd8095e948 | ||
| 
						 | 
					ad5e2a607f | ||
| 
						 | 
					5b84c2ad11 | ||
| 
						 | 
					b82594ad59 | ||
| 
						 | 
					6742812548 | ||
| 
						 | 
					9aac7efea6 | ||
| 
						 | 
					4c594b6246 | ||
| 
						 | 
					15591b9952 | ||
| 
						 | 
					50da066416 | ||
| 
						 | 
					3f52f57632 | ||
| 
						 | 
					6ee88d6906 | ||
| 
						 | 
					4aa494da71 | ||
| 
						 | 
					0fc5c6b7bc | ||
| 
						 | 
					fcda1691d6 | ||
| 
						 | 
					5a57770fb9 | ||
| 
						 | 
					d73ce2628c | ||
| 
						 | 
					5ae148ac84 | ||
| 
						 | 
					7e4cbd7e23 | ||
| 
						 | 
					a5f8afe6d0 | ||
| 
						 | 
					9b05b9a5eb | ||
| 
						 | 
					b1036202a6 | ||
| 
						 | 
					778ff9d7b8 | ||
| 
						 | 
					58afaefab1 | ||
| 
						 | 
					ce31b06477 | ||
| 
						 | 
					f85f5f9d71 | ||
| 
						 | 
					d32faa2429 | ||
| 
						 | 
					5bae8eb049 | ||
| 
						 | 
					cd563798b3 | ||
| 
						 | 
					288e5b8777 | ||
| 
						 | 
					13b387e185 | ||
| 
						 | 
					e9a75eb55b | ||
| 
						 | 
					93ecefa864 | ||
| 
						 | 
					7ee22d35c8 | ||
| 
						 | 
					eafc654736 | ||
| 
						 | 
					9252450e4b | ||
| 
						 | 
					d8b12e24ec | ||
| 
						 | 
					86ba3d5fd7 | ||
| 
						 | 
					4b54c69195 | ||
| 
						 | 
					66577e083f | ||
| 
						 | 
					a058aea33a | ||
| 
						 | 
					8e23108fbc | ||
| 
						 | 
					665fd1e6f6 | ||
| 
						 | 
					edeba4ae52 | ||
| 
						 | 
					476731080e | ||
| 
						 | 
					dcfc0129f7 | ||
| 
						 | 
					59f07ce344 | ||
| 
						 | 
					9dcc5e46aa | ||
| 
						 | 
					50d382e272 | ||
| 
						 | 
					ea5175141d | ||
| 
						 | 
					46984a705b | ||
| 
						 | 
					400317d08b | ||
| 
						 | 
					f08099164d | ||
| 
						 | 
					c14d372d21 | ||
| 
						 | 
					8d441c9688 | ||
| 
						 | 
					312807d92b | ||
| 
						 | 
					557f093dd4 | ||
| 
						 | 
					f2b4d88885 | ||
| 
						 | 
					87aee131c6 | ||
| 
						 | 
					26970522d4 | ||
| 
						 | 
					361038a4d6 | ||
| 
						 | 
					1a0ce5770b | ||
| 
						 | 
					833909d281 | ||
| 
						 | 
					0a395d4708 | ||
| 
						 | 
					1779a7c030 | ||
| 
						 | 
					ee5a1a1fa8 | ||
| 
						 | 
					1dcbbfd512 | ||
| 
						 | 
					8e36a0a462 | ||
| 
						 | 
					ffcd2de1ae | ||
| 
						 | 
					c1b14fb592 | ||
| 
						 | 
					9f8fb4e680 | ||
| 
						 | 
					f0023df7fb | ||
| 
						 | 
					73b9b623b7 | ||
| 
						 | 
					170bcf3a0f | ||
| 
						 | 
					0c0e2652b5 | ||
| 
						 | 
					aab1595552 | ||
| 
						 | 
					08411e4d15 | ||
| 
						 | 
					84e751f2e8 | ||
| 
						 | 
					0cadd6a48a | ||
| 
						 | 
					260bf52ad5 | ||
| 
						 | 
					3a9308cd41 | ||
| 
						 | 
					f709e4c273 | ||
| 
						 | 
					85d80b7689 | ||
| 
						 | 
					ea74f137d0 | ||
| 
						 | 
					2b2209d13d | ||
| 
						 | 
					80025fb56a | ||
| 
						 | 
					3ea4922f04 | ||
| 
						 | 
					114545ce31 | ||
| 
						 | 
					b6435f9e20 | ||
| 
						 | 
					0fc5f0480c | ||
| 
						 | 
					ce075a3194 | ||
| 
						 | 
					74d5a97be7 | ||
| 
						 | 
					9cb05adadc | ||
| 
						 | 
					e53530faff | ||
| 
						 | 
					a144daa3ad | ||
| 
						 | 
					5d6d6d42c6 | ||
| 
						 | 
					74ddbf9e7c | ||
| 
						 | 
					f235ae694d | ||
| 
						 | 
					d727d30b41 | ||
| 
						 | 
					62b7650925 | ||
| 
						 | 
					9db78d663c | ||
| 
						 | 
					2d2213c860 | ||
| 
						 | 
					a370505f65 | ||
| 
						 | 
					a110411eb1 | ||
| 
						 | 
					9c39f1abd8 | ||
| 
						 | 
					5fe4ebc045 | ||
| 
						 | 
					15785a5188 | ||
| 
						 | 
					588b62c78a | ||
| 
						 | 
					fe740c8de6 | ||
| 
						 | 
					d5364b3a04 | ||
| 
						 | 
					14e353434c | ||
| 
						 | 
					4ac5672940 | ||
| 
						 | 
					28086c1d4f | ||
| 
						 | 
					c1acc88b12 | ||
| 
						 | 
					ef95672052 | ||
| 
						 | 
					253cc19a3a | ||
| 
						 | 
					f02cb05caa | ||
| 
						 | 
					397933a0db | ||
| 
						 | 
					edfe204d5a | ||
| 
						 | 
					40f3b539c4 | ||
| 
						 | 
					b339991d52 | ||
| 
						 | 
					9eff1509b3 | ||
| 
						 | 
					86980643f0 | ||
| 
						 | 
					06adb15a4f | ||
| 
						 | 
					adb3209192 | ||
| 
						 | 
					eee488bcfb | ||
| 
						 | 
					e9fc89ac19 | ||
| 
						 | 
					d1d8e8bbcd | ||
| 
						 | 
					6d7e95e143 | ||
| 
						 | 
					396ddca1ae | ||
| 
						 | 
					fbd11a20e7 | ||
| 
						 | 
					b6a99dbba8 | ||
| 
						 | 
					9ba912b613 | ||
| 
						 | 
					aa8bb477bd | ||
| 
						 | 
					e8893e7bfb | ||
| 
						 | 
					f23aa55db9 | ||
| 
						 | 
					e02c3bf1bc | ||
| 
						 | 
					0209c549ed | ||
| 
						 | 
					49c03d7476 | ||
| 
						 | 
					807c484d87 | ||
| 
						 | 
					651e7187c1 | ||
| 
						 | 
					8337ddc903 | ||
| 
						 | 
					cbc502feea | ||
| 
						 | 
					b22453afe8 | ||
| 
						 | 
					4839fe180e | ||
| 
						 | 
					94bc72b46e | ||
| 
						 | 
					d0753c9c42 | ||
| 
						 | 
					ece88565bb | ||
| 
						 | 
					aff271b0a8 | ||
| 
						 | 
					a054f6440b | ||
| 
						 | 
					6f148c056c | ||
| 
						 | 
					8efbe18818 | ||
| 
						 | 
					98fcba54d8 | ||
| 
						 | 
					1c06199762 | ||
| 
						 | 
					7e9cfc62bf | ||
| 
						 | 
					c866593237 | ||
| 
						 | 
					97423baa34 | ||
| 
						 | 
					4cd0317088 | ||
| 
						 | 
					01ee91a022 | ||
| 
						 | 
					faa2f57a11 | ||
| 
						 | 
					ffc5371e6e | ||
| 
						 | 
					9eee86a112 | ||
| 
						 | 
					9889c2467e | ||
| 
						 | 
					1aaa81e193 | ||
| 
						 | 
					c79549b91b | ||
| 
						 | 
					a5ee34eeb6 | ||
| 
						 | 
					3a87570a7b | ||
| 
						 | 
					04f34274a0 | ||
| 
						 | 
					8c246c0140 | ||
| 
						 | 
					9c757c9cfd | ||
| 
						 | 
					215227c657 | ||
| 
						 | 
					fe0cee1030 | ||
| 
						 | 
					ab606ba30e | ||
| 
						 | 
					f571956de7 | ||
| 
						 | 
					adcc4fa1ee | ||
| 
						 | 
					3292aace29 | ||
| 
						 | 
					c88a1c6360 | ||
| 
						 | 
					599dd69b8a | ||
| 
						 | 
					0055934b34 | ||
| 
						 | 
					291a5ea1e0 | ||
| 
						 | 
					b130e55bbd | ||
| 
						 | 
					c7b623721e | ||
| 
						 | 
					045fafbd14 | ||
| 
						 | 
					ac68ff3e79 | ||
| 
						 | 
					1cab30cfd1 | ||
| 
						 | 
					e148321e60 | ||
| 
						 | 
					f1a7171627 | ||
| 
						 | 
					dfe67a0a49 | ||
| 
						 | 
					5af08756cb | ||
| 
						 | 
					c98612fe78 | ||
| 
						 | 
					397b13e182 | ||
| 
						 | 
					54ebad0fce | ||
| 
						 | 
					98633bc15e | ||
| 
						 | 
					2c93e0df28 | ||
| 
						 | 
					8864c5a124 | ||
| 
						 | 
					e6f09b17c7 | ||
| 
						 | 
					f359af4e74 | ||
| 
						 | 
					c6e01cb75d | ||
| 
						 | 
					dfb668e24a | ||
| 
						 | 
					7f03e4f12f | ||
| 
						 | 
					cfe60fc0ca | ||
| 
						 | 
					110040db2d | ||
| 
						 | 
					2c461b0d40 | ||
| 
						 | 
					b3264c594f | ||
| 
						 | 
					8bc465a192 | ||
| 
						 | 
					82eb5c0cd5 | ||
| 
						 | 
					9ad349fee7 | ||
| 
						 | 
					67ef6ecc2a | ||
| 
						 | 
					5c47e3153a | ||
| 
						 | 
					a55546379b | ||
| 
						 | 
					2ab9b5086a | ||
| 
						 | 
					0e6843d107 | ||
| 
						 | 
					8a7891a974 | ||
| 
						 | 
					f6382d9130 | ||
| 
						 | 
					a610bde4e0 | ||
| 
						 | 
					85832c81ce | ||
| 
						 | 
					f5c9a556f2 | ||
| 
						 | 
					6fcdedffc1 | ||
| 
						 | 
					0f5f912a76 | ||
| 
						 | 
					f1df0b4b55 | ||
| 
						 | 
					eca3747650 | ||
| 
						 | 
					6e810e93ad | ||
| 
						 | 
					23fe161354 | ||
| 
						 | 
					1e098e19d2 | ||
| 
						 | 
					9f11fa6d24 | ||
| 
						 | 
					2473e3504e | ||
| 
						 | 
					b70aef199d | ||
| 
						 | 
					633072b847 | ||
| 
						 | 
					2e2a766edf | ||
| 
						 | 
					ce2cb22342 | ||
| 
						 | 
					cf57cd15b5 | ||
| 
						 | 
					8bf64b502a | ||
| 
						 | 
					aef618761e | ||
| 
						 | 
					b245a24621 | ||
| 
						 | 
					220d41e5e1 | ||
| 
						 | 
					b411fe4a9b | ||
| 
						 | 
					9ed738a8d0 | ||
| 
						 | 
					535fd9d1d5 | ||
| 
						 | 
					3040b76398 | ||
| 
						 | 
					8d8e278dd7 | ||
| 
						 | 
					0bede55ff0 | ||
| 
						 | 
					026cdc9950 | ||
| 
						 | 
					07e6fdc414 | ||
| 
						 | 
					0b2488dc92 | ||
| 
						 | 
					3502854fcc | ||
| 
						 | 
					ddbfac8bfb | ||
| 
						 | 
					141f53190c | ||
| 
						 | 
					dc3a7a1f83 | ||
| 
						 | 
					00a68eb4a1 | ||
| 
						 | 
					f6021a2223 | ||
| 
						 | 
					d11a55097b | ||
| 
						 | 
					248326181b | ||
| 
						 | 
					24c70c15b5 | ||
| 
						 | 
					ad07052b3e | ||
| 
						 | 
					763a047e17 | ||
| 
						 | 
					a9eebb6eb0 | ||
| 
						 | 
					beaf23f267 | ||
| 
						 | 
					e7dc32fdf6 | ||
| 
						 | 
					b3e484a4c2 | ||
| 
						 | 
					2e0de740fd | ||
| 
						 | 
					db74f631b3 | ||
| 
						 | 
					331a6ccad0 | ||
| 
						 | 
					a04b6e4143 | ||
| 
						 | 
					202e5d6134 | ||
| 
						 | 
					26b3274c8a | ||
| 
						 | 
					ab26456624 | ||
| 
						 | 
					82b0cb662f | ||
| 
						 | 
					7eb8e7f0ae | ||
| 
						 | 
					3043047a4e | ||
| 
						 | 
					ceeb0cd4bd | ||
| 
						 | 
					546733bb13 | ||
| 
						 | 
					ce4a18a346 | ||
| 
						 | 
					1ad0c910d6 | ||
| 
						 | 
					c123c5c219 | ||
| 
						 | 
					ed8c248638 | ||
| 
						 | 
					f3c491f188 | ||
| 
						 | 
					c67b8f4d85 | ||
| 
						 | 
					9d516199cb | ||
| 
						 | 
					1502520eff | ||
| 
						 | 
					b548d8ef9b | ||
| 
						 | 
					c96c6a5d86 | ||
| 
						 | 
					dadc6ed188 | ||
| 
						 | 
					dd7452d08b | ||
| 
						 | 
					c2e750c6b8 | ||
| 
						 | 
					ba0fa51c0b | ||
| 
						 | 
					a7685a6f39 | ||
| 
						 | 
					aad5452dd4 | ||
| 
						 | 
					6a1d5c662f | ||
| 
						 | 
					9aa65a8059 | ||
| 
						 | 
					f69af626d5 | ||
| 
						 | 
					891d42409e | ||
| 
						 | 
					3b03252dea | ||
| 
						 | 
					6f42e4f9c1 | ||
| 
						 | 
					39bcff8631 | 
@@ -1,4 +1,4 @@
 | 
			
		||||
# For SmartGit
 | 
			
		||||
[bugtraq "jira"]
 | 
			
		||||
 url = https://alfresco.atlassian.net/browse/%BUGID%
 | 
			
		||||
 url = https://issues.alfresco.com/jira/browse/%BUGID%
 | 
			
		||||
 logRegex = ([A-Z]+-\\d+)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -35,6 +35,3 @@ 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/public</url>
 | 
			
		||||
                    <url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
 | 
			
		||||
                </repository>
 | 
			
		||||
            </repositories>
 | 
			
		||||
            <pluginRepositories>
 | 
			
		||||
@@ -25,6 +25,10 @@
 | 
			
		||||
                    <url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
 | 
			
		||||
                </pluginRepository>
 | 
			
		||||
            </pluginRepositories>
 | 
			
		||||
            <properties>
 | 
			
		||||
                <!-- WhiteSource token -->
 | 
			
		||||
                <org.whitesource.orgToken>${env.WHITESOURCE_API_KEY}</org.whitesource.orgToken>
 | 
			
		||||
            </properties>
 | 
			
		||||
        </profile>
 | 
			
		||||
    </profiles>
 | 
			
		||||
 | 
			
		||||
@@ -39,5 +43,15 @@
 | 
			
		||||
            <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>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										193
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										193
									
								
								.travis.yml
									
									
									
									
									
								
							@@ -1,5 +1,5 @@
 | 
			
		||||
---
 | 
			
		||||
dist: focal
 | 
			
		||||
dist: xenial
 | 
			
		||||
language: java
 | 
			
		||||
jdk: openjdk11
 | 
			
		||||
 | 
			
		||||
@@ -21,8 +21,6 @@ branches:
 | 
			
		||||
  only:
 | 
			
		||||
    - master
 | 
			
		||||
    - /release\/.*/
 | 
			
		||||
    - /feature\/.*/
 | 
			
		||||
    - /fix\/.*/
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
  global:
 | 
			
		||||
@@ -44,6 +42,22 @@ install: travis_retry travis_wait 40 bash scripts/travis/build.sh
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  include:
 | 
			
		||||
    - name: "WhiteSource scan"
 | 
			
		||||
      stage: test
 | 
			
		||||
      # only on release branches or master and if it is not a PR
 | 
			
		||||
      if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request
 | 
			
		||||
      script:
 | 
			
		||||
        # Download the latest version of WhiteSource Unified Agent
 | 
			
		||||
        - curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
 | 
			
		||||
        # Run WhiteSource Unified Agent
 | 
			
		||||
        - java -jar wss-unified-agent.jar -apiKey ${WHITESOURCE_API_KEY} -c .wss-unified-agent.config -d ./packaging/war
 | 
			
		||||
 | 
			
		||||
#    - name: "Source Clear Scan"
 | 
			
		||||
#      # only on release branches or master and if it is not a PR
 | 
			
		||||
#      if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request
 | 
			
		||||
#      script: skip
 | 
			
		||||
#      addons:
 | 
			
		||||
#        srcclr: true
 | 
			
		||||
 | 
			
		||||
    - name: "Core, Data-Model, Repository - AllUnitTestsSuite - Build and test"
 | 
			
		||||
      script:
 | 
			
		||||
@@ -52,171 +66,120 @@ jobs:
 | 
			
		||||
 | 
			
		||||
    - name: "Repository - AppContext01TestSuite"
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.10
 | 
			
		||||
        - 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=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"
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - 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=AppContext02TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
 | 
			
		||||
 | 
			
		||||
    - name: "Repository - AppContext03TestSuite"
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.10
 | 
			
		||||
      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
 | 
			
		||||
        - 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
 | 
			
		||||
      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:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.10
 | 
			
		||||
        - 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
 | 
			
		||||
      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"
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - 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
 | 
			
		||||
        - 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 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 quay.io/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:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.10
 | 
			
		||||
      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
 | 
			
		||||
        - 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
 | 
			
		||||
      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:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.10
 | 
			
		||||
        - 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=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:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.10
 | 
			
		||||
      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
 | 
			
		||||
        - 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
 | 
			
		||||
      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:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
      script: travis_wait 20 mvn -B test -pl repository -Dtest=SearchTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dindex.subsystem.name=solr6
 | 
			
		||||
 | 
			
		||||
    - name: "Repository - MariaDB 10.2.18 tests"
 | 
			
		||||
      if: commit_message !~ /\[skip db\]/
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 3307:3306 --name mariadb -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mariadb:10.2.18 --transaction-isolation=READ-COMMITTED --max-connections=300 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
      script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
 | 
			
		||||
 | 
			
		||||
    - name: "Repository - MariaDB 10.4 tests"
 | 
			
		||||
      if: commit_message !~ /\[skip db\]/
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 3307:3306 --name mariadb -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mariadb:10.4 --transaction-isolation=READ-COMMITTED --max-connections=300 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
      script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
 | 
			
		||||
 | 
			
		||||
    - name: "Repository - MariaDB 10.5 tests"
 | 
			
		||||
      if: commit_message !~ /\[skip db\]/
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 3307:3306 --name mariadb -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mariadb:10.5 --transaction-isolation=READ-COMMITTED --max-connections=300 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
      script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
 | 
			
		||||
 | 
			
		||||
    - name: "Repository - MySQL 5.7.23 tests"
 | 
			
		||||
    - name: "Repository - MySQL tests"
 | 
			
		||||
      if: commit_message !~ /\[skip db\]/
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 3307:3306 -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco  mysql:5.7.23 --transaction-isolation='READ-COMMITTED'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - 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=AllDBTestsTestSuite -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
 | 
			
		||||
 | 
			
		||||
    - name: "Repository - MySQL 8 tests"
 | 
			
		||||
      if: commit_message !~ /\[skip db\]/
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 3307:3306 -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco  mysql:8 --transaction-isolation='READ-COMMITTED'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
      script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
 | 
			
		||||
 | 
			
		||||
    - name: "Repository - PostgreSQL 10.9 tests"
 | 
			
		||||
    - name: "Repository - PostgreSQL 10 tests"
 | 
			
		||||
      if: commit_message !~ /\[skip db\]/
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:10.9 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - 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=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
 | 
			
		||||
 | 
			
		||||
    - name: "Repository - PostgreSQL 11.7 tests"
 | 
			
		||||
    - name: "Repository - PostgreSQL 11 tests"
 | 
			
		||||
      if: commit_message !~ /\[skip db\]/
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - 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=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
 | 
			
		||||
 | 
			
		||||
    - name: "Repository - PostgreSQL 12.4 tests"
 | 
			
		||||
    - name: "Repository - MariaDB tests"
 | 
			
		||||
      if: commit_message !~ /\[skip db\]/
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:12.4 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
      script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
 | 
			
		||||
 | 
			
		||||
    - name: "Repository - PostgreSQL 13.1 tests"
 | 
			
		||||
      if: commit_message !~ /\[skip db\]/
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
      script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
 | 
			
		||||
 | 
			
		||||
    - name: "Repository - Messaging tests"
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
      script: travis_wait 20 mvn -B test -pl repository -Dtest=CamelRoutesTest,CamelComponentsTest
 | 
			
		||||
        - docker run -d -p 3307:3306 --name mariadb -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mariadb:10.2.18 --transaction-isolation=READ-COMMITTED --max-connections=300 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
 | 
			
		||||
      script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
 | 
			
		||||
 | 
			
		||||
    - name: "Remote-api - AppContext01TestSuite"
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - 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 remote-api -Dtest=AppContext01TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
 | 
			
		||||
 | 
			
		||||
    - name: "Remote-api - AppContext02TestSuite"
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.10
 | 
			
		||||
        - 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 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:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.10
 | 
			
		||||
        - 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 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"
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.10
 | 
			
		||||
        - 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 remote-api -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
 | 
			
		||||
 | 
			
		||||
    - name: "Remote-api - AppContextExtraTestSuite"
 | 
			
		||||
      before_script:
 | 
			
		||||
        - docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
 | 
			
		||||
        - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
 | 
			
		||||
        - 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 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: branch = master OR commit_message =~ /\[tas\]/
 | 
			
		||||
      if: 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"
 | 
			
		||||
@@ -224,7 +187,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: branch = master OR commit_message =~ /\[tas\]/
 | 
			
		||||
      if: 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"
 | 
			
		||||
@@ -232,39 +195,23 @@ 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: branch = master OR commit_message =~ /\[tas\]/
 | 
			
		||||
      if: 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 - BROWSER binding"
 | 
			
		||||
      if: branch = master OR commit_message =~ /\[tas\]/
 | 
			
		||||
    - name: "CMIS TAS tests"
 | 
			
		||||
      if: commit_message =~ /\[tas\]/
 | 
			
		||||
      before_script:
 | 
			
		||||
        - ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
 | 
			
		||||
        - ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
 | 
			
		||||
      script:
 | 
			
		||||
        - travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-browser -Denvironment=default -DrunBugs=false
 | 
			
		||||
 | 
			
		||||
    - 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
 | 
			
		||||
        - travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
 | 
			
		||||
 | 
			
		||||
    - name: "Email TAS tests"
 | 
			
		||||
      if: branch = master OR commit_message =~ /\[tas\]/
 | 
			
		||||
      if: 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"
 | 
			
		||||
@@ -272,7 +219,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: branch = master OR commit_message =~ /\[tas\]/
 | 
			
		||||
      if: 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"
 | 
			
		||||
@@ -280,7 +227,7 @@ 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: branch = master OR commit_message =~ /\[tas\]/
 | 
			
		||||
      if: 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"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								.whitesource
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								.whitesource
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
{
 | 
			
		||||
  "generalSettings": {
 | 
			
		||||
    "shouldScanRepo": true
 | 
			
		||||
  },
 | 
			
		||||
  "checkRunSettings": {
 | 
			
		||||
    "vulnerableCheckRunConclusionLevel": "failure"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										228
									
								
								.wss-unified-agent.config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										228
									
								
								.wss-unified-agent.config
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,228 @@
 | 
			
		||||
####################################################################
 | 
			
		||||
# WhiteSource Unified-Agent configuration file
 | 
			
		||||
####################################################################
 | 
			
		||||
##########################################
 | 
			
		||||
# GENERAL SCAN MODE: Files and Package Managers
 | 
			
		||||
##########################################
 | 
			
		||||
  
 | 
			
		||||
checkPolicies=true
 | 
			
		||||
forceCheckAllDependencies=true
 | 
			
		||||
forceUpdate=true
 | 
			
		||||
forceUpdate.failBuildOnPolicyViolation=true
 | 
			
		||||
offline=false
 | 
			
		||||
#ignoreSourceFiles=true
 | 
			
		||||
#scanComment=
 | 
			
		||||
#updateInventory=false
 | 
			
		||||
#resolveAllDependencies=false
 | 
			
		||||
#failErrorLevel=ALL
 | 
			
		||||
#requireKnownSha1=false
 | 
			
		||||
#generateScanReport=true
 | 
			
		||||
#scanReportTimeoutMinutes=10
 | 
			
		||||
#excludeDependenciesFromNodes=.*commons-io.*,.*maven-model
 | 
			
		||||
   
 | 
			
		||||
#projectPerFolder=true
 | 
			
		||||
#projectPerFolderIncludes=
 | 
			
		||||
#projectPerFolderExcludes=
 | 
			
		||||
   
 | 
			
		||||
#wss.connectionTimeoutMinutes=60
 | 
			
		||||
# Change the below URL to your WhiteSource server.
 | 
			
		||||
# Use the 'WhiteSource Server URL' which can be retrieved
 | 
			
		||||
# from your 'Profile' page on the 'Server URLs' panel.
 | 
			
		||||
# Then, add the '/agent' path to it.
 | 
			
		||||
wss.url=https://saas.whitesourcesoftware.com/agent
 | 
			
		||||
  
 | 
			
		||||
#npm.resolveDependencies=false
 | 
			
		||||
#npm.ignoreSourceFiles=false
 | 
			
		||||
#npm.includeDevDependencies=true
 | 
			
		||||
#npm.runPreStep=true
 | 
			
		||||
#npm.ignoreNpmLsErrors=true
 | 
			
		||||
#npm.ignoreScripts=true
 | 
			
		||||
#npm.yarnProject=true
 | 
			
		||||
#npm.accessToken=
 | 
			
		||||
#npm.identifyByNameAndVersion=true
 | 
			
		||||
 
 | 
			
		||||
#bower.resolveDependencies=false
 | 
			
		||||
#bower.ignoreSourceFiles=true
 | 
			
		||||
#bower.runPreStep=true
 | 
			
		||||
   
 | 
			
		||||
#nuget.resolvePackagesConfigFiles=false
 | 
			
		||||
#nuget.resolveCsProjFiles=false
 | 
			
		||||
#nuget.resolveDependencies=false
 | 
			
		||||
#nuget.restoreDependencies=true
 | 
			
		||||
#nuget.ignoreSourceFiles=true
 | 
			
		||||
#nuget.runPreStep=true
 | 
			
		||||
#nuget.resolveNuspecFiles=false
 | 
			
		||||
   
 | 
			
		||||
#python.resolveDependencies=false
 | 
			
		||||
#python.ignoreSourceFiles=false
 | 
			
		||||
#python.ignorePipInstallErrors=true
 | 
			
		||||
#python.installVirtualenv=true
 | 
			
		||||
#python.resolveHierarchyTree=false
 | 
			
		||||
#python.requirementsFileIncludes=requirements.txt
 | 
			
		||||
#python.resolveSetupPyFiles=true
 | 
			
		||||
#python.runPipenvPreStep=true
 | 
			
		||||
#python.pipenvDevDependencies=true
 | 
			
		||||
#python.IgnorePipenvInstallErrors=true
 | 
			
		||||
   
 | 
			
		||||
#maven.ignoredScopes=test provided
 | 
			
		||||
maven.resolveDependencies=true
 | 
			
		||||
#maven.ignoreSourceFiles=true
 | 
			
		||||
#maven.aggregateModules=true
 | 
			
		||||
maven.ignorePomModules=false
 | 
			
		||||
#maven.runPreStep=true
 | 
			
		||||
#maven.ignoreMvnTreeErrors=true
 | 
			
		||||
#maven.environmentPath=
 | 
			
		||||
#maven.m2RepositoryPath=
 | 
			
		||||
  
 | 
			
		||||
#gradle.ignoredScopes=
 | 
			
		||||
#gradle.resolveDependencies=false
 | 
			
		||||
#gradle.runAssembleCommand=false
 | 
			
		||||
#gradle.runPreStep=true
 | 
			
		||||
#gradle.ignoreSourceFiles=true
 | 
			
		||||
#gradle.aggregateModules=true
 | 
			
		||||
#gradle.preferredEnvironment=wrapper
 | 
			
		||||
#gradle.localRepositoryPath=
 | 
			
		||||
 
 | 
			
		||||
#paket.resolveDependencies=false
 | 
			
		||||
#paket.ignoredGroups=
 | 
			
		||||
#paket.ignoreSourceFiles=false
 | 
			
		||||
#paket.runPreStep=true
 | 
			
		||||
#paket.exePath=
 | 
			
		||||
 
 | 
			
		||||
#go.resolveDependencies=false
 | 
			
		||||
#go.collectDependenciesAtRuntime=true
 | 
			
		||||
#go.dependencyManager=
 | 
			
		||||
#go.ignoreSourceFiles=true
 | 
			
		||||
#go.glide.ignoreTestPackages=false
 | 
			
		||||
#go.gogradle.enableTaskAlias=true
 | 
			
		||||
 
 | 
			
		||||
#ruby.resolveDependencies = false
 | 
			
		||||
#ruby.ignoreSourceFiles = false
 | 
			
		||||
#ruby.installMissingGems = true
 | 
			
		||||
#ruby.runBundleInstall = true
 | 
			
		||||
#ruby.overwriteGemFile = true
 | 
			
		||||
 
 | 
			
		||||
#sbt.resolveDependencies=false
 | 
			
		||||
#sbt.ignoreSourceFiles=true
 | 
			
		||||
#sbt.aggregateModules=true
 | 
			
		||||
#sbt.runPreStep=true
 | 
			
		||||
#sbt.targetFolder=
 | 
			
		||||
 
 | 
			
		||||
#php.resolveDependencies=false
 | 
			
		||||
#php.runPreStep=true
 | 
			
		||||
#php.includeDevDependencies=true
 | 
			
		||||
 
 | 
			
		||||
#html.resolveDependencies=false
 | 
			
		||||
 
 | 
			
		||||
#cocoapods.resolveDependencies=false
 | 
			
		||||
#cocoapods.runPreStep=true
 | 
			
		||||
#cocoapods.ignoreSourceFiles=false
 | 
			
		||||
 
 | 
			
		||||
#hex.resolveDependencies=false
 | 
			
		||||
#hex.runPreStep=true
 | 
			
		||||
#hex.ignoreSourceFiles=false
 | 
			
		||||
#hex.aggregateModules=true
 | 
			
		||||
 
 | 
			
		||||
##################################
 | 
			
		||||
# Organization tokens:
 | 
			
		||||
##################################
 | 
			
		||||
apiKey=
 | 
			
		||||
 
 | 
			
		||||
#userKey is required if WhiteSource administrator has enabled "Enforce user level access" option
 | 
			
		||||
#userKey=
 | 
			
		||||
   
 | 
			
		||||
projectName=alfresco-repository
 | 
			
		||||
projectVersion=7.N
 | 
			
		||||
projectToken=
 | 
			
		||||
   
 | 
			
		||||
productName=ACS Community
 | 
			
		||||
productVersion=
 | 
			
		||||
productToken=
 | 
			
		||||
#updateType=APPEND
 | 
			
		||||
#requesterEmail=user@provider.com
 | 
			
		||||
    
 | 
			
		||||
#########################################################################################
 | 
			
		||||
# Includes/Excludes Glob patterns - PLEASE USE ONLY ONE EXCLUDE LINE AND ONE INCLUDE LINE
 | 
			
		||||
#########################################################################################
 | 
			
		||||
#includes=**/*.c **/*.cc **/*.cp **/*.cpp **/*.cxx **/*.c++ **/*.h **/*.hpp **/*.hxx
 | 
			
		||||
   
 | 
			
		||||
#includes=**/*.m **/*.mm  **/*.js **/*.php
 | 
			
		||||
includes=**/*.jar
 | 
			
		||||
#includes=**/*.gem **/*.rb
 | 
			
		||||
#includes=**/*.dll **/*.cs **/*.nupkg
 | 
			
		||||
#includes=**/*.tgz **/*.deb **/*.gzip **/*.rpm **/*.tar.bz2
 | 
			
		||||
#includes=**/*.zip **/*.tar.gz **/*.egg **/*.whl **/*.py
 | 
			
		||||
   
 | 
			
		||||
## Exclude file extensions or specific directories by adding **/*.<extension> or **<excluded_dir>/**
 | 
			
		||||
excludes=**/*sources.jar **/*javadoc.jar
 | 
			
		||||
   
 | 
			
		||||
case.sensitive.glob=false
 | 
			
		||||
followSymbolicLinks=true
 | 
			
		||||
    
 | 
			
		||||
##################################
 | 
			
		||||
# Archive properties
 | 
			
		||||
##################################
 | 
			
		||||
#archiveExtractionDepth=2
 | 
			
		||||
#archiveIncludes=**/*.war **/*.ear
 | 
			
		||||
#archiveExcludes=**/*sources.jar
 | 
			
		||||
    
 | 
			
		||||
##################################
 | 
			
		||||
# Proxy settings
 | 
			
		||||
##################################
 | 
			
		||||
#proxy.host=
 | 
			
		||||
#proxy.port=
 | 
			
		||||
#proxy.user=
 | 
			
		||||
#proxy.pass=
 | 
			
		||||
    
 | 
			
		||||
##################################
 | 
			
		||||
# SCM settings
 | 
			
		||||
##################################
 | 
			
		||||
#scm.type=
 | 
			
		||||
#scm.user=
 | 
			
		||||
#scm.pass=
 | 
			
		||||
#scm.ppk=
 | 
			
		||||
#scm.url=
 | 
			
		||||
#scm.branch=
 | 
			
		||||
#scm.tag=
 | 
			
		||||
#scm.npmInstall=
 | 
			
		||||
#scm.npmInstallTimeoutMinutes=
 | 
			
		||||
#scm.repositoriesFile=
 | 
			
		||||
   
 | 
			
		||||
##############################################
 | 
			
		||||
# SCAN MODE: Linux package manager settings
 | 
			
		||||
##############################################
 | 
			
		||||
#scanPackageManager=true
 | 
			
		||||
  
 | 
			
		||||
##################################
 | 
			
		||||
# SCAN MODE: Docker images
 | 
			
		||||
##################################
 | 
			
		||||
#docker.scanImages=true
 | 
			
		||||
#docker.includes=.*.*
 | 
			
		||||
#docker.excludes=
 | 
			
		||||
#docker.pull.enable=true
 | 
			
		||||
#docker.pull.images=.*.*
 | 
			
		||||
#docker.pull.maxImages=10
 | 
			
		||||
#docker.pull.tags=.*.*
 | 
			
		||||
#docker.pull.digest=
 | 
			
		||||
#docker.delete.force=true
 | 
			
		||||
#docker.login.sudo=false
 | 
			
		||||
 
 | 
			
		||||
#docker.aws.enable=true
 | 
			
		||||
#docker.aws.registryIds=
 | 
			
		||||
 
 | 
			
		||||
##################################
 | 
			
		||||
# SCAN MODE: Docker containers
 | 
			
		||||
##################################
 | 
			
		||||
#docker.scanContainers=true
 | 
			
		||||
#docker.containerIncludes=.*.*
 | 
			
		||||
#docker.containerExcludes=
 | 
			
		||||
 
 | 
			
		||||
################################
 | 
			
		||||
# Serverless settings
 | 
			
		||||
################################
 | 
			
		||||
#serverless.provider=
 | 
			
		||||
#serverless.scanFunctions=true
 | 
			
		||||
#serverless.includes=
 | 
			
		||||
#serverless.excludes=
 | 
			
		||||
#serverless.region=
 | 
			
		||||
#serverless.maxFunctions=10
 | 
			
		||||
							
								
								
									
										26
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								README.md
									
									
									
									
									
								
							@@ -34,7 +34,7 @@ Repository is a library packaged as a jar file which contains the following:
 | 
			
		||||
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 suitable test environment. For example:
 | 
			
		||||
to provide a sutable test environment. 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
 | 
			
		||||
~~~
 | 
			
		||||
@@ -113,27 +113,27 @@ and `acs-community-packaging` in a single Intellij IDEA project. They depend on
 | 
			
		||||
want to make changes to both of them if you are changing the repository code.
 | 
			
		||||
 | 
			
		||||
~~~
 | 
			
		||||
mkdir work
 | 
			
		||||
cd work
 | 
			
		||||
git clone git@github.com:Alfresco/alfresco-community-repo.git
 | 
			
		||||
git clone git@github.com:Alfresco/acs-community-packaging.git
 | 
			
		||||
$ mkdir work
 | 
			
		||||
$ cd work
 | 
			
		||||
$ 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 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 ..
 | 
			
		||||
$ 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.
 | 
			
		||||
In Itellij IDEA, create a new project using the `work` directory as the source.
 | 
			
		||||
* File > New Project from Existing Sources > .../work > Maven
 | 
			
		||||
 | 
			
		||||
## 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`.
 | 
			
		||||
For example the code used to create the repository in ACS 6.2.1 in 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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										67
									
								
								core/pom.xml
									
									
									
									
									
								
							
							
						
						
									
										67
									
								
								core/pom.xml
									
									
									
									
									
								
							@@ -7,28 +7,18 @@
 | 
			
		||||
   <parent>
 | 
			
		||||
      <groupId>org.alfresco</groupId>
 | 
			
		||||
      <artifactId>alfresco-community-repo</artifactId>
 | 
			
		||||
      <version>11.17</version>
 | 
			
		||||
      <version>7.183.300-TEST3</version>
 | 
			
		||||
   </parent>
 | 
			
		||||
   
 | 
			
		||||
   <properties>
 | 
			
		||||
      <dependency.org-json.version>20160212</dependency.org-json.version>
 | 
			
		||||
   </properties>
 | 
			
		||||
 | 
			
		||||
   <dependencies>
 | 
			
		||||
      <!-- Jakarta... -->
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>jakarta.xml.bind</groupId>
 | 
			
		||||
         <artifactId>jakarta.xml.bind-api</artifactId>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>org.glassfish.jaxb</groupId>
 | 
			
		||||
         <artifactId>jaxb-runtime</artifactId>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <!-- REPO-5047 - Replaces org.apache.geronimo.specs:geronimo-jta_1.1_spec -->
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>jakarta.transaction</groupId>
 | 
			
		||||
         <artifactId>jakarta.transaction-api</artifactId>
 | 
			
		||||
      </dependency>
 | 
			
		||||
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>commons-codec</groupId>
 | 
			
		||||
         <artifactId>commons-codec</artifactId>
 | 
			
		||||
         <version>1.14</version>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>commons-httpclient</groupId>
 | 
			
		||||
@@ -37,10 +27,12 @@
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>commons-logging</groupId>
 | 
			
		||||
         <artifactId>commons-logging</artifactId>
 | 
			
		||||
         <version>1.2</version>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>commons-io</groupId>
 | 
			
		||||
         <artifactId>commons-io</artifactId>
 | 
			
		||||
         <version>2.6</version>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>org.apache.commons</groupId>
 | 
			
		||||
@@ -61,10 +53,12 @@
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>org.json</groupId>
 | 
			
		||||
         <artifactId>json</artifactId>
 | 
			
		||||
         <version>20160212</version>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>org.springframework</groupId>
 | 
			
		||||
         <artifactId>spring-orm</artifactId>
 | 
			
		||||
         <version>${dependency.spring.version}</version>
 | 
			
		||||
         <!-- exclude spring-jcl which is brought in by spring-core -->
 | 
			
		||||
         <!-- see https://issues.alfresco.com/jira/browse/REPO-4774 -->
 | 
			
		||||
         <exclusions>
 | 
			
		||||
@@ -77,10 +71,12 @@
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>org.springframework</groupId>
 | 
			
		||||
         <artifactId>spring-context</artifactId>
 | 
			
		||||
         <version>${dependency.spring.version}</version>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>org.quartz-scheduler</groupId>
 | 
			
		||||
         <artifactId>quartz</artifactId>
 | 
			
		||||
         <version>2.3.2</version>
 | 
			
		||||
         <!-- exclude c3p0 -->
 | 
			
		||||
         <!-- see https://issues.alfresco.com/jira/browse/REPO-3447 -->
 | 
			
		||||
         <exclusions>
 | 
			
		||||
@@ -93,21 +89,44 @@
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>org.alfresco.surf</groupId>
 | 
			
		||||
         <artifactId>spring-surf-core-configservice</artifactId>
 | 
			
		||||
         <version>${dependency.webscripts.version}</version>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>javax.xml.bind</groupId>
 | 
			
		||||
         <artifactId>jaxb-api</artifactId>
 | 
			
		||||
         <version>2.3.1</version>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>com.sun.xml.bind</groupId>
 | 
			
		||||
         <artifactId>jaxb-impl</artifactId>
 | 
			
		||||
         <version>2.3.2</version>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>com.sun.xml.bind</groupId>
 | 
			
		||||
         <artifactId>jaxb-core</artifactId>
 | 
			
		||||
         <version>2.3.0.1</version>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>org.codehaus.guessencoding</groupId>
 | 
			
		||||
         <artifactId>guessencoding</artifactId>
 | 
			
		||||
         <version>1.4</version>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>javax.transaction</groupId>
 | 
			
		||||
         <artifactId>jta</artifactId>
 | 
			
		||||
         <version>1.1</version>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>joda-time</groupId>
 | 
			
		||||
         <artifactId>joda-time</artifactId>
 | 
			
		||||
         <version>2.10.5</version>
 | 
			
		||||
      </dependency>
 | 
			
		||||
 | 
			
		||||
      <!-- provided dependencies -->
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>javax.servlet</groupId>
 | 
			
		||||
         <artifactId>javax.servlet-api</artifactId>
 | 
			
		||||
         <version>3.0.1</version>
 | 
			
		||||
         <scope>provided</scope>
 | 
			
		||||
      </dependency>
 | 
			
		||||
 | 
			
		||||
@@ -120,24 +139,40 @@
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>junit</groupId>
 | 
			
		||||
         <artifactId>junit</artifactId>
 | 
			
		||||
         <version>4.13</version>
 | 
			
		||||
         <scope>test</scope>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>org.mockito</groupId>
 | 
			
		||||
         <artifactId>mockito-core</artifactId>
 | 
			
		||||
         <version>3.2.4</version>
 | 
			
		||||
         <scope>test</scope>
 | 
			
		||||
      </dependency>
 | 
			
		||||
      <dependency>
 | 
			
		||||
         <groupId>commons-dbcp</groupId>
 | 
			
		||||
         <artifactId>commons-dbcp</artifactId>
 | 
			
		||||
         <version>1.4-DBCP330</version>
 | 
			
		||||
         <scope>test</scope>
 | 
			
		||||
      </dependency>
 | 
			
		||||
   </dependencies>
 | 
			
		||||
 | 
			
		||||
   <build>
 | 
			
		||||
      <pluginManagement>
 | 
			
		||||
         <plugins>
 | 
			
		||||
            <plugin>
 | 
			
		||||
               <artifactId>maven-release-plugin</artifactId>
 | 
			
		||||
               <configuration>
 | 
			
		||||
                  <autoVersionSubmodules>true</autoVersionSubmodules>
 | 
			
		||||
                  <tagNameFormat>@{project.version}</tagNameFormat>
 | 
			
		||||
               </configuration>        
 | 
			
		||||
            </plugin>
 | 
			
		||||
         </plugins>
 | 
			
		||||
      </pluginManagement>
 | 
			
		||||
 | 
			
		||||
      <plugins>
 | 
			
		||||
         <plugin>
 | 
			
		||||
            <artifactId>maven-jar-plugin</artifactId>
 | 
			
		||||
            <version>3.2.0</version>
 | 
			
		||||
            <executions>
 | 
			
		||||
               <execution>
 | 
			
		||||
                  <goals>
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,7 @@ package org.alfresco.httpclient;
 | 
			
		||||
import java.io.ByteArrayInputStream;
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
import java.io.InputStream;
 | 
			
		||||
import java.security.AlgorithmParameters;
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
@@ -31,11 +32,14 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
 | 
			
		||||
import org.alfresco.encryption.AlfrescoKeyStore;
 | 
			
		||||
import org.alfresco.encryption.AlfrescoKeyStoreImpl;
 | 
			
		||||
import org.alfresco.encryption.EncryptionUtils;
 | 
			
		||||
import org.alfresco.encryption.Encryptor;
 | 
			
		||||
import org.alfresco.encryption.KeyProvider;
 | 
			
		||||
import org.alfresco.encryption.KeyResourceLoader;
 | 
			
		||||
import org.alfresco.encryption.KeyStoreParameters;
 | 
			
		||||
import org.alfresco.encryption.ssl.AuthSSLProtocolSocketFactory;
 | 
			
		||||
import org.alfresco.encryption.ssl.SSLEncryptionParameters;
 | 
			
		||||
import org.alfresco.error.AlfrescoRuntimeException;
 | 
			
		||||
import org.alfresco.util.Pair;
 | 
			
		||||
import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;
 | 
			
		||||
import org.apache.commons.httpclient.HostConfiguration;
 | 
			
		||||
import org.apache.commons.httpclient.HttpClient;
 | 
			
		||||
@@ -49,6 +53,8 @@ import org.apache.commons.httpclient.SimpleHttpConnectionManager;
 | 
			
		||||
import org.apache.commons.httpclient.URI;
 | 
			
		||||
import org.apache.commons.httpclient.URIException;
 | 
			
		||||
import org.apache.commons.httpclient.cookie.CookiePolicy;
 | 
			
		||||
import org.apache.commons.httpclient.methods.ByteArrayRequestEntity;
 | 
			
		||||
import org.apache.commons.httpclient.methods.PostMethod;
 | 
			
		||||
import org.apache.commons.httpclient.params.DefaultHttpParams;
 | 
			
		||||
import org.apache.commons.httpclient.params.DefaultHttpParamsFactory;
 | 
			
		||||
import org.apache.commons.httpclient.params.HttpClientParams;
 | 
			
		||||
@@ -69,25 +75,23 @@ import org.apache.commons.logging.LogFactory;
 | 
			
		||||
 */
 | 
			
		||||
public class HttpClientFactory
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * Communication type for HttpClient:
 | 
			
		||||
     * - NONE is plain http
 | 
			
		||||
     * - SECRET is plain http with a shared secret via request header
 | 
			
		||||
     * - HTTPS is mTLS with client authentication (certificates are required)
 | 
			
		||||
     */
 | 
			
		||||
    public static enum SecureCommsType
 | 
			
		||||
    {
 | 
			
		||||
        HTTPS, NONE, SECRET;
 | 
			
		||||
        HTTPS, NONE;
 | 
			
		||||
        
 | 
			
		||||
        public static SecureCommsType getType(String type)
 | 
			
		||||
        {
 | 
			
		||||
            switch (type.toLowerCase())
 | 
			
		||||
            if(type.equalsIgnoreCase("https"))
 | 
			
		||||
            {
 | 
			
		||||
                case "https": return HTTPS;
 | 
			
		||||
                case "none": return NONE;
 | 
			
		||||
                case "secret": return SECRET;
 | 
			
		||||
                default: throw new IllegalArgumentException("Invalid communications type");
 | 
			
		||||
                    
 | 
			
		||||
                return HTTPS;
 | 
			
		||||
            }
 | 
			
		||||
            else if(type.equalsIgnoreCase("none"))
 | 
			
		||||
            {
 | 
			
		||||
                return NONE;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                throw new IllegalArgumentException("Invalid communications type");
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
@@ -118,24 +122,14 @@ public class HttpClientFactory
 | 
			
		||||
 | 
			
		||||
    private int connectionTimeout = 0;
 | 
			
		||||
    
 | 
			
		||||
    // Shared secret parameters
 | 
			
		||||
    private String sharedSecret;
 | 
			
		||||
    private String sharedSecretHeader = DEFAULT_SHAREDSECRET_HEADER;
 | 
			
		||||
 | 
			
		||||
    // Default name for HTTP Request Header when using shared secret communication
 | 
			
		||||
    public static final String DEFAULT_SHAREDSECRET_HEADER = "X-Alfresco-Search-Secret";
 | 
			
		||||
    
 | 
			
		||||
    public HttpClientFactory()
 | 
			
		||||
    {
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * Default constructor for legacy subsystems.
 | 
			
		||||
     */
 | 
			
		||||
 | 
			
		||||
    public HttpClientFactory(SecureCommsType secureCommsType, SSLEncryptionParameters sslEncryptionParameters,
 | 
			
		||||
                KeyResourceLoader keyResourceLoader, KeyStoreParameters keyStoreParameters,
 | 
			
		||||
                MD5EncryptionParameters encryptionParameters, String host, int port, int sslPort,
 | 
			
		||||
                int maxTotalConnections, int maxHostConnections, int socketTimeout)
 | 
			
		||||
            KeyResourceLoader keyResourceLoader, KeyStoreParameters keyStoreParameters,
 | 
			
		||||
            MD5EncryptionParameters encryptionParameters, String host, int port, int sslPort, int maxTotalConnections,
 | 
			
		||||
            int maxHostConnections, int socketTimeout)
 | 
			
		||||
    {
 | 
			
		||||
        this.secureCommsType = secureCommsType;
 | 
			
		||||
        this.sslEncryptionParameters = sslEncryptionParameters;
 | 
			
		||||
@@ -151,21 +145,6 @@ public class HttpClientFactory
 | 
			
		||||
        init();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Recommended constructor for subsystems supporting Shared Secret communication.
 | 
			
		||||
     * This constructor supports Shared Secret ("secret") communication method additionally to the legacy ones: "none" and "https".
 | 
			
		||||
     */
 | 
			
		||||
    public HttpClientFactory(SecureCommsType secureCommsType, SSLEncryptionParameters sslEncryptionParameters,
 | 
			
		||||
                KeyResourceLoader keyResourceLoader, KeyStoreParameters keyStoreParameters,
 | 
			
		||||
                MD5EncryptionParameters encryptionParameters, String sharedSecret, String sharedSecretHeader, 
 | 
			
		||||
                String host, int port, int sslPort, int maxTotalConnections, int maxHostConnections, int socketTimeout)
 | 
			
		||||
    {
 | 
			
		||||
        this(secureCommsType, sslEncryptionParameters, keyResourceLoader, keyStoreParameters, encryptionParameters,
 | 
			
		||||
                    host, port, sslPort, maxTotalConnections, maxHostConnections, socketTimeout);
 | 
			
		||||
        this.sharedSecret = sharedSecret;
 | 
			
		||||
        this.sharedSecretHeader = sharedSecretHeader;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void init()
 | 
			
		||||
    {
 | 
			
		||||
        this.sslKeyStore = new AlfrescoKeyStoreImpl(sslEncryptionParameters.getKeyStoreParameters(),  keyResourceLoader);
 | 
			
		||||
@@ -293,44 +272,10 @@ public class HttpClientFactory
 | 
			
		||||
        this.connectionTimeout = connectionTimeout;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Shared secret used for SECRET communication
 | 
			
		||||
     * @param secret shared secret word
 | 
			
		||||
     */
 | 
			
		||||
    public void setSharedSecret(String sharedSecret)
 | 
			
		||||
    {
 | 
			
		||||
        this.sharedSecret = sharedSecret;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * @return Shared secret used for SECRET communication
 | 
			
		||||
     */
 | 
			
		||||
    public String getSharedSecret()
 | 
			
		||||
    {
 | 
			
		||||
        return sharedSecret;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * HTTP Request header used for SECRET communication
 | 
			
		||||
     * @param sharedSecretHeader HTTP Request header
 | 
			
		||||
     */
 | 
			
		||||
    public void setSharedSecretHeader(String sharedSecretHeader)
 | 
			
		||||
    {
 | 
			
		||||
        this.sharedSecretHeader = sharedSecretHeader;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * @return HTTP Request header used for SECRET communication
 | 
			
		||||
     */
 | 
			
		||||
    public String getSharedSecretHeader()
 | 
			
		||||
    {
 | 
			
		||||
        return sharedSecretHeader;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected RequestHeadersHttpClient constructHttpClient()
 | 
			
		||||
    protected HttpClient constructHttpClient()
 | 
			
		||||
    {
 | 
			
		||||
        MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
 | 
			
		||||
        RequestHeadersHttpClient httpClient = new RequestHeadersHttpClient(connectionManager);
 | 
			
		||||
        HttpClient httpClient = new HttpClient(connectionManager);
 | 
			
		||||
        HttpClientParams params = httpClient.getParams();
 | 
			
		||||
        params.setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true);
 | 
			
		||||
        params.setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, true);
 | 
			
		||||
@@ -346,15 +291,15 @@ public class HttpClientFactory
 | 
			
		||||
        return httpClient;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    protected RequestHeadersHttpClient getHttpsClient()
 | 
			
		||||
    protected HttpClient getHttpsClient()
 | 
			
		||||
    {
 | 
			
		||||
       return getHttpsClient(host, sslPort);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    protected RequestHeadersHttpClient getHttpsClient(String httpsHost, int httpsPort)
 | 
			
		||||
    protected HttpClient getHttpsClient(String httpsHost, int httpsPort)
 | 
			
		||||
    {
 | 
			
		||||
        // Configure a custom SSL socket factory that will enforce mutual authentication
 | 
			
		||||
        RequestHeadersHttpClient httpClient = constructHttpClient();
 | 
			
		||||
        HttpClient httpClient = constructHttpClient();
 | 
			
		||||
        // Default port is 443 for the HostFactory, when including customised port (like 8983) the port name is skipped from "getHostURL" string
 | 
			
		||||
        HttpHostFactory hostFactory = new HttpHostFactory(new Protocol("https", sslSocketFactory, HttpsURL.DEFAULT_PORT));
 | 
			
		||||
        httpClient.setHostConfiguration(new HostConfigurationWithHostFactory(hostFactory));
 | 
			
		||||
@@ -362,54 +307,28 @@ public class HttpClientFactory
 | 
			
		||||
        return httpClient;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected RequestHeadersHttpClient getDefaultHttpClient()
 | 
			
		||||
    protected HttpClient getDefaultHttpClient()
 | 
			
		||||
    {
 | 
			
		||||
        return getDefaultHttpClient(host, port);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    protected RequestHeadersHttpClient getDefaultHttpClient(String httpHost, int httpPort)
 | 
			
		||||
    protected HttpClient getDefaultHttpClient(String httpHost, int httpPort)
 | 
			
		||||
    {
 | 
			
		||||
        RequestHeadersHttpClient httpClient = constructHttpClient();
 | 
			
		||||
        HttpClient httpClient = constructHttpClient();
 | 
			
		||||
        httpClient.getHostConfiguration().setHost(httpHost, httpPort);
 | 
			
		||||
        return httpClient;
 | 
			
		||||
    }
 | 
			
		||||
       
 | 
			
		||||
    /**
 | 
			
		||||
     * Build HTTP Client using default headers
 | 
			
		||||
     * @return RequestHeadersHttpClient including default header for shared secret method
 | 
			
		||||
     */
 | 
			
		||||
    protected RequestHeadersHttpClient constructSharedSecretHttpClient()
 | 
			
		||||
    {
 | 
			
		||||
        RequestHeadersHttpClient client = constructHttpClient();
 | 
			
		||||
        client.setDefaultHeaders(Map.of(sharedSecretHeader, sharedSecret));
 | 
			
		||||
        return client;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    protected RequestHeadersHttpClient getSharedSecretHttpClient()
 | 
			
		||||
    {
 | 
			
		||||
        return getSharedSecretHttpClient(host, port);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    protected RequestHeadersHttpClient getSharedSecretHttpClient(String httpHost, int httpPort)
 | 
			
		||||
    {
 | 
			
		||||
        RequestHeadersHttpClient httpClient = constructSharedSecretHttpClient();
 | 
			
		||||
        httpClient.getHostConfiguration().setHost(httpHost, httpPort);
 | 
			
		||||
        return httpClient;       
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    protected AlfrescoHttpClient getAlfrescoHttpsClient()
 | 
			
		||||
    {
 | 
			
		||||
        return new HttpsClient(getHttpsClient());
 | 
			
		||||
        AlfrescoHttpClient repoClient = new HttpsClient(getHttpsClient());
 | 
			
		||||
        return repoClient;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected AlfrescoHttpClient getAlfrescoHttpClient()
 | 
			
		||||
    {
 | 
			
		||||
        return new DefaultHttpClient(getDefaultHttpClient());
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    protected AlfrescoHttpClient getAlfrescoSharedSecretClient()
 | 
			
		||||
    {
 | 
			
		||||
        return new DefaultHttpClient(getSharedSecretHttpClient());
 | 
			
		||||
        AlfrescoHttpClient repoClient = new DefaultHttpClient(getDefaultHttpClient());
 | 
			
		||||
        return repoClient;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    protected HttpClient getMD5HttpClient(String host, int port)
 | 
			
		||||
@@ -422,37 +341,66 @@ public class HttpClientFactory
 | 
			
		||||
    
 | 
			
		||||
    public AlfrescoHttpClient getRepoClient(String host, int port)
 | 
			
		||||
    {
 | 
			
		||||
        switch (secureCommsType)
 | 
			
		||||
        AlfrescoHttpClient repoClient = null;
 | 
			
		||||
 | 
			
		||||
        if(secureCommsType == SecureCommsType.HTTPS)
 | 
			
		||||
        {
 | 
			
		||||
            case HTTPS: return getAlfrescoHttpsClient();
 | 
			
		||||
            case NONE: return getAlfrescoHttpClient();
 | 
			
		||||
            case SECRET: return getAlfrescoSharedSecretClient();
 | 
			
		||||
            default: throw new AlfrescoRuntimeException("Invalid Solr secure communications type configured in [solr|alfresco].secureComms, should be 'ssl', 'none' or 'secret'");
 | 
			
		||||
            repoClient = getAlfrescoHttpsClient();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
    public RequestHeadersHttpClient getHttpClient()
 | 
			
		||||
    {       
 | 
			
		||||
        switch (secureCommsType)
 | 
			
		||||
        else if(secureCommsType == SecureCommsType.NONE)
 | 
			
		||||
        {
 | 
			
		||||
            case HTTPS: return getHttpsClient();
 | 
			
		||||
            case NONE: return getDefaultHttpClient();
 | 
			
		||||
            case SECRET: return getSharedSecretHttpClient();
 | 
			
		||||
            default: throw new AlfrescoRuntimeException("Invalid Solr secure communications type configured in [solr|alfresco].secureComms, should be 'ssl', 'none' or 'secret'");
 | 
			
		||||
            repoClient = getAlfrescoHttpClient();
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            throw new AlfrescoRuntimeException("Invalid Solr secure communications type configured in alfresco.secureComms, should be 'ssl'or 'none'");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return repoClient;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public RequestHeadersHttpClient getHttpClient(String host, int port)
 | 
			
		||||
    public HttpClient getHttpClient()
 | 
			
		||||
    {
 | 
			
		||||
        switch (secureCommsType)
 | 
			
		||||
        HttpClient httpClient = null;
 | 
			
		||||
 | 
			
		||||
        if(secureCommsType == SecureCommsType.HTTPS)
 | 
			
		||||
        {
 | 
			
		||||
            case HTTPS: return getHttpsClient(host, port);
 | 
			
		||||
            case NONE: return getDefaultHttpClient(host, port);
 | 
			
		||||
            case SECRET: return getSharedSecretHttpClient(host, port);
 | 
			
		||||
            default: throw new AlfrescoRuntimeException("Invalid Solr secure communications type configured in [solr|alfresco].secureComms, should be 'ssl', 'none' or 'secret'");
 | 
			
		||||
            httpClient = getHttpsClient();
 | 
			
		||||
        }
 | 
			
		||||
        else if(secureCommsType == SecureCommsType.NONE)
 | 
			
		||||
        {
 | 
			
		||||
            httpClient = getDefaultHttpClient();
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            throw new AlfrescoRuntimeException("Invalid Solr secure communications type configured in alfresco.secureComms, should be 'ssl'or 'none'");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return httpClient;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public HttpClient getHttpClient(String host, int port)
 | 
			
		||||
    {
 | 
			
		||||
        HttpClient httpClient = null;
 | 
			
		||||
 | 
			
		||||
        if(secureCommsType == SecureCommsType.HTTPS)
 | 
			
		||||
        {
 | 
			
		||||
            httpClient = getHttpsClient(host, port);
 | 
			
		||||
        }
 | 
			
		||||
        else if(secureCommsType == SecureCommsType.NONE)
 | 
			
		||||
        {
 | 
			
		||||
            httpClient = getDefaultHttpClient(host, port);
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            throw new AlfrescoRuntimeException("Invalid Solr secure communications type configured in alfresco.secureComms, should be 'ssl'or 'none'");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return httpClient;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * A secure client connection to the repository.
 | 
			
		||||
     * 
 | 
			
		||||
 
 | 
			
		||||
@@ -1,87 +0,0 @@
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (C) 2005-2021 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.httpclient;
 | 
			
		||||
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
import org.apache.commons.httpclient.HostConfiguration;
 | 
			
		||||
import org.apache.commons.httpclient.HttpClient;
 | 
			
		||||
import org.apache.commons.httpclient.HttpException;
 | 
			
		||||
import org.apache.commons.httpclient.HttpMethod;
 | 
			
		||||
import org.apache.commons.httpclient.HttpState;
 | 
			
		||||
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Since Apache HttpClient 3.1 doesn't support including custom headers by default,
 | 
			
		||||
 * this class is adding that custom headers every time a method is invoked.
 | 
			
		||||
 */
 | 
			
		||||
public class RequestHeadersHttpClient extends HttpClient
 | 
			
		||||
{
 | 
			
		||||
    
 | 
			
		||||
    private Map<String, String> defaultHeaders;
 | 
			
		||||
    
 | 
			
		||||
    public RequestHeadersHttpClient(MultiThreadedHttpConnectionManager connectionManager)
 | 
			
		||||
    {
 | 
			
		||||
        super(connectionManager);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Map<String, String> getDefaultHeaders()
 | 
			
		||||
    {
 | 
			
		||||
        return defaultHeaders;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setDefaultHeaders(Map<String, String> defaultHeaders)
 | 
			
		||||
    {
 | 
			
		||||
        this.defaultHeaders = defaultHeaders;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    private void addDefaultHeaders(HttpMethod method)
 | 
			
		||||
    {
 | 
			
		||||
        if (defaultHeaders != null)
 | 
			
		||||
        {
 | 
			
		||||
            defaultHeaders.forEach((k,v) -> {
 | 
			
		||||
                method.addRequestHeader(k, v);
 | 
			
		||||
            });
 | 
			
		||||
        }        
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    @Override
 | 
			
		||||
    public int executeMethod(HttpMethod method) throws IOException, HttpException
 | 
			
		||||
    {
 | 
			
		||||
        addDefaultHeaders(method);
 | 
			
		||||
        return super.executeMethod(method);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public int executeMethod(HostConfiguration hostConfiguration, HttpMethod method) throws IOException, HttpException
 | 
			
		||||
    {
 | 
			
		||||
        addDefaultHeaders(method);
 | 
			
		||||
        return super.executeMethod(hostConfiguration, method);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public int executeMethod(HostConfiguration hostconfig, HttpMethod method, HttpState state)
 | 
			
		||||
                throws IOException, HttpException
 | 
			
		||||
    {
 | 
			
		||||
        addDefaultHeaders(method);
 | 
			
		||||
        return super.executeMethod(hostconfig, method, state);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -113,7 +113,7 @@ public abstract class AbstractCannedQuery<R> implements CannedQuery<R>
 | 
			
		||||
        final List<List<R>> finalPages = pages;
 | 
			
		||||
        
 | 
			
		||||
        // Has more items beyond requested pages ? ... ie. at least one more page (with at least one result)
 | 
			
		||||
        final boolean hasMoreItems = (rawResults.size() > pagingDetails.getResultsRequiredForPaging()) || (totalCount.getFirst() > pagingDetails.getResultsRequiredForPaging());
 | 
			
		||||
        final boolean hasMoreItems = (rawResults.size() > pagingDetails.getResultsRequiredForPaging());
 | 
			
		||||
        
 | 
			
		||||
        results = new CannedQueryResults<R>()
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
@@ -24,10 +24,8 @@ import java.io.FileOutputStream;
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
import java.io.InputStream;
 | 
			
		||||
import java.io.OutputStream;
 | 
			
		||||
import java.time.Duration;
 | 
			
		||||
import java.util.concurrent.atomic.AtomicLong;
 | 
			
		||||
 | 
			
		||||
import org.alfresco.api.AlfrescoPublicApi;
 | 
			
		||||
import org.alfresco.api.AlfrescoPublicApi;     
 | 
			
		||||
import org.alfresco.error.AlfrescoRuntimeException;
 | 
			
		||||
import org.apache.commons.logging.Log;
 | 
			
		||||
import org.apache.commons.logging.LogFactory;
 | 
			
		||||
@@ -350,17 +348,6 @@ public class TempFileProvider
 | 
			
		||||
    {
 | 
			
		||||
        public static final String KEY_PROTECT_HOURS = "protectHours";
 | 
			
		||||
        public static final String KEY_DIRECTORY_NAME = "directoryName";
 | 
			
		||||
        public static final String KEY_MAX_FILES_TO_DELETE = "maxFilesToDelete";
 | 
			
		||||
        public static final String KEY_MAX_TIME_TO_RUN = "maxTimeToRun";
 | 
			
		||||
 | 
			
		||||
        /** The time when the job has actually started */
 | 
			
		||||
        private static long jobStartTime;
 | 
			
		||||
 | 
			
		||||
        /** The maximum number of files that can be deleted when the cleaning jobs runs */
 | 
			
		||||
        private static AtomicLong maxFilesToDelete;
 | 
			
		||||
 | 
			
		||||
        /** The maximum time allowed for the cleaning job to run */
 | 
			
		||||
        private static Duration maxTimeToRun;
 | 
			
		||||
 | 
			
		||||
        /**
 | 
			
		||||
         * Gets a list of all files in the {@link TempFileProvider#ALFRESCO_TEMP_FILE_DIR temp directory}
 | 
			
		||||
@@ -389,59 +376,24 @@ public class TempFileProvider
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            String directoryName = (String) context.getJobDetail().getJobDataMap().get(KEY_DIRECTORY_NAME);
 | 
			
		||||
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                final Object oMaxFilesToDelete = context.getJobDetail().getJobDataMap().get(KEY_MAX_FILES_TO_DELETE);
 | 
			
		||||
                if (oMaxFilesToDelete != null)
 | 
			
		||||
                {
 | 
			
		||||
                    final String strMaxFilesToDelete = (String) oMaxFilesToDelete;
 | 
			
		||||
                    maxFilesToDelete = new AtomicLong(Long.parseLong(strMaxFilesToDelete));
 | 
			
		||||
                    logger.debug("Set the maximum number of temp files to be deleted to: " + maxFilesToDelete.get());
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    logger.debug("No maximum number of files was configured for the temp file clean job.");
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            catch (Exception e)
 | 
			
		||||
            {
 | 
			
		||||
                logger.warn(e);
 | 
			
		||||
                throw new JobExecutionException("Invalid job data, maxFilesToDelete");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                final Object oMaxTimeToRun = context.getJobDetail().getJobDataMap().get(KEY_MAX_TIME_TO_RUN);
 | 
			
		||||
                if (oMaxTimeToRun != null)
 | 
			
		||||
                {
 | 
			
		||||
                    final String strMaxTimeToRun = (String) oMaxTimeToRun;
 | 
			
		||||
                    maxTimeToRun = Duration.parse(strMaxTimeToRun);
 | 
			
		||||
                    logger.debug("Set the maximum duration time of the temp file clean job to: " + maxTimeToRun);
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    logger.debug("No maximum duration was configured for the temp file clean job.");
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            catch (Exception e)
 | 
			
		||||
            {
 | 
			
		||||
                logger.warn(e);
 | 
			
		||||
                throw new JobExecutionException("Invalid job data, maxTimeToRun");
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            if (directoryName == null)
 | 
			
		||||
            {
 | 
			
		||||
                directoryName = ALFRESCO_TEMP_FILE_DIR;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            jobStartTime = System.currentTimeMillis();
 | 
			
		||||
            long aFewHoursBack = jobStartTime - (3600L * 1000L * protectHours);
 | 
			
		||||
            long aLongTimeBack = jobStartTime - (24 * 3600L * 1000L);
 | 
			
		||||
            long now = System.currentTimeMillis();
 | 
			
		||||
            long aFewHoursBack = now - (3600L * 1000L * protectHours);
 | 
			
		||||
            
 | 
			
		||||
            long aLongTimeBack = now - (24 * 3600L * 1000L);
 | 
			
		||||
            
 | 
			
		||||
            File tempDir = TempFileProvider.getTempDir(directoryName);
 | 
			
		||||
            int count = removeFiles(tempDir, aFewHoursBack, aLongTimeBack, false);  // don't delete this directory
 | 
			
		||||
            logger.debug("Removed " + count + " files from temp directory: " + tempDir);
 | 
			
		||||
            // done
 | 
			
		||||
            if (logger.isDebugEnabled())
 | 
			
		||||
            {
 | 
			
		||||
                logger.debug("Removed " + count + " files from temp directory: " + tempDir);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        /**
 | 
			
		||||
@@ -477,23 +429,29 @@ public class TempFileProvider
 | 
			
		||||
            }
 | 
			
		||||
            // list all files
 | 
			
		||||
            File[] files = directory.listFiles();
 | 
			
		||||
            File[] filesToIterate = files != null ? files : new File[0];
 | 
			
		||||
            int count = 0;
 | 
			
		||||
            for (File file : filesToIterate)
 | 
			
		||||
            for (File file : files)
 | 
			
		||||
            {
 | 
			
		||||
                if (shouldTheDeletionStop())
 | 
			
		||||
                {
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                if (file.isDirectory())
 | 
			
		||||
                {
 | 
			
		||||
                    // long life for this folder and its children
 | 
			
		||||
                    // OR
 | 
			
		||||
                    // enter subdirectory and clean it out and remove itsynetics
 | 
			
		||||
                    int countRemoved = removeFiles(file,
 | 
			
		||||
                        isLongLifeTempDir(file) ? longLifeBefore : removeBefore, longLifeBefore,
 | 
			
		||||
                        true);
 | 
			
		||||
                    logger.debug("Removed " + countRemoved + " files from " + (isLongLifeTempDir(file) ? "temp " : " ") + "directory: " + file);
 | 
			
		||||
                    if(isLongLifeTempDir(file))
 | 
			
		||||
                    {
 | 
			
		||||
                        // long life for this folder and its children
 | 
			
		||||
                        int countRemoved = removeFiles(file, longLifeBefore, longLifeBefore, true);  
 | 
			
		||||
                        if (logger.isDebugEnabled())
 | 
			
		||||
                        {
 | 
			
		||||
                            logger.debug("Removed " + countRemoved + " files from temp directory: " + file);
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    else
 | 
			
		||||
                    {
 | 
			
		||||
                        // enter subdirectory and clean it out and remove itsynetics
 | 
			
		||||
                        int countRemoved = removeFiles(file, removeBefore, longLifeBefore, true);
 | 
			
		||||
                        if (logger.isDebugEnabled())
 | 
			
		||||
                        {
 | 
			
		||||
                            logger.debug("Removed " + countRemoved + " files from directory: " + file);
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
@@ -506,19 +464,11 @@ public class TempFileProvider
 | 
			
		||||
                    // it is a file - attempt a delete
 | 
			
		||||
                    try
 | 
			
		||||
                    {
 | 
			
		||||
                        logger.debug("Deleting temp file: " + file);
 | 
			
		||||
                        if(logger.isDebugEnabled())
 | 
			
		||||
                        {
 | 
			
		||||
                            logger.debug("Deleting temp file: " + file);
 | 
			
		||||
                        }
 | 
			
		||||
                        file.delete();
 | 
			
		||||
 | 
			
		||||
                        if (maxFilesToDelete != null)
 | 
			
		||||
                        {
 | 
			
		||||
                            maxFilesToDelete.decrementAndGet();
 | 
			
		||||
                            logger.debug(maxFilesToDelete.get() + " files left to delete.");
 | 
			
		||||
                        }
 | 
			
		||||
                        if (maxTimeToRun != null)
 | 
			
		||||
                        {
 | 
			
		||||
                            logger.debug((jobStartTime + maxTimeToRun.toMillis() - System.currentTimeMillis()) + " millis left to delete.");
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
                        count++;
 | 
			
		||||
                    }
 | 
			
		||||
                    catch (Throwable e)
 | 
			
		||||
@@ -537,8 +487,10 @@ public class TempFileProvider
 | 
			
		||||
                    if(listing != null && listing.length == 0)
 | 
			
		||||
                    {
 | 
			
		||||
                        // directory is empty
 | 
			
		||||
                        logger.debug("Deleting empty directory: " + directory);
 | 
			
		||||
                        // ignore the limits for empty directories that just need cleanup
 | 
			
		||||
                        if(logger.isDebugEnabled())
 | 
			
		||||
                        {
 | 
			
		||||
                            logger.debug("Deleting empty directory: " + directory);
 | 
			
		||||
                        }
 | 
			
		||||
                        directory.delete();
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
@@ -547,21 +499,8 @@ public class TempFileProvider
 | 
			
		||||
                    logger.info("Failed to remove temp directory: " + directory, e);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            // done
 | 
			
		||||
            return count;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /**
 | 
			
		||||
         * Decides whether or not the job should continue iterating through the temp files and delete.
 | 
			
		||||
         * It achieves the result by checking the number of files deleted against the limit and whether
 | 
			
		||||
         * or not it is within the time limit
 | 
			
		||||
         *
 | 
			
		||||
         * @return true or false
 | 
			
		||||
         */
 | 
			
		||||
        private static boolean shouldTheDeletionStop()
 | 
			
		||||
        {
 | 
			
		||||
            return maxFilesToDelete != null && maxFilesToDelete.get() <= 0
 | 
			
		||||
                || maxTimeToRun != null && ((jobStartTime + maxTimeToRun.toMillis()) < System
 | 
			
		||||
                .currentTimeMillis());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -424,7 +424,6 @@ public abstract class AbstractAsynchronouslyRefreshedCache<T>
 | 
			
		||||
        @Override
 | 
			
		||||
        public Void call()
 | 
			
		||||
        {
 | 
			
		||||
            liveLock.writeLock().lock();
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                doCall();
 | 
			
		||||
@@ -445,10 +444,6 @@ public abstract class AbstractAsynchronouslyRefreshedCache<T>
 | 
			
		||||
                }
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
            finally
 | 
			
		||||
            {
 | 
			
		||||
                liveLock.writeLock().unlock();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private void doCall() throws Exception
 | 
			
		||||
 
 | 
			
		||||
@@ -18,10 +18,7 @@
 | 
			
		||||
 */
 | 
			
		||||
package org.alfresco.util.transaction;
 | 
			
		||||
 | 
			
		||||
import static java.util.Collections.emptyList;
 | 
			
		||||
 | 
			
		||||
import java.lang.reflect.Method;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
 | 
			
		||||
import javax.transaction.HeuristicMixedException;
 | 
			
		||||
import javax.transaction.HeuristicRollbackException;
 | 
			
		||||
@@ -39,7 +36,6 @@ import org.springframework.transaction.CannotCreateTransactionException;
 | 
			
		||||
import org.springframework.transaction.NoTransactionException;
 | 
			
		||||
import org.springframework.transaction.PlatformTransactionManager;
 | 
			
		||||
import org.springframework.transaction.TransactionDefinition;
 | 
			
		||||
import org.springframework.transaction.TransactionManager;
 | 
			
		||||
import org.springframework.transaction.TransactionStatus;
 | 
			
		||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
 | 
			
		||||
import org.springframework.transaction.interceptor.TransactionAttribute;
 | 
			
		||||
@@ -138,9 +134,7 @@ public class SpringAwareUserTransaction
 | 
			
		||||
    private long threadId = Long.MIN_VALUE;
 | 
			
		||||
    /** make sure that we clean up the thread transaction stack properly */
 | 
			
		||||
    private boolean finalized = false;
 | 
			
		||||
 | 
			
		||||
    private Collection<String> labels = emptyList();
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * Creates a user transaction that defaults to {@link TransactionDefinition#PROPAGATION_REQUIRED}.
 | 
			
		||||
     * 
 | 
			
		||||
@@ -205,21 +199,6 @@ public class SpringAwareUserTransaction
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Associate one or more labels with this transaction attribute.
 | 
			
		||||
     * <p>This may be used for applying specific transactional behavior
 | 
			
		||||
     * or follow a purely descriptive nature.
 | 
			
		||||
     */
 | 
			
		||||
    public void setLabels(Collection<String> labels) {
 | 
			
		||||
        this.labels = labels;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public Collection<String> getLabels()
 | 
			
		||||
    {
 | 
			
		||||
        return this.labels;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The {@link UserTransaction } must rollback regardless of the error.  The
 | 
			
		||||
     * {@link #rollback() rollback} behaviour is implemented by simulating a caught
 | 
			
		||||
@@ -431,15 +410,8 @@ public class SpringAwareUserTransaction
 | 
			
		||||
        // begin a transaction
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
            TransactionManager tm = getTransactionManager();
 | 
			
		||||
 | 
			
		||||
            if (tm != null && !(tm instanceof PlatformTransactionManager))
 | 
			
		||||
            {
 | 
			
		||||
                throw new IllegalStateException("Specified transaction manager is not a PlatformTransactionManager: " + tm);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            internalTxnInfo = createTransactionIfNecessary(
 | 
			
		||||
                (PlatformTransactionManager) tm, getTransactionAttribute(null, null), getName());
 | 
			
		||||
                    getTransactionManager(), getTransactionAttribute(null, null), getName());
 | 
			
		||||
        }
 | 
			
		||||
        catch (CannotCreateTransactionException e)
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (C) 2005-2020 Alfresco Software Limited.
 | 
			
		||||
 * Copyright (C) 2005-2010 Alfresco Software Limited.
 | 
			
		||||
 *
 | 
			
		||||
 * This file is part of Alfresco
 | 
			
		||||
 *
 | 
			
		||||
@@ -74,22 +74,6 @@ 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,28 +0,0 @@
 | 
			
		||||
/*
 | 
			
		||||
 * 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 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
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
@@ -1,29 +0,0 @@
 | 
			
		||||
/*
 | 
			
		||||
 * 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
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>org.alfresco</groupId>
 | 
			
		||||
        <artifactId>alfresco-community-repo</artifactId>
 | 
			
		||||
        <version>11.17</version>
 | 
			
		||||
        <version>7.183.300-TEST3</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <properties>
 | 
			
		||||
@@ -64,6 +64,7 @@
 | 
			
		||||
            </plugin>
 | 
			
		||||
            <plugin>
 | 
			
		||||
                <artifactId>maven-jar-plugin</artifactId>
 | 
			
		||||
                <version>3.2.0</version>
 | 
			
		||||
                <executions>
 | 
			
		||||
                    <execution>
 | 
			
		||||
                        <goals>
 | 
			
		||||
@@ -108,6 +109,13 @@
 | 
			
		||||
                        </lifecycleMappingMetadata>
 | 
			
		||||
                    </configuration>
 | 
			
		||||
                </plugin>
 | 
			
		||||
                <plugin>
 | 
			
		||||
                    <artifactId>maven-release-plugin</artifactId>
 | 
			
		||||
                    <configuration>
 | 
			
		||||
                        <autoVersionSubmodules>true</autoVersionSubmodules>
 | 
			
		||||
                        <tagNameFormat>@{project.version}</tagNameFormat>
 | 
			
		||||
                    </configuration>
 | 
			
		||||
                </plugin>
 | 
			
		||||
            </plugins>
 | 
			
		||||
        </pluginManagement>
 | 
			
		||||
    </build>
 | 
			
		||||
@@ -125,30 +133,12 @@
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>javax.servlet</groupId>
 | 
			
		||||
            <artifactId>javax.servlet-api</artifactId>
 | 
			
		||||
            <version>3.0.1</version>
 | 
			
		||||
            <scope>provided</scope>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <!-- Jakarta... -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>jakarta.activation</groupId>
 | 
			
		||||
            <artifactId>jakarta.activation-api</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <!-- REPO-5047 - Replaces com.sun.activation:javax.activation -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>com.sun.activation</groupId>
 | 
			
		||||
            <artifactId>jakarta.activation</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <!-- REPO-5047 - Replaces javax.annotation:javax.annotation-api -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>jakarta.annotation</groupId>
 | 
			
		||||
            <artifactId>jakarta.annotation-api</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <!-- REPO-5047 - Replaces org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>jakarta.jws</groupId>
 | 
			
		||||
            <artifactId>jakarta.jws-api</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <!--
 | 
			
		||||
            | compile dependencies
 | 
			
		||||
            -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.jibx</groupId>
 | 
			
		||||
            <artifactId>jibx-run</artifactId>
 | 
			
		||||
@@ -156,71 +146,36 @@
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency> 
 | 
			
		||||
            <groupId>com.fasterxml.jackson.core</groupId> 
 | 
			
		||||
            <artifactId>jackson-annotations</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
            <artifactId>jackson-annotations</artifactId> 
 | 
			
		||||
            <version>2.10.2</version> 
 | 
			
		||||
        </dependency> 
 | 
			
		||||
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.antlr</groupId>
 | 
			
		||||
            <artifactId>antlr</artifactId>
 | 
			
		||||
            <version>${dependency.antlr.version}</version>
 | 
			
		||||
            <version>3.5.2</version>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <!-- REPO-5047 - Replaces org.codehaus.woodstox:woodstox-core-asl -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>com.fasterxml.woodstox</groupId>
 | 
			
		||||
            <artifactId>woodstox-core</artifactId>
 | 
			
		||||
            <version>6.2.6</version>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <!-- the cxf libs were updated, see dependencyManagement section -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.apache.chemistry.opencmis</groupId>
 | 
			
		||||
            <artifactId>chemistry-opencmis-commons-impl</artifactId>
 | 
			
		||||
            <version>${dependency.opencmis.version}</version>
 | 
			
		||||
            <version>1.0.0</version>
 | 
			
		||||
            <exclusions>
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>com.sun.xml.messaging.saaj</groupId>
 | 
			
		||||
                    <artifactId>saaj-impl</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
                <!-- Duplicates classes from com.fasterxml.woodstox:woodstox-core -->
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>org.codehaus.woodstox</groupId>
 | 
			
		||||
                    <artifactId>woodstox-core-asl</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
                <!-- [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>
 | 
			
		||||
            </exclusions>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.apache.chemistry.opencmis</groupId>
 | 
			
		||||
            <artifactId>chemistry-opencmis-server-bindings</artifactId>
 | 
			
		||||
            <version>${dependency.opencmis.version}</version>
 | 
			
		||||
            <version>1.0.0</version>
 | 
			
		||||
            <exclusions>
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>commons-lang</groupId>
 | 
			
		||||
                    <artifactId>commons-lang3</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
                <!-- Duplicates classes from jakarta.jws:jakarta.jws-api -->
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>org.apache.geronimo.specs</groupId>
 | 
			
		||||
                    <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
                <!-- Duplicates classes from jakarta.transaction:jakarta.transaction-api -->
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>org.apache.geronimo.specs</groupId>
 | 
			
		||||
                    <artifactId>geronimo-jta_1.1_spec</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
                <!-- Duplicates classes from jakarta.annotation:jakarta.annotation-api -->
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>javax.annotation</groupId>
 | 
			
		||||
                    <artifactId>javax.annotation-api</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
                <!-- Duplicates classes from com.sun.activation:jakarta.activation -->
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>com.sun.activation</groupId>
 | 
			
		||||
                    <artifactId>javax.activation</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
            </exclusions>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <!-- This is now deployed at:
 | 
			
		||||
@@ -239,6 +194,7 @@
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>xerces</groupId>
 | 
			
		||||
            <artifactId>xercesImpl</artifactId>
 | 
			
		||||
            <version>2.12.0-alfresco-patched-20191004</version>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <!-- Tika -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
@@ -263,26 +219,6 @@
 | 
			
		||||
                    <groupId>asm</groupId>
 | 
			
		||||
                    <artifactId>asm</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
                <!-- Duplicates classes from jakarta.jws:jakarta.jws-api -->
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>org.apache.geronimo.specs</groupId>
 | 
			
		||||
                    <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
                <!-- Duplicates classes from jakarta.transaction:jakarta.transaction-api -->
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>org.apache.geronimo.specs</groupId>
 | 
			
		||||
                    <artifactId>geronimo-jta_1.1_spec</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
                <!-- Duplicates classes from jakarta.annotation:jakarta.annotation-api -->
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>javax.annotation</groupId>
 | 
			
		||||
                    <artifactId>javax.annotation-api</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
                <!-- Duplicates classes from com.sun.activation:jakarta.activation -->
 | 
			
		||||
                <exclusion>
 | 
			
		||||
                    <groupId>com.sun.activation</groupId>
 | 
			
		||||
                    <artifactId>javax.activation</artifactId>
 | 
			
		||||
                </exclusion>
 | 
			
		||||
            </exclusions>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
@@ -290,16 +226,19 @@
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>junit</groupId>
 | 
			
		||||
            <artifactId>junit</artifactId>
 | 
			
		||||
            <version>4.13</version>
 | 
			
		||||
            <scope>test</scope>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.antlr</groupId>
 | 
			
		||||
            <artifactId>gunit</artifactId>
 | 
			
		||||
             <scope>test</scope>
 | 
			
		||||
            <version>3.5.2</version>
 | 
			
		||||
            <scope>test</scope>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.mockito</groupId>
 | 
			
		||||
            <artifactId>mockito-core</artifactId>
 | 
			
		||||
            <version>3.2.4</version>
 | 
			
		||||
            <scope>test</scope>
 | 
			
		||||
        </dependency>
 | 
			
		||||
    </dependencies>
 | 
			
		||||
 
 | 
			
		||||
@@ -28,8 +28,8 @@ package org.alfresco.opencmis.dictionary;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
 | 
			
		||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneIn(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneInequality(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<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.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
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.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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<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.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserExpressionAdaptor;
 | 
			
		||||
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.impl.querymodel.PredicateMode;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -50,33 +50,33 @@ public class BaseLuceneBuilder implements CMISPropertyLuceneBuilder
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E 
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneIn(QueryParserAdaptor<Q, S, E> lqpa, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneIn(LuceneQueryParserAdaptor<Q, S, E> lqpa, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserExpressionAdaptor<Q, E> expressionAdaptor = lqpa.getExpressionAdaptor();
 | 
			
		||||
        LuceneQueryParserExpressionAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneInequality(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLike(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<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.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
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.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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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(QueryParserAdaptor<Q, S, E> lqpa) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<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.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneIn(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneInequality(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa)
 | 
			
		||||
    public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<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.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
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.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(QueryParserAdaptor<Q, S, E> lqpa)
 | 
			
		||||
    private <Q, S, E extends Throwable> StoreRef getStore(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value)
 | 
			
		||||
    private <Q, S, E extends Throwable> String getValueAsString(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
 | 
			
		||||
                                                                LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
 | 
			
		||||
                                                                        LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
 | 
			
		||||
                                                             LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
 | 
			
		||||
                                                                     LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa)
 | 
			
		||||
    public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<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.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
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.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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
 | 
			
		||||
                                                             LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
 | 
			
		||||
                                                                LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
 | 
			
		||||
                                                                        LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
 | 
			
		||||
                                                               LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneInequality(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
 | 
			
		||||
                                                             LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
 | 
			
		||||
                                                                     LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa)
 | 
			
		||||
    public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<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.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
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.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(QueryParserAdaptor<Q, S, E> lqpa)
 | 
			
		||||
    private <Q, S, E extends Throwable> StoreRef getStore(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value)
 | 
			
		||||
    private <Q, S, E extends Throwable> String getValueAsString(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, PredicateMode mode,
 | 
			
		||||
                                                             LuceneFunction luceneFunction) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, Serializable value, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa)
 | 
			
		||||
    public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<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.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.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.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryConstants;
 | 
			
		||||
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.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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
 | 
			
		||||
                                                             PredicateMode mode, LuceneFunction luceneFunction) 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
 | 
			
		||||
    {
 | 
			
		||||
        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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Boolean not) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
 | 
			
		||||
                                                                PredicateMode mode, LuceneFunction luceneFunction) 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
 | 
			
		||||
    {
 | 
			
		||||
        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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
 | 
			
		||||
                                                                        PredicateMode mode, LuceneFunction luceneFunction) 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
 | 
			
		||||
    {
 | 
			
		||||
        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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Collection<Serializable> values,
 | 
			
		||||
                                                       Boolean not, PredicateMode mode) 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
 | 
			
		||||
    {
 | 
			
		||||
        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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
 | 
			
		||||
                                                               PredicateMode mode, LuceneFunction luceneFunction) 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
 | 
			
		||||
    {
 | 
			
		||||
        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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
 | 
			
		||||
                                                             PredicateMode mode, LuceneFunction luceneFunction) 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
 | 
			
		||||
    {
 | 
			
		||||
        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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value,
 | 
			
		||||
                                                                     PredicateMode mode, LuceneFunction luceneFunction) 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
 | 
			
		||||
    {
 | 
			
		||||
        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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, Boolean not)
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName) throws E
 | 
			
		||||
    public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName) throws E
 | 
			
		||||
    {
 | 
			
		||||
        PropertyDefinitionWrapper propertyDef = cmisDictionaryService.findProperty(propertyName);
 | 
			
		||||
        return propertyDef.getPropertyLuceneBuilder().getLuceneSortField(lqpa);
 | 
			
		||||
 
 | 
			
		||||
@@ -31,9 +31,6 @@ import org.alfresco.service.cmr.repository.ContentIOException;
 | 
			
		||||
import org.alfresco.service.cmr.repository.ContentReader;
 | 
			
		||||
import org.alfresco.service.cmr.repository.ContentStreamListener;
 | 
			
		||||
import org.alfresco.service.cmr.repository.ContentWriter;
 | 
			
		||||
import org.alfresco.service.cmr.repository.DirectAccessUrl;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Provides low-level retrieval of content
 | 
			
		||||
@@ -238,29 +235,4 @@ public interface ContentStore
 | 
			
		||||
     *      if an IO error occurs
 | 
			
		||||
     */
 | 
			
		||||
    public boolean delete(String contentUrl);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Gets a presigned URL to directly access a binary content. It is up to the actual store
 | 
			
		||||
     * implementation if it can fulfil this request with an expiry time or not.
 | 
			
		||||
     *
 | 
			
		||||
     * @param contentUrl A content store URL
 | 
			
		||||
     * @param expiresAt An optional expiry date, so the direct access url would become invalid when the expiry date is reached
 | 
			
		||||
     * @return A direct access URL object for a binary content
 | 
			
		||||
     * @throws UnsupportedOperationException if the store is unable to provide the information
 | 
			
		||||
     */
 | 
			
		||||
    default DirectAccessUrl getDirectAccessUrl(String contentUrl, Date expiresAt)
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException(
 | 
			
		||||
            "Retrieving direct access URLs is not supported by this content store.");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Checks if the store supports the retrieving of direct access URLs.
 | 
			
		||||
     *
 | 
			
		||||
     * @return true if direct access URLs retrieving is supported, false otherwise
 | 
			
		||||
     */
 | 
			
		||||
    default boolean isDirectAccessSupported()
 | 
			
		||||
    {
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -662,6 +662,7 @@ public class MimetypeMap implements MimetypeService
 | 
			
		||||
        boolean successReadingConfig = true;
 | 
			
		||||
        if (jsonConfigFileFinder != null)
 | 
			
		||||
        {
 | 
			
		||||
            // This should not be "alfresco/mimetype" which is used for the in JVM jodconverter
 | 
			
		||||
            successReadingConfig &= jsonConfigFileFinder.readFiles("alfresco/mimetypes", logger);
 | 
			
		||||
            if (mimetypeJsonConfigDir != null && !mimetypeJsonConfigDir.isBlank())
 | 
			
		||||
            {
 | 
			
		||||
@@ -876,6 +877,11 @@ public class MimetypeMap implements MimetypeService
 | 
			
		||||
     */
 | 
			
		||||
    private MediaType detectType(String filename, ContentReader reader)
 | 
			
		||||
    {
 | 
			
		||||
//        Metadata metadata = new Metadata();
 | 
			
		||||
//        if (filename != null)
 | 
			
		||||
//        {
 | 
			
		||||
//            metadata.add(Metadata.RESOURCE_NAME_KEY, filename);
 | 
			
		||||
//        }
 | 
			
		||||
        TikaInputStream inp = null;
 | 
			
		||||
        try
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
@@ -117,6 +117,12 @@ public class CustomModelDefinitionImpl implements CustomModelDefinition
 | 
			
		||||
        return this.active;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String getAnalyserResourceBundleName()
 | 
			
		||||
    {
 | 
			
		||||
        return m2ModelDefinition.getAnalyserResourceBundleName();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String getAuthor()
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -280,6 +280,11 @@ public interface DictionaryDAO extends ModelQuery
 | 
			
		||||
    // MT-specific
 | 
			
		||||
    boolean isModelInherited(QName name);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @return String
 | 
			
		||||
     */
 | 
			
		||||
    String getDefaultAnalyserResourceBundleName();
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @return ClassLoader
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -101,6 +101,18 @@ 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,6 +234,15 @@ 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,6 +270,19 @@ 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,6 +206,8 @@ import org.alfresco.util.EqualsHelper;
 | 
			
		||||
                defaultAspectNames.add(name);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        this.analyserResourceBundleName = m2Class.getAnalyserResourceBundleName();
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    @Override
 | 
			
		||||
@@ -759,6 +761,15 @@ 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,50 +40,86 @@ 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,6 +67,7 @@ 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();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -145,9 +146,108 @@ 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,6 +469,21 @@ 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,6 +55,7 @@ public class M2ModelDefinition implements ModelDefinition
 | 
			
		||||
    {
 | 
			
		||||
        this.name = QName.createQName(model.getName(), resolver);
 | 
			
		||||
        this.model = model;
 | 
			
		||||
        this.analyserResourceBundleName = model.getAnalyserResourceBundleName();
 | 
			
		||||
        this.dictionaryDAO = dictionaryDAO;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -174,6 +175,17 @@ 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,6 +312,20 @@ public class M2Property
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @return String
 | 
			
		||||
     */
 | 
			
		||||
    public String getAnalyserResourceBundleName()
 | 
			
		||||
    {
 | 
			
		||||
        return analyserResourceBundleName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public void setAnalyserResourceBundleName(String analyserResourceBundleName)
 | 
			
		||||
    {
 | 
			
		||||
        this.analyserResourceBundleName = analyserResourceBundleName;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public void setConfigProperties(Properties configProperties)
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -78,6 +78,7 @@ 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();
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
@@ -551,43 +552,19 @@ import org.springframework.util.StringUtils;
 | 
			
		||||
        // check mandatory
 | 
			
		||||
        if (isMandatory() != propDef.isMandatory())
 | 
			
		||||
        { 
 | 
			
		||||
            // Change from mandatory to NON mandatory is an incremental change
 | 
			
		||||
            if (isMandatory() && !propDef.isMandatory())
 | 
			
		||||
            {
 | 
			
		||||
                isUpdatedIncrementally = true;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                isUpdated = true;
 | 
			
		||||
            }
 | 
			
		||||
            isUpdated = true;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        // check mandatory enforced
 | 
			
		||||
        if (isMandatoryEnforced() != propDef.isMandatoryEnforced())
 | 
			
		||||
        {
 | 
			
		||||
            // Change from mandatory enforced to NON mandatory enforced is an incremental change
 | 
			
		||||
            if (isMandatoryEnforced() && ! propDef.isMandatoryEnforced())
 | 
			
		||||
            {
 | 
			
		||||
                isUpdatedIncrementally = true;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                isUpdated = true;
 | 
			
		||||
            }
 | 
			
		||||
        { 
 | 
			
		||||
            isUpdated = true;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        // check protected
 | 
			
		||||
        if (isProtected() != propDef.isProtected())
 | 
			
		||||
        {
 | 
			
		||||
            // Change from protected to NON protected is an incremental change
 | 
			
		||||
            if (isProtected() && !propDef.isProtected())
 | 
			
		||||
            {
 | 
			
		||||
                isUpdatedIncrementally = true;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                isUpdated = true;
 | 
			
		||||
            }
 | 
			
		||||
        { 
 | 
			
		||||
            isUpdated = true;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        //
 | 
			
		||||
@@ -688,4 +665,119 @@ 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" usage="optional"/>
 | 
			
		||||
               <value name="default-analyser-class" field="defaultAnalyserClassName"/>
 | 
			
		||||
               <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;
 | 
			
		||||
package org.alfresco.repo.search.adaptor.lucene;
 | 
			
		||||
 | 
			
		||||
public enum AnalysisMode
 | 
			
		||||
{
 | 
			
		||||
@@ -24,7 +24,7 @@
 | 
			
		||||
 * #L%
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package org.alfresco.repo.search.adaptor;
 | 
			
		||||
package org.alfresco.repo.search.adaptor.lucene;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 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;
 | 
			
		||||
package org.alfresco.repo.search.adaptor.lucene;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@@ -33,8 +33,8 @@ import org.alfresco.service.cmr.dictionary.PropertyDefinition;
 | 
			
		||||
import org.alfresco.service.cmr.search.SearchParameters;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Adaptor class to wrap search parser implementations and encapsulate changes between search versions of query
 | 
			
		||||
 * building.
 | 
			
		||||
 * Adaptor class principally to wrap lucene parser implementations and encapsulate changes between lucene 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 QueryParserAdaptor<Q, S, E extends Throwable>
 | 
			
		||||
public interface LuceneQueryParserAdaptor<Q, S, E extends Throwable>
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -215,9 +215,9 @@ public interface QueryParserAdaptor<Q, S, E extends Throwable>
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * Utility to build conjunctions, disjunctions and negation
 | 
			
		||||
     * @return QueryParserExpressionAdaptor
 | 
			
		||||
     * @return LuceneQueryParserExpressionAdaptor
 | 
			
		||||
     */
 | 
			
		||||
    QueryParserExpressionAdaptor<Q, E> getExpressionAdaptor();
 | 
			
		||||
    LuceneQueryParserExpressionAdaptor<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;
 | 
			
		||||
package org.alfresco.repo.search.adaptor.lucene;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @author Andy
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public interface QueryParserExpressionAdaptor<Q, E extends Throwable>
 | 
			
		||||
public interface LuceneQueryParserExpressionAdaptor<Q, E extends Throwable>
 | 
			
		||||
{
 | 
			
		||||
    public void addRequired(Q q) throws E;
 | 
			
		||||
    public void addExcluded(Q q) throws E;
 | 
			
		||||
@@ -23,7 +23,7 @@
 | 
			
		||||
 * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 * #L%
 | 
			
		||||
 */
 | 
			
		||||
package org.alfresco.repo.search.adaptor;
 | 
			
		||||
package org.alfresco.repo.search.adaptor.lucene;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This class defines 
 | 
			
		||||
@@ -181,24 +181,6 @@ public interface QueryConstants
 | 
			
		||||
    
 | 
			
		||||
    public static final String FIELD_SOLR_NOLOCALE_TOKENISED_SUFFIX = ".__";
 | 
			
		||||
 | 
			
		||||
    public static final String FIELD_SOLR_UNIT_OF_TIME_SECOND_SUFFIX = "_unit_of_time_second";
 | 
			
		||||
 | 
			
		||||
    public static final String FIELD_SOLR_UNIT_OF_TIME_MINUTE_SUFFIX = "_unit_of_time_minute";
 | 
			
		||||
 | 
			
		||||
    public static final String FIELD_SOLR_UNIT_OF_TIME_HOUR_SUFFIX = "_unit_of_time_hour";
 | 
			
		||||
 | 
			
		||||
    public static final String FIELD_SOLR_UNIT_OF_TIME_DAY_SUFFIX = "_unit_of_time_day_of_month";
 | 
			
		||||
 | 
			
		||||
    public static final String FIELD_SOLR_UNIT_OF_TIME_DAY_OF_WEEK_SUFFIX = "_unit_of_time_day_of_week";
 | 
			
		||||
 | 
			
		||||
    public static final String FIELD_SOLR_UNIT_OF_TIME_DAY_OF_YEAR_SUFFIX = "_unit_of_time_day_of_year";
 | 
			
		||||
 | 
			
		||||
    public static final String FIELD_SOLR_UNIT_OF_TIME_MONTH_SUFFIX = "_unit_of_time_month";
 | 
			
		||||
 | 
			
		||||
    public static final String FIELD_SOLR_UNIT_OF_TIME_QUARTER_SUFFIX = "_unit_of_time_quarter";
 | 
			
		||||
    
 | 
			
		||||
    public static final String FIELD_SOLR_UNIT_OF_TIME_YEAR_SUFFIX = "_unit_of_time_year";
 | 
			
		||||
 | 
			
		||||
    public static final String FIELD_SITE = "SITE";
 | 
			
		||||
    
 | 
			
		||||
    public static final String FIELD_GEO = "GEO";
 | 
			
		||||
@@ -27,7 +27,7 @@ package org.alfresco.repo.search.impl;
 | 
			
		||||
 | 
			
		||||
import java.util.HashSet;
 | 
			
		||||
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryConstants;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.QueryConstants;
 | 
			
		||||
import org.alfresco.service.cmr.dictionary.AspectDefinition;
 | 
			
		||||
import org.alfresco.service.cmr.dictionary.ClassDefinition;
 | 
			
		||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
 | 
			
		||||
@@ -384,51 +384,6 @@ public class QueryParserUtils implements QueryConstants
 | 
			
		||||
            propertyFieldName = field.substring(field.startsWith("@") ? 1 : 0, field.length() - FIELD_SOLR_NOLOCALE_TOKENISED_SUFFIX.length());
 | 
			
		||||
            ending = FIELD_SOLR_NOLOCALE_TOKENISED_SUFFIX;
 | 
			
		||||
        }
 | 
			
		||||
        else if (field.endsWith(FIELD_SOLR_UNIT_OF_TIME_SECOND_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            propertyFieldName = field.substring(field.startsWith("@") ? 1 : 0, field.length() - FIELD_SOLR_UNIT_OF_TIME_SECOND_SUFFIX.length());
 | 
			
		||||
            ending = FIELD_SOLR_UNIT_OF_TIME_SECOND_SUFFIX;
 | 
			
		||||
        }
 | 
			
		||||
        else if (field.endsWith(FIELD_SOLR_UNIT_OF_TIME_MINUTE_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            propertyFieldName = field.substring(field.startsWith("@") ? 1 : 0, field.length() - FIELD_SOLR_UNIT_OF_TIME_MINUTE_SUFFIX.length());
 | 
			
		||||
            ending = FIELD_SOLR_UNIT_OF_TIME_MINUTE_SUFFIX;
 | 
			
		||||
        }
 | 
			
		||||
        else if (field.endsWith(FIELD_SOLR_UNIT_OF_TIME_HOUR_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            propertyFieldName = field.substring(field.startsWith("@") ? 1 : 0, field.length() - FIELD_SOLR_UNIT_OF_TIME_HOUR_SUFFIX.length());
 | 
			
		||||
            ending = FIELD_SOLR_UNIT_OF_TIME_HOUR_SUFFIX;
 | 
			
		||||
        }
 | 
			
		||||
        else if (field.endsWith(FIELD_SOLR_UNIT_OF_TIME_DAY_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            propertyFieldName = field.substring(field.startsWith("@") ? 1 : 0, field.length() - FIELD_SOLR_UNIT_OF_TIME_DAY_SUFFIX.length());
 | 
			
		||||
            ending = FIELD_SOLR_UNIT_OF_TIME_DAY_SUFFIX;
 | 
			
		||||
        }
 | 
			
		||||
        else if (field.endsWith(FIELD_SOLR_UNIT_OF_TIME_DAY_OF_WEEK_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            propertyFieldName = field.substring(field.startsWith("@") ? 1 : 0, field.length() - FIELD_SOLR_UNIT_OF_TIME_DAY_OF_WEEK_SUFFIX.length());
 | 
			
		||||
            ending = FIELD_SOLR_UNIT_OF_TIME_DAY_OF_WEEK_SUFFIX;
 | 
			
		||||
        }
 | 
			
		||||
        else if (field.endsWith(FIELD_SOLR_UNIT_OF_TIME_DAY_OF_YEAR_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            propertyFieldName = field.substring(field.startsWith("@") ? 1 : 0, field.length() - FIELD_SOLR_UNIT_OF_TIME_DAY_OF_YEAR_SUFFIX.length());
 | 
			
		||||
            ending = FIELD_SOLR_UNIT_OF_TIME_DAY_OF_YEAR_SUFFIX;
 | 
			
		||||
        }
 | 
			
		||||
        else if (field.endsWith(FIELD_SOLR_UNIT_OF_TIME_MONTH_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            propertyFieldName = field.substring(field.startsWith("@") ? 1 : 0, field.length() - FIELD_SOLR_UNIT_OF_TIME_MONTH_SUFFIX.length());
 | 
			
		||||
            ending = FIELD_SOLR_UNIT_OF_TIME_MONTH_SUFFIX;
 | 
			
		||||
        }
 | 
			
		||||
        else if (field.endsWith(FIELD_SOLR_UNIT_OF_TIME_QUARTER_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            propertyFieldName = field.substring(field.startsWith("@") ? 1 : 0, field.length() - FIELD_SOLR_UNIT_OF_TIME_QUARTER_SUFFIX.length());
 | 
			
		||||
            ending = FIELD_SOLR_UNIT_OF_TIME_QUARTER_SUFFIX;
 | 
			
		||||
        }
 | 
			
		||||
        else if (field.endsWith(FIELD_SOLR_UNIT_OF_TIME_YEAR_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            propertyFieldName = field.substring(field.startsWith("@") ? 1 : 0, field.length() - FIELD_SOLR_UNIT_OF_TIME_YEAR_SUFFIX.length());
 | 
			
		||||
            ending = FIELD_SOLR_UNIT_OF_TIME_YEAR_SUFFIX;
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            propertyFieldName = field.substring(field.startsWith("@") ? 1 : 0);
 | 
			
		||||
 
 | 
			
		||||
@@ -31,9 +31,9 @@ import java.util.HashSet;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
import org.alfresco.repo.dictionary.IndexTokenisationMode;
 | 
			
		||||
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.adaptor.lucene.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) 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
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public  <Q, S, E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Boolean not) throws E
 | 
			
		||||
    public  <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Boolean not) throws E
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public  <Q, S, E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) 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
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public  <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
 | 
			
		||||
    public  <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Collection<Serializable> values, Boolean not, PredicateMode mode) 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
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public  <Q, S, E extends Throwable> Q buildLuceneInequality(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) 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
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public  <Q, S, E extends Throwable> Q buildLuceneLessThan(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) 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
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public  <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
 | 
			
		||||
    public  <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, Boolean not) throws E
 | 
			
		||||
    public  <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, Boolean not) throws E
 | 
			
		||||
    {
 | 
			
		||||
        throw new UnsupportedOperationException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public  <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa, String propertyName) throws E
 | 
			
		||||
    public  <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<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 QueryParserAdaptor<Q, S, E>
 | 
			
		||||
     * @param lqpa LuceneQueryParserAdaptor<Q, S, E>
 | 
			
		||||
     * @param field String
 | 
			
		||||
     * @return ... extends Throwable
 | 
			
		||||
     * @throws E 
 | 
			
		||||
     */
 | 
			
		||||
    private  <Q, S, E extends Throwable> String findSortField(QueryParserAdaptor<Q, S, E> lqpa, String field) throws E
 | 
			
		||||
    private  <Q, S, E extends Throwable> String findSortField(LuceneQueryParserAdaptor<Q, S, E> lqpa, String field) throws E
 | 
			
		||||
    {
 | 
			
		||||
        return lqpa.getSortField(field);
 | 
			
		||||
    }
 | 
			
		||||
@@ -499,129 +499,6 @@ public class AlfrescoFunctionEvaluationContext implements FunctionEvaluationCont
 | 
			
		||||
                return propertyField;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if(field.endsWith(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_SECOND_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            QName propertyField = QName.createQName(field.substring(0, field.length() - QueryConstants.FIELD_SOLR_UNIT_OF_TIME_SECOND_SUFFIX.length()));
 | 
			
		||||
            PropertyDefinition propertyDef = dictionaryService.getProperty(propertyField);
 | 
			
		||||
            if (!propertyDef.getDataType().getName().equals(DataTypeDefinition.DATETIME))
 | 
			
		||||
            {
 | 
			
		||||
                throw new FTSQueryException(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_SECOND_SUFFIX+" only supported on datetime properties");
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                return propertyField;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if(field.endsWith(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_MINUTE_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            QName propertyField = QName.createQName(field.substring(0, field.length() - QueryConstants.FIELD_SOLR_UNIT_OF_TIME_MINUTE_SUFFIX.length()));
 | 
			
		||||
            PropertyDefinition propertyDef = dictionaryService.getProperty(propertyField);
 | 
			
		||||
            if (!propertyDef.getDataType().getName().equals(DataTypeDefinition.DATETIME))
 | 
			
		||||
            {
 | 
			
		||||
                throw new FTSQueryException(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_MINUTE_SUFFIX+" only supported on datetime properties");
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                return propertyField;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if(field.endsWith(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_HOUR_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            QName propertyField = QName.createQName(field.substring(0, field.length() - QueryConstants.FIELD_SOLR_UNIT_OF_TIME_HOUR_SUFFIX.length()));
 | 
			
		||||
            PropertyDefinition propertyDef = dictionaryService.getProperty(propertyField);
 | 
			
		||||
            if (!propertyDef.getDataType().getName().equals(DataTypeDefinition.DATETIME))
 | 
			
		||||
            {
 | 
			
		||||
                throw new FTSQueryException(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_HOUR_SUFFIX+" only supported on datetime properties");
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                return propertyField;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if(field.endsWith(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_DAY_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            QName propertyField = QName.createQName(field.substring(0, field.length() - QueryConstants.FIELD_SOLR_UNIT_OF_TIME_DAY_SUFFIX.length()));
 | 
			
		||||
            PropertyDefinition propertyDef = dictionaryService.getProperty(propertyField);
 | 
			
		||||
            if (!propertyDef.getDataType().getName().equals(DataTypeDefinition.DATE) &&
 | 
			
		||||
                    !propertyDef.getDataType().getName().equals(DataTypeDefinition.DATETIME))
 | 
			
		||||
            {
 | 
			
		||||
                throw new FTSQueryException(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_DAY_SUFFIX+" only supported on date and datetime properties");
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                return propertyField;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if(field.endsWith(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_DAY_OF_WEEK_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            QName propertyField = QName.createQName(field.substring(0, field.length() - QueryConstants.FIELD_SOLR_UNIT_OF_TIME_DAY_OF_WEEK_SUFFIX.length()));
 | 
			
		||||
            PropertyDefinition propertyDef = dictionaryService.getProperty(propertyField);
 | 
			
		||||
            if (!propertyDef.getDataType().getName().equals(DataTypeDefinition.DATE) &&
 | 
			
		||||
                    !propertyDef.getDataType().getName().equals(DataTypeDefinition.DATETIME))
 | 
			
		||||
            {
 | 
			
		||||
                throw new FTSQueryException(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_DAY_OF_WEEK_SUFFIX+" only supported on date and datetime properties");
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                return propertyField;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if(field.endsWith(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_DAY_OF_YEAR_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            QName propertyField = QName.createQName(field.substring(0, field.length() - QueryConstants.FIELD_SOLR_UNIT_OF_TIME_DAY_OF_YEAR_SUFFIX.length()));
 | 
			
		||||
            PropertyDefinition propertyDef = dictionaryService.getProperty(propertyField);
 | 
			
		||||
            if (!propertyDef.getDataType().getName().equals(DataTypeDefinition.DATE) &&
 | 
			
		||||
                    !propertyDef.getDataType().getName().equals(DataTypeDefinition.DATETIME))
 | 
			
		||||
            {
 | 
			
		||||
                throw new FTSQueryException(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_DAY_OF_YEAR_SUFFIX+" only supported on date and datetime properties");
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                return propertyField;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if(field.endsWith(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_MONTH_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            QName propertyField = QName.createQName(field.substring(0, field.length() - QueryConstants.FIELD_SOLR_UNIT_OF_TIME_MONTH_SUFFIX.length()));
 | 
			
		||||
            PropertyDefinition propertyDef = dictionaryService.getProperty(propertyField);
 | 
			
		||||
            if (!propertyDef.getDataType().getName().equals(DataTypeDefinition.DATE) &&
 | 
			
		||||
                    !propertyDef.getDataType().getName().equals(DataTypeDefinition.DATETIME))
 | 
			
		||||
            {
 | 
			
		||||
                throw new FTSQueryException(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_MONTH_SUFFIX+" only supported on date and datetime properties");
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                return propertyField;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if(field.endsWith(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_QUARTER_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            QName propertyField = QName.createQName(field.substring(0, field.length() - QueryConstants.FIELD_SOLR_UNIT_OF_TIME_QUARTER_SUFFIX.length()));
 | 
			
		||||
            PropertyDefinition propertyDef = dictionaryService.getProperty(propertyField);
 | 
			
		||||
            if (!propertyDef.getDataType().getName().equals(DataTypeDefinition.DATE) &&
 | 
			
		||||
                    !propertyDef.getDataType().getName().equals(DataTypeDefinition.DATETIME))
 | 
			
		||||
            {
 | 
			
		||||
                throw new FTSQueryException(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_QUARTER_SUFFIX+" only supported on date and datetime properties");
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                return propertyField;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if(field.endsWith(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_YEAR_SUFFIX))
 | 
			
		||||
        {
 | 
			
		||||
            QName propertyField = QName.createQName(field.substring(0, field.length() - QueryConstants.FIELD_SOLR_UNIT_OF_TIME_YEAR_SUFFIX.length()));
 | 
			
		||||
            PropertyDefinition propertyDef = dictionaryService.getProperty(propertyField);
 | 
			
		||||
            if (!propertyDef.getDataType().getName().equals(DataTypeDefinition.DATE) &&
 | 
			
		||||
                    !propertyDef.getDataType().getName().equals(DataTypeDefinition.DATETIME))
 | 
			
		||||
            {
 | 
			
		||||
                throw new FTSQueryException(QueryConstants.FIELD_SOLR_UNIT_OF_TIME_YEAR_SUFFIX+" only supported on date and datetime properties");
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                return propertyField;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            return qname;
 | 
			
		||||
 
 | 
			
		||||
@@ -32,7 +32,7 @@ import java.util.LinkedList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
import org.alfresco.repo.search.adaptor.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.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.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) 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;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Boolean not) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) 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;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @param propertyName String
 | 
			
		||||
@@ -108,7 +108,7 @@ public interface FunctionEvaluationContext
 | 
			
		||||
     * @return the query
 | 
			
		||||
     * @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;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) 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;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @param propertyName String
 | 
			
		||||
@@ -128,7 +128,7 @@ public interface FunctionEvaluationContext
 | 
			
		||||
     * @return the query
 | 
			
		||||
     * @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;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, Boolean not) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) 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;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 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(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Collection<Serializable> values, Boolean not, PredicateMode mode) 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;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @param propertyName String
 | 
			
		||||
     * @return the field used for sorting the given property
 | 
			
		||||
     * @throws E 
 | 
			
		||||
     */
 | 
			
		||||
    public <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q, S, E> lqpa, String propertyName) throws E;
 | 
			
		||||
    public <Q, S, E extends Throwable> String getLuceneSortField(LuceneQueryParserAdaptor<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.QueryParserExpressionAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserExpressionAdaptor;
 | 
			
		||||
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.QueryBuilderContext,
 | 
			
		||||
     *      java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext,
 | 
			
		||||
     *      org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
 | 
			
		||||
     */
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
       
 | 
			
		||||
        QueryParserExpressionAdaptor<Q, E> expressionAdaptor = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
 | 
			
		||||
        LuceneQueryParserExpressionAdaptor<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.QueryParserExpressionAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserExpressionAdaptor;
 | 
			
		||||
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.QueryBuilderContext,
 | 
			
		||||
     *      java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext,
 | 
			
		||||
     *      org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
 | 
			
		||||
     */
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserExpressionAdaptor<Q, E> expressionBuilder = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
 | 
			
		||||
        LuceneQueryParserExpressionAdaptor<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:
 | 
			
		||||
                        QueryParserExpressionAdaptor<Q, E> subExpressionBuilder = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
 | 
			
		||||
                        LuceneQueryParserExpressionAdaptor<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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<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.QueryParserExpressionAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserExpressionAdaptor;
 | 
			
		||||
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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
 | 
			
		||||
    public Q buildQuery(Set<String> selectors, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserExpressionAdaptor<Q, E> expressionBuilder = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
 | 
			
		||||
        LuceneQueryParserExpressionAdaptor<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.QueryBuilderContext,
 | 
			
		||||
     *      org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext,
 | 
			
		||||
     *      org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
 | 
			
		||||
     */
 | 
			
		||||
    public S buildSort(Set<String> selectors, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
 | 
			
		||||
    public S buildSort(Set<String> selectors, LuceneQueryBuilderContext<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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public List<SortDefinition> buildSortDefinitions(Set<String> selectors, LuceneQueryBuilderContext<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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E;
 | 
			
		||||
    public Q buildQuery(Set<String> selectors,  LuceneQueryBuilderContext<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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E;
 | 
			
		||||
    public S buildSort(Set<String> selectors, LuceneQueryBuilderContext<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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext);
 | 
			
		||||
    public List<SortDefinition> buildSortDefinitions(Set<String> selectors, LuceneQueryBuilderContext<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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E;
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -25,20 +25,20 @@
 | 
			
		||||
 */
 | 
			
		||||
package org.alfresco.repo.search.impl.querymodel.impl.lucene;
 | 
			
		||||
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
import org.alfresco.service.namespace.NamespacePrefixResolver;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @author Andy
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public interface QueryBuilderContext<Q, S, E extends Throwable>
 | 
			
		||||
public interface LuceneQueryBuilderContext<Q, S, E extends Throwable>
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @return - the parser
 | 
			
		||||
     */
 | 
			
		||||
    public abstract QueryParserAdaptor<Q, S, E> getLuceneQueryParserAdaptor();
 | 
			
		||||
    public abstract LuceneQueryParserAdaptor<Q, S, E> getLuceneQueryParserAdaptor();
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @return - the namespace prefix resolver
 | 
			
		||||
@@ -28,9 +28,10 @@ package org.alfresco.repo.search.impl.querymodel.impl.lucene;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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;
 | 
			
		||||
 | 
			
		||||
@@ -53,9 +54,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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext) throws E
 | 
			
		||||
    {
 | 
			
		||||
    	QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
    	LuceneQueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
    	switch(getJoinType())
 | 
			
		||||
    	{
 | 
			
		||||
    	case INNER:
 | 
			
		||||
 
 | 
			
		||||
@@ -29,14 +29,14 @@ import java.util.ArrayList;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryConstants;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
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(QueryBuilderContext<Q, S, E> luceneContext)
 | 
			
		||||
    private StoreRef getStore(LuceneQueryBuilderContext<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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryConstants;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
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(QueryBuilderContext<Q, S, E> luceneContext)
 | 
			
		||||
    private StoreRef getStore(LuceneQueryBuilderContext<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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
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.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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
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.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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.LuceneFunction;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
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.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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.AnalysisMode;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @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.QueryBuilderContext,
 | 
			
		||||
     * java.util.Map, org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext,
 | 
			
		||||
     * org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
 | 
			
		||||
     */
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<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.QueryParserAdaptor;
 | 
			
		||||
import org.alfresco.repo.search.adaptor.lucene.LuceneQueryParserAdaptor;
 | 
			
		||||
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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @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, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        QueryParserAdaptor<Q, S, E> lqpa = luceneContext.getLuceneQueryParserAdaptor();
 | 
			
		||||
        LuceneQueryParserAdaptor<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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @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.QueryBuilderContext, 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.LuceneQueryBuilderContext, org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
 | 
			
		||||
     */
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @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.QueryBuilderContext, 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.LuceneQueryBuilderContext, org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
 | 
			
		||||
     */
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<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.QueryBuilderContext;
 | 
			
		||||
import org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQueryBuilderContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @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.QueryBuilderContext, 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.LuceneQueryBuilderContext, org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
 | 
			
		||||
     */
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
    public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, LuceneQueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
 | 
			
		||||
            throws E
 | 
			
		||||
    {
 | 
			
		||||
        throw new QueryModelException("Unsupported function in query "+getName());
 | 
			
		||||
 
 | 
			
		||||
@@ -618,13 +618,7 @@ public class AuthenticationUtil implements InitializingBean
 | 
			
		||||
        {
 | 
			
		||||
            if (originalFullAuthentication == null)
 | 
			
		||||
            {
 | 
			
		||||
                if (logger.isTraceEnabled())
 | 
			
		||||
                {
 | 
			
		||||
                    logger.trace("Removing the current security information for thread: " + Thread.currentThread().getName());
 | 
			
		||||
                }
 | 
			
		||||
                ContextHolder.setContext(null);
 | 
			
		||||
                TenantContextHolder.clearTenantDomain();
 | 
			
		||||
 | 
			
		||||
                AuthenticationUtil.clearCurrentSecurityContext();
 | 
			
		||||
                logNDC(null);
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
 
 | 
			
		||||
@@ -37,6 +37,7 @@ import org.alfresco.repo.cache.SimpleCache;
 | 
			
		||||
import org.alfresco.service.cmr.repository.datatype.Duration;
 | 
			
		||||
import org.alfresco.util.GUID;
 | 
			
		||||
import org.apache.commons.codec.binary.Hex;
 | 
			
		||||
import org.apache.commons.lang3.StringUtils;
 | 
			
		||||
import org.apache.commons.logging.Log;
 | 
			
		||||
import org.apache.commons.logging.LogFactory;
 | 
			
		||||
import org.safehaus.uuid.UUIDGenerator;
 | 
			
		||||
@@ -62,7 +63,7 @@ public class InMemoryTicketComponentImpl implements TicketComponent
 | 
			
		||||
    private boolean oneOff;
 | 
			
		||||
    private String guid;
 | 
			
		||||
    private SimpleCache<String, Ticket> ticketsCache; // Can't use Ticket as it's private
 | 
			
		||||
    private SimpleCache<String, String> usernameToTicketIdCache;
 | 
			
		||||
    private SimpleCache<String, String> usernameKey;
 | 
			
		||||
    private ExpiryMode expiryMode = ExpiryMode.AFTER_INACTIVITY;
 | 
			
		||||
    private boolean useSingleTicketPerUser = true;
 | 
			
		||||
 | 
			
		||||
@@ -84,10 +85,10 @@ public class InMemoryTicketComponentImpl implements TicketComponent
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Set the usernameToTicketIdCache as secondary map for supporting cache clustering
 | 
			
		||||
     * Set the usernameKey cache as secondary map for supporting cache clustering
 | 
			
		||||
     */
 | 
			
		||||
    public void setUsernameToTicketIdCache (SimpleCache<String, String> usernameToTicketIdCache) {
 | 
			
		||||
        this.usernameToTicketIdCache = usernameToTicketIdCache;
 | 
			
		||||
    public void setUsernameKey (SimpleCache<String, String> usernameKey) {
 | 
			
		||||
        this.usernameKey = usernameKey;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -145,55 +146,55 @@ public class InMemoryTicketComponentImpl implements TicketComponent
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * All put operations into ticketsCache and usernameToTicketIdCache should go through this method,
 | 
			
		||||
     * All put operations into ticketsCache should go through this method,
 | 
			
		||||
     * so we can debug/trace ticket problems easier from the logs
 | 
			
		||||
     */
 | 
			
		||||
    private void putIntoCache (Ticket ticket)
 | 
			
		||||
    private void putTicketIntoTicketsCache(Ticket ticket)
 | 
			
		||||
    {
 | 
			
		||||
        if (logger.isTraceEnabled())
 | 
			
		||||
        {
 | 
			
		||||
            logger.trace("Putting into ticketsCache " + ticketsCache.toString() + " ticket: " + ticket);
 | 
			
		||||
        }
 | 
			
		||||
        ticketsCache.put(ticket.getTicketId(), ticket);
 | 
			
		||||
 | 
			
		||||
        if (logger.isTraceEnabled())
 | 
			
		||||
        {
 | 
			
		||||
            logger.trace("Putting into usernameToTicketIdCache " + usernameToTicketIdCache.toString() + " username and ticketId of: " + ticket);
 | 
			
		||||
        }
 | 
			
		||||
        usernameToTicketIdCache.put(ticket.getUserName(), ticket.getTicketId());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * All remove operations from ticketsCache and usernameToTicketIdCache should go through this method,
 | 
			
		||||
     * All put operations into usernameKey cache should go through this method,
 | 
			
		||||
     * so we can debug/trace  problems easier from the logs
 | 
			
		||||
     */
 | 
			
		||||
    private void putTicketIntoUsernameKeyCache (Ticket ticket)
 | 
			
		||||
    {
 | 
			
		||||
        if (logger.isTraceEnabled())
 | 
			
		||||
        {
 | 
			
		||||
            logger.trace("Putting into usernameKey " + usernameKey.toString() + " username and key of ticket: " + ticket);
 | 
			
		||||
        }
 | 
			
		||||
        usernameKey.put(ticket.getUserName(), ticket.getTicketId());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * All remove operations from ticketsCache should go through this method,
 | 
			
		||||
     * so we can debug/trace ticket problems easier from the logs
 | 
			
		||||
     */
 | 
			
		||||
    private void removeFromCache (String ticketId)
 | 
			
		||||
    private void removeTicketFromTicketsCache(String ticketId)
 | 
			
		||||
    {
 | 
			
		||||
        Ticket ticket = null;
 | 
			
		||||
        if(ticketId != null)
 | 
			
		||||
        {
 | 
			
		||||
            ticket = ticketsCache.get(ticketId);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (logger.isTraceEnabled())
 | 
			
		||||
        {
 | 
			
		||||
            logger.trace("Removing ticket from ticketsCache: " + ticketId);
 | 
			
		||||
        }
 | 
			
		||||
        ticketsCache.remove(ticketId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
        if(ticket != null)
 | 
			
		||||
    /**
 | 
			
		||||
     * All remove operations from usernameKey cache should go through this method,
 | 
			
		||||
     * so we can debug/trace problems easier from the logs
 | 
			
		||||
     */
 | 
			
		||||
    private void removeFromUsernameKey(String username)
 | 
			
		||||
    {
 | 
			
		||||
        if (logger.isTraceEnabled())
 | 
			
		||||
        {
 | 
			
		||||
            String username = ticket.getUserName();
 | 
			
		||||
            String actualUserTicketIdFromCache = usernameToTicketIdCache.get(username);
 | 
			
		||||
            if(ticketId.equals(actualUserTicketIdFromCache))
 | 
			
		||||
            {
 | 
			
		||||
                if (logger.isTraceEnabled())
 | 
			
		||||
                {
 | 
			
		||||
                    logger.trace("Removing ticketId from usernameToTicketIdCache for: " + username);
 | 
			
		||||
                }
 | 
			
		||||
                usernameToTicketIdCache.remove(username);
 | 
			
		||||
            }
 | 
			
		||||
            logger.trace("Removing ticket key from usernameKey: " + username);
 | 
			
		||||
        }
 | 
			
		||||
        usernameKey.remove(username);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
@@ -213,7 +214,8 @@ public class InMemoryTicketComponentImpl implements TicketComponent
 | 
			
		||||
                expiryDate = Duration.add(new Date(), validDuration);
 | 
			
		||||
            }
 | 
			
		||||
            ticket = new Ticket(ticketsExpire ? expiryMode : ExpiryMode.DO_NOT_EXPIRE, expiryDate, userName, validDuration);
 | 
			
		||||
            putIntoCache(ticket);
 | 
			
		||||
            putTicketIntoTicketsCache(ticket);
 | 
			
		||||
            putTicketIntoUsernameKeyCache(ticket);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        String ticketString = GRANTED_AUTHORITY_TICKET_PREFIX + ticket.getTicketId();
 | 
			
		||||
@@ -227,20 +229,40 @@ public class InMemoryTicketComponentImpl implements TicketComponent
 | 
			
		||||
 | 
			
		||||
    private Ticket findNonExpiredUserTicket(String userName)
 | 
			
		||||
    {
 | 
			
		||||
        String userTicketIdFromCache = usernameToTicketIdCache.get(userName);
 | 
			
		||||
        if(userTicketIdFromCache != null)
 | 
			
		||||
        {
 | 
			
		||||
            Ticket ticketFromCache = ticketsCache.get(userTicketIdFromCache);
 | 
			
		||||
            if(ticketFromCache != null)
 | 
			
		||||
            {
 | 
			
		||||
        String keyFromCache = usernameKey.get(userName);
 | 
			
		||||
        if(StringUtils.isNotBlank(keyFromCache)) {
 | 
			
		||||
            Ticket ticketFromCache = ticketsCache.get(keyFromCache);
 | 
			
		||||
            if(ticketFromCache != null) {
 | 
			
		||||
                Ticket newTicket = ticketFromCache.getNewEntry();
 | 
			
		||||
                if(newTicket != null)
 | 
			
		||||
                {
 | 
			
		||||
                    if (newTicket != ticketFromCache)
 | 
			
		||||
                    {
 | 
			
		||||
                        putIntoCache(newTicket);
 | 
			
		||||
                        putTicketIntoTicketsCache(newTicket);
 | 
			
		||||
                        putTicketIntoUsernameKeyCache(newTicket);
 | 
			
		||||
                    }
 | 
			
		||||
                    return ticketFromCache;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            for (String key : ticketsCache.getKeys())
 | 
			
		||||
            {
 | 
			
		||||
                Ticket ticket = ticketsCache.get(key);
 | 
			
		||||
                if (ticket != null)
 | 
			
		||||
                {
 | 
			
		||||
                    if(ticket.getUserName().equals(userName))
 | 
			
		||||
                    {
 | 
			
		||||
                        Ticket newTicket = ticket.getNewEntry();
 | 
			
		||||
                        if(newTicket != null)
 | 
			
		||||
                        {
 | 
			
		||||
                            if (newTicket != ticket)
 | 
			
		||||
                            {
 | 
			
		||||
                                putTicketIntoTicketsCache(newTicket);
 | 
			
		||||
                                putTicketIntoUsernameKeyCache(newTicket);
 | 
			
		||||
                            }
 | 
			
		||||
                            return ticket;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    return newTicket;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
@@ -279,11 +301,16 @@ public class InMemoryTicketComponentImpl implements TicketComponent
 | 
			
		||||
        {
 | 
			
		||||
            //this feature is deprecated
 | 
			
		||||
 | 
			
		||||
            removeFromCache(ticketKey);
 | 
			
		||||
            removeTicketFromTicketsCache(ticketKey);
 | 
			
		||||
            String userName = newTicket.getUserName();
 | 
			
		||||
            if(StringUtils.isNotBlank(userName)) {
 | 
			
		||||
                removeFromUsernameKey(userName);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if (newTicket != ticket)
 | 
			
		||||
        {
 | 
			
		||||
            putIntoCache(newTicket);
 | 
			
		||||
            putTicketIntoTicketsCache(newTicket);
 | 
			
		||||
            putTicketIntoUsernameKeyCache(newTicket);
 | 
			
		||||
        }
 | 
			
		||||
        currentTicket.set(ticketString);
 | 
			
		||||
        if (logger.isTraceEnabled())
 | 
			
		||||
@@ -330,7 +357,7 @@ public class InMemoryTicketComponentImpl implements TicketComponent
 | 
			
		||||
    public void invalidateTicketById(String ticketString)
 | 
			
		||||
    {
 | 
			
		||||
        String key = ticketString.substring(GRANTED_AUTHORITY_TICKET_PREFIX.length());
 | 
			
		||||
        removeFromCache(key);
 | 
			
		||||
        removeTicketFromTicketsCache(key);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
@@ -392,11 +419,10 @@ public class InMemoryTicketComponentImpl implements TicketComponent
 | 
			
		||||
                logger.trace("Clearing all tickets from the ticketsCache, that used to have size: " + count);
 | 
			
		||||
            }
 | 
			
		||||
            ticketsCache.clear();
 | 
			
		||||
            usernameToTicketIdCache.clear();
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            Set<String> toRemove = new HashSet<>();
 | 
			
		||||
            Set<String> toRemove = new HashSet<String>();
 | 
			
		||||
            for (String key : ticketsCache.getKeys())
 | 
			
		||||
            {
 | 
			
		||||
                Ticket ticket = ticketsCache.get(key);
 | 
			
		||||
@@ -408,7 +434,7 @@ public class InMemoryTicketComponentImpl implements TicketComponent
 | 
			
		||||
            }
 | 
			
		||||
            for (String id : toRemove)
 | 
			
		||||
            {
 | 
			
		||||
                removeFromCache(id);
 | 
			
		||||
                removeTicketFromTicketsCache(id);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return count;
 | 
			
		||||
@@ -417,26 +443,35 @@ public class InMemoryTicketComponentImpl implements TicketComponent
 | 
			
		||||
    @Override
 | 
			
		||||
    public void invalidateTicketByUser(String userName)
 | 
			
		||||
    {
 | 
			
		||||
        Set<String> toRemove = new HashSet<>();
 | 
			
		||||
        Set<String> toRemove = new HashSet<String>();
 | 
			
		||||
 | 
			
		||||
        for (String key : ticketsCache.getKeys())
 | 
			
		||||
        {
 | 
			
		||||
            Ticket ticket = ticketsCache.get(key);
 | 
			
		||||
            // Hack: The getKeys() call might return keys for null marker objects, yielding null values
 | 
			
		||||
            if(ticket == null)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
        String keyFromCache = usernameKey.get(userName);
 | 
			
		||||
        if(StringUtils.isNotBlank(keyFromCache)) {
 | 
			
		||||
            Ticket ticketFromCache = ticketsCache.get(keyFromCache);
 | 
			
		||||
            if(ticketFromCache != null) {
 | 
			
		||||
                toRemove.add(ticketFromCache.getTicketId());
 | 
			
		||||
            }
 | 
			
		||||
            if(ticket.getUserName().equals(userName))
 | 
			
		||||
        } else {
 | 
			
		||||
            for (String key : ticketsCache.getKeys())
 | 
			
		||||
            {
 | 
			
		||||
                toRemove.add(ticket.getTicketId());
 | 
			
		||||
                Ticket ticket = ticketsCache.get(key);
 | 
			
		||||
                // Hack: The getKeys() call might return keys for null marker objects, yielding null values
 | 
			
		||||
                if (ticket == null)
 | 
			
		||||
                {
 | 
			
		||||
                    continue;
 | 
			
		||||
                }
 | 
			
		||||
                if (ticket.getUserName().equals(userName))
 | 
			
		||||
                {
 | 
			
		||||
                    toRemove.add(ticket.getTicketId());
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (String id : toRemove)
 | 
			
		||||
        {
 | 
			
		||||
            removeFromCache(id);
 | 
			
		||||
            removeTicketFromTicketsCache(id);
 | 
			
		||||
        }
 | 
			
		||||
        removeFromUsernameKey(userName);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
 
 | 
			
		||||
@@ -149,6 +149,12 @@ 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,7 +33,6 @@ 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.
 | 
			
		||||
@@ -106,14 +105,6 @@ 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
 | 
			
		||||
     *
 | 
			
		||||
@@ -176,8 +167,6 @@ public interface CustomModelService
 | 
			
		||||
     */
 | 
			
		||||
    public boolean isNamespaceUriExists(String modelNamespaceUri);
 | 
			
		||||
 | 
			
		||||
    public boolean isNamespacePrefixExists(NodeRef modelNodeRef);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Whether a model with the given name exists or not
 | 
			
		||||
     *
 | 
			
		||||
@@ -186,35 +175,10 @@ 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 modelNamespacePrefix the model namespace prefix
 | 
			
		||||
     * @param modelNamespaceUri the model namespace prefix
 | 
			
		||||
     * @return true if the prefix has been used, false otherwise
 | 
			
		||||
     */
 | 
			
		||||
    public boolean isNamespacePrefixExists(String modelNamespacePrefix);
 | 
			
		||||
 
 | 
			
		||||
@@ -98,8 +98,33 @@ 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,6 +105,12 @@ 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,4 +161,22 @@ 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();
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * #%L
 | 
			
		||||
 * Alfresco Data model classes
 | 
			
		||||
 * %%
 | 
			
		||||
 * Copyright (C) 2005 - 2020 Alfresco Software Limited
 | 
			
		||||
 * 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 
 | 
			
		||||
@@ -33,7 +33,8 @@ import org.alfresco.api.AlfrescoPublicApi;
 | 
			
		||||
 * same action might succeed, all other things not having changed.
 | 
			
		||||
 * <p/>
 | 
			
		||||
 * An example of this would be the case where a request to create a thumbnail
 | 
			
		||||
 * has failed because the necessary thumbnailing software is not available.
 | 
			
		||||
 * has failed because the necessary thumbnailing software is not available e.g. because the OpenOffice.org process
 | 
			
		||||
 * is not currently running.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author Neil Mc Erlean
 | 
			
		||||
 * @since 4.0.1
 | 
			
		||||
 
 | 
			
		||||
@@ -50,36 +50,23 @@ import org.alfresco.service.namespace.QName;
 | 
			
		||||
@AlfrescoPublicApi
 | 
			
		||||
public interface SearchService
 | 
			
		||||
{
 | 
			
		||||
    String LANGUAGE_LUCENE = "lucene";
 | 
			
		||||
    public static final String LANGUAGE_LUCENE = "lucene";
 | 
			
		||||
 | 
			
		||||
    String LANGUAGE_XPATH = "xpath";
 | 
			
		||||
    public static final String LANGUAGE_XPATH = "xpath";
 | 
			
		||||
 | 
			
		||||
    String LANGUAGE_FTS_ALFRESCO = "fts-alfresco";
 | 
			
		||||
    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_CMIS_STRICT = "cmis-strict";
 | 
			
		||||
    public static final String LANGUAGE_SOLR_CMIS = "solr-cmis";
 | 
			
		||||
 | 
			
		||||
    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";
 | 
			
		||||
    public static final String LANGUAGE_SOLR_ALFRESCO = "solr-alfresco";
 | 
			
		||||
    
 | 
			
		||||
    public static final String LANGUAGE_SOLR_SQL = "solr-sql";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Search against a store. Pulls back all attributes on each node. Does not
 | 
			
		||||
@@ -94,7 +81,7 @@ public interface SearchService
 | 
			
		||||
     * @return Returns the query results
 | 
			
		||||
     */
 | 
			
		||||
    @Auditable(parameters = {"store", "language", "query"})
 | 
			
		||||
    ResultSet query(StoreRef store, String language, String query);
 | 
			
		||||
    public ResultSet query(StoreRef store, String language, String query);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Search against a store.
 | 
			
		||||
@@ -111,8 +98,8 @@ public interface SearchService
 | 
			
		||||
     * @return Returns the query results
 | 
			
		||||
     */
 | 
			
		||||
    @Auditable(parameters = {"store", "language", "query", "queryParameterDefinitions"})
 | 
			
		||||
    ResultSet query(StoreRef store, String language, String query,
 | 
			
		||||
                    QueryParameterDefinition[] queryParameterDefinitions);
 | 
			
		||||
    public ResultSet query(StoreRef store, String language, String query,
 | 
			
		||||
            QueryParameterDefinition[] queryParameterDefinitions);
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
@@ -127,14 +114,14 @@ public interface SearchService
 | 
			
		||||
     * @return Returns the query results
 | 
			
		||||
     */
 | 
			
		||||
    @Auditable(parameters = {"store", "queryId", "queryParameters"})
 | 
			
		||||
    ResultSet query(StoreRef store, QName queryId, QueryParameter[] queryParameters);
 | 
			
		||||
    public ResultSet query(StoreRef store, QName queryId, QueryParameter[] queryParameters);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Search using the given SearchParameters
 | 
			
		||||
     */
 | 
			
		||||
 | 
			
		||||
    @Auditable(parameters = {"searchParameters"})
 | 
			
		||||
    ResultSet query(SearchParameters searchParameters);
 | 
			
		||||
    public ResultSet query(SearchParameters searchParameters);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Select nodes using an xpath expression.
 | 
			
		||||
@@ -156,8 +143,8 @@ public interface SearchService
 | 
			
		||||
            
 | 
			
		||||
            parameters = {"contextNodeRef", "xpath", "parameters", "namespacePrefixResolver", "followAllParentLinks"},
 | 
			
		||||
            recordable = {true,             true,    true,         false,                     true})
 | 
			
		||||
    List<NodeRef> selectNodes(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters,
 | 
			
		||||
                              NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks)
 | 
			
		||||
    public List<NodeRef> selectNodes(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters,
 | 
			
		||||
            NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks)
 | 
			
		||||
            throws InvalidNodeRefException, XPathException;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -182,8 +169,8 @@ public interface SearchService
 | 
			
		||||
            
 | 
			
		||||
            parameters = {"contextNodeRef", "xpath", "parameters", "namespacePrefixResolver", "followAllParentLinks", "language"},
 | 
			
		||||
            recordable = {true,             true,    true,         false,                     true,                   true})
 | 
			
		||||
    List<NodeRef> selectNodes(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters,
 | 
			
		||||
                              NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks, String language)
 | 
			
		||||
    public List<NodeRef> selectNodes(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters,
 | 
			
		||||
            NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks, String language)
 | 
			
		||||
            throws InvalidNodeRefException, XPathException;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -206,9 +193,9 @@ public interface SearchService
 | 
			
		||||
            
 | 
			
		||||
            parameters = {"contextNodeRef", "xpath", "parameters", "namespacePrefixResolver", "followAllParentLinks"},
 | 
			
		||||
            recordable = {true,             true,    true,         false,                     true})
 | 
			
		||||
    List<Serializable> selectProperties(NodeRef contextNodeRef, String xpath,
 | 
			
		||||
                                        QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver,
 | 
			
		||||
                                        boolean followAllParentLinks) throws InvalidNodeRefException, XPathException;
 | 
			
		||||
    public List<Serializable> selectProperties(NodeRef contextNodeRef, String xpath,
 | 
			
		||||
            QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver,
 | 
			
		||||
            boolean followAllParentLinks) throws InvalidNodeRefException, XPathException;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Select properties using an xpath expression
 | 
			
		||||
@@ -232,9 +219,9 @@ public interface SearchService
 | 
			
		||||
            
 | 
			
		||||
            parameters = {"contextNodeRef", "xpath", "parameters", "namespacePrefixResolver", "followAllParentLinks", "language"},
 | 
			
		||||
            recordable = {true,             true,     true,        false,                     true,                   true})
 | 
			
		||||
    List<Serializable> selectProperties(NodeRef contextNodeRef, String xpath,
 | 
			
		||||
                                        QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver,
 | 
			
		||||
                                        boolean followAllParentLinks, String language) throws InvalidNodeRefException, XPathException;
 | 
			
		||||
    public 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
 | 
			
		||||
@@ -249,7 +236,7 @@ public interface SearchService
 | 
			
		||||
     * @return Returns true if the pattern could be found - uses the default OR operator
 | 
			
		||||
     */
 | 
			
		||||
    @Auditable(parameters = {"nodeRef", "propertyQName", "googleLikePattern"})
 | 
			
		||||
    boolean contains(NodeRef nodeRef, QName propertyQName, String googleLikePattern)
 | 
			
		||||
    public boolean contains(NodeRef nodeRef, QName propertyQName, String googleLikePattern)
 | 
			
		||||
            throws InvalidNodeRefException;
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
@@ -265,7 +252,7 @@ public interface SearchService
 | 
			
		||||
     * @return Returns true if the pattern could be found
 | 
			
		||||
     */
 | 
			
		||||
    @Auditable(parameters = {"nodeRef", "propertyQName", "googleLikePattern", "defaultOperator"})
 | 
			
		||||
    boolean contains(NodeRef nodeRef, QName propertyQName, String googleLikePattern, SearchParameters.Operator defaultOperator)
 | 
			
		||||
    public boolean contains(NodeRef nodeRef, QName propertyQName, String googleLikePattern, SearchParameters.Operator defaultOperator)
 | 
			
		||||
            throws InvalidNodeRefException;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -283,6 +270,6 @@ public interface SearchService
 | 
			
		||||
     * @return Returns true if the pattern could be found
 | 
			
		||||
     */
 | 
			
		||||
    @Auditable(parameters = {"nodeRef", "propertyQName", "sqlLikePattern", "includeFTS"})
 | 
			
		||||
    boolean like(NodeRef nodeRef, QName propertyQName, String sqlLikePattern, boolean includeFTS)
 | 
			
		||||
    public boolean like(NodeRef nodeRef, QName propertyQName, String sqlLikePattern, boolean includeFTS)
 | 
			
		||||
            throws InvalidNodeRefException;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -100,25 +100,26 @@ public abstract class BaseApplicationContextHelper
 | 
			
		||||
    		classpath[i] = resources[i].getURL();
 | 
			
		||||
    	}
 | 
			
		||||
    	// Let's give our classloader 'child-first' resource loading qualities!
 | 
			
		||||
        return new URLClassLoader(classpath, Thread.currentThread().getContextClassLoader())
 | 
			
		||||
        {
 | 
			
		||||
            @Override
 | 
			
		||||
            public URL getResource(String name)
 | 
			
		||||
            {
 | 
			
		||||
                URL ret = findResource(name);
 | 
			
		||||
                return ret == null ? super.getResource(name) : ret;
 | 
			
		||||
            }
 | 
			
		||||
    	ClassLoader classLoader = new URLClassLoader(classpath, Thread.currentThread().getContextClassLoader())
 | 
			
		||||
    	{
 | 
			
		||||
    		@Override
 | 
			
		||||
    		public URL getResource(String name)
 | 
			
		||||
    		{
 | 
			
		||||
    			URL ret = findResource(name);
 | 
			
		||||
    			return ret == null ? super.getResource(name) : ret;
 | 
			
		||||
    		}
 | 
			
		||||
 | 
			
		||||
            @SuppressWarnings("rawtypes")
 | 
			
		||||
            @Override
 | 
			
		||||
            public Enumeration<URL> getResources(String name) throws IOException
 | 
			
		||||
            {
 | 
			
		||||
                Enumeration[] tmp = new Enumeration[2];
 | 
			
		||||
                tmp[0] = findResources(name);
 | 
			
		||||
                tmp[1] = super.getResources(name);
 | 
			
		||||
                return new CompoundEnumeration<URL>(tmp);
 | 
			
		||||
            }
 | 
			
		||||
        };
 | 
			
		||||
    		@SuppressWarnings("rawtypes")
 | 
			
		||||
    		@Override
 | 
			
		||||
    		public Enumeration<URL> getResources(String name) throws IOException
 | 
			
		||||
    		{
 | 
			
		||||
    			Enumeration[] tmp = new Enumeration[2];
 | 
			
		||||
    			tmp[0] = findResources(name);
 | 
			
		||||
    			tmp[1] = super.getResources(name);
 | 
			
		||||
    			return new CompoundEnumeration<URL>(tmp);
 | 
			
		||||
    		}
 | 
			
		||||
    	};
 | 
			
		||||
    	return classLoader;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 * #%L
 | 
			
		||||
 * Alfresco Repository
 | 
			
		||||
 * %%
 | 
			
		||||
 * Copyright (C) 2005 - 2021 Alfresco Software Limited
 | 
			
		||||
 * Copyright (C) 2005 - 2020 Alfresco Software Limited
 | 
			
		||||
 * %%
 | 
			
		||||
 * This file is part of the Alfresco software.
 | 
			
		||||
 * If the software was purchased under a paid Alfresco license, the terms of
 | 
			
		||||
@@ -57,10 +57,7 @@ public abstract class ConfigScheduler<Data>
 | 
			
		||||
    public static class ConfigSchedulerJob implements Job
 | 
			
		||||
    {
 | 
			
		||||
        @Override
 | 
			
		||||
        // Synchronized has little effect in normal operation, but on laptops that are suspended, there can be a number
 | 
			
		||||
        // of Threads calling execute concurrently without it, resulting in errors in the log. Theoretically possible in
 | 
			
		||||
        // production but not very likely.
 | 
			
		||||
        public synchronized void execute(JobExecutionContext context) throws JobExecutionException
 | 
			
		||||
        public void execute(JobExecutionContext context) throws JobExecutionException
 | 
			
		||||
        {
 | 
			
		||||
            JobDataMap dataMap = context.getJobDetail().getJobDataMap();
 | 
			
		||||
            ConfigScheduler configScheduler = (ConfigScheduler)dataMap.get(CONFIG_SCHEDULER);
 | 
			
		||||
 
 | 
			
		||||
@@ -41,6 +41,9 @@
 | 
			
		||||
        <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=Alfresco Dictionary Model
 | 
			
		||||
d_dictionary.description=Modelo de diccionario Alfresco
 | 
			
		||||
 | 
			
		||||
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_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_content.title=Contenido
 | 
			
		||||
d_dictionary.datatype.d_content.description=Contenido
 | 
			
		||||
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_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_datetime.title=Fecha y hora
 | 
			
		||||
d_dictionary.datatype.d_datetime.description=Fecha y hora
 | 
			
		||||
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_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_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=Path
 | 
			
		||||
d_dictionary.datatype.d_path.description=Path
 | 
			
		||||
d_dictionary.datatype.d_path.title=Ruta
 | 
			
		||||
d_dictionary.datatype.d_path.description=Ruta
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,6 @@
 | 
			
		||||
 | 
			
		||||
         <mimetype mimetype="application/vnd.ms-project" display="Microsoft Project">
 | 
			
		||||
            <extension default="true">mpp</extension>
 | 
			
		||||
            <extension>mpt</extension>
 | 
			
		||||
         </mimetype>
 | 
			
		||||
 | 
			
		||||
         <mimetype mimetype="image/vnd.adobe.photoshop" display="Adobe Photoshop">
 | 
			
		||||
@@ -109,28 +108,11 @@
 | 
			
		||||
            <extension>acp</extension>
 | 
			
		||||
         </mimetype>
 | 
			
		||||
         <mimetype mimetype="application/vnd.visio" display="Microsoft Visio">
 | 
			
		||||
            <extension default="true">vsd</extension>
 | 
			
		||||
            <extension>vss</extension>
 | 
			
		||||
            <extension>vst</extension>
 | 
			
		||||
            <extension>vsd</extension>
 | 
			
		||||
         </mimetype>
 | 
			
		||||
         <mimetype mimetype="application/vnd.visio2013" display="Microsoft Visio 2013">
 | 
			
		||||
            <extension>vsdx</extension>
 | 
			
		||||
         </mimetype>
 | 
			
		||||
         <mimetype mimetype="application/vnd.ms-visio.drawing.macroenabled.main+xml" display="Microsoft Visio macro-enabled drawing">
 | 
			
		||||
            <extension>vsdm</extension>
 | 
			
		||||
         </mimetype>
 | 
			
		||||
         <mimetype mimetype="application/vnd.ms-visio.stencil.main+xml" display="Microsoft Visio stencil">
 | 
			
		||||
            <extension>vssx</extension>
 | 
			
		||||
         </mimetype>
 | 
			
		||||
         <mimetype mimetype="application/vnd.ms-visio.stencil.macroenabled.main+xml" display="Microsoft Visio macro-enabled stencil">
 | 
			
		||||
            <extension>vssm</extension>
 | 
			
		||||
         </mimetype>
 | 
			
		||||
         <mimetype mimetype="application/vnd.ms-visio.template.main+xml" display="Microsoft Visio template">
 | 
			
		||||
            <extension>vstx</extension>
 | 
			
		||||
         </mimetype>
 | 
			
		||||
         <mimetype mimetype="application/vnd.ms-visio.template.macroenabled.main+xml" display="Microsoft Visio macro-enabled template">
 | 
			
		||||
            <extension>vstm</extension>
 | 
			
		||||
         </mimetype>
 | 
			
		||||
         <mimetype mimetype="application/vnd.adobe.xdp+xml" display="Adobe Acrobat XML Data Package">
 | 
			
		||||
            <extension>xdp</extension>
 | 
			
		||||
         </mimetype>
 | 
			
		||||
 
 | 
			
		||||
@@ -16,19 +16,16 @@
 | 
			
		||||
  <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>
 | 
			
		||||
@@ -439,4 +436,4 @@
 | 
			
		||||
    
 | 
			
		||||
  </types>
 | 
			
		||||
 | 
			
		||||
</model>
 | 
			
		||||
</model>
 | 
			
		||||
@@ -0,0 +1,18 @@
 | 
			
		||||
# 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
 | 
			
		||||
@@ -0,0 +1,4 @@
 | 
			
		||||
# 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
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user