Skip to content

Commit

Permalink
ported getContext method
Browse files Browse the repository at this point in the history
  • Loading branch information
corrado lombardi committed Oct 2, 2023
1 parent 9731363 commit 5670b24
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.dspace.util.ItemAuthorityUtils;
import org.dspace.util.UUIDUtils;
import org.dspace.utils.DSpace;
import org.dspace.web.ContextUtil;

/**
* Sample authority to link a dspace item with another (i.e a publication with
Expand Down Expand Up @@ -291,4 +292,9 @@ private boolean hasValidExternalSource(String sourceIdentifier) {
return false;
}

private Context getContext() {
Context context = ContextUtil.obtainCurrentRequestContext();
return context != null ? context : new Context();
}

}

0 comments on commit 5670b24

Please sign in to comment.