Subversion Repository Public Repository

Satyam

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bestray.healthcareemr.Util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;

// TODO: Auto-generated Javadoc
/**
 * The Class LicenseDetail.
 *
 * @author dell
 */
public class LicenseDetail {
    
    /** The Constant clientName. */
    private static final String clientName = "KNH";
    
    /** The Constant licenseNumber. */
    private static final String licenseNumber = "KNH";
    
    /** The Constant startDate. */
    private static final String startDate = "09-11-2013";
    
    /** The Constant endDate. */
    private static final String endDate = "12-11-2014";
    
    /** The properties. */
    private Properties properties=new Properties();
    
    /** The sdf. */
    private  SimpleDateFormat sdf =  new SimpleDateFormat("dd-MM-yyyy");
    
    /**
     * Validate license.
     *
     * @return true, if successful
     */
    public boolean validateLicense(){
        try{
            /*InputStream fis=getClass().getResourceAsStream("/license.properties");
            properties.load(fis);
            fis.close();
            clientName = properties.getProperty("ClientName");
            licenseNumber = properties.getProperty("LicenseNumber");
            startDate = properties.getProperty("StartDate");
            endDate = properties.getProperty("EndDate");*/
            Date currDate = new Date();
            Date endDt = sdf.parse(endDate);
            if(currDate.compareTo(endDt) > 0){
                return false;
            }else{
                return true;
            }
            
        }catch(Exception e){
            return false;
        }
    }
    
    
}

Commits for Satyam/AuroCareEMR/src/main/java/com/bestray/healthcareemr/Util/LicenseDetail.java

Diff revisions: vs.
Revision Author Commited Message
1 girijabapi picture girijabapi Fri 20 Jul, 2018 05:59:17 +0000