PawSource
import io.skipcheck.tm1.testcontainers.PawSource; Where a PawContainer gets Planning Analytics Workspace from: IBM's PAW Local
zip, ipa_workspace_local_<release>.<build>.zip.
IBM ships PAW Local as Docker images, compose files and scripts in that zip. Nothing
from it is in this library, so every PawContainer needs one.
discover finds one from the environment. Each setting is read first as a
system property and then as an environment variable, under the same name, the names
docker/paw/paw-local.sh uses:
PAW_ZIP: the zip itselfPAW_BUNDLE_DIR: a folder holding it; the newestipa_workspace_local_*.zipthere is used
Members
PawSource constructor | Makes the path absolute and checks it's a file. |
ZIP static | The PAW Local zip. |
BUNDLE_DIR static | A folder holding the PAW Local zip; the newest one there is used. |
describe | A short description for logs and messages. |
discover static | Finds a source from system properties and environment variables. |
discover static | Finds a source using lookup to read each setting. |
toString | |
hashCode | |
equals | |
zip |
PawSource
constructorPawSource(Path zip)Makes the path absolute and checks it's a file.
ZIP
staticString ZIPThe PAW Local zip.
BUNDLE_DIR
staticString BUNDLE_DIRA folder holding the PAW Local zip; the newest one there is used.
describe
String describe()A short description for logs and messages.
Returns
- the description
discover
staticstatic Optional<PawSource> discover()Finds a source from system properties and environment variables. See the class docs.
Returns
- the source, or empty if none is configured
Throws
IllegalArgumentException- if a setting is present but invalid
discover
staticstatic Optional<PawSource> discover(Function<String,String> lookup) Finds a source using lookup to read each setting. Blank values count as
unset.
Parameters
lookup- reads a setting by name, returning
nullif it's unset
Returns
- the source, or empty if none is configured
Throws
IllegalArgumentException- if a setting is present but invalid, such as a folder with no PAW Local zip in it. A wrong setting fails rather than silently skipping the tests.
toString
String toString()hashCode
int hashCode()equals
boolean equals(Object o)zip
Path zip()Also in the Javadoc.