client-direct

client-direct appearance

client-direct provides the web interface to the app-manager component and uses a number of different web pages, i.e. it’s not an SPA.

The client-direct interface is intended for running simulations using manually input values, e.g. pIC50, Hill Coefficients.

Dependencies

Initial installation

Download the project source and go to this component’s root directory (i.e. here) and follow the steps below.

  • Either …
  • … or …
  1. [ T ] Copy sample.pom.xml to pom.xml
  2. [ S ] Copy src/main/resources/META-INF/spring/ctx/config/sample.appCtx.config.cellModels.site.xml to src/main/resources/META-INF/spring/ctx/config/appCtx.config.cellModels.site.xml
  3. [ S ] Copy src/main/resources/META-INF/spring/ctx/config/sample.appCtx.config.site.xml to src/main/resources/META-INF/spring/ctx/config/appCtx.config.site.xml
  4. [ T ] Copy src/main/resources/META-INF/spring/ctx/ws/sample.appCtx.ws.security-outgoing.xml to src/main/resources/META-INF/spring/ctx/ws/appCtx.ws.security-outgoing.xml
  5. [ V ] Copy src/main/webapp/resources/js/site/sample.site.js to src/main/webapp/resources/css/site/site.js
  6. [ T ] Copy src/properties/database/sample.database.filter.properties to src/properties/database/database.filter.properties
  7. [ T ] Copy src/properties/database/sample.database.spring.properties to src/properties/database/dev.database.embedded.properties
  8. See Database choice
  9. [ T ] Copy src/properties/sample.filter.properties to src/properties/filter.properties
  10. [ T ] Copy src/properties/sample.spring.properties to src/properties/spring.properties

If you intend to have a client-direct-specific “prepopulated user authenticationuser authentication mechanism database then also do the following :

  1. [ T ] Copy src/main/resources/META-INF/data/spring-security/local/sample.users.sql to src/main/resources/META-INF/data/spring-security/local/users.sql
  • … finally
  1. Edit each of the copied files according to your desired configuration.

Configuration

pom.xml

It may necessary in some circumstances, e.g. if there is site-specific access control code being overlayed into the client-direct src/main/java directory, or if using a MySQL driver, to adapt the pom.xml file for Maven-building the component.

src/main/resources/META-INF/data/spring-security/local/users.sql

Adjust this according to your expected usage requirements.

  • If you are using a local client-direct-specific “prepopulated user authentication” mechanism for authentication and authorisation, this file is required.
    Please also check the following Note.
  • If you are using a “bespoke user authentication” mechanism, or if “prepopulated user authentication” users are shared between client and client-direct installations (and hence defined in client-shared), then this file is not required.

Note

If there is a new registration request the requesting user’s details are not automatically written to the user database.
New users must be manually added to this users.sql file and the system restarted – for this reason it is better to create a number of unissued usernames and passwords (commensurate with the total anticipated usage) and then distribute them to new registrations as they arrive.

src/main/resources/META-INF/spring/ctx/config/appCtx.config.cellModels.site.xml

Collection of ion channel models which the user can choose from.

Probably the only modifications likely are :

  1. To comment out any ion channel model(s) which is/are not relevant to the portal users, and/or,
  2. To assign a default ion channel model to use by way of assigning a single ion channel model with a defaultModel arg with an attribute value of true.

Warning

These ion channel models are built into ApPredict and the detail MUST be identical to the values which ApPredict expects, particularly the identifier and name values.

src/main/resources/META-INF/spring/ctx/config/appCtx.config.site.xml

c50Units

Preferred units for displaying inhibitory concentration, e.g. IC50 [nM], IC50 [µM], pIC50.
Cut-and-paste your preferred unit to be the top/first <entry /> value.

configuration -> recommendedPlasmaConcMax

Default recommended value for maximum plasma concentration (µM) value.
Users can enter values higher than the recommended maximum if they wish, i.e. this is not an enforced limit.

configuration -> plasmaConcMin

Minimum plasma concentration (µM).
Users cannot enter values lower than this, i.e. it is an enforced limit.

configuration -> spreads

Define the default variability values for specified ion channels.

src/main/resources/META-INF/spring/ctx/ws/appCtx.ws.security-outgoing.xml

Generally no change necessary.

src/main/webapp/resources/css/site/site.js

Generally no change necessary.

src/properties/database/database.filter.properties

client.database.queryTimeout=

Data query timeout (in milliseconds). Shouldn’t need to be higher than 200.

src/properties/database/dev.database.<deploy.db_vendor>.properties

See also

Database choice

src/properties/filter.properties

app_manager.soap.location=

WS URL of app-manager component, e.g. ‘http://localhost:18380/app_manager-0.0.4/aws/

See also

For the following email-related properties take a look at the JavaMail API documentation

log.file.client_direct=

Component log file location on disk, e.g. ‘logs/client-direct.log’.

log.level.client_direct=

Component log level, e.g. (trace|debug|info|warn|error|fatal).

log.level.general=

Log level of code from other libraries, e.g. (trace|debug|info|warn|error|fatal).

src/properties/spring.properties

recaptcha.private.key=

reCAPTCHA private key.

recaptcha.public.key=

reCAPTCHA public key. If this field is left empty it will be assumed that no reCAPTCHA is available!

securement.app.username=

app-manager WSS username.

securement.app.password=

app-manager WSS password.

Build

See also

Database choice and Spring profiles for additional information.

-Dspring.profiles.active=

Options are currently client-shared_(embedded|mysql|oracle10g),client-shared_(bespoke|prepopulated).

Warning

At build time it is important to include the client-shared_embedded spring profile during building because during integration testing rubbish may be written to the database so it is important to use the embedded database during the build process.

-Ddeploy.db_vendor=

The name of the database vendor, e.g. mysql, postgres, used in the intended deployment (not build) environment. The actual name used corresponds exactly to the <deploy.db_vendor> element of the file derived from sample.database.spring.properties during the installation process.

-Ddeploy.env=

The environment name, i.e. dev.

Example build instructions (illustrating use of embedded during the build process, and mysql in the deploy environment):

cd <ap_predict_online>/client-direct
mvn clean verify -Dspring.profiles.active=client-shared_embedded,client-shared_prepopulated -Ddeploy.db_vendor=mysql -Ddeploy.env=dev

Deploy

If the Build command has completed successfully the webapp .war file should be in the target directory. Copy this to the servlet container’s relevant file, e.g. for Tomcat, the webapps directory.

Run

See start.

Start-up problems

See also

Log file troubleshooting.

Footnotes

[1]Since early 2019.