Remvoing getEditConfigObject() from EditConfigurationTemplateModel
This commit is contained in:
parent
450b3b8206
commit
cbc53bd701
1 changed files with 14 additions and 10 deletions
|
@ -27,6 +27,8 @@ import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Property;
|
import edu.cornell.mannlib.vitro.webapp.beans.Property;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
|
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.ParamMap;
|
||||||
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
|
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
|
||||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils;
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils;
|
||||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
|
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo;
|
||||||
|
@ -46,12 +48,7 @@ public class EditConfigurationTemplateModel extends BaseTemplateModel {
|
||||||
this.vreq = vreq;
|
this.vreq = vreq;
|
||||||
//get additional data that may be required to generate template
|
//get additional data that may be required to generate template
|
||||||
this.retrieveEditData();
|
this.retrieveEditData();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Seeing if returning edit config object might work
|
|
||||||
public EditConfigurationVTwo getEditConfigObject() {
|
|
||||||
return editConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEditKey(){
|
public String getEditKey(){
|
||||||
return editConfig.getEditKey();
|
return editConfig.getEditKey();
|
||||||
|
@ -542,10 +539,17 @@ public class EditConfigurationTemplateModel extends BaseTemplateModel {
|
||||||
//Additional methods that were originally in edit request dispatch controller
|
//Additional methods that were originally in edit request dispatch controller
|
||||||
//to be employed here instead
|
//to be employed here instead
|
||||||
|
|
||||||
public String getUrlToReturnTo() {
|
public String getUrlToReturnTo() {
|
||||||
return vreq
|
if( editConfig.getEntityToReturnTo() != null &&
|
||||||
.getParameter("urlPattern") == null ? "/entity" : vreq
|
! editConfig.getEntityToReturnTo().trim().isEmpty()) {
|
||||||
.getParameter("urlPattern");
|
ParamMap params = new ParamMap();
|
||||||
|
params.put("uri", editConfig.getEntityToReturnTo());
|
||||||
|
return UrlBuilder.getUrl(UrlBuilder.Route.INDIVIDUAL, params);
|
||||||
|
}else if( vreq.getParameter("urlPattern") != null ){
|
||||||
|
return vreq.getParameter("urlPattern");
|
||||||
|
}else{
|
||||||
|
return UrlBuilder.Route.INDIVIDUAL.path();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCurrentUrl() {
|
public String getCurrentUrl() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue