A Java library for accessing Evergreen servers via the HTTP JSON Gateway with IDL support.
- Java 17 or higher
This project uses Gradle for building. You don't need to install Gradle separately - the project includes the Gradle Wrapper.
# Build the project
./gradlew build
# Run tests
./gradlew test
# Generate JAR
./gradlew jar
# Generate all artifacts (including sources and javadoc JARs)
./gradlew build
# Clean build outputs
./gradlew cleanAn example program that demonstrates logging into an Evergreen server, fetching a user, and updating their phone number via the Evergreen JSON HTTP gateway.
# Build the project and copy runtime dependencies
./gradlew build copyDependencies
# Run the example
java -cp build/libs/evergreen-java-0.1.0-SNAPSHOT.jar:build/dependencies/* \
org.evergreen_ils.examples.UpdateUserPhone \
<hostname> <username> <password> <user_id> <new_phone>The copyDependencies task copies the required JAR files (JSON parser, etc.) from Gradle's
cache into build/dependencies/ so they can be included in the classpath when running examples.
Example:
java -cp build/libs/evergreen-java-0.1.0-SNAPSHOT.jar:build/dependencies/* \
org.evergreen_ils.examples.UpdateUserPhone \
evergreen.example.org admin demo123 1 "555-123-4567"Use -k to ignore SSL certificate errors (for testing with self-signed certificates):
java -cp build/libs/evergreen-java-0.1.0-SNAPSHOT.jar:build/dependencies/* \
org.evergreen_ils.examples.UpdateUserPhone \
-k localhost admin demo123 1 "555-123-4567"Demonstrates applying user settings via the open-ils.actor.settings.apply.user_or_ws API.
java -cp build/libs/evergreen-java-0.1.0-SNAPSHOT.jar:build/dependencies/* \
org.evergreen_ils.examples.UpdateUserSetting \
[-k] <hostname> <username> <password> <sms_number>Example:
java -cp build/libs/evergreen-java-0.1.0-SNAPSHOT.jar:build/dependencies/* \
org.evergreen_ils.examples.UpdateUserSetting \
-k localhost admin demo123 "555-123-4567"Demonstrates retrieving and updating patron addresses. Retrieval uses
open-ils.actor.user.fleshed.retrieve and updates use open-ils.actor.patron.update.
View addresses:
java -cp build/libs/evergreen-java-0.1.0-SNAPSHOT.jar:build/dependencies/* \
org.evergreen_ils.examples.PatronAddress \
[-k] <hostname> <username> <password> <user_id>Update billing address street1:
java -cp build/libs/evergreen-java-0.1.0-SNAPSHOT.jar:build/dependencies/* \
org.evergreen_ils.examples.PatronAddress \
-k localhost admin demo123 1 "123 Main St"Apache License 2.0 - See LICENSE file for details.