Search in sources :

Example 21 with Dataset

use of edu.harvard.iq.dataverse.Dataset in project dataverse by IQSS.

the class Index method filesearch.

@GET
@Path("filesearch")
public Response filesearch(@QueryParam("persistentId") String persistentId, @QueryParam("semanticVersion") String semanticVersion, @QueryParam("q") String userSuppliedQuery) {
    Dataset dataset = datasetService.findByGlobalId(persistentId);
    if (dataset == null) {
        return error(Status.BAD_REQUEST, "Could not find dataset with persistent id " + persistentId);
    }
    User user = GuestUser.get();
    try {
        AuthenticatedUser authenticatedUser = findAuthenticatedUserOrDie();
        if (authenticatedUser != null) {
            user = authenticatedUser;
        }
    } catch (WrappedResponse ex) {
    }
    RetrieveDatasetVersionResponse datasetVersionResponse = datasetVersionService.retrieveDatasetVersionByPersistentId(persistentId, semanticVersion);
    if (datasetVersionResponse == null) {
        return error(Status.BAD_REQUEST, "Problem searching for files. Could not find dataset version based on " + persistentId + " and " + semanticVersion);
    }
    DatasetVersion datasetVersion = datasetVersionResponse.getDatasetVersion();
    FileView fileView = searchFilesService.getFileView(datasetVersion, user, userSuppliedQuery);
    if (fileView == null) {
        return error(Status.BAD_REQUEST, "Problem searching for files. Null returned from getFileView.");
    }
    JsonArrayBuilder filesFound = Json.createArrayBuilder();
    JsonArrayBuilder cards = Json.createArrayBuilder();
    JsonArrayBuilder fileIds = Json.createArrayBuilder();
    for (SolrSearchResult result : fileView.getSolrSearchResults()) {
        cards.add(result.getNameSort());
        fileIds.add(result.getEntityId());
        JsonObjectBuilder fileFound = Json.createObjectBuilder();
        fileFound.add("name", result.getNameSort());
        fileFound.add("entityId", result.getEntityId().toString());
        fileFound.add("datasetVersionId", result.getDatasetVersionId());
        fileFound.add("datasetId", result.getParent().get(SearchFields.ID));
        filesFound.add(fileFound);
    }
    JsonArrayBuilder facets = Json.createArrayBuilder();
    for (FacetCategory facetCategory : fileView.getFacetCategoryList()) {
        facets.add(facetCategory.getFriendlyName());
    }
    JsonArrayBuilder filterQueries = Json.createArrayBuilder();
    for (String filterQuery : fileView.getFilterQueries()) {
        filterQueries.add(filterQuery);
    }
    JsonArrayBuilder allDatasetVersionIds = Json.createArrayBuilder();
    for (DatasetVersion dsVersion : dataset.getVersions()) {
        allDatasetVersionIds.add(dsVersion.getId());
    }
    JsonObjectBuilder data = Json.createObjectBuilder();
    data.add("filesFound", filesFound);
    data.add("cards", cards);
    data.add("fileIds", fileIds);
    data.add("facets", facets);
    data.add("user", user.getIdentifier());
    data.add("persistentID", persistentId);
    data.add("query", fileView.getQuery());
    data.add("filterQueries", filterQueries);
    data.add("allDataverVersionIds", allDatasetVersionIds);
    data.add("semanticVersion", datasetVersion.getSemanticVersion());
    return ok(data);
}
Also used : SolrSearchResult(edu.harvard.iq.dataverse.search.SolrSearchResult) RetrieveDatasetVersionResponse(edu.harvard.iq.dataverse.DatasetVersionServiceBean.RetrieveDatasetVersionResponse) FileView(edu.harvard.iq.dataverse.search.FileView) AuthenticatedUser(edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser) User(edu.harvard.iq.dataverse.authorization.users.User) GuestUser(edu.harvard.iq.dataverse.authorization.users.GuestUser) Dataset(edu.harvard.iq.dataverse.Dataset) FacetCategory(edu.harvard.iq.dataverse.search.FacetCategory) DatasetVersion(edu.harvard.iq.dataverse.DatasetVersion) JsonArrayBuilder(javax.json.JsonArrayBuilder) JsonObjectBuilder(javax.json.JsonObjectBuilder) AuthenticatedUser(edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser) Path(javax.ws.rs.Path) GET(javax.ws.rs.GET)

