Commit 048e54b0 authored by Michael Ritter's avatar Michael Ritter
Browse files

Remove use of old char state setter

parent 7dc5822e
...@@ -33,6 +33,7 @@ package edu.umiacs.ace.monitor.audit; ...@@ -33,6 +33,7 @@ package edu.umiacs.ace.monitor.audit;
import edu.umiacs.ace.ims.api.IMSService; import edu.umiacs.ace.ims.api.IMSService;
import edu.umiacs.ace.ims.api.TokenValidator; import edu.umiacs.ace.ims.api.TokenValidator;
import edu.umiacs.ace.monitor.core.Collection; import edu.umiacs.ace.monitor.core.Collection;
import edu.umiacs.ace.monitor.core.CollectionState;
import edu.umiacs.ace.monitor.core.MonitoredItem; import edu.umiacs.ace.monitor.core.MonitoredItem;
import edu.umiacs.ace.monitor.core.MonitoredItemManager; import edu.umiacs.ace.monitor.core.MonitoredItemManager;
import edu.umiacs.ace.monitor.log.LogEnum; import edu.umiacs.ace.monitor.log.LogEnum;
...@@ -306,9 +307,9 @@ public final class AuditTokens extends Thread implements CancelCallback { ...@@ -306,9 +307,9 @@ public final class AuditTokens extends Thread implements CancelCallback {
MonitoredItemManager mim = new MonitoredItemManager(em); MonitoredItemManager mim = new MonitoredItemManager(em);
if ( mim.countErrorsInCollection(collection) == 0 ) { if ( mim.countErrorsInCollection(collection) == 0 ) {
collection.setState('A'); collection.setState(CollectionState.ACTIVE);
} else { } else {
collection.setState('E'); collection.setState(CollectionState.ERROR);
} }
EntityTransaction trans = em.getTransaction(); EntityTransaction trans = em.getTransaction();
......
...@@ -199,10 +199,6 @@ public class Collection implements Serializable { ...@@ -199,10 +199,6 @@ public class Collection implements Serializable {
return state.asChar(); return state.asChar();
} }
public void setState( char state ) {
this.state = CollectionState.fromChar(state);
}
public String getStorage() { public String getStorage() {
return storage; return storage;
} }
......
...@@ -147,7 +147,7 @@ public class ManageCollectionServlet extends EntityManagerServlet { ...@@ -147,7 +147,7 @@ public class ManageCollectionServlet extends EntityManagerServlet {
*/ */
else { else {
collection = new Collection(); collection = new Collection();
collection.setState('N'); collection.setState(CollectionState.NEVER);
populateCollection(request, collection); populateCollection(request, collection);
// is all the collection params match, commit and create a storage // is all the collection params match, commit and create a storage
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment