leon.app
Class LyApplicationVersionValidator
java.lang.Object
leon.app.LyApplicationVersionValidator
- All Implemented Interfaces:
- java.lang.Runnable, LyAnswerInterface, LyQuestionAnswerInterface
public class LyApplicationVersionValidator
- extends java.lang.Object
- implements LyQuestionAnswerInterface, java.lang.Runnable
This class attempts to fetch 'current' application version on a website. If the connection
failed, or version file is not found : nothing occur. If the connection file is found and the
version number is the same as LY_ROOT_VERSION properties : nothing occurs. If the version number
in the target file differs from current file a message is shown to the user.
Target url is specified in files_xxx.properties LY_APPLICATION_VERSION_VALIDATOR
Update message is specified in the message String LY_NEW_APPLICATION_VERSION_AVAILABLE
Target file format is
<VALIDATOR>
<VERSION>x.y.z build b</VERSION>
<MESSAGE>optional message </MESSAGE>
<UPDATE_URL>optional download url </UPDATE_URL>
</VALIDATOR>
File size is 1Ko Max
Method Summary |
void |
checkVersion(LyEnvironment environment)
Attempt to connect to an URL to check Application version. |
void |
questionAnswer(boolean result,
java.lang.Object clientData)
Response to the question popup view. |
void |
run()
Code to RUN In SWT Thread -from execGUI in checkVersion(). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LyApplicationVersionValidator
public LyApplicationVersionValidator()
checkVersion
public void checkVersion(LyEnvironment environment)
- Attempt to connect to an URL to check Application version. See class description above
- Parameters:
environment
- current application environment
run
public void run()
- Code to RUN In SWT Thread -from execGUI in checkVersion().
- Specified by:
run
in interface java.lang.Runnable
questionAnswer
public void questionAnswer(boolean result,
java.lang.Object clientData)
- Response to the question popup view. This method may be called directrly specifying the
environment as clientData
- Specified by:
questionAnswer
in interface LyQuestionAnswerInterface
- Parameters:
result
- : answer to the question "do you want to check versions on servers". If
false, does nothing.clientData
- shound be the environment if called directly.- See Also:
LyQuestionAnswerInterface
Website: W4 S.A., contact us: support@w4global.com