renamed
parent
2f64c62b78
commit
bba3ac0613
|
|
@ -39,6 +39,7 @@ import com.nttdata.calender.planTimes.PlanTimesRequest;
|
||||||
import com.nttdata.calender.presets.Preset;
|
import com.nttdata.calender.presets.Preset;
|
||||||
import com.nttdata.calender.presets.Presets;
|
import com.nttdata.calender.presets.Presets;
|
||||||
import com.nttdata.calender.presets.PresetsGetResponse;
|
import com.nttdata.calender.presets.PresetsGetResponse;
|
||||||
|
import com.nttdata.calender.presets.RenamePresetRequest;
|
||||||
import com.nttdata.calender.states.State;
|
import com.nttdata.calender.states.State;
|
||||||
import com.nttdata.calender.states.StateChange;
|
import com.nttdata.calender.states.StateChange;
|
||||||
import com.nttdata.calender.states.StateChangeRequest;
|
import com.nttdata.calender.states.StateChangeRequest;
|
||||||
|
|
@ -320,13 +321,20 @@ public class KalenderRestController {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@CrossOrigin("*")
|
@CrossOrigin("*")
|
||||||
@GetMapping("api/updatePresets")
|
@GetMapping("api/initPresets")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object initPresets() throws ARException, NotFoundError {
|
public Object initPresets() throws ARException, NotFoundError {
|
||||||
Presets presets = new Presets(javaAPI);
|
Presets presets = new Presets(javaAPI);
|
||||||
return presets.initPresets();
|
return presets.initPresets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@CrossOrigin
|
||||||
|
@PostMapping("api/renamePresets")
|
||||||
|
@ResponseBody
|
||||||
|
public Object renamePreset(@RequestBody RenamePresetRequest request) {
|
||||||
|
return request;
|
||||||
|
}
|
||||||
|
|
||||||
@CrossOrigin("*")
|
@CrossOrigin("*")
|
||||||
@GetMapping("/api/getAllPresets")
|
@GetMapping("/api/getAllPresets")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|
|
||||||
|
|
@ -88,10 +88,15 @@ public class Presets {
|
||||||
}
|
}
|
||||||
|
|
||||||
// public boolean selectPreset(String guid) throws ARException {
|
// public boolean selectPreset(String guid) throws ARException {
|
||||||
// api.modifyEntry(guid, prefQuery);
|
// api.modifyEntry(guid, prefQuery);
|
||||||
// return true;
|
// return true;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
public void renamePreset(RenamePresetRequest request) throws ARException {
|
||||||
|
var preset = api.queryFieldsById("\'179\'==\"" + request.getId() + "\"", defQuery.getFieldIds(), formDefault, null, 0, 0).get(0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void allPresets() throws ARException, NotFoundError {
|
public void allPresets() throws ARException, NotFoundError {
|
||||||
var entries = api.queryFieldsById("\'2\'==\"" + api.getUser() + "\"", query.getFieldIds(), formName, null, 0,
|
var entries = api.queryFieldsById("\'2\'==\"" + api.getUser() + "\"", query.getFieldIds(), formName, null, 0,
|
||||||
0);
|
0);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.nttdata.calender.presets;
|
||||||
|
|
||||||
|
public class RenamePresetRequest {
|
||||||
|
private String newName;
|
||||||
|
private String oldName;
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
public RenamePresetRequest(String newName, String oldName, String id) {
|
||||||
|
this.newName = newName;
|
||||||
|
this.oldName = oldName;
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewName() {
|
||||||
|
return this.newName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewName(String newName) {
|
||||||
|
this.newName = newName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOldName() {
|
||||||
|
return this.oldName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOldName(String oldName) {
|
||||||
|
this.oldName = oldName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue