LicenseImpl.java
1.48 KB
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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.day.downloadid.Checker
*/
package com.adobe.granite.license.impl;
import com.adobe.granite.license.License;
import com.day.downloadid.Checker;
import java.util.HashMap;
import java.util.Map;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public final class LicenseImpl
extends HashMap<String, String>
implements License {
private static final long serialVersionUID = 5975434929952091131L;
public static License createLicense(Map<String, String> props) {
LicenseImpl lic = new LicenseImpl(props);
if (lic.isValid()) {
return lic;
}
return null;
}
private LicenseImpl(Map<String, String> props) {
if (props != null) {
this.putAll(props);
}
}
public boolean isValid() {
String downloadid = this.getDownloadId();
return downloadid != null && Checker.check((String)downloadid.trim());
}
@Override
public String getDownloadId() {
return (String)this.get("license.downloadID");
}
@Override
public String getCustomerName() {
return (String)this.get("license.customer.name");
}
@Override
public String getProductName() {
return (String)this.get("license.product.name");
}
@Override
public String getProductVersion() {
return (String)this.get("license.product.version");
}
}