client-direct¶
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¶
- Maven (build)
- Java 7 8 [1] or higher (build, deploy)
- Java Servlet Container, e.g. Apache Tomcat (deploy)
- Database (build, deploy)
- A Maven-
installedclient-parentandclient-shared. See client-parent and client-shared
General topics¶
Initial installation¶
Download the project source and go to this component’s root directory (i.e. here) and follow the steps below.
- Either …
- … or …
- [ T ] Copy sample.pom.xml to
pom.xml- [ 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- [ 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- [ 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- [ V ] Copy src/main/webapp/resources/js/site/sample.site.js to
src/main/webapp/resources/css/site/site.js- [ T ] Copy src/properties/database/sample.database.filter.properties to
src/properties/database/database.filter.properties- [ T ] Copy src/properties/database/sample.database.spring.properties to
src/properties/database/dev.database.embedded.properties- See Database choice
- [ T ] Copy src/properties/sample.filter.properties to
src/properties/filter.properties- [ T ] Copy src/properties/sample.spring.properties to
src/properties/spring.properties
If you intend to have a client-direct-specific “prepopulated user authentication”
user authentication mechanism database then also do
the following :
- [ 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
- 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
clientandclient-directinstallations (and hence defined inclient-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 :
- To comment out any ion channel model(s) which is/are not relevant to the portal users, and/or,
- To assign a default ion channel model to use by way of assigning a single ion channel model with a
defaultModelarg with an attributevalueoftrue.
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.
See also
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
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
