Subversion Repositories SmartDukaan

Rev

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

Rev 7266 Rev 7294
Line 17... Line 17...
17
     */
17
     */
18
    private long circle;
18
    private long circle;
19
    private long operator;
19
    private long operator;
20
    List<FRC> frcs = new ArrayList<FRC>();
20
    List<FRC> frcs = new ArrayList<FRC>();
21
    private String message = "";
21
    private String message = "";
22
    static List<TelecomCircle> circles = new ArrayList<TelecomCircle>();
22
    private static List<TelecomCircle> circles = new ArrayList<TelecomCircle>();
23
    static Map<Long, String> operatorsMap = new HashMap<Long, String>();
23
    private static Map<Long, String> operatorsMap = new HashMap<Long, String>();
24
    private ArrayList<Long> frcIdToDelete = new ArrayList<Long>();
24
    private ArrayList<Long> frcIdToDelete = new ArrayList<Long>();
25
    
25
    
26
    private static final long serialVersionUID = 1L;
26
    private static final long serialVersionUID = 1L;
27
    
27
    
28
    static {
-
 
29
        try{
-
 
30
            TransactionClient tcl = new TransactionClient();
-
 
31
            circles = tcl.getClient().getAllCircles();
-
 
32
            operatorsMap = tcl.getClient().getServiceProviders(RechargeType.MOBILE, true);
-
 
33
        } catch (Exception e) {
-
 
34
            log.error("Unable to get all circles", e);
-
 
35
        }
-
 
36
    }
-
 
37
    
-
 
38
    public String index() {
28
    public String index() {
-
 
29
        if(circles.size() == 0) {
-
 
30
            try{
-
 
31
                TransactionClient tcl = new TransactionClient();
-
 
32
                circles = tcl.getClient().getAllCircles();
-
 
33
                operatorsMap = tcl.getClient().getServiceProviders(RechargeType.MOBILE, true);
-
 
34
            } catch (Exception e) {
-
 
35
                log.error("Unable to get all circles", e);
-
 
36
                setMessage("Internal Error. Please try again.");
-
 
37
            }
-
 
38
        }
39
        return "index";
39
        return "index";
40
    }
40
    }
41
    
41
    
42
    public String destroy() {
42
    public String destroy() {
43
        try{
43
        try{