Subversion Repositories SmartDukaan

Rev

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

Rev 2262 Rev 2418
Line 1... Line 1...
1
package in.shop2020.datalogger.event;
1
package in.shop2020.datalogger.event;
2
 
2
 
-
 
3
import in.shop2020.datalogger.EventType;
-
 
4
 
-
 
5
import org.json.JSONException;
-
 
6
import org.json.JSONObject;
-
 
7
 
3
public class RegisterFailedUserExists extends Event{
8
public class RegisterFailedUserExists extends Event{
4
    
9
    
5
    private String userName;
10
    private String userName;
6
    private String commMail;
11
    private String commMail;
7
 
12
 
Line 9... Line 14...
9
        super(eventFileds);
14
        super(eventFileds);
10
        userName = eventFileds[5].trim();
15
        userName = eventFileds[5].trim();
11
        commMail = eventFileds[6].trim();
16
        commMail = eventFileds[6].trim();
12
    }
17
    }
13
 
18
 
-
 
19
    public RegisterFailedUserExists(EventType eType, String sessionId, long userId, String email, String[] logData) {
-
 
20
        super(eType, sessionId, userId, email);
-
 
21
        userName = logData[0].trim();
-
 
22
        commMail = logData[1].trim();
-
 
23
    }
-
 
24
 
14
    public String toString() {
25
    public String toString() {
15
        StringBuilder sb = new StringBuilder();
26
        StringBuilder sb = new StringBuilder();
16
        sb.append(eventType.name() + ", ");
27
        sb.append(eventType.name() + ", ");
17
        sb.append("userEmail : " + userEmail);
28
        sb.append("userEmail : " + userEmail);
18
        sb.append(" userName : " + userName);
29
        sb.append(" userName : " + userName);
Line 21... Line 32...
21
        sb.append(" session : " + sessionId);
32
        sb.append(" session : " + sessionId);
22
        
33
        
23
        return sb.toString();
34
        return sb.toString();
24
    }
35
    }
25
    
36
    
-
 
37
    @Override
-
 
38
    public JSONObject getLogDataInJson() {
-
 
39
        JSONObject logDataInJson = new JSONObject();
-
 
40
        try {
-
 
41
            logDataInJson.put("userName", userName);
-
 
42
            logDataInJson.put("commMail", commMail);
-
 
43
        } catch (JSONException e) {
-
 
44
            e.printStackTrace();
-
 
45
        }
-
 
46
        return logDataInJson;
-
 
47
    }
-
 
48
    
26
    public String getUserName() {
49
    public String getUserName() {
27
        return userName;
50
        return userName;
28
    }
51
    }
29
 
52
 
30
    public void setUserName(String userName) {
53
    public void setUserName(String userName) {