Changing VClassRetryController to use context dao factory
This commit is contained in:
parent
688b858641
commit
9f2171c2a3
1 changed files with 7 additions and 10 deletions
|
@ -31,6 +31,7 @@ import edu.cornell.mannlib.vitro.webapp.beans.VClass;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.Controllers;
|
import edu.cornell.mannlib.vitro.webapp.controller.Controllers;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.edit.utils.RoleLevelOptionsSetup;
|
import edu.cornell.mannlib.vitro.webapp.controller.edit.utils.RoleLevelOptionsSetup;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.dao.ModelAccess;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.OntologyDao;
|
import edu.cornell.mannlib.vitro.webapp.dao.OntologyDao;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.VClassDao;
|
import edu.cornell.mannlib.vitro.webapp.dao.VClassDao;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.VClassGroupDao;
|
import edu.cornell.mannlib.vitro.webapp.dao.VClassGroupDao;
|
||||||
|
@ -64,10 +65,12 @@ public class VclassRetryController extends BaseEditController {
|
||||||
action = epo.getAction();
|
action = epo.getAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
VClassDao vcwDao = request.getUnfilteredAssertionsWebappDaoFactory().getVClassDao();
|
WebappDaoFactory wadf = ModelAccess.on(getServletContext()).getWebappDaoFactory();
|
||||||
|
|
||||||
|
VClassDao vcwDao = wadf.getVClassDao();
|
||||||
epo.setDataAccessObject(vcwDao);
|
epo.setDataAccessObject(vcwDao);
|
||||||
VClassGroupDao cgDao = request.getUnfilteredWebappDaoFactory().getVClassGroupDao();
|
VClassGroupDao cgDao = wadf.getVClassGroupDao();
|
||||||
OntologyDao oDao = request.getUnfilteredWebappDaoFactory().getOntologyDao();
|
OntologyDao oDao = wadf.getOntologyDao();
|
||||||
|
|
||||||
VClass vclassForEditing = null;
|
VClass vclassForEditing = null;
|
||||||
if (!epo.getUseRecycledBean()){
|
if (!epo.getUseRecycledBean()){
|
||||||
|
@ -82,18 +85,12 @@ public class VclassRetryController extends BaseEditController {
|
||||||
} else {
|
} else {
|
||||||
vclassForEditing = new VClass();
|
vclassForEditing = new VClass();
|
||||||
if (request.getParameter("GroupId") != null) {
|
if (request.getParameter("GroupId") != null) {
|
||||||
try {
|
vclassForEditing.setGroupURI(request.getParameter("GroupURI"));
|
||||||
vclassForEditing.setGroupURI(request.getParameter("GroupURI"));
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
// too bad
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
epo.setOriginalBean(vclassForEditing);
|
epo.setOriginalBean(vclassForEditing);
|
||||||
} else {
|
} else {
|
||||||
vclassForEditing = (VClass) epo.getNewBean();
|
vclassForEditing = (VClass) epo.getNewBean();
|
||||||
// action = "update";
|
|
||||||
// log.error("using newBean");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//make a simple mask for the class's id
|
//make a simple mask for the class's id
|
||||||
|
|
Loading…
Add table
Reference in a new issue