Example 22 with Dataset

use of edu.harvard.iq.dataverse.Dataset in project dataverse by IQSS.

the class Datasets method receiveChecksumValidationResults.

@POST
@Path("{identifier}/dataCaptureModule/checksumValidation")
public Response receiveChecksumValidationResults(@PathParam("identifier") String id, JsonObject jsonFromDcm) {
    logger.log(Level.FINE, "jsonFromDcm: {0}", jsonFromDcm);
    AuthenticatedUser authenticatedUser = null;
    try {
        authenticatedUser = findAuthenticatedUserOrDie();
    } catch (WrappedResponse ex) {
        return error(Response.Status.BAD_REQUEST, "Authentication is required.");
    }
    if (!authenticatedUser.isSuperuser()) {
        return error(Response.Status.FORBIDDEN, "Superusers only.");
    }
    String statusMessageFromDcm = jsonFromDcm.getString("status");
    try {
        Dataset dataset = findDatasetOrDie(id);
        if ("validation passed".equals(statusMessageFromDcm)) {
            String uploadFolder = jsonFromDcm.getString("uploadFolder");
            int totalSize = jsonFromDcm.getInt("totalSize");
            ImportMode importMode = ImportMode.MERGE;
            try {
                JsonObject jsonFromImportJobKickoff = execCommand(new ImportFromFileSystemCommand(createDataverseRequest(findUserOrDie()), dataset, uploadFolder, new Long(totalSize), importMode));
                long jobId = jsonFromImportJobKickoff.getInt("executionId");
                String message = jsonFromImportJobKickoff.getString("message");
                JsonObjectBuilder job = Json.createObjectBuilder();
                job.add("jobId", jobId);
                job.add("message", message);
                return ok(job);
            } catch (WrappedResponse wr) {
                String message = wr.getMessage();
                return error(Response.Status.INTERNAL_SERVER_ERROR, "Uploaded files have passed checksum validation but something went wrong while attempting to put the files into Dataverse. Message was '" + message + "'.");
            }
        } else if ("validation failed".equals(statusMessageFromDcm)) {
            Map<String, AuthenticatedUser> distinctAuthors = permissionService.getDistinctUsersWithPermissionOn(Permission.EditDataset, dataset);
            distinctAuthors.values().forEach((value) -> {
                userNotificationService.sendNotification((AuthenticatedUser) value, new Timestamp(new Date().getTime()), UserNotification.Type.CHECKSUMFAIL, dataset.getId());
            });
            List<AuthenticatedUser> superUsers = authenticationServiceBean.findSuperUsers();
            if (superUsers != null && !superUsers.isEmpty()) {
                superUsers.forEach((au) -> {
                    userNotificationService.sendNotification(au, new Timestamp(new Date().getTime()), UserNotification.Type.CHECKSUMFAIL, dataset.getId());
                });
            }
            return ok("User notified about checksum validation failure.");
        } else {
            return error(Response.Status.BAD_REQUEST, "Unexpected status cannot be processed: " + statusMessageFromDcm);
        }
    } catch (WrappedResponse ex) {
        return ex.getResponse();
    }
}
Also used : AuthenticatedUser(edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser) Produces(javax.ws.rs.Produces) FormDataContentDisposition(org.glassfish.jersey.media.multipart.FormDataContentDisposition) UpdateDatasetVersionCommand(edu.harvard.iq.dataverse.engine.command.impl.UpdateDatasetVersionCommand) DataFileTagException(edu.harvard.iq.dataverse.datasetutility.DataFileTagException) User(edu.harvard.iq.dataverse.authorization.users.User) MediaType(javax.ws.rs.core.MediaType) JsonParseException(edu.harvard.iq.dataverse.util.json.JsonParseException) MoveDatasetCommand(edu.harvard.iq.dataverse.engine.command.impl.MoveDatasetCommand) Map(java.util.Map) GetPrivateUrlCommand(edu.harvard.iq.dataverse.engine.command.impl.GetPrivateUrlCommand) DatasetField(edu.harvard.iq.dataverse.DatasetField) CommandException(edu.harvard.iq.dataverse.engine.command.exception.CommandException) JsonObject(javax.json.JsonObject) MetadataBlockServiceBean(edu.harvard.iq.dataverse.MetadataBlockServiceBean) DataverseServiceBean(edu.harvard.iq.dataverse.DataverseServiceBean) WorkflowContext(edu.harvard.iq.dataverse.workflow.WorkflowContext) AbstractApiBean.error(edu.harvard.iq.dataverse.api.AbstractApiBean.error) DataFile(edu.harvard.iq.dataverse.DataFile) DatasetServiceBean(edu.harvard.iq.dataverse.DatasetServiceBean) EJBException(javax.ejb.EJBException) ImportMode(edu.harvard.iq.dataverse.batch.jobs.importer.ImportMode) FormDataParam(org.glassfish.jersey.media.multipart.FormDataParam) DatasetVersion(edu.harvard.iq.dataverse.DatasetVersion) GetSpecificPublishedDatasetVersionCommand(edu.harvard.iq.dataverse.engine.command.impl.GetSpecificPublishedDatasetVersionCommand) CreatePrivateUrlCommand(edu.harvard.iq.dataverse.engine.command.impl.CreatePrivateUrlCommand) DataCaptureModuleUtil(edu.harvard.iq.dataverse.datacapturemodule.DataCaptureModuleUtil) JsonArrayBuilder(javax.json.JsonArrayBuilder) GET(javax.ws.rs.GET) PermissionServiceBean(edu.harvard.iq.dataverse.PermissionServiceBean) EjbDataverseEngine(edu.harvard.iq.dataverse.EjbDataverseEngine) DataverseSession(edu.harvard.iq.dataverse.DataverseSession) ResourceBundle(java.util.ResourceBundle) DatasetUtil(edu.harvard.iq.dataverse.dataset.DatasetUtil) Workflow(edu.harvard.iq.dataverse.workflow.Workflow) WorkflowServiceBean(edu.harvard.iq.dataverse.workflow.WorkflowServiceBean) Json(javax.json.Json) PublishDatasetCommand(edu.harvard.iq.dataverse.engine.command.impl.PublishDatasetCommand) EJB(javax.ejb.EJB) ExportService(edu.harvard.iq.dataverse.export.ExportService) UserNotificationServiceBean(edu.harvard.iq.dataverse.UserNotificationServiceBean) AuthenticationServiceBean(edu.harvard.iq.dataverse.authorization.AuthenticationServiceBean) DeletePrivateUrlCommand(edu.harvard.iq.dataverse.engine.command.impl.DeletePrivateUrlCommand) UserNotification(edu.harvard.iq.dataverse.UserNotification) DeleteDatasetVersionCommand(edu.harvard.iq.dataverse.engine.command.impl.DeleteDatasetVersionCommand) StringReader(java.io.StringReader) UpdateDatasetTargetURLCommand(edu.harvard.iq.dataverse.engine.command.impl.UpdateDatasetTargetURLCommand) ListVersionsCommand(edu.harvard.iq.dataverse.engine.command.impl.ListVersionsCommand) Date(java.util.Date) DataFileServiceBean(edu.harvard.iq.dataverse.DataFileServiceBean) DataverseRequest(edu.harvard.iq.dataverse.engine.command.DataverseRequest) Path(javax.ws.rs.Path) RoleAssignee(edu.harvard.iq.dataverse.authorization.RoleAssignee) CreateDatasetVersionCommand(edu.harvard.iq.dataverse.engine.command.impl.CreateDatasetVersionCommand) DataCaptureModuleException(edu.harvard.iq.dataverse.datacapturemodule.DataCaptureModuleException) SettingsServiceBean(edu.harvard.iq.dataverse.settings.SettingsServiceBean) DDIExportServiceBean(edu.harvard.iq.dataverse.export.DDIExportServiceBean) QueryParam(javax.ws.rs.QueryParam) Consumes(javax.ws.rs.Consumes) Permission(edu.harvard.iq.dataverse.authorization.Permission) FormDataBodyPart(org.glassfish.jersey.media.multipart.FormDataBodyPart) ScriptRequestResponse(edu.harvard.iq.dataverse.datacapturemodule.ScriptRequestResponse) GetDatasetCommand(edu.harvard.iq.dataverse.engine.command.impl.GetDatasetCommand) DestroyDatasetCommand(edu.harvard.iq.dataverse.engine.command.impl.DestroyDatasetCommand) DELETE(javax.ws.rs.DELETE) AddReplaceFileHelper(edu.harvard.iq.dataverse.datasetutility.AddReplaceFileHelper) DeleteDatasetCommand(edu.harvard.iq.dataverse.engine.command.impl.DeleteDatasetCommand) Timestamp(java.sql.Timestamp) ListRoleAssignments(edu.harvard.iq.dataverse.engine.command.impl.ListRoleAssignments) Logger(java.util.logging.Logger) MetadataBlock(edu.harvard.iq.dataverse.MetadataBlock) DatasetThumbnail(edu.harvard.iq.dataverse.dataset.DatasetThumbnail) List(java.util.List) IngestServiceBean(edu.harvard.iq.dataverse.ingest.IngestServiceBean) Response(javax.ws.rs.core.Response) JsonPrinter(edu.harvard.iq.dataverse.util.json.JsonPrinter) ImportFromFileSystemCommand(edu.harvard.iq.dataverse.engine.command.impl.ImportFromFileSystemCommand) ReturnDatasetToAuthorCommand(edu.harvard.iq.dataverse.engine.command.impl.ReturnDatasetToAuthorCommand) SubmitDatasetForReviewCommand(edu.harvard.iq.dataverse.engine.command.impl.SubmitDatasetForReviewCommand) JsonObjectBuilder(javax.json.JsonObjectBuilder) OptionalFileParams(edu.harvard.iq.dataverse.datasetutility.OptionalFileParams) GetDraftDatasetVersionCommand(edu.harvard.iq.dataverse.engine.command.impl.GetDraftDatasetVersionCommand) DatasetLock(edu.harvard.iq.dataverse.DatasetLock) PathParam(javax.ws.rs.PathParam) SystemConfig(edu.harvard.iq.dataverse.util.SystemConfig) HashMap(java.util.HashMap) GetLatestPublishedDatasetVersionCommand(edu.harvard.iq.dataverse.engine.command.impl.GetLatestPublishedDatasetVersionCommand) EjbUtil(edu.harvard.iq.dataverse.util.EjbUtil) Level(java.util.logging.Level) Inject(javax.inject.Inject) DataverseRole(edu.harvard.iq.dataverse.authorization.DataverseRole) NoFilesException(edu.harvard.iq.dataverse.datasetutility.NoFilesException) Dataverse(edu.harvard.iq.dataverse.Dataverse) Command(edu.harvard.iq.dataverse.engine.command.Command) UpdateDatasetThumbnailCommand(edu.harvard.iq.dataverse.engine.command.impl.UpdateDatasetThumbnailCommand) POST(javax.ws.rs.POST) DatasetFieldType(edu.harvard.iq.dataverse.DatasetFieldType) Dataset(edu.harvard.iq.dataverse.Dataset) GetLatestAccessibleDatasetVersionCommand(edu.harvard.iq.dataverse.engine.command.impl.GetLatestAccessibleDatasetVersionCommand) AssignRoleCommand(edu.harvard.iq.dataverse.engine.command.impl.AssignRoleCommand) DatasetFieldServiceBean(edu.harvard.iq.dataverse.DatasetFieldServiceBean) PrivateUrl(edu.harvard.iq.dataverse.privateurl.PrivateUrl) RequestRsyncScriptCommand(edu.harvard.iq.dataverse.engine.command.impl.RequestRsyncScriptCommand) PublishDatasetResult(edu.harvard.iq.dataverse.engine.command.impl.PublishDatasetResult) SetDatasetCitationDateCommand(edu.harvard.iq.dataverse.engine.command.impl.SetDatasetCitationDateCommand) PUT(javax.ws.rs.PUT) InputStream(java.io.InputStream) ImportFromFileSystemCommand(edu.harvard.iq.dataverse.engine.command.impl.ImportFromFileSystemCommand) Dataset(edu.harvard.iq.dataverse.Dataset) JsonObject(javax.json.JsonObject) AuthenticatedUser(edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser) Timestamp(java.sql.Timestamp) Date(java.util.Date) ImportMode(edu.harvard.iq.dataverse.batch.jobs.importer.ImportMode) List(java.util.List) JsonObjectBuilder(javax.json.JsonObjectBuilder) Map(java.util.Map) HashMap(java.util.HashMap) Path(javax.ws.rs.Path) POST(javax.ws.rs.POST)

