1 package org.musicontroller.gui;
2
3 import org.apache.tapestry.html.BasePage;
4 import org.musicontroller.core.Playlist;
5 import org.musicontroller.dao.Dao;
6 import org.musicontroller.security.User;
7 import org.musicontroller.service.McService;
8
9
10
11
12
13 public abstract class Home extends BasePage {
14
15 public abstract Dao getDao();
16 public abstract McService getMcService();
17
18 public abstract User getUser();
19
20 public long getUserid() {
21 User user = getUser();
22 return user==null?-1L:user.getId();
23 }
24
25 public String getPasshash() {
26 User user = getUser();
27 return user==null ? "" : user.getPassword();
28 }
29
30
31
32
33
34
35 public Playlist getUpcoming() {
36 return getMcService().getUpcoming(getUserid());
37 }
38
39 }