Changeset 32475 for main

Show
Ignore:
Timestamp:
18.09.2018 16:10:38 (9 months ago)
Author:
kjdon
Message:

set a no_archives att to the collection element if archives are not present - then we know not to show document editing. for now, this is just a basic test whether the folder exists or not. not doing any test on the contents of it.

Location:
main/trunk/greenstone3/src/java/org/greenstone/gsdl3
Files:
2 modified

Legend:

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

    r31916 r32475  
    170170        loadSecurityInformation(coll_config_xml); 
    171171 
     172        // do we have archives folder? 
     173        File archives_folder = new File(GSFile.collectionArchiveDir(this.site_home, this.cluster_name)); 
     174        if (!archives_folder.exists()) { 
     175          this.description.setAttribute(GSXML.NO_ARCHIVES_ATT, "true"); 
     176        } 
    172177        // now do the services 
    173178        configureServiceRacks(coll_config_xml, build_config_xml); 
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSXML.java

    r32434 r32475  
    165165    public static final String PATH_ATT = "path"; 
    166166  public static final String SENSITIVE_ATT = "sensitive"; 
    167    
     167  public static final String NO_ARCHIVES_ATT = "no_archives"; 
    168168    // document stuff 
    169169    public static final String DOC_TYPE_ATT = "docType";