/
Target Service (java)
NOTE: Trivore ID Documentation has moved to https://trivoreid.com
The content on this site IS OUT OF DATE!
This space has been archived!
Please go ahead to the new site!
Target Service (java)
Wrapper for '/target' endpoint.
List of all options
Target management
Initialize service
TrivoreID sdk = TrivoreID.mgmtApiClient();
TargetServiceImpl targetService = new TargetServiceImpl(sdk.targetService());
Target management
// get page with the targets
Criteria criteria = new Criteria(Filter.equal("nsCode", "examplecode"));
Page<Target> page = targetService.getAll(criteria);
// create new target
// the function returns target object with the generated id
Target target = targetService.create(new Target());
String targetId = target.getId();
// update target
target.setName("Example Name");
targetService.update(target);
// get target
target = targetService.get(targetId);
// delete target
targetService.delete(targetId);