|
Lines 25-30
Link Here
|
| 25 |
protected static Integer LICENSE_UNSPECIFIED = new Integer(0); // This needs to be 0 for the plugin prefs. |
25 |
protected static Integer LICENSE_UNSPECIFIED = new Integer(0); // This needs to be 0 for the plugin prefs. |
| 26 |
protected static Integer LICENSE_AGREE = new Integer(1); |
26 |
protected static Integer LICENSE_AGREE = new Integer(1); |
| 27 |
protected static Integer LICENSE_DISAGREE = new Integer(2); |
27 |
protected static Integer LICENSE_DISAGREE = new Integer(2); |
|
|
28 |
// Signifies a license that has been disagreed to this session. |
| 29 |
protected static Integer LICENSE_DISAGREE_THIS_SESSION = new Integer(3); |
| 28 |
|
30 |
|
| 29 |
protected final static String _LOG_INFO_WTP_NO_USER_INTERACTION = "_LOG_INFO_WTP_NO_USER_INTERACTION"; |
31 |
protected final static String _LOG_INFO_WTP_NO_USER_INTERACTION = "_LOG_INFO_WTP_NO_USER_INTERACTION"; |
| 30 |
|
32 |
|
|
Lines 115-120
Link Here
|
| 115 |
} |
117 |
} |
| 116 |
|
118 |
|
| 117 |
/** |
119 |
/** |
|
|
120 |
* Disagree to the specified license for this session. The license is disagreed to only if it has already |
| 121 |
* been registered with the registry. |
| 122 |
* |
| 123 |
* @param url The URL of the license to accept. |
| 124 |
*/ |
| 125 |
private void disagreeLicenseThisSession(String url) |
| 126 |
{ |
| 127 |
if(licenses.containsKey(url)) |
| 128 |
{ |
| 129 |
licenses.put(url, LICENSE_DISAGREE_THIS_SESSION); |
| 130 |
} |
| 131 |
} |
| 132 |
|
| 133 |
/** |
| 118 |
* Determine if the license has been accepted. This method will return true if the license |
134 |
* Determine if the license has been accepted. This method will return true if the license |
| 119 |
* has been accepted or is not registered with the registry and false if it has not been accepted. |
135 |
* has been accepted or is not registered with the registry and false if it has not been accepted. |
| 120 |
* |
136 |
* |
|
Lines 140-146
Link Here
|
| 140 |
{ |
156 |
{ |
| 141 |
if(!CachePlugin.getDefault().shouldPrompt()) |
157 |
if(!CachePlugin.getDefault().shouldPrompt()) |
| 142 |
return false; |
158 |
return false; |
|
|
159 |
licenses.put(licenseURL, LICENSE_DISAGREE_THIS_SESSION); |
| 160 |
} |
| 161 |
// The license has already been disagreed to this session. Do not prompt. |
| 162 |
else if(agreed == LICENSE_DISAGREE_THIS_SESSION) |
| 163 |
{ |
| 164 |
return false; |
| 143 |
} |
165 |
} |
|
|
166 |
|
| 144 |
|
167 |
|
| 145 |
// Prompt the user to accept the license. |
168 |
// Prompt the user to accept the license. |
| 146 |
if(promptToAcceptLicense(url, licenseURL)) |
169 |
if(promptToAcceptLicense(url, licenseURL)) |
|
Lines 148-154
Link Here
|
| 148 |
agreeLicense(licenseURL); |
171 |
agreeLicense(licenseURL); |
| 149 |
return true; |
172 |
return true; |
| 150 |
} |
173 |
} |
| 151 |
disagreeLicense(licenseURL); |
174 |
disagreeLicenseThisSession(licenseURL); |
| 152 |
return false; |
175 |
return false; |
| 153 |
} |
176 |
} |
| 154 |
|
177 |
|