Example 23 with Dataset

use of edu.harvard.iq.dataverse.Dataset in project dataverse by IQSS.

the class Datasets method getLinks.

@GET
@Path("{id}/links")
public Response getLinks(@PathParam("id") String idSupplied) {
    try {
        User u = findUserOrDie();
        if (!u.isSuperuser()) {
            return error(Response.Status.FORBIDDEN, "Not a superuser");
        }
        Dataset dataset = findDatasetOrDie(idSupplied);
        long datasetId = dataset.getId();
        List<Dataverse> dvsThatLinkToThisDatasetId = dataverseSvc.findDataversesThatLinkToThisDatasetId(datasetId);
        JsonArrayBuilder dataversesThatLinkToThisDatasetIdBuilder = Json.createArrayBuilder();
        for (Dataverse dataverse : dvsThatLinkToThisDatasetId) {
            dataversesThatLinkToThisDatasetIdBuilder.add(dataverse.getAlias() + " (id " + dataverse.getId() + ")");
        }
        JsonObjectBuilder response = Json.createObjectBuilder();
        response.add("dataverses that link to dataset id " + datasetId, dataversesThatLinkToThisDatasetIdBuilder);
        return ok(response);
    } catch (WrappedResponse wr) {
        return wr.getResponse();
    }
}
Also used : AuthenticatedUser(edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser) User(edu.harvard.iq.dataverse.authorization.users.User) Dataset(edu.harvard.iq.dataverse.Dataset) JsonArrayBuilder(javax.json.JsonArrayBuilder) JsonObjectBuilder(javax.json.JsonObjectBuilder) Dataverse(edu.harvard.iq.dataverse.Dataverse) Path(javax.ws.rs.Path) GET(javax.ws.rs.GET)

