Changeset 32653

Show
Ignore:
Timestamp:
04.12.2018 13:48:08 (10 days ago)
Author:
kjdon
Message:

renamed groupsContains to csvContains as that better reflects what its doing. Added getFormattedCCSSelection - returns a comma separated list of all collecitons and groups that are specified in the two args.

Files:
1 modified

Legend:

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

    r32459 r32653  
    113113    } 
    114114 
    115   public static boolean groupsContains(String user_groups, String this_group) 
     115  public static boolean csvContains(String user_groups, String this_group) 
    116116  { 
    117117    String[] groups_array = user_groups.split(","); 
     
    175175    } 
    176176 
     177  public static String getFormattedCCSSelection(String collections, String groups) { 
     178 
     179    String result = ","; 
     180    if (collections != null && !collections.equals("")) { 
     181      result += collections+","; 
     182    } 
     183    if (groups != null && !groups.equals("")) { 
     184      String[] gps = groups.split(","); 
     185      for (int i=0; i<gps.length; i++) { 
     186    result += "group."+gps[i].replace('/','.') +","; 
     187      } 
     188    } 
     189    return result; 
     190  } 
    177191    /** 
    178192     * Generates links to equivalent documents for a document with a default