Commit Graph

117 Commits

Author SHA1 Message Date
montgolfiere
46f6d5829e ATS-892 / ATS-909: Add IPTC model (#429)
- fix previous blatant typo (thanks Stefan)
- https://github.com/Alfresco/alfresco-community-repo/pull/427
2021-05-04 16:01:25 +01:00
montgolfiere
099a444bf0 ATS-892: Add IPTC model (#427)
- add existing IPTC model (& message files) alongside other core models, eg. Exif & DublinCore
- see also ATS-909
2021-05-04 12:25:43 +01:00
Sara
96ef362d6d ACS-1425 Get stores at start of query (#421)
* ACS-1425 Get stores at start of query

* ACS-1425 Get stores at start of query

* ACS-1425 Get stores at start of accelerated query

* ACS-1425 Tidy up
2021-04-29 10:25:41 +01:00
Sara
ab6c831447 Feature/acs 1425 long running tmdq (#417)
* ACS-1425 Add store info to result

* ACS-1425 Fix unit tests
2021-04-28 11:07:02 +01:00
Nana Insaidoo
5ce179f209 [ACS-1455] Schema validation report expansion with patch specific problems told apart (#386)
* Update schema validation report

- Introduced changes to tell apart problems due to optional unapplied
  patches within schema validation report

* Update SchemaDifferenceHelper

- Now populating optionalUpgradePatches list during the schema bootstrap
  registration to conform with patch registration mechanising already in use
- Added tests

* Make minor corrections

Co-authored-by: Nana Insaidoo <nana.insaidoo@meterian.com>
2021-04-27 09:57:47 +01:00
Cristian Turlica
f201f35ec1 MNT-22186: propTablesCleanupJobDetail v2 can cause Out of Memory erro… (#402)
-  MySQLDeleteNotExistsExecutor (by extending DeleteNotExistsExecutor) to cope with MySQLspecific fetch size limitation and restrictions
- updated tests
- moved tests to AllDBTestsTestSuite from AppContextExtraTestSuite
2021-04-23 11:20:48 +03:00
Cristian Turlica
a7d8789ff4 Revert "MNT-22186: propTablesCleanupJobDetail v2 can cause Out of Memory errors (CleanAlfPropTablesV2.sql ) (#390)" (#394)
This reverts commit 5e38be6f7d.
2021-04-21 10:22:16 +03:00
Davide
9d711213cc SEARCH-2782 commit time as event time (#377) 2021-04-20 16:32:41 +02:00
Cristian Turlica
5e38be6f7d MNT-22186: propTablesCleanupJobDetail v2 can cause Out of Memory errors (CleanAlfPropTablesV2.sql ) (#390)
- added dialect check to set MySQL specific fetch size limitation (Integer.MIN_VALUE). fetchSize activates result set streaming.
- updated tests
2021-04-19 18:02:19 +03:00
Tom Page
b9e4557973 Add unit test to look for unreferenced test classes. (#368)
* Add unit test to look for unreferenced test classes.

It's very unusual that we write a test class which should not also be added to a test suite.

* Utilise the hierarchy of NonBuildTests markers to help exclude false positives.

* Update all omitted tests.

Either add the test to AllUnitTestsSuite if it passes and runs quickly, mark the test with the appropriate NonBuildTests interface or mark the class as abstract (if appropriate).

Mark one test (RemoteTransformerClientTest) as a NeverRunTest even though it passes because it takes 12 seconds to run and is marked as deprecated.

* Mark two Camel tests as 'never run' because they failed on the CI.
2021-04-15 11:23:26 +01:00
Angel Borroy
20dd0efc6f Feature/search 2802 shared secret auth (#382)
* SEARCH-2802: Filter HTTP requests (now "none" and "secret" communication methods are available) from X509 Web Filter.

* SEARCH-2802: HttpClientFactory (for Repository and Search Services clients) support for Shared Secret communication.

* SEARCH-2802: Fix HttpClientFactory base unit tests.
2021-04-14 10:25:45 +02:00
Nana Insaidoo
046116ddf0 Bugfix/repo 5610 events are not actually sent to activemq (#360)
* Add events tests

* Polished put test: connects to JMS via TCP and validate that the event sent is also received back

* Now the tests provides a simple main() that listens on the topic, useful for quick debug sessions

* Now the user name is collected in the calling thread, so that the sendEvent does not silently fails

* Apply changes following review

* Now using queue system to guarantee events order

* Add license

* Updated logs and corrected comments

* Remove empty methods

* Now catering for spurious events at startup when database is bootstrapped

* Now preserving the txn-id in all events

* Moved up definitions in events2.xml after PR feedback

Co-authored-by: Bruno Bossola <bruno@meterian.com>
2021-04-09 13:34:05 +01:00
Davide
65675b9a1d Revert "SEARCH-2782 use current transaction timestamp instead of current time as event time (#371)" (#376)
This reverts commit 28f1429a
2021-04-08 15:02:06 +02:00
Davide
28f1429a13 SEARCH-2782 use current transaction timestamp instead of current time as event time (#371) 2021-04-07 15:59:24 +02:00
Alan Davis
b4455f7d60 version.schema=15000 as we will use a 1000 gap for minor versions rather than just 100 2021-04-06 10:25:53 +01:00
Nicolas Barithel
34f360211f Externalize the nodeServiceCleanup CRON expression (#326) 2021-03-31 10:17:58 +03:00
Tom Page
562479bde4 SEARCH-2768 Add callback feature for asynchronous ACL updates. (#357)
* SEARCH-2768 Add callback feature for asynchronous ACL updates.

Change default for user filter to empty, as changes from all users could affect metadata
or permissions which might need to be indexing by the enterprise Elasticsearch Connector.

* SEARCH-2768 Add unit test for new listeners.

* SEARCH-2768 Rename listener callback function.

* SEARCH-2768 Add unit test to test suite.
2021-03-29 11:31:36 +01:00
alandavis
b772205539 Switch master to support ACS 7.1.0
* incremented pom versions to 11.0 so that 9 may be used by 7.0.1 and 10 for 7.0.2
* version.schema not changed this time as it had already been incremented by 100 to 14100
2021-03-27 09:45:27 +00:00
evasques
3a495f7b3f MNT-22295 - FixedACLJob not processing all nodes due to unordered results (#359)
* Added method selectNodesWithAspects that accepts a boolean as param to order values
* Added param ordered to IdsEntity class
* Added optional ordered param to the query template that orderes the results by node id in asc order
* Added method getNodesWithAspects that accepts a boolean as param to order values in nodeDAO
* FixedACLUpdater Job calls the new getNodesWithAspects, with the ordered param as true
2021-03-26 13:11:32 +00:00
Denis Ungureanu
d91a552925 ACS-1252 : Add tests for the JMS/ActiveMQ/Camel configuration in *alfresco-community-repo* (#356)
- fix messaging context for tests by adding missing mocked beans and properties
   - add tests for amqp, jms, activemq protocols
   - add travis job to run messaging tests
2021-03-24 14:13:37 +02:00
Bruno Bossola
8c91145b39 Revert "[ACS-1291] Asynchronous mechanism to send events (#351)" as no events are sent to AMQ with this change
This reverts commit f446031069.
2021-03-24 11:53:12 +00:00
Bruno Bossola
f446031069 [ACS-1291] Asynchronous mechanism to send events (#351)
* Performance optimisation spike

* Event2 is now sending event asynchronously

* Now forcing synchronous calls in tests for events2

* Now qualifying the event service used in tests

Co-authored-by: Nana Insaidoo <insaidoo.nana@yahoo.it>
2021-03-19 11:08:13 +00:00
evasques
ace87c9c3b MNT-21898 Unexpected ACLs when job runs Fix (#344)
* On move node, verify if parent has pending acl aspect applied and consider the pending shared ACL to update inheritance to avoid ending up with mixed permissions as children of pending acl nodes do not have the correct acls and when moved, keep their wrong acl.
* Add public method setInheritanceForChildren that receives an additional param: forceSharedACL. If an unexpected ACL occurs in a child, it can be overridden by setting it.
* Implement method setInheritanceForChildren that receives an additional parameter: forceSharedACL
* Add method setFixedAcls that receives an additional parameter: forceSharedACL - When a child node has an unexpected ACL, setting this parameter to true will force it to assume the new shared ACL instead of throwing a concurrency exception. When the shared ACL is forces, a warning is thrown in the log informing on what node exactly are we forcing the ACL. This is only possible when the child ACL is type SHARED and when it has an unexpected ACL
* All methods that called setFixedAcls without the new parameter will continue to operate as normal, as having forceSharedACL=false
* Added property forceSharedACL to the FixedACLUpdaterJob. If set to true it will force shared ACL to propagate through children even if there is an unexpected ACL
* When there is a exception detected when doing setInheritanceForChildren on the job, catch and log the error, but do not rollback the entire batch
* On copy/move unit tests I changed the ACL of the target folders on copy and move tests so that the old shared ACL accessed was never the same for origin and target folders as happens when performing these operations between sites
* Added unit test to verify fix for MNT-21898 - testAsyncWithNodeMoveChildToChildPendingFolder
* Added unit test to verify system property for the job: forceSharedACL - testAsyncWithErrorsForceSharedACL
2021-03-12 14:25:58 +00:00
alandavis
d4bae73b86 Use master for ACS 7.0.1
* version.schema=14100 (100 more than used for ACS 7.0.0 originally)
* Reset pom.xml version to next major number (9), as 8.x will be used for 7.0.0 HFs
2021-03-10 21:15:34 +00:00
Denis Ungureanu
f485581d5e ACS-855 : Long running patch in ACS 7.0.0.A2 upgrade (#338)
- revert  changes (sql and schema reference files) done in REPO-4547
2021-03-08 09:49:38 +02:00
Alan Davis
d60cd5ed1c ACS-1180 ACS 7 Stacks: MySQL 8 (#336) 2021-03-05 11:37:47 +00:00
Ancuta Morarasu
2b03e2bbf0 ACS-1201: Model integrity violation saving properties (#332)
- Fix the name property persistence in ContentModelFormProcessor to only save when the property value is actually changed. This prevents the FilenameFilteringInterceptor to be called when there are no changes to the file name.
2021-03-05 12:32:10 +02:00
Stefan Kopf
fef8cc9256 ACS-1217 Additional option for SOLR to authenticate with a shared secret (#334)
Co-authored-by: Alex Mukha <alex.mukha@alfresco.com>
2021-03-04 18:49:49 +01:00
alandavis
2294a87908 REPO-5376 Query Accelerator add simple timings, having remove temporary timing code 2021-02-27 09:10:58 +00:00
CezarLeahu
4e50446c4e ACS-1253 Remove ignored JMX namespace argument on Camel context (#314) 2021-02-26 09:33:05 +02:00
Andreea Nechifor
1a5aa34d3d APPS-692: after properties removed. (#315) 2021-02-25 20:45:46 +02:00
Alan Davis
e88aab47f7 REPO-5376 Query Accelerator Remove all temporary code (#308)
* REPO-5376 Remove all temporary code

* Remove DBStats, SingleTaskRestartableWatch
* Remove propertiesCache and aspectsCache from DBQueryEngine as they were marked as temporary

* Remove further temporary code

Co-authored-by: Nana Insaidoo <insaidoo.nana@yahoo.it>
2021-02-23 16:54:58 +00:00
Lucian Tuca
fd7adefe27 REPO-5571 : Change the tempFileCleanerTrigger to work at scale (#293)
* REPO-5571 : Change the tempFileCleanerTrigger to work at scale
    - added nr of files and time limits
2021-02-23 15:41:06 +02:00
CezarLeahu
bb19c61253 ACS-1253 Enable Camel JMX management (#295)
- enable Camel JMX management
- disable JMS connection idle timeout
- update ActiveMQ broker URLs to use NIO
2021-02-19 14:52:28 +02:00
Andrea Gazzarini
1ff90242b0 [SEARCH-2677] Extract SearchEngineResultSet and SearchEngineResultMetadata interfaces (#286)
* [SEARCH-2677] Extract SearchEngineResultSet and SearchEngineResultMetadata interfaces

* [SEARCH-2677] Scan the ResultSet decorator chain for a maximum of 3 nested levels
2021-02-19 12:09:40 +01:00
Cristian Turlica
cee63b31f6 ACS-1264: Content Model changes dynamically updated to node caches across a cluster deadlock (#289)
Re enabling changes disabled in ACS-936 we can see deadlock in asynchronouslyRefreshedCacheThreadPool (AbstractAsynchronouslyRefreshedCache).

There should be no reason to be calling the dictionary destroy method before the doCall() finishes...and it is the use of the destroy method that carries the risk of deadlock.

Proposed fix: the liveLock is used for the doCall() method, this will stop deadlock from external calls to dictionary destroy() while doCall is in progress.

Removed invalidating cache fix (e.g. fix the issue where cluster nodes could have null values and other nodes had default value… so no properly invalidated on node startup). This fix was moved in ClusteringBootstrap as the initial one was causing issues.
2021-02-19 09:46:36 +02:00
montgolfiere
3ad33034f1 MNT-14308: CMIS - optionally request rendition(s) when uploading docs - part 2 (#283)
* MNT-14308: CMIS - optionally request rendition(s) when uploading docs - part 2

- note: PublicApiAlfrescoCmisServiceFactory extends AlfrescoCmisServiceFactory and overrides getCmisServiceTarget
- hence, also ensure property (cmis.create.doc.request.renditions.set) is set for public rest api spring context

- note: set following log4j.properties: log4j.logger.org.alfresco.opencmis=info

* MNT-14308: CMIS - optionally request rendition(s) when uploading docs - part 2

- tweak info log to output property on init (since service currently instantiated on every call)

- note: set following log4j.properties: log4j.logger.org.alfresco.opencmis=info
2021-02-10 20:37:57 +00:00
Nana Insaidoo
e3dca6ecbd Apply changes to enable node ownership evaluation to happen on ent. as before (#279) 2021-02-08 15:21:44 +00:00
Gloria Camino
fafdfa6945 LOC-282 - FIX pending languages (Czech, Polish and Danish) plus FR amends (#278) 2021-02-08 13:18:32 +00:00
evasques
592dde531f MNT-22135 Filter policy to only run on admin auth - Unit test (#275)
Created unit test testIfGroupIsAdminAuthority to check if public method isAdminAuthority correctly validates groups:
* Verify it can identify GROUP_ALFRESCO_ADMINISTRATORS as an admin group
* Verify created groups (non administrators) and users are not considered administrators
* Add a subgroup to the parent group and verify if its still identified as non admin
* Add the group to the administrators group and verify if both group and subgroup are identified correctly as admins
* Add the user to the subgroup and verify if he's an admin
* Create a group with the same name as an admin user, group should not be identified as admin
2021-02-08 10:53:35 +00:00
CezarLeahu
2171bcc192 ACS-1215 Update JMS/ActiveMQ configuration after the Camel 3.7 upgrade (#274)
- add an **activemq** messaging component bean (of type `org.apache.camel.component.activemq.ActiveMQComponent`)
- add a common **jmsConfig** bean to be used by all the three messaging component beans: **jms**, **activemq** and **amqp**
- exclude `activemq-broker` dependencies
- remove unnecessary messaging configuration
2021-02-07 22:35:21 +02:00
Nana Insaidoo
a84a68cb9a Bugfix/APPS-766 classification children job not picking rm types (#272)
* Now handling System reading

* Address changes requested in PR #272
2021-02-04 13:00:18 +00:00
montgolfiere
e8e2ded02a MNT-14308: CMIS - optionally request rendition(s) when uploading docs (#263)
* MNT-14308: CMIS - optionally request rendition(s) when uploading docs

- add new configurable option to request set of renditions when uploading via CMIS (none by default)
- note: in the event a client *relied* on previous behaviour (rather than dynamic requests) the property can be overridden & set to "doclib"

- add info message to show new property when initialising CMIS, ie. set of requested renditions set (empty by default)
- note: set following log4j.properties: log4j.logger.org.alfresco.opencmis=info
2021-02-01 10:43:37 +00:00
Alan Davis
a903d9ec44 REPO-5549 Fix: Local transformer names must exist and be unique docli… (#264)
* REPO-5549 Fix: Local transformer names must exist and be unique doclib Read from ... when overriding a Local transform.

* Problem was that there were two conflicting pieces of code in play in the LocalTransformRegistry.register method. One that checked for duplicate T-Engine names and the other that allowed transforms to be overridden if they had the same name.
* The code checking for duplicate names needed an extra clause to only look at T-Engines (they have a T-Engine url associated with them).
* The code that overrode transforms then worked, but still had issues as the supported source to target mimetypes, priorities and max sizes were not cleared.
* It turned out to be simpler to split the original LocalTransformRegistry.register method into two. Extracting a new method into CombinedConfig.removeOverriddenOrInvalidTransformers that discarded invalid or overridden config before the list of supported source to target mimetypes was created rather than try to fix them up later. This is why there appear to be quite a few changes.
* More extensive unit tests were also added.
2021-01-29 20:04:55 +00:00
Alexandru-Eusebiu Epure
14ca5bb726 MNT-20775 : deleted-nodes with maxitems parameter take longer (#255)
* MNT-20775 : rest api /deleted-nodes with maxitems parameter take longer when there are more items in the trash can
  Based on offset and limit, returns only the required results from database
  Added count query for ArchivedNodes
2021-01-27 17:15:34 +02:00
Nana Insaidoo
358bd704df [ACS-1160] Handle null Authority (#249) 2021-01-20 14:57:17 +00:00
Denis Ungureanu
b4b591b8af ACS-1170 : Release Gytheio 0.12 - ACS 7.0 compatible (#250)
- upgrade Gytheio
   - move jms bean to messaging-context.xml
2021-01-20 16:26:02 +02:00
Jamal Kaabi-Mofrad
2ffbb2ca23 ACS-1140: Added cluster-aware cache for QuerySet configs. (#243) 2021-01-15 23:09:37 +00:00
Gloria Camino
b3454b762c LOC-282 - Partial fix. 12 language bundles updated. (pending 3: DA, CZ and PL) (#241) 2021-01-14 14:34:17 +00:00
Denis Ungureanu
a9e54bd08c ACS-1043 : Camel upgrade to 3.7.0 (#235)
ACS-1043: Upgrade Camel version
2021-01-12 11:41:23 +02:00