Example 24 with Dataset

use of edu.harvard.iq.dataverse.Dataset in project dataverse by IQSS.

the class Datasets method addFileToDataset.

/**
 * Add a File to an existing Dataset
 *
 * @param idSupplied
 * @param jsonData
 * @param fileInputStream
 * @param contentDispositionHeader
 * @param formDataBodyPart
 * @return
 */
@POST
@Path("{id}/add")
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Response addFileToDataset(@PathParam("id") String idSupplied, @FormDataParam("jsonData") String jsonData, @FormDataParam("file") InputStream fileInputStream, @FormDataParam("file") FormDataContentDisposition contentDispositionHeader, @FormDataParam("file") final FormDataBodyPart formDataBodyPart) {
    // -------------------------------------
    // (1) Get the user from the API key
    // -------------------------------------
    User authUser;
    try {
        authUser = findUserOrDie();
    } catch (WrappedResponse ex) {
        return error(Response.Status.FORBIDDEN, ResourceBundle.getBundle("Bundle").getString("file.addreplace.error.auth"));
    }
    if (DataCaptureModuleUtil.rsyncSupportEnabled(settingsSvc.getValueForKey(SettingsServiceBean.Key.UploadMethods))) {
        return error(Response.Status.METHOD_NOT_ALLOWED, SettingsServiceBean.Key.UploadMethods + " contains " + SystemConfig.FileUploadMethods.RSYNC + ". Please use rsync file upload.");
    }
    // -------------------------------------
    // (2) Get the Dataset Id
    // 
    // -------------------------------------
    Dataset dataset;
    Long datasetId;
    try {
        dataset = findDatasetOrDie(idSupplied);
    } catch (WrappedResponse wr) {
        return wr.getResponse();
    }
    // -------------------------------------
    // (3) Get the file name and content type
    // -------------------------------------
    String newFilename = contentDispositionHeader.getFileName();
    String newFileContentType = formDataBodyPart.getMediaType().toString();
    // (2a) Load up optional params via JSON
    // ---------------------------------------
    OptionalFileParams optionalFileParams = null;
    msgt("(api) jsonData: " + jsonData);
    try {
        optionalFileParams = new OptionalFileParams(jsonData);
    } catch (DataFileTagException ex) {
        return error(Response.Status.BAD_REQUEST, ex.getMessage());
    }
    // -------------------
    // (3) Create the AddReplaceFileHelper object
    // -------------------
    msg("ADD!");
    DataverseRequest dvRequest2 = createDataverseRequest(authUser);
    AddReplaceFileHelper addFileHelper = new AddReplaceFileHelper(dvRequest2, ingestService, datasetService, fileService, permissionSvc, commandEngine, systemConfig);
    // -------------------
    // (4) Run "runAddFileByDatasetId"
    // -------------------
    addFileHelper.runAddFileByDataset(dataset, newFilename, newFileContentType, fileInputStream, optionalFileParams);
    if (addFileHelper.hasError()) {
        return error(addFileHelper.getHttpErrorCode(), addFileHelper.getErrorMessagesAsString("\n"));
    } else {
        String successMsg = ResourceBundle.getBundle("Bundle").getString("file.addreplace.success.add");
        try {
            // msgt("as String: " + addFileHelper.getSuccessResult());
            /**
             * @todo We need a consistent, sane way to communicate a human
             * readable message to an API client suitable for human
             * consumption. Imagine if the UI were built in Angular or React
             * and we want to return a message from the API as-is to the
             * user. Human readable.
             */
            logger.fine("successMsg: " + successMsg);
            return ok(addFileHelper.getSuccessResultAsJsonObjectBuilder());
        // "Look at that!  You added a file! (hey hey, it may have worked)");
        } catch (NoFilesException ex) {
            Logger.getLogger(Files.class.getName()).log(Level.SEVERE, null, ex);
            return error(Response.Status.BAD_REQUEST, "NoFileException!  Serious Error! See administrator!");
        }
    }
}
Also used : DataverseRequest(edu.harvard.iq.dataverse.engine.command.DataverseRequest) AuthenticatedUser(edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser) User(edu.harvard.iq.dataverse.authorization.users.User) Dataset(edu.harvard.iq.dataverse.Dataset) NoFilesException(edu.harvard.iq.dataverse.datasetutility.NoFilesException) OptionalFileParams(edu.harvard.iq.dataverse.datasetutility.OptionalFileParams) DataFileTagException(edu.harvard.iq.dataverse.datasetutility.DataFileTagException) AddReplaceFileHelper(edu.harvard.iq.dataverse.datasetutility.AddReplaceFileHelper) Path(javax.ws.rs.Path) POST(javax.ws.rs.POST) Consumes(javax.ws.rs.Consumes)

