Package com.infoclinika.mssharing.model.internal.entity

Examples of com.infoclinika.mssharing.model.internal.entity.Experiment


        this.rawFilesRepository = rawFilesRepository;
    }

    @Override
    public PaginationItems.PagedItem<ExperimentFileItem> pagedFilesInExperiment(long actor, long experimentId, PaginationItems.PagedItemInfo pageInfo) {
        Experiment experiment = checkPresence(experimentRepository.findOne(experimentId));
        if (!ruleValidator.isUserCanReadExperiment(actor).apply(experiment))
            throw new AccessDenied("User hasn't permissions to read experiment");

        Page<RawFile> files = getPagedFiles(experimentId, pageInfo);
        return new PaginationItems.PagedItem<ExperimentFileItem>(files.getTotalPages(), files.getTotalElements(),
View Full Code Here


    }


    @Override
    public ImmutableSortedSet<ExperimentFileItem> filesInExperiment(long actor, long experimentId) {
        Experiment experiment = checkPresence(experimentRepository.findOne(experimentId));
        if (!ruleValidator.isUserCanReadExperiment(actor).apply(experiment))
            throw new AccessDenied("User hasn't permissions to read experiment");

        return from(experiment.getRawFiles().data)
                .transform(FILE_ITEM_TRANSFORMER)
                .toImmutableSortedSet(FILE_ITEM_COMPARATOR);
    }
View Full Code Here

         return experimentRepository.findOneByToken(token) != null;
    }

    @Override
    public ExperimentItem getExperiment(String token) {
        Experiment experiment = checkNotNull(experimentRepository.findOneByToken(token));
        return new ExperimentItem(experiment.getCreator().getId(), experiment.getId()
                ,from(experiment.getRawFiles().getData())
                .transform(META_ID_FROM_RAW).toImmutableSet());
    }
View Full Code Here

                .transform(META_ID_FROM_RAW).toImmutableSet());
    }

    @Override
    public void sendEmail(long actor, String token, String email) {
        Experiment experiment = checkNotNull(experimentRepository.findOneByToken(token));
        notifier.sendExperimentDownloadLink(actor, experiment.getId(), email, transformers.getDownloadLink(experiment));
    }
View Full Code Here

        return fileMetaDataRepository.findOne(fileMetaDataId).getName();
    }

    @Override
    public ExperimentDetails experimentDetails(long experiment) {
        final Experiment ex = experimentRepository.findOne(experiment);
        return new ExperimentDetails(ex.name, ex.getCreator().getEmail(), ex.getTranslationError());
    }
View Full Code Here

TOP

Related Classes of com.infoclinika.mssharing.model.internal.entity.Experiment

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.