LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.app
Class LyApplicationVersionValidator

java.lang.Object
  extended by 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


Field Summary
 
Fields inherited from interface leon.view.setinterface.LyQuestionAnswerInterface
__VERSION
 
Constructor Summary
LyApplicationVersionValidator()
           
 
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
 

Constructor Detail

LyApplicationVersionValidator

public LyApplicationVersionValidator()
Method Detail

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

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com