Skip to content

Commit

Permalink
Replaced WebService with MERIT WebService impl. Added SpeciesListServ…
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Feb 24, 2025
1 parent 474e6cb commit 3f12431
Show file tree
Hide file tree
Showing 13 changed files with 834 additions and 55 deletions.
7 changes: 6 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,15 @@ dependencies {
implementation "org.grails.plugins:async"
implementation "org.grails.plugins:scaffolding"
implementation "org.grails.plugins:gsp"
implementation 'commons-io:commons-io:2.6'
implementation 'commons-io:commons-io:2.14.0'
implementation "org.grails.plugins:ala-auth:$alaSecurityLibsVersion"
implementation "org.grails.plugins:ala-ws-security-plugin:$alaSecurityLibsVersion"
implementation "org.grails.plugins:ala-ws-plugin:$alaSecurityLibsVersion"
implementation "au.org.ala:userdetails-service-client:$alaSecurityLibsVersion"
implementation "org.codehaus.groovy.modules.http-builder:http-builder:0.7.1"
implementation "org.apache.httpcomponents:httpcore:4.4.13"
implementation 'org.apache.httpcomponents:httpclient:4.5.13'
implementation "org.apache.httpcomponents:httpmime:4.2.1"

console "org.grails:grails-console"
profile "org.grails.profiles:web-plugin"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xss2048k -Xmx1024M
exploded=true
enableClover=false
enableJacoco=true
alaSecurityLibsVersion=6.2.0
alaSecurityLibsVersion=6.3.0
19 changes: 16 additions & 3 deletions grails-app/conf/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ spring:

disableCAS: true

security:
cas:
appServerName: 'n/a'

management:
endpoints:
enabled-by-default: false

lists.baseURL : https://lists-ws.test.ala.org.au/

---
grails:
mime:
Expand Down Expand Up @@ -94,6 +95,18 @@ userProfile:
---
environments:
test:
security:
cas:
appServerName: 'n/a'
oidc:
enabled: true
discoveryUri: 'http://localhost:8080'
jwt:
enabled: false

grails:
serverURL: "http://localhost:8080"

server:
port: "8087"
spring:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ class UrlMappings {
controller = 'preview'
action = [GET: 'index', POST: 'model']
}
"/speciesList/$listId"() {
controller = 'speciesList'
action = 'speciesListItems'
}
"500"(view:'/error')
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package au.org.ala.ecodata.forms

import org.grails.web.json.JSONArray
import org.grails.web.json.JSONElement
import org.grails.web.json.JSONObject

/**
Expand All @@ -11,7 +10,7 @@ class ActivityFormService {

static final String ACTIVITY_FORM_PATH = '/activityForm'
static final String ACTIVITY_FORM_SEARCH_PATH = '/activityForm/search'
def webService
def ecpWebService
def grailsApplication

/**
Expand All @@ -33,7 +32,7 @@ class ActivityFormService {
if (includeScoreInformation) {
url += '&includeScoreInformation='+Boolean.toString(includeScoreInformation)
}
Map result = webService.getJson(url)
Map result = ecpWebService.getJson(url)
if (!result || result.error) {
result = null
}
Expand Down Expand Up @@ -74,7 +73,7 @@ class ActivityFormService {
Map searchActivityForms(Map criteria) {
String url = grailsApplication.config.getProperty('ecodata.service.url') +
ACTIVITY_FORM_SEARCH_PATH
Map result = webService.doPost(url, criteria)
Map result = ecpWebService.doPost(url, criteria)
if (!result || result.error) {
result = null
}
Expand Down
Loading

0 comments on commit 3f12431

Please sign in to comment.