API reference#
The Java API of Planning Engine ships as one dependency-free JAR that needs JDK 21 or newer. It schedules, edits, levels and scores projects, turns workers and skill requirements into slots for auto-assignment, and reads and writes the shared JSON format.
How the API is organized#
Every public type lives in the single package org.dhtmlx.plen. There's no module-info.java. The folders of this reference group the types by topic and aren't packages:
- project - the
Projecthandle, its options andValidation - data - the input snapshot:
ProjectData, tasks, links, calendars, resources, assignments,IdandMoment - changes - edits for a live project:
SchedulingChanges, the update records andPatch - results -
ScheduleResultand what it holds - resources - load profiles and leveling
- evaluate - candidates, metrics and
Execution - suggest - slots and auto-assignment results
- assign - the skill layer input:
Pool,Worker,SkillandRequirement - errors -
PlenExceptionand its subclasses, plusMatchException - json - the JSON API:
JsonProject,Wire,Decode,EncodeandJson. See Exchange JSON with a client - support -
ValueRecord,Vec,SortedDictandRef
Each call has its own page at the top of api/: the methods of Project and the static methods Engine.schedule and SkillLayer.slots.
The library is a private Maven package.
plen
{repository-url}
org.dhtmlx
plen
{version}
repositories {
maven { url = uri("{repository-url}") }
}
dependencies {
implementation("org.dhtmlx:plen:{version}")
}
;
The package also holds Set, Queue, PriorityQueue, Array and Runtime, which clash with java.util and java.lang names. Alongside a wildcard import of java.util.*, import the needed Planning Engine types by name. Other public classes in the package that this reference doesn't list are implementation details.
Every call is synchronous and CPU-only: no CompletableFuture, no I/O. Nothing is AutoCloseable. A Project isn't synchronized; see Share a project between threads and Call from async code.
Failures are unchecked exceptions, and no method declares throws. Invalid input throws InputException, and a call that doesn't fit the project's state throws ProjectException. Both extend PlenException. SkillLayer.slots throws MatchException instead. A null argument that isn't documented as nullable throws NullPointerException. Cycles, conflicts and rejected edits come back as data in the result. See Error handling for which failures throw and which don't.
Calls by task#
preview, loadProfile, evaluate, evaluateWith, suggestAssignments, roster and SkillLayer.slots need a solved project. evaluate, evaluateWith, suggestAssignments and SkillLayer.slots also accept any Collection in place of Vec. The constructors and copy() are on the Project page.