use of org.platformlayer.ops.schedule.EndpointRecord in project platformlayer by platformlayer.
the class JdbcSchedulerRepository method fromDb.
private SchedulerRecord fromDb(SchedulerRecordEntity in) throws OpsException {
SchedulerRecord out = new SchedulerRecord();
out.key = in.key;
out.schedule = new JobSchedule();
out.schedule.base = in.scheduleBase;
out.schedule.interval = in.scheduleInterval;
ActionTask task = new ActionTask();
out.task = task;
task.target = PlatformLayerKey.parse(in.taskTarget);
task.endpoint = new EndpointRecord();
task.endpoint.url = in.taskEndpointUrl;
task.endpoint.project = in.taskEndpointProject;
task.endpoint.secret = fromDb(in.taskEndpointSecret);
task.endpoint.token = in.taskEndpointToken;
task.endpoint.trustKeys = in.taskEndpointTrustKeys;
if (in.taskAction != null) {
task.action = deserializeAction(in.taskAction);
}
return out;
}
Aggregations