Package com.infoclinika.mssharing.fileserver.model

Examples of com.infoclinika.mssharing.fileserver.model.NodePath


    @RequestMapping(value = "/destination/{id}", method = RequestMethod.GET)
    @ResponseBody
    public UploadFilePathResponse composeExperimentAttachmentDestination(@PathVariable("id") long attachmentId, Principal principal) {
        final long userId = getUserId(principal);
        //TBD: should we verify attachment exists?
        final NodePath nodePath = storedObjectPaths.experimentAttachmentPath(userId, attachmentId);
        return new UploadFilePathResponse(nodePath.getPath());
    }
View Full Code Here


    private StorageService storageService;

    @Override
    @Async
    public void feedContentToStorage(long fileItemId, long userId, StoredFile storedFile) {
        final NodePath nodePath = getPath(fileItemId, userId);
        LOGGER.debug("Posting the attachment binary contents to the project. File item ID = " + fileItemId + "; user ID = " + userId + ".");

        storageService.put(nodePath, storedFile);

        LOGGER.debug("Project attachment saved successfully. File item ID = " + fileItemId + "; user ID = " + userId + ". Path = " + nodePath);
View Full Code Here

        final List<InstrumentManagement.UploadFileItem> files = uploadFilesRequest.files;
        for (InstrumentManagement.UploadFileItem file : files) {

            Long fileItemId = instrumentManagement.findUploadResumableFile(userId, instrumentId, file.name);
            if (fileItemId == null) {
                final NodePath nodePath = storedObjectPaths.rawFilePath(userId, instrumentId, file.name);
                fileItemId = instrumentManagement.attachFile(userId, file.name, file.size, instrumentId, file.specie, file.labels, file.archive, nodePath.getPath());
            }
            storedFilesInfo.add(new UploadFilesResponse.UploadFileResponseLine(file.name, fileItemId, ""));
        }
        return new UploadFilesResponse(instrumentId, storedFilesInfo);
    }
View Full Code Here

    public UploadFilePathResponse composeUploadFilePath(@PathVariable("fileId") long fileId, Principal principal) {
        final long userId = getUserId(principal);

        final DetailsReader.FileItem fileItem = detailsReader.readFileDetails(userId, fileId);

        final NodePath nodePath = storedObjectPaths.rawFilePath(userId, fileItem.instrumentId, fileItem.name);
        return new UploadFilePathResponse(nodePath.getPath());
    }
View Full Code Here

    @RequestMapping(value = "/destination/{id}", method = RequestMethod.GET)
    @ResponseBody
    public UploadFilePathResponse composeProjectAttachmentDestination(@PathVariable("id") long attachmentId, Principal principal) {
        final long userId = getUserId(principal);
        //TBD: should we verify attachment exists?
        final NodePath nodePath = storedObjectPaths.projectAttachmentPath(userId, attachmentId);
        return new UploadFilePathResponse(nodePath.getPath());
    }
View Full Code Here

    @Inject
    private DetailsReader detailsReader;


    public NodePath rawFilePath(long user, long instrumentId, String fileName) {
        return new NodePath(Joiner.on(DELIMITER).join(rawFilesPrefix, user, instrumentId, checkHasNowDelimiter(fileName)));
    }
View Full Code Here

    public NodePath rawFilePath(long user, long instrumentId, String fileName) {
        return new NodePath(Joiner.on(DELIMITER).join(rawFilesPrefix, user, instrumentId, checkHasNowDelimiter(fileName)));
    }

    public NodePath experimentAttachmentPath(long user, long attachmentId) {
        return new NodePath(Joiner.on(DELIMITER).join(experimentsAttachmentsPrefix, user, attachmentId));
    }
View Full Code Here

    public NodePath experimentAttachmentPath(long user, long attachmentId) {
        return new NodePath(Joiner.on(DELIMITER).join(experimentsAttachmentsPrefix, user, attachmentId));
    }

    public NodePath projectAttachmentPath(long user, long attachmentId) {
        return new NodePath(Joiner.on(DELIMITER).join(projectAttachmentsPrefix, user, attachmentId));
    }
View Full Code Here

    public NodePath projectAttachmentPath(long user, long attachmentId) {
        return new NodePath(Joiner.on(DELIMITER).join(projectAttachmentsPrefix, user, attachmentId));
    }

    public NodePath translatedRawFilePath(long user, long instrumentId, String fileName) {
        return new NodePath(Joiner.on(DELIMITER).join(translatedRawFilesPrefix, user, instrumentId, checkHasNowDelimiter(fileName)));
    }
View Full Code Here

    }

    @Transactional
    public NodePath experimentSearchExportPath(long userId, long experimentSearchId, long fileId, DetailsReader.ExportType exportType) {
        final String key = detailsReader.readExperimentSearchExport(userId, experimentSearchId, fileId, exportType).key;
        return new NodePath(key);
    }
View Full Code Here

TOP

Related Classes of com.infoclinika.mssharing.fileserver.model.NodePath

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.