Example 25 with Dataset

use of edu.harvard.iq.dataverse.Dataset in project dataverse by IQSS.

the class Datasets method deletePrivateUrl.

@DELETE
@Path("{id}/privateUrl")
public Response deletePrivateUrl(@PathParam("id") String idSupplied) {
    return response(req -> {
        Dataset dataset = findDatasetOrDie(idSupplied);
        PrivateUrl privateUrl = execCommand(new GetPrivateUrlCommand(req, dataset));
        if (privateUrl != null) {
            execCommand(new DeletePrivateUrlCommand(req, dataset));
            return ok("Private URL deleted.");
        } else {
            return notFound("No Private URL to delete.");
        }
    });
}
Also used : PrivateUrl(edu.harvard.iq.dataverse.privateurl.PrivateUrl) Dataset(edu.harvard.iq.dataverse.Dataset) GetPrivateUrlCommand(edu.harvard.iq.dataverse.engine.command.impl.GetPrivateUrlCommand) DeletePrivateUrlCommand(edu.harvard.iq.dataverse.engine.command.impl.DeletePrivateUrlCommand) Path(javax.ws.rs.Path) DELETE(javax.ws.rs.DELETE)

Aggregations

Dataset (edu.harvard.iq.dataverse.Dataset)142 Test (org.junit.Test)53 DatasetVersion (edu.harvard.iq.dataverse.DatasetVersion)44 DataFile (edu.harvard.iq.dataverse.DataFile)41 Dataverse (edu.harvard.iq.dataverse.Dataverse)34 AuthenticatedUser (edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser)27 CommandException (edu.harvard.iq.dataverse.engine.command.exception.CommandException)23 IOException (java.io.IOException)22 ArrayList (java.util.ArrayList)22 Path (javax.ws.rs.Path)22 FileMetadata (edu.harvard.iq.dataverse.FileMetadata)17 DataverseRole (edu.harvard.iq.dataverse.authorization.DataverseRole)17 RoleAssignment (edu.harvard.iq.dataverse.RoleAssignment)16 DataverseRequest (edu.harvard.iq.dataverse.engine.command.DataverseRequest)16 Date (java.util.Date)16 JsonObjectBuilder (javax.json.JsonObjectBuilder)16 JsonObject (javax.json.JsonObject)15 DvObject (edu.harvard.iq.dataverse.DvObject)14 RoleAssignee (edu.harvard.iq.dataverse.authorization.RoleAssignee)14 PrivateUrlUser (edu.harvard.iq.dataverse.authorization.users.PrivateUrlUser)14