Skip to content

Commit

Permalink
Merge pull request #18 from mlibrary/issue-working16
Browse files Browse the repository at this point in the history
migration and clean up log
  • Loading branch information
blancoj authored Nov 20, 2024
2 parents 2905c18 + 35e1e3f commit d0b24d6
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 208 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ public List<String> getPairs(String name) {
}
{
collectionUUID = ContextUtil.getCollectionUUID();
log.info("COLL: owningCollectin=" + collectionUUID);
}

List<String> myList = new ArrayList<>();
Expand Down Expand Up @@ -226,7 +225,6 @@ public List<String> getPairs(String name) {
}
catch (Exception exc)
{
log.info("PROX: ERROR but it may be OK, creating collection mapping context is null.");
myList.add("ERROR collmapping");
myList.add("ERROR collmapping");
}
Expand Down Expand Up @@ -259,7 +257,6 @@ public List<String> getPairs(String name) {

EPerson[] Proxies = ePerson.getProxiesByUUID ( c, userid, collectionUUID );

log.info ("PROX: processing request");
for (int k = 0; k < Proxies.length; k++)
{
String nameFull = Proxies[k].getFullName();
Expand Down Expand Up @@ -433,7 +430,6 @@ private void doNodes(Node n)
processDefinition(nd);
foundDefs = true;
} else if (tagName.equals("form-value-pairs")) {
log.info("PROX: calling processValuePairs");
processValuePairs(nd);
}
// Ignore unknown nodes
Expand Down
4 changes: 0 additions & 4 deletions dspace-api/src/main/java/org/dspace/core/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ public String getExtraLogInfo() {
public void complete() throws SQLException {
// If Context is no longer open/valid, just note that it has already been closed
if (!isValid()) {
log.info("complete() was called on a closed Context object. No changes to commit.");
return;
}

Expand Down Expand Up @@ -432,7 +431,6 @@ public void complete() throws SQLException {
public void commit() throws SQLException {
// If Context is no longer open/valid, just note that it has already been closed
if (!isValid()) {
log.info("commit() was called on a closed Context object. No changes to commit.");
return;
}

Expand Down Expand Up @@ -564,7 +562,6 @@ public Event pollEvent() {
public void rollback() throws SQLException {
// If Context is no longer open/valid, just note that it has already been closed
if (!isValid()) {
log.info("rollback() was called on a closed Context object. No changes to abort.");
return;
}

Expand Down Expand Up @@ -592,7 +589,6 @@ public void rollback() throws SQLException {
public void abort() {
// If Context is no longer open/valid, just note that it has already been closed
if (!isValid()) {
log.info("abort() was called on a closed Context object. No changes to abort.");
return;
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE proxies ADD COLUMN uuid VARCHAR(100);
24 changes: 0 additions & 24 deletions dspace-rest/src/main/java/org/dspace/rest/ItemsResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public Item getItem(@PathParam("item_id") String itemId, @QueryParam("expand") S
@Context HttpServletRequest request)
throws WebApplicationException {

log.info("Reading item(id=" + itemId + ").");
org.dspace.core.Context context = null;
Item item = null;

Expand Down Expand Up @@ -174,7 +173,6 @@ public Item[] getItems(@QueryParam("expand") String expand, @QueryParam("limit")
@Context HttpHeaders headers, @Context HttpServletRequest request)
throws WebApplicationException {

log.info("Reading items.(offset=" + offset + ",limit=" + limit + ").");
org.dspace.core.Context context = null;
List<Item> items = null;

Expand Down Expand Up @@ -245,7 +243,6 @@ public MetadataEntry[] getItemMetadata(@PathParam("item_id") String itemId, @Que
@Context HttpHeaders headers, @Context HttpServletRequest request)
throws WebApplicationException {

log.info("Reading item(id=" + itemId + ") metadata.");
org.dspace.core.Context context = null;
List<MetadataEntry> metadata = null;

Expand Down Expand Up @@ -304,7 +301,6 @@ public Bitstream[] getItemBitstreams(@PathParam("item_id") String itemId,
@Context HttpHeaders headers, @Context HttpServletRequest request)
throws WebApplicationException {

log.info("Reading item(id=" + itemId + ") bitstreams.(offset=" + offset + ",limit=" + limit + ")");
org.dspace.core.Context context = null;
List<Bitstream> bitstreams = null;
try {
Expand Down Expand Up @@ -372,7 +368,6 @@ public Response addItemMetadata(@PathParam("item_id") String itemId,
@Context HttpServletRequest request)
throws WebApplicationException {

log.info("Adding metadata to item(id=" + itemId + ").");
org.dspace.core.Context context = null;

try {
Expand Down Expand Up @@ -403,7 +398,6 @@ public Response addItemMetadata(@PathParam("item_id") String itemId,
processFinally(context);
}

log.info("Metadata to item(id=" + itemId + ") were successfully added.");
return Response.status(Status.OK).build();
}

Expand Down Expand Up @@ -452,7 +446,6 @@ public Bitstream addItemBitstream(@PathParam("item_id") String itemId, InputStre
@Context HttpServletRequest request)
throws WebApplicationException {

log.info("Adding bitstream to item(id=" + itemId + ").");
org.dspace.core.Context context = null;
Bitstream bitstream = null;

Expand Down Expand Up @@ -565,7 +558,6 @@ public Bitstream addItemBitstream(@PathParam("item_id") String itemId, InputStre
processFinally(context);
}

log.info("Bitstream(id=" + bitstream.getUUID() + ") was successfully added into item(id=" + itemId + ").");
return bitstream;
}

Expand Down Expand Up @@ -602,7 +594,6 @@ public Response updateItemMetadata(@PathParam("item_id") String itemId, Metadata
@Context HttpServletRequest request)
throws WebApplicationException {

log.info("Updating metadata in item(id=" + itemId + ").");
org.dspace.core.Context context = null;

try {
Expand Down Expand Up @@ -649,7 +640,6 @@ public Response updateItemMetadata(@PathParam("item_id") String itemId, Metadata
processFinally(context);
}

log.info("Metadata of item(id=" + itemId + ") were successfully updated.");
return Response.status(Status.OK).build();
}

Expand Down Expand Up @@ -684,7 +674,6 @@ public Response deleteItem(@PathParam("item_id") String itemId, @QueryParam("use
@Context HttpHeaders headers, @Context HttpServletRequest request)
throws WebApplicationException {

log.info("Deleting item(id=" + itemId + ").");
org.dspace.core.Context context = null;

try {
Expand Down Expand Up @@ -712,7 +701,6 @@ public Response deleteItem(@PathParam("item_id") String itemId, @QueryParam("use
processFinally(context);
}

log.info("Item(id=" + itemId + ") was successfully deleted.");
return Response.status(Status.OK).build();
}

Expand Down Expand Up @@ -747,7 +735,6 @@ public Response deleteItemMetadata(@PathParam("item_id") String itemId, @QueryPa
@Context HttpHeaders headers, @Context HttpServletRequest request)
throws WebApplicationException {

log.info("Deleting metadata in item(id=" + itemId + ").");
org.dspace.core.Context context = null;

try {
Expand Down Expand Up @@ -789,7 +776,6 @@ public Response deleteItemMetadata(@PathParam("item_id") String itemId, @QueryPa
processFinally(context);
}

log.info("Item(id=" + itemId + ") metadata were successfully deleted.");
return Response.status(Status.OK).build();
}

Expand Down Expand Up @@ -827,7 +813,6 @@ public Response deleteItemBitstream(@PathParam("item_id") String itemId,
@Context HttpServletRequest request)
throws WebApplicationException {

log.info("Deleting bitstream in item(id=" + itemId + ").");
org.dspace.core.Context context = null;

try {
Expand Down Expand Up @@ -872,7 +857,6 @@ public Response deleteItemBitstream(@PathParam("item_id") String itemId,
processFinally(context);
}

log.info("Bitstream(id=" + bitstreamId + ") from item(id=" + itemId + ") was successfuly deleted .");
return Response.status(Status.OK).build();
}

Expand Down Expand Up @@ -911,8 +895,6 @@ public Item[] findItemsByMetadataField(MetadataEntry metadataEntry, @QueryParam(
@Context HttpHeaders headers, @Context HttpServletRequest request)
throws WebApplicationException {

log.info("Looking for item with metadata(key=" + metadataEntry.getKey() + ",value=" + metadataEntry.getValue()
+ ", language=" + metadataEntry.getLanguage() + ").");
org.dspace.core.Context context = null;

List<Item> items = new ArrayList<Item>();
Expand Down Expand Up @@ -956,12 +938,6 @@ public Item[] findItemsByMetadataField(MetadataEntry metadataEntry, @QueryParam(
processFinally(context);
}

if (items.size() == 0) {
log.info("Items not found.");
} else {
log.info("Items were found.");
}

return items.toArray(new Item[0]);
}

Expand Down
Loading

0 comments on commit d0b24d6

Please sign in to comment.