Changeset 35484


Ignore:
Timestamp:
2021-09-25T23:38:18+12:00 (4 months ago)
Author:
davidb
Message:

Java support for: Workpackaged themed color scheme for DL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSParams.java

    r34218 r35484  
    9191    public static final String DEBUG = "debug";
    9292
    93   public static final String SERVICE_PREFIX = "s1";
    94   public static final String PREVIOUS_PREFIX = "p";
    95   public static final String MD_PREFIX = "md___";
     93  public static final String SERVICE_PREFIX   = "s1";
     94  public static final String PREVIOUS_PREFIX  = "p";
     95  public static final String MD_PREFIX        = "md___";
     96  public static final String SAVEPARAM_PREFIX = "jsession";
    9697
    9798  public static final String SERVICE_PARAM_REGEX = "^s\\d\\..*";
     
    131132    }
    132133
    133     public boolean addParameter(String name, boolean save, boolean sensitive) {
     134        public boolean addParameter(String name, boolean save, boolean sensitive)
     135        {
    134136        if (this.param_map.containsKey(name))
    135137        {
     
    139141        this.param_map.put(name, new Param("", save, sensitive));
    140142        return true;
    141   }
     143    }
     144   
    142145    public boolean addParameter(String name, String default_value, boolean save)
    143146    {
     
    201204    {
    202205        // p. is used to store previous settings
    203         if (name.startsWith(PREVIOUS_PREFIX+".") || name.startsWith(MD_PREFIX))
     206            if (name.startsWith(PREVIOUS_PREFIX+".") || name.startsWith(MD_PREFIX)) {
    204207            return false;
     208        }
     209        else if (name.startsWith(SAVEPARAM_PREFIX+".")) {
     210            return true;
     211        }
     212       
    205213        Param p;
    206214        if (name.matches(SERVICE_PARAM_REGEX)) {
     
    214222          return false; // never save unknown params
    215223        }
     224       
    216225        return p.save;
    217226    }
Note: See TracChangeset for help on using the changeset viewer.