/** * Append a new division (div element) to the document's body. This is a * short cut method for divisions with out special rendering instructions. * The division created is not interactive meaning that it may not contain * any form elements, to create an interactive division use * addInteractiveDivision(). * * @param name * a local identifier used to differentiate the element from its * siblings * @return A new division. */ public Division addDivision(String name) throws WingException { return this.addDivision(name, null); }
@Override public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException, ProcessingException { Division division = body.addDivision("staticpage"); division.setHead("StaticPageBodyHead"); division.addPara("StaticPageBodyPara"); } }
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { Division feedback = body.addDivision("feedback-sent","primary"); feedback.setHead(T_head); feedback.addPara(T_para1); } }
public void addBody(Body body) throws WingException { Division cannot = body.addDivision("register-cannot","primary"); cannot.setHead(T_head); EPersonUtils.registrationProgressList(cannot, 0); cannot.addPara(T_para1); }
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { Request request = ObjectModelHelper.getRequest(objectModel); Division div = body.addDivision("failed_auth"); div.setHead(T_h1); div.addPara((Message)request.getSession().getAttribute(SESSION_ATTRIBUTE_NAME)); deRegisterErrorCode(request); }
public void addBody(Body body) throws WingException { Division updated = body.addDivision("profile-updated", "primary"); updated.setHead(T_head); updated.addPara(T_para1); updated.addPara().addXref(contextPath + "/", T_go_home); }
public void addBody(Body body) throws WingException { Division reset = body.addDivision("password-reset", "primary"); reset.setHead(T_head); EPersonUtils.forgottProgressList(reset, 3); reset.addPara(T_para1); reset.addPara().addXref(contextPath, T_go_home); }
public void addBody(Body body) throws WingException { Division finished = body.addDivision("registration-finished", "primary"); finished.setHead(T_head); EPersonUtils.registrationProgressList(finished, 3); finished.addPara(T_para1); finished.addPara().addXref(contextPath, T_go_home); }
/** What to add at the end of the body */ @Override public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException, ResourceNotFoundException { if (this.bodyEmpty) { Division notFound = body.addDivision("page-not-found","primary"); notFound.setHead(T_head); notFound.addPara(T_para1); notFound.addPara().addXref(contextPath + "/",T_go_home); throw new ResourceNotFoundException("Page cannot be found"); } }
public void addBody(Body body) throws WingException { Division verify = body.addDivision("verify-email","primary"); verify.setHead(T_head); if (forgot) { EPersonUtils.forgottProgressList(verify, 1); } else { EPersonUtils.registrationProgressList(verify,1); } verify.addPara(T_para.parameterize(email)); }
@Override public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { DSpaceObject dso = HandleUtil.obtainHandle(objectModel); if (!(dso instanceof Community)) { return; } Community community = (Community) dso; Division home = body.addDivision("community-home", "primary repository community"); java.util.List<BrowseItem> items = getRecentlySubmittedItems(community); if(items.size() == 0) { return; } Division lastSubmittedDiv = home .addDivision("community-recent-submission","secondary recent-submission"); lastSubmittedDiv.setHead(T_head_recent_submissions); ReferenceSet lastSubmitted = lastSubmittedDiv.addReferenceSet( "collection-last-submitted", ReferenceSet.TYPE_SUMMARY_LIST, null, "recent-submissions"); for (BrowseItem item : items) { lastSubmitted.addReference(item); } }
@Override public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { DSpaceObject dso = HandleUtil.obtainHandle(objectModel); if (!(dso instanceof Collection)) { return; } // Set up the major variables Collection collection = (Collection) dso; java.util.List<BrowseItem> items = getRecientlySubmittedItems(collection); if(items.size() == 0) { return; } Division home = body.addDivision("collection-home", "primary repository collection"); Division lastSubmittedDiv = home .addDivision("collection-recent-submission","secondary recent-submission"); lastSubmittedDiv.setHead(T_head_recent_submissions); ReferenceSet lastSubmitted = lastSubmittedDiv.addReferenceSet( "collection-last-submitted", ReferenceSet.TYPE_SUMMARY_LIST, null, "recent-submissions"); for (BrowseItem item : items) { lastSubmitted.addReference(item); } }
public void addBody(Body body) throws WingException, SQLException { String loginURL = contextPath+"/login"; String feedbackURL = contextPath+"/feedback"; Division main = body.addDivision("not-authorized","primary administrative"); main.setHead(T_head); Para para1 = main.addPara(); para1.addContent(T_para1a); para1.addXref(feedbackURL,T_para1b); para1.addContent(T_para1c); main.addPara().addXref(loginURL,T_para2); }
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { Division main = body.addDivision("export_main"); main.setHead(T_main_head); if (message != null) { main.addDivision("success", "success").addPara(message); } if (errors.size() > 0) { Division errors = main.addDivision("export-errors", "error"); for (Message error : this.errors) { errors.addPara(error); } } if (availableExports != null && availableExports.size() > 0) { Division avail = main.addDivision("available-exports", "available-exports"); avail.setHead(T_avail_head); List fileList = avail.addList("available-files", List.TYPE_ORDERED); for (String fileName : availableExports) { fileList.addItem().addXref( this.contextPath + "/exportdownload/" + fileName, fileName); } } }
/** * Add a single link to the view item page that allows the user * to submit to the collection. */ public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { DSpaceObject dso = HandleUtil.obtainHandle(objectModel); if (!(dso instanceof Collection)) { return; } // Set up the major variables Collection collection = (Collection) dso; // Only add the submit link if the user has the ability to add items. if (AuthorizeManager.authorizeActionBoolean(context, collection, Constants.ADD)) { Division home = body.addDivision("collection-home","primary repository collection"); Division viewer = home.addDivision("collection-view","secondary"); String submitURL = contextPath + "/handle/" + collection.getHandle() + "/submit"; viewer.addPara().addXref(submitURL,T_submit); } }
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { String error = ""; try { error = parameters.getParameter("error"); } catch (ParameterException e) { //Should not happen. assert false; } Division div = body.addDivision("error"); Table table = div.addTable("table0",2,1); table.addRow().addCell().addContent("An error has occured:"); table.addRow().addCell().addContent(error); } }
public void addBody(Body body) throws WingException { Division invalid = body.addDivision("invalid-token","primary"); invalid.setHead(T_head); invalid.addPara(T_para1); Para example1 = invalid.addPara("invalid-token-examlpe","code"); example1.addContent(ConfigurationManager.getProperty("dspace.url") + "/register?token=ABCDEFGHIJK"); Para example2 = invalid.addPara("invalid-token-examlpe","code"); example2.addContent("LMNOP"); invalid.addPara(T_para2); Para example3 = invalid.addPara("valid-token-examlpe","code"); example3.addContent(ConfigurationManager.getProperty("dspace.url") + "/register?token=ABCDEFGHIJKLMNOP"); }
public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { Division contact = body.addDivision("contact","primary"); contact.setHead(T_head); String name = ConfigurationManager.getProperty("dspace.name"); contact.addPara(T_para1.parameterize(name)); List list = contact.addList("contact"); list.addLabel(T_feedback_label); list.addItem().addXref(contextPath+"/feedback",T_feedback_link); list.addLabel(T_email); String email = ConfigurationManager.getProperty("mail.admin"); list.addItem().addXref("mailto:"+email,email); } }
@Override public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { DSpaceObject dso = HandleUtil.obtainHandle(objectModel); if (!(dso instanceof Collection)) { return; } // Set up the major variables Collection collection = (Collection) dso; Division home = body.addDivision("collection-home", "primary repository collection"); Division search = home.addDivision("collection-search-browse", "secondary search-browse"); // Search query Division query = search.addInteractiveDivision("collection-search", contextPath + "/handle/" + collection.getHandle() + "/search", Division.METHOD_POST, "secondary search"); Para para = query.addPara("search-query", null); para.addContent(T_full_text_search); para.addContent(" "); para.addText("query"); para.addContent(" "); para.addButton("submit").setValue(T_go); query.addPara().addXref(contextPath + "/handle/" + collection.getHandle()+ "/advanced-search", T_advanced_search_link); } }
Division search = body.addDivision("search","primary"); search.setHead(T_head); Division query = search.addInteractiveDivision("general-query",