public void addOptions(Options options) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { /* Create skeleton menu structure to ensure consistent order between aspects, * even if they are never used */ options.addList("browse"); options.addList("account"); options.addList("context"); options.addList("administrative"); }
/** * Translate this element and all contained elements into SAX events. The * events should be routed to the contentHandler found in the WingContext. * * @param contentHandler * (Required) The registered contentHandler where SAX events * should be routed too. * @param lexicalHandler * (Required) The registered lexicalHandler where lexical * events (such as CDATA, DTD, etc) should be routed too. * @param namespaces * (Required) SAX Helper class to keep track of namespaces able * to determine the correct prefix for a given namespace URI. */ public void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces) throws SAXException { if (!merged) { startElement(contentHandler, namespaces, E_OPTIONS, null); } for (AbstractWingElement content : contents) { content.toSAX(contentHandler, lexicalHandler, namespaces); } if (!merged) { endElement(contentHandler, namespaces, E_OPTIONS); } }
/** * Generate a new wing document element. * * @param context * (Required) The context this element is contained in. */ public WingDocument(WingContext context) throws WingException { super(context); // These are all required so we just create them now. this.meta = new Meta(context); this.body = new Body(context); this.options = new Options(context); }
if (this.options != null && this.options.mergeEqual(namespace, localName, qName, attributes))
/** * dispose */ public void dispose() { if (this.meta != null) { meta.dispose(); } if (this.body != null) { body.dispose(); } if (this.options != null) { options.dispose(); } this.meta = null; this.body = null; this.options = null; super.dispose(); } //
options.toSAX(contentHandler, lexicalHandler, namespaces);
public void addOptions(Options options) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { /* Create skeleton menu structure to ensure consistent order between aspects, * even if they are never used */ options.addList("browse"); options.addList("account"); options.addList("context"); options.addList("administrative"); }
/** * Add a new sublist to this item. Note that an item may contain either * characters (with formating & fields) or lists but not both. * * @param name * (Required) a local identifier used to differentiate the * element from its siblings. * @return A new sub list. */ public List addList(String name) throws WingException { return addList(name, null, null); }
public void addOptions(Options options) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { // Basic navigation skeleton options.addList("browse"); List account = options.addList("account"); options.addList("context"); options.addList("administrative"); // This dosn't flow very well, lets remove it and see if anyone misses it. // DSpaceObject dso = HandleUtil.obtainHandle(objectModel); // if (dso != null && dso instanceof Collection) // { // Collection collection = (Collection) dso; // if (AuthorizeManager.authorizeActionBoolean(context, collection, Constants.ADD)) // { // String submitURL = contextPath + "/handle/" + collection.getHandle() + "/submit"; // account.addItemXref(submitURL,"Submit to this collection"); // } // } account.addItemXref(contextPath+"/submissions",T_submissions); } }
/** * Add the statistics aspect navigational options. */ public void addOptions(Options options) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { /* Create skeleton menu structure to ensure consistent order between aspects, * even if they are never used */ options.addList("browse"); options.addList("account"); options.addList("context"); options.addList("administrative"); List statistics = options.addList("statistics"); DSpaceObject dso = HandleUtil.obtainHandle(objectModel); if(dso != null && dso.getHandle() != null){ statistics.setHead(T_statistics_head); statistics.addItemXref(contextPath + "/handle/" + dso.getHandle() + "/statistics", T_statistics_view); }else{ // This Navigation is only called either on a DSO related page, or the homepage // If on the home page: add statistics link for the home page statistics.setHead(T_statistics_head); statistics.addItemXref(contextPath + "/statistics-home", T_statistics_view); } } }
public void addOptions(Options options) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { /* Create skeleton menu structure to ensure consistent order between aspects, * even if they are never used */ List admin = options.addList("administrative"); //Check if a system administrator boolean isSystemAdmin = AuthorizeManager.isAdmin(this.context); // System Administrator options! if (isSystemAdmin) { admin.addItemXref(contextPath+ "/admin/xmlworkflowoverview", T_xmlworkflow_overview); } }
/** * Add additional navigation options. This is to allow selection of a monthly report * * @param options * @throws SAXException * @throws WingException * @throws UIException * @throws SQLException * @throws IOException * @throws AuthorizeException */ public void addOptions(Options options) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { Date[] monthlyDates = StatisticsLoader.getMonthlyAnalysisDates(); if (monthlyDates != null && monthlyDates.length > 0) { List statList = options.addList("statsreports"); statList.setHead(T_choose_report); HashMap<String, String> params = new HashMap<String, String>(); for (Date date : monthlyDates) { params.put("date", sdfLink.format(date)); statList.addItemXref(super.generateURL("statistics", params), sdfDisplay.format(date)); } } }
public void addOptions(Options options) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException { List test = options.addList("XMLTest"); test.setHead("XML Test"); test.addItemXref(contextPath + "/xmltest/structural","Structural"); test.addItemXref(contextPath + "/xmltest/HTML","HTML"); List form = test.addList("FormTest"); form.setHead("Forms"); form.addItemXref(contextPath + "/xmltest/form/basic","Basic"); form.addItemXref(contextPath + "/xmltest/form/inline","In line"); form.addItemXref(contextPath + "/xmltest/form/advanced","Advanced"); } }
browse = options.addList("discovery");