MentaTutorials

Rev

Rev 38 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 38 Rev 53
Line 1... Line 1...
1
package org.menta;
1
package org.menta;
2
2
-
 
3
import java.io.IOException;
3
import java.sql.Connection;
4
import java.sql.Connection;
4
5
5
import org.menta.action.LoginAction;
6
import org.menta.action.LoginAction;
6
import org.menta.action.UserAction;
7
import org.menta.action.UserAction;
7
import org.menta.dao.UserDAO;
8
import org.menta.dao.UserDAO;
8
import org.menta.dao.jdbc.JdbcUserDAO;
9
import org.menta.dao.jdbc.JdbcUserDAO;
9
import org.menta.model.Group;
10
import org.menta.model.Group;
10
import org.menta.model.Language;
11
import org.menta.model.Language;
11
import org.menta.model.User;
12
import org.menta.model.User;
-
 
13
import org.menta.model.User.Sexo;
12
import org.menta.service.UserService;
14
import org.menta.service.UserService;
13
import org.menta.service.impl.UserServiceImpl;
15
import org.menta.service.impl.UserServiceImpl;
14
import org.mentabean.BeanSession;
16
import org.mentabean.BeanSession;
15
import org.mentabean.DBTypes;
17
import org.mentabean.DBTypes;
16
import org.mentabean.util.SQLUtils;
18
import org.mentabean.util.SQLUtils;
Line 24... Line 26...
24
import org.mentawai.filter.AuthenticationFilter;
26
import org.mentawai.filter.AuthenticationFilter;
25
import org.mentawai.filter.ExceptionFilter;
27
import org.mentawai.filter.ExceptionFilter;
26
import org.mentawai.filter.MentaContainerFilter;
28
import org.mentawai.filter.MentaContainerFilter;
27
import org.mentawai.filter.TransactionFilter;
29
import org.mentawai.filter.TransactionFilter;
28
import org.mentawai.filter.ValidationFilter;
30
import org.mentawai.filter.ValidationFilter;
-
 
31
import org.mentawai.list.BaseListData;
-
 
32
import org.mentawai.list.ListManager;
29
import org.mentawai.mail.Email;
33
import org.mentawai.mail.Email;
30
34
31
public class AppManager extends ApplicationManager {
35
public class AppManager extends ApplicationManager {
32
36
33
        private Props props;
37
        private Props props;
Line 95... Line 99...
95
                        .pk("id", DBTypes.AUTOINCREMENT)
99
                        .pk("id", DBTypes.AUTOINCREMENT)
96
                        .field("username", DBTypes.STRING)
100
                        .field("username", DBTypes.STRING)
97
                        .field("password", DBTypes.STRING)
101
                        .field("password", DBTypes.STRING)
98
                        .field("email", DBTypes.STRING)
102
                        .field("email", DBTypes.STRING)
99
                        .field("languageId", "language_id", DBTypes.INTEGER)
103
                        .field("languageId", "language_id", DBTypes.INTEGER)
100
                        .field("groupId", "group_id", DBTypes.INTEGER);
-
 
-
 
104
                        .field("groupId", "group_id", DBTypes.INTEGER)
-
 
105
                        .field("sexo","sexo", DBTypes.ENUMID.from(Sexo.class));
-
 
106
               
101
        }
107
        }
102
       
108
       
103
    @Override
109
    @Override
104
    public void loadLists() {
110
    public void loadLists() {
-
 
111
               
-
 
112
        try {
-
 
113
                        ListManager.addList( new BaseListData("sexo", BaseListData.ORDER_BY_ID) );
-
 
114
                } catch (IOException e) {
-
 
115
                        e.printStackTrace();
-
 
116
                }
-
 
117
               
105
                addLocalizedLists("groups", "languages");
118
                addLocalizedLists("groups", "languages");
106
        }
119
        }
107
       
120
       
108
        @Override
121
        @Override
109
        public void loadLocales() {
122
        public void loadLocales() {