if (result == null) { throw new FenixServiceException("error.Result.not.found"); }
    public ResultDocumentFile run(ResultDocumentFileSubmissionBean bean) throws FenixServiceException {        final Result result = bean.getResult();        if (result == null) { throw new FenixServiceException("error.Result.not.found"); }                final String fileName = result.getIdInternal() + String.valueOf(System.currentTimeMillis());        final String displayName = bean.getFilename();        final Person person = AccessControl.getUserView().getPerson();        final FileMetadata fileMetadata = new FileMetadata(fileName, person.getName());        final FileDescriptor fileDescriptor = FileManagerFactory.getFileManager().saveFile(                getFilePath(result), fileName, true, fileMetadata, bean.getInputStream());                return new ResultDocumentFile(result, person, fileName, displayName, fileDescriptor.getMimeType(), fileDescriptor                .getChecksum(), fileDescriptor.getChecksumAlgorithm(), fileDescriptor.getSize(),                fileDescriptor.getUniqueId(), new RoleGroup(Role.getRoleByRoleType(RoleType.RESEARCHER)));    }