Skip to content

Commit

Permalink
Added Rollback patch and potential fix for blocked refresh when pubfl…
Browse files Browse the repository at this point in the history
…ow is started.
  • Loading branch information
bjosel committed Jan 16, 2024
1 parent e8325d5 commit 08ebc6c
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ public void setInReview(boolean inReview) {
}

public String getTermsOfUse() {
if (termsOfUse != null && termsOfUse.contains("CC0")) {
termsOfUse = termsOfUse.replace("CC0", "CC BY");
}
return termsOfUse;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,6 @@ public static void writeAccessRightsElement(XMLStreamWriter xmlw, DatasetVersion
xmlw.writeEndElement(); // </rights>

writeRightsHeader(xmlw, language);

if (datasetVersionDTO.getLicense() != null) {
xmlw.writeAttribute("rightsURI", datasetVersionDTO.getLicense().getUri());
xmlw.writeCharacters(datasetVersionDTO.getLicense().getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ public DatasetVersion parseDatasetVersion(JsonObject obj, DatasetVersion dsv) th
throw new JsonParseException(BundleUtil.getStringFromBundle("jsonparser.error.parsing.number", Arrays.asList(ex.getMessage())), ex);
}
}

private edu.harvard.iq.dataverse.license.License parseLicense(String licenseNameOrUri) throws JsonParseException {
if (licenseNameOrUri == null){
boolean safeDefaultIfKeyNotFound = true;
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -439,18 +439,6 @@ public static JsonObjectBuilder jsonDataFileList(List<DataFile> dataFiles){
return bld;
}

private static String getLicense(DatasetVersion dsv) {
if (dsv.getTermsOfUseAndAccess().getLicense() != null) {
if (dsv.getTermsOfUseAndAccess().getLicense().equals(TermsOfUseAndAccess.License.CC0)) {
return "CC BY";
} else {
return dsv.getTermsOfUseAndAccess().getLicense().toString();
}
} else {
return null;
}
}

/**
* Export formats such as DDI require the citation to be included. See
* https://github.com/IQSS/dataverse/issues/2579 for more on DDI export.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public WorkflowServiceBean() {
* @throws CommandException If the dataset could not be locked.
*/
//ToDo - should this be @Async? or just the forward() method?
@Asynchronous
//@Asynchronous
public void start(Workflow wf, WorkflowContext ctxt, boolean findDataset) throws CommandException {
/*
* Workflows appear to start running prior to the caller's transaction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public WorkflowStepResult run(WorkflowContext context) {
return new Pending();
} else {
String responseBody = mtd.getResponseBodyAsString();
this.rollback(context, null);
this.rollback(context, null);
return new Failure("Error communicating with server. Server response: " + responseBody + " (" + responseStatus + ").");
}

Expand Down
1 change: 0 additions & 1 deletion src/main/webapp/metadataFragment.xhtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
Expand Down

0 comments on commit 08ebc6c

Please sign in to comment.