Coverage Report - org.kuali.mobility.shared.Constants
 
Classes in this File Line Coverage Branch Coverage Complexity
Constants
0%
0/14
N/A
1
Constants$DateFormat
0%
0/8
N/A
1
Constants$FileType
0%
0/2
N/A
1
Constants$FileTypes
0%
0/48
N/A
1
 
 1  
 /**
 2  
  * Copyright 2011 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.mobility.shared;
 17  
 
 18  
 import java.text.SimpleDateFormat;
 19  
 import java.util.LinkedHashMap;
 20  
 import java.util.Map;
 21  
 
 22  0
 public class Constants {
 23  
 
 24  
         public static final String KME_USER_KEY = "kme.user";
 25  
         public static final String KME_BACKDOOR_USER_KEY = "kme.backdoor.user";
 26  
         
 27  
         public static final String URL_MIME_TYPE = "text/url";
 28  
         
 29  
         public static final String SAKAI_FOLDER_EXTENSION = "fldr";
 30  
         public static final String SAKAI_URL_EXTENSION = "url";
 31  
         
 32  0
         public static final Map<String, String> CAMPUS_NAMES = new LinkedHashMap<String, String>();
 33  
         
 34  
         static {
 35  0
                 CAMPUS_NAMES.put("Any", "Any Campus");
 36  0
                 CAMPUS_NAMES.put("BL", "IU Bloomington");
 37  0
                 CAMPUS_NAMES.put("IN", "IUPUI");
 38  0
                 CAMPUS_NAMES.put("CO", "IUPUC");
 39  0
                 CAMPUS_NAMES.put("EA", "IU East");
 40  0
                 CAMPUS_NAMES.put("FW", "IPFW");
 41  0
                 CAMPUS_NAMES.put("KO", "IU Kokomo");
 42  0
                 CAMPUS_NAMES.put("NW", "IU Northwest");
 43  0
                 CAMPUS_NAMES.put("SB", "IU South Bend");
 44  0
                 CAMPUS_NAMES.put("SE", "IU Southeast");
 45  0
         }
 46  
         
 47  0
         public enum DateFormat {
 48  0
                 queryStringDateFormat("yyyyMMdd"),
 49  0
                 displayDateFormat("MMMM dd, yyyy"),
 50  0
                 buttonDateFormat("MMM dd");
 51  
                 
 52  
                 private String format;
 53  
                 
 54  0
                 DateFormat(String format) {
 55  0
                         this.format = format;
 56  0
                 }
 57  
                 
 58  
                 public SimpleDateFormat getFormat() {
 59  0
                         return new SimpleDateFormat(format);
 60  
                 }
 61  
         }
 62  
         
 63  0
         public enum FileType {
 64  0
                 GENERIC, IMAGE, VIDEO, TEXT, PRESENTATION, SPREADSHEET, PDF, AUDIO, LINK, FOLDER, COMPRESSED;
 65  
         }
 66  
                 
 67  0
         public enum FileTypes {
 68  0
                 txt(FileType.TEXT),
 69  0
                 rtf(FileType.TEXT),
 70  0
                 doc(FileType.TEXT),
 71  0
                 docx(FileType.TEXT),
 72  0
                 odt(FileType.TEXT),
 73  0
                 wpd(FileType.TEXT),
 74  0
                 jpg(FileType.IMAGE),
 75  0
                 jpeg(FileType.IMAGE),
 76  0
                 png(FileType.IMAGE),
 77  0
                 gif(FileType.IMAGE),
 78  0
                 bmp(FileType.IMAGE),
 79  0
                 psd(FileType.IMAGE),
 80  0
                 tiff(FileType.IMAGE),
 81  0
                 wav(FileType.AUDIO),
 82  0
                 wma(FileType.AUDIO),
 83  0
                 mpa(FileType.AUDIO),
 84  0
                 mp3(FileType.AUDIO),
 85  0
                 mid(FileType.AUDIO),
 86  0
                 midi(FileType.AUDIO),
 87  0
                 m4a(FileType.AUDIO),
 88  0
                 m3u(FileType.AUDIO),
 89  0
                 aif(FileType.AUDIO),
 90  0
                 avi(FileType.VIDEO),
 91  0
                 flv(FileType.VIDEO),
 92  0
                 mov(FileType.VIDEO),
 93  0
                 mp4(FileType.VIDEO),
 94  0
                 mpg(FileType.VIDEO),
 95  0
                 swf(FileType.VIDEO),
 96  0
                 vob(FileType.VIDEO),
 97  0
                 wmv(FileType.VIDEO),
 98  0
                 wks(FileType.SPREADSHEET),
 99  0
                 xls(FileType.SPREADSHEET),
 100  0
                 xlsx(FileType.SPREADSHEET),
 101  0
                 ods(FileType.SPREADSHEET),
 102  0
                 ppt(FileType.PRESENTATION),
 103  0
                 pptx(FileType.PRESENTATION),
 104  0
                 odp(FileType.PRESENTATION),
 105  0
                 pdf(FileType.PDF),
 106  0
                 zip(FileType.COMPRESSED),
 107  0
                 rar(FileType.COMPRESSED),
 108  0
                 gz(FileType.COMPRESSED),
 109  0
                 fldr(FileType.FOLDER),
 110  0
                 url(FileType.LINK);
 111  
                 
 112  
                 private FileType fileType;
 113  
                 
 114  0
                 FileTypes(FileType fileType) {
 115  0
                         this.fileType = fileType;
 116  0
                 }
 117  
                 
 118  
                 public FileType getFileType() {
 119  0
                         return fileType;
 120  
                 }
 121  
         }
 122  
         
 123  
 }