This directory contains example code demonstrating how to use the OpenTDF Java SDK.
The examples can be run using the exec-maven-plugin. The general format is:
mvn -f examples/pom.xml exec:java@<ExampleName>Replace <ExampleName> with the name of the example you want to run. For example, to run the EncryptExample, use the following command:
mvn -f examples/pom.xml exec:java@EncryptExampleCreateAttributeCreateNamespaceCreateSubjectConditionSetCreateSubjectMappingDecryptCollectionExampleDecryptExampleEncryptCollectionExampleEncryptExampleGetDecisionsGetEntitlementsGetManifestInformationListAttributesListNamespacesListSubjectMappings
Some examples, like GetManifestInformation, require command-line arguments. You can pass arguments to the examples using the exec.args property. For example:
mvn -f examples/pom.xml exec:java@GetManifestInformation -Dexec.args="my.ciphertext"