Skip to content

Commit

Permalink
Merge pull request #150 from xenit-eu/ALFREDAPI-510_merge
Browse files Browse the repository at this point in the history
Alfredapi 510 merge
  • Loading branch information
WimCrols authored Jan 17, 2023
2 parents c9512fe + 21fefbc commit 25bdc63
Show file tree
Hide file tree
Showing 30 changed files with 221 additions and 303 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Alfred API - Changelog


## 4.0.0 (2023-01-17)
This release adds support for Alfresco 7.3 and drops support for Alfresco 5.2 and 6.1.

### Added
* [ALFREDAPI-505](https://xenitsupport.jira.com/browse/ALFREDAPI-505): Added support for Alfresco 7.3

### Fixed
* [ALFREDAPI-503](https://xenitsupport.jira.com/browse/ALFREDAPI-503): Fixed issue where site information could not be retrieved if the user does not have permissions to one of the components

### Removed
* [ALFREDAPI-505](https://xenitsupport.jira.com/browse/ALFREDAPI-505): Drop support for Alfresco 5.2 and 6.1


## 3.1.0 (2022-04-21)

### Added
Expand Down
9 changes: 3 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ node {
stage("Unit test apix-rest-v1") {
sh "${gradleCommand} :apix-rest-v1:test"
}
stage("Build 52") {
BuildVersionX("52")
}
stage("Build 61") {
BuildVersionX("61")
}
stage("Build 62") {
BuildVersionX("62")
}
Expand All @@ -63,6 +57,9 @@ node {
stage("Build 72") {
BuildVersionX("72")
}
stage("Build 73") {
BuildVersionX("73")
}

stage("Publishing") {
def gitBranch = env.BRANCH_NAME
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ In a development scenario, it is possible to upload code changes to a running al
This requires the running alfresco to already have an older or equal version of alfred-api installed, and
the use of the jar artifact instead of the amp to do the new install.
The JAR has the format `apix-impl-{ALFRESCO-VERSION}-{APIX-VERSION}.jar` and can be found under
`apix-impl/{ALFRESCO-VERSION}/build/libs/`, where `ALFRESCO-VERSION` is one of *(52|61|62|70|71|72)*.
`apix-impl/{ALFRESCO-VERSION}/build/libs/`, where `ALFRESCO-VERSION` is one of *(62|70|71|72|73)*.
The new installation can be done either through the DE web interface, or with the following gradle task.
```bash
./gradlew :apix-impl:apix-impl-{ALFRESCO-VERSION}:installBundle -Phost={ALFRESCO-HOST} -Pport={ALFRESCO-PORT}
Expand Down
11 changes: 0 additions & 11 deletions apix-docker/52/build.gradle

This file was deleted.

17 changes: 0 additions & 17 deletions apix-docker/52/debug-extension.docker-compose.yml

This file was deleted.

38 changes: 0 additions & 38 deletions apix-docker/52/docker-compose.yml

This file was deleted.

13 changes: 0 additions & 13 deletions apix-docker/61/build.gradle

This file was deleted.

38 changes: 0 additions & 38 deletions apix-docker/61/docker-compose.yml

This file was deleted.

8 changes: 8 additions & 0 deletions apix-docker/73/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dependencies {
baseAlfrescoWar platform("org.alfresco:acs-packaging:7.3.0.1")
baseAlfrescoWar 'org.alfresco:content-services@war'
}

dockerAlfresco {
baseImage = 'docker.xenit.eu/private/alfresco-enterprise/alfresco-repository-enterprise:7.3.0.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ services:
- DEBUG=true
- SHARE_HOST=alfresco-share
alfresco-share:
image: hub.xenit.eu/public/alfresco-share-community:6.1
image: docker.io/xenit/alfresco-share-community:7.3
ports:
- 8090:8080
environment:
- DEBUG=true
- ALFRESCO_HOST=alfresco-core
- ALFRESCO_INTERNAL_HOST=alfresco-core
- ALFRESCO_INTERNAL_HOST=alfresco-core
48 changes: 48 additions & 0 deletions apix-docker/73/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: '2'

services:
alfresco-core:
image: ${DOCKER_IMAGE}
ports:
- "${DOCKER_IP}::8080"
volumes:
- alfresco:/opt/alfresco/alf_data
restart: unless-stopped
environment:
- SOLR_HOST=solr
- TERM=xterm
- GLOBAL_messaging.broker.url=failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true
- GLOBAL_localTransform.core-aio.url=http://transform-core-aio:8090/

solr:
image: hub.xenit.eu/alfresco-enterprise/alfresco-solr6:2.0.1
volumes:
- solr:/opt/alfresco/alf_data
restart: unless-stopped
environment:
- ALFRESCO_HOST=alfresco-core

postgresql:
image: docker.io/xenit/postgres
volumes:
- postgres:/var/lib/postgresql/data
environment:
- POSTGRES_USER=alfresco
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=alfresco
restart: unless-stopped

activemq:
image: alfresco/alfresco-activemq:5.16.1
mem_limit: 1g

transform-core-aio:
image: alfresco/alfresco-transform-core-aio:2.5.0
environment:
JAVA_OPTS: " -Xms256m -Xmx512m"
ACTIVEMQ_URL: "nio://activemq:61616"

volumes:
alfresco:
solr:
postgres:
9 changes: 0 additions & 9 deletions apix-impl/52/overrides.gradle

This file was deleted.

9 changes: 0 additions & 9 deletions apix-impl/61/overrides.gradle

This file was deleted.

7 changes: 0 additions & 7 deletions apix-impl/61/src/main/config/module.properties

This file was deleted.

2 changes: 1 addition & 1 deletion apix-impl/72/overrides.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ ext {
alfresco_repo_version = '14.142'
alfresco_dm_version = alfresco_72_dm_version
alfresco_min_version = "7.2"
//Not setting alfresco_max_version here to make it easier to test on next Alfresco version (only for latest version)
alfresco_max_version = "7.2.99"
}
1 change: 1 addition & 0 deletions apix-impl/72/src/main/config/module.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ module.description=${project.description}
module.version=${project.version}

module.repo.version.min=${project.alfresco_min_version}
module.repo.version.max=${project.alfresco_max_version}
9 changes: 9 additions & 0 deletions apix-impl/73/overrides.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description = "Xenit API-X implementation Alfresco 7.3"

ext {
alfresco_version = alfresco_73_version
alfresco_repo_version = '17.175'
alfresco_dm_version = alfresco_73_dm_version
alfresco_min_version = "7.3"
//Not setting alfresco_max_version here to make it easier to test on next Alfresco version (only for latest version)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ module.description=${project.description}
module.version=${project.version}

module.repo.version.min=${project.alfresco_min_version}
module.repo.version.max=${project.alfresco_max_version}
7 changes: 4 additions & 3 deletions apix-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ subprojects {

dependencies {
compile(project(":apix-impl"))
dynamicExtensionsBundles(group: 'eu.xenit.swagger.ui', name: 'swagger-ui_5x', version: '1.1.0') {
transitive = false
} // Works for 6x too
// Works for >5 too
dynamicExtensionsBundles(group: 'eu.xenit.swagger.ui', name: 'swagger-ui_5x', version: '1.3.0') { transitive = false }
}

publishing {
Expand Down Expand Up @@ -150,6 +149,8 @@ public class Version {
+ 'org.springframework.cglib.proxy,'
// Unintuitively, the notation 'version="1.0"' means any version >= 1.0
+ 'org.json;version="1.0",'
// Alfresco >=7.3 uses a SLF4J version >2.0, so we need to override the default upper boundary of 2.0.
+ 'org.slf4j.*;version="1.7",'
+ '!com.google.appengine.api,'
+ '!com.google.apphosting.api,'
+ '!org.joda.convert,'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,28 @@ public List<ISite> getUserSites(String userId) {
return apixSites;
}

private Map<String, NodeRef> getSiteComponents(org.alfresco.service.cmr.site.SiteService siteService,
String siteShortname) {
private Map<String, NodeRef> getSiteComponents(org.alfresco.service.cmr.site.SiteService siteService, String siteShortname) {
Map<String, NodeRef> componentsMap = new HashMap<>();
NodeRef documentLibrary = c.apix(siteService.getContainer(siteShortname, DOCUMENT_LIBRARY_COMPONENT));
NodeRef links = c.apix(siteService.getContainer(siteShortname, LINKS_COMPONENT));
NodeRef dataLists = c.apix(siteService.getContainer(siteShortname, DATA_LISTS_COMPONENT));
NodeRef wiki = c.apix(siteService.getContainer(siteShortname, WIKI_COMPONENT));
NodeRef discussions = c.apix(siteService.getContainer(siteShortname, DISCUSSIONS_COMPONENT));
componentsMap.put(DOCUMENT_LIBRARY_COMPONENT, documentLibrary);
componentsMap.put(LINKS_COMPONENT, links);
componentsMap.put(DATA_LISTS_COMPONENT, dataLists);
componentsMap.put(WIKI_COMPONENT, wiki);
componentsMap.put(DISCUSSIONS_COMPONENT, discussions);
addSiteComponentToMap(siteService, componentsMap, siteShortname, DOCUMENT_LIBRARY_COMPONENT);
addSiteComponentToMap(siteService, componentsMap, siteShortname, LINKS_COMPONENT);
addSiteComponentToMap(siteService, componentsMap, siteShortname, DATA_LISTS_COMPONENT);
addSiteComponentToMap(siteService, componentsMap, siteShortname, WIKI_COMPONENT);
addSiteComponentToMap(siteService, componentsMap, siteShortname, DISCUSSIONS_COMPONENT);

return componentsMap;
}

private void addSiteComponentToMap(org.alfresco.service.cmr.site.SiteService siteService, Map<String, NodeRef> componentsMap,
String siteShortname, String siteComponentName) {
try {
NodeRef componentRef = c.apix(siteService.getContainer(siteShortname, siteComponentName));
if (componentRef == null) {
return;
}
componentsMap.put(siteComponentName, componentRef);
}
catch (AccessDeniedException ex) {
logger.debug("Access denied to site component {} for site {}. It is not added to the map.", siteComponentName, siteShortname);
}
}
}
Loading

0 comments on commit 25bdc63

Please sign in to comment.