Added individual song and service pages.
This commit is contained in:
		@@ -1,3 +1,11 @@
 | 
			
		||||
package com.jdbernard.nlsongs.model;
 | 
			
		||||
 | 
			
		||||
public enum ServiceType { SUN_AM, SUN_PM, WED }
 | 
			
		||||
public enum ServiceType {
 | 
			
		||||
    SUN_AM("Sunday AM"), SUN_PM("Sunday PM"), WED("Wednesday");
 | 
			
		||||
    
 | 
			
		||||
    private String displayName;
 | 
			
		||||
 | 
			
		||||
    ServiceType(String displayName) { this.displayName = displayName; }
 | 
			
		||||
 | 
			
		||||
    @Override public String toString() { return this.displayName; }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,16 @@
 | 
			
		||||
package com.jdbernard.nlsongs.servlet
 | 
			
		||||
 | 
			
		||||
import com.jdbernard.nlsongs.db.NLSongsDB
 | 
			
		||||
import com.jdbernard.nlsongs.model.Service
 | 
			
		||||
import com.jdbernard.nlsongs.model.Song
 | 
			
		||||
 | 
			
		||||
public class NLSongsContext {
 | 
			
		||||
 | 
			
		||||
    public static NLSongsDB songsDB }
 | 
			
		||||
    public static NLSongsDB songsDB
 | 
			
		||||
    
 | 
			
		||||
    public static String mediaUrlBase
 | 
			
		||||
 | 
			
		||||
    public static String makeUrl(Service service, Song song) {
 | 
			
		||||
        return mediaUrlBase + service.@date.toString('yyyy-MM-dd') +
 | 
			
		||||
            '/' + song.name.replaceAll(/\s/, '') + '.ogg' }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user