class AcmObjectLockAPIController {

    @PreAuthorize("hasPermission(#objectId, #objectType, 'unlock')")
    @RequestMapping(value = { "/api/v1/plugin/{objectType}/{objectId}/lock",
            "/api/latest/plugin/{objectType}/{objectId}/lock" }, method = RequestMethod.DELETE)
    @ResponseStatus(value = HttpStatus.OK)
    public void unlockObject(@PathVariable(value = "objectType") String objectType, @PathVariable(value = "objectId") Long objectId,
            @RequestParam(value = "lockType", required = false, defaultValue = "OBJECT_LOCK") String lockType,
            @RequestParam(value = "lockId", required = false) Long lockId, Authentication auth)
            throws MuleException, IOException, AcmObjectLockException
    {
        objectLockingManager.releaseObjectLock(objectId, objectType, lockType, true, auth.getName(), lockId);
    }

}