- public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException {
- Sone sone = getSone(parameters, "Sone", true, true);
- getCore().unlockSone(sone);
- return new Response("SoneUnlocked", new SimpleFieldSetBuilder().put("Sone", sone.getId()).get());
+ public Response execute(SimpleFieldSet parameters) throws FcpException {
+ Optional<Sone> sone = getSone(parameters, "Sone", true, true);
+ getCore().unlockSone(sone.get());
+ return new Response("SoneUnlocked", new SimpleFieldSetBuilder().put("Sone", sone.get().getId()).get());