Changeset 25465

Show
Ignore:
Timestamp:
24.04.2012 13:17:35 (7 years ago)
Author:
kjdon
Message:

look for public true/false metadata, and set is_public accordingly. pass messages that we can't process to super class so that security requests can be processed.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/collection/XMLCollection.java

    r13994 r25465  
    4343    Element display_list = (Element)GSXML.getChildByTagName(coll_config_xml, GSXML.DISPLAY_TEXT_ELEM+GSXML.LIST_MODIFIER); 
    4444    if (display_list != null) { 
     45      resolveMacros(display_list); 
    4546        addDisplayItems(display_list); 
    4647    } 
     
    5455    } 
    5556     
     57    // are we a private collection?? 
     58    if (this.metadata_list != null) { 
     59       
     60      Element meta_elem = (Element) GSXML.getNamedElement(this.metadata_list, GSXML.METADATA_ELEM, GSXML.NAME_ATT, "public"); 
     61      if (meta_elem != null) { 
     62         
     63        String value = GSXML.getValue(meta_elem).toLowerCase().trim(); 
     64        if (value.equals("false")) { 
     65          is_public = false; 
     66        } 
     67      } 
     68    } 
    5669    Element config_doc_list = (Element)GSXML.getChildByTagName(coll_config_xml, GSXML.DOCUMENT_ELEM+GSXML.LIST_MODIFIER); 
    5770    if (config_doc_list != null) { 
     
    117130        return response; 
    118131    } 
    119      
    120     if (type.equals(GSXML.REQUEST_TYPE_SYSTEM)) { 
    121         response = processSystemRequest(request); 
    122     } else { // unknown type 
    123         logger.error("cant handle request of type "+ type); 
     132    return super.processMessage(request); 
    124133         
    125     } 
    126     return response; 
    127134    } 
    128  
     135   
    129136}