Changeset 32999


Ignore:
Timestamp:
2019-04-09T10:50:58+12:00 (3 years ago)
Author:
kjdon
Message:

a bit of tidying and commenting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/PageAction.java

    r32996 r32999  
    5858    Element result = doc.createElement(GSXML.MESSAGE_ELEM);
    5959    Element response;
    60     if (page_name.equals(HOME_PAGE))
    61       {
    62     response = homePage(request);
    63            
    64       }
    65     else if (page_name.equals(GLI4GS3_PAGE))
    66       {
    67     response = gli4gs3Page(request);
    68       } else    if (collection.equals("")) {
     60    if (page_name.equals(HOME_PAGE)) {
     61     
     62      response = homePage(request);
     63     
     64    }
     65    else if (page_name.equals(GLI4GS3_PAGE)) {
     66     
     67      response = gli4gs3Page(request);
     68     
     69    } else if (collection.equals("")) {
    6970      // we are not in a collection. eg could be library prefs or other page
    7071      response = generalLibraryPage(request, page_name);
     
    7374      response = collectionPage(request, page_name, collection);
    7475    }
    75        
    76 
     76   
     77   
    7778    result.appendChild(doc.importNode(response, true));
    7879    logger.debug("page action result: " + this.converter.getPrettyString(result));
     
    8283
    8384  // A general library page just adds site metadata and interface options.
    84   // customise: prefs: add language list
     85  // page specific customisation: prefs: add language list
    8586  protected Element generalLibraryPage(Element request, String page_name) {
    8687
     
    9697  }
    9798
     99  // a general collection page. Need to add collection info and info about its services
    98100  protected Element collectionPage(Element request, String page_name, String collection) {
    99101
     
    141143
    142144    if (page_name.equals(ABOUT_PAGE)) {
    143       // get service descriptions. Actually only want displayItems
     145      // get service descriptions. Actually only want displayItems, but get everything for now
    144146      NodeList services = coll_about_response.getElementsByTagName(GSXML.SERVICE_ELEM);
    145147      if (services.getLength() > 0)
     
    149151
    150152    }
    151     // old code had adding a ct param to the paramList - for about/prefs page, only used for gs2 interface. Since we don't support that anymore, am leaving it out.
     153    // old code had adding a ct param to the paramList - for about/prefs page, only used for gs2 interface.
     154    // Since we don't support that anymore, am leaving it out.
    152155
    153156    // add the global collection format info
     
    164167      }
    165168
     169    // security info for collection if we are a 'humanverify' page
    166170    if (page_name.equals(VERIFY_PAGE)) {
    167171      addSecurityInfo(request, collection, response);
Note: See TracChangeset for help on using the changeset viewer.