Package ef.impl.response

Examples of ef.impl.response.MapResponse


        if(volume != dstVolume){
            throw new ErrException(Error.errTrgFolderNotFound);
        }

        List<FileEntry> added = new ArrayList<FileEntry>();
        MapResponse response = new MapResponse();

        if(request.cut){
            List<String> removed = new ArrayList<String>();
            for(String target: request.targets){
                added.add(volume.move(target, request.dst));
                removed.add(target);
            }
            response.put("removed", removed);
        }else{
            for(String target: request.targets){
                added.add(volume.copy(target, request.dst));
            }
        }

        response.put("added", added);
        return response;
    }
View Full Code Here


    @Override
    public Response execute(PutRequest request) {
        Volume volume = volumeManager.getRequiredVolume(request.target);
        volume.writeText(request.target, request.content);
        FileEntry file = volume.get(request.target);
        MapResponse response = new MapResponse();
        response.put("file", file);
        return response;
    }
View Full Code Here

            Volume volume = volumeManager.getRequiredVolume(request.target);
            cwd = volume.get(request.target);
            list = volume.list(request.target);
        }

        MapResponse response = new MapResponse();

        if(request.init){
            response.put("api", 2);
            response.put("options", OPTIONS);
        }

        response.put("files", list);

        if(cwd != null){
            response.put("cwd", cwd);
        }

        return response;
    }
View Full Code Here

    @Override
    public Response execute(ExtractRequest request) {
        Volume volume = volumeManager.getRequiredVolume(request.target);
        FileEntry entry = volume.extract(request.target);
        MapResponse response = new MapResponse();
        response.put("added", Arrays.asList(entry));
        return response;
    }
View Full Code Here

        for(String target: request.targets){
            added.add(volume.duplicate(target));
        }

        MapResponse response = new MapResponse();
        response.put("added", added);
        return response;
    }
View Full Code Here

            }
        }
    }

    private void writeError(HttpServletResponse resp, String ... errors) throws IOException {
        MapResponse response = new MapResponse();
        response.put("error", errors);
        writeResponse(response, resp);
    }
View Full Code Here

TOP

Related Classes of ef.impl.response.MapResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.