de.hattrickorganizer.net
Class MyConnector

java.lang.Object
  extended by de.hattrickorganizer.net.MyConnector
All Implemented Interfaces:
IDownloadHelper

public class MyConnector
extends java.lang.Object
implements IDownloadHelper

DOCUMENT ME!

Author:
thomas.werth

Field Summary
static java.lang.String m_sIDENTIFIER
          TODO Missing Parameter Documentation
 
Method Summary
 void enableProxy()
           
 java.lang.String fetchRegionID(int teamID)
          TODO Missing Method Documentation
 java.lang.String getArena()
          Fetch our arena
 java.lang.String getArena(int arenaId)
          Fetch a specific arena
 java.lang.String getEconomy()
          holt die Finanzen
 Extension getEpvVersion()
           
 java.io.InputStream getFileFromWeb(java.lang.String url, boolean displaysettingsScreen)
          TODO Missing Method Documentation
 java.lang.String getHattrickIPAdress()
          lädt die IP Adress-Seite
 java.lang.String getHattrickXMLFile(java.lang.String file)
          downloads an xml File from hattrick
static java.lang.String getHOSite()
           
static java.lang.String getInitialHTConnectionUrl()
           
 News getLatestNews()
           
 double getLatestVersion()
           
 java.lang.String getLeagueDetails()
          lädt die Tabelle
 java.lang.String getLeagueFixtures(int season, int ligaID)
          lädt den Spielplan
 java.lang.String getMatchArchiv(int teamId, java.lang.String firstDate, java.lang.String lastDate)
          lädt das MatchArchiv als xml
 java.lang.String getMatchdetails(int matchId)
          lädt den Die Aufstellungsbewertung zu einem Spiel
 java.lang.String getMatchesASP(int teamId, boolean forceRefresh)
          lädt die matches.asp seite als xml
 java.lang.String getMatchLineup(int matchId, int teamId)
          lädt den Die Aufstellungsbewertung zu einem Spiel
 java.lang.String getMatchOrder(int matchId)
          lädt den Die Aufstellung zu einem Spiel
 java.lang.String getPage(java.lang.String url)
           
 java.lang.String getPage(java.lang.String surl, boolean needLogin)
          TODO Missing Method Documentation
 java.lang.String getPlayersAsp()
          holt die Spielerdaten
static java.lang.String getPluginSite()
           
 java.lang.String getProxyHost()
          Getter for property m_sProxyHost.
 java.lang.String getProxyPort()
          Getter for property m_sProxyPort.
 java.lang.String getProxyUserName()
          Getter for property m_ProxyUserName.
 java.lang.String getProxyUserPWD()
          Getter for property m_ProxyUserPWD.
 Extension getRatingsVersion()
           
static java.lang.String getResourceSite()
           
 ServerVerweis[] getServerList()
          holt die Liste der verfügbaren Server aus der I-Net-Server-DB
 java.lang.String getTeamdetails(int teamId)
          holt die Teamdetails
 java.lang.String getTraining()
          holt das Training
 java.lang.String getTransferCompare(int playerID)
          lädt die Tabelle
 java.lang.String getUsalWebPage(java.lang.String url, boolean displaysettingsScreen)
          TODO Missing Method Documentation
 java.lang.String getUserName()
          Getter for property m_sUserName.
 java.lang.String getUserPwd()
          Getter for property m_sUserPwd.
 java.lang.String getVerein()
          holt die Vereinsdaten
 java.lang.String getWebPage(java.lang.String surl, boolean needCookie)
          TODO Missing Method Documentation
 java.lang.String getWorldDetails()
          holt die Weltdaten
 boolean hasSecLogin()
          TODO Missing Method Documentation
static MyConnector instance()
          TODO Missing Method Documentation
 boolean isAuthenticated()
          TODO Missing Method Documentation
 boolean isCookieSet()
           
 boolean isProxyAuthentifactionNeeded()
          Getter for property m_bProxyAuthentifactionNeeded.
 boolean isUseProxy()
          Getter for property m_UseProxy.
 boolean login()
           
 void logout()
          TODO Missing Method Documentation
 int registerServer(java.lang.String ipAdress, int port, java.lang.String info)
          registriert einen HO! Friendly Server im Internet
 boolean sendAlive(int matchId)
          Informiert Inet Db das Friendly-Server weiterhin lauscht
 boolean sendSpielbericht(Spielbericht sb, boolean isServer)
          holt die Liste der verfügbaren Server aus der I-Net-Server-DB
 void setAuthenticated(boolean value)
          um nach einem Fehler zu restten
 void setProxyAuthentifactionNeeded(boolean m_bProxyAuthentifactionNeeded)
          Setter for property m_bProxyAuthentifactionNeeded.
 void setProxyHost(java.lang.String m_sProxyHost)
          Setter for property m_sProxyHost.
 void setProxyPort(java.lang.String m_sProxyPort)
          Setter for property m_sProxyPort.
 void setProxyUserName(java.lang.String m_ProxyUserName)
          Setter for property m_ProxyUserName.
 void setProxyUserPWD(java.lang.String m_ProxyUserPWD)
          Setter for property m_ProxyUserPWD.
 void setUseProxy(boolean m_UseProxy)
          Setter for property m_UseProxy.
 void setUserName(java.lang.String m_sUserName)
          Setter for property m_sUserName.
 void setUserPwd(java.lang.String m_sUserPwd)
          Setter for property m_sUserPwd.
 boolean unregisterServer(int matchId)
          Informiert die DB das der Server nicht mehr zur verfügung steht
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_sIDENTIFIER

public static java.lang.String m_sIDENTIFIER
TODO Missing Parameter Documentation

Method Detail

instance

public static MyConnector instance()
TODO Missing Method Documentation

Returns:
TODO Missing Return Method Documentation

getResourceSite

public static java.lang.String getResourceSite()

getHOSite

public static java.lang.String getHOSite()

getPluginSite

public static java.lang.String getPluginSite()

getArena

public java.lang.String getArena()
                          throws java.io.IOException
Fetch our arena

Returns:
arena xml
Throws:
java.io.IOException

getArena

public java.lang.String getArena(int arenaId)
                          throws java.io.IOException
Fetch a specific arena

Parameters:
arenaId - id of the arena to fetch (-1 = our arena)
Returns:
arena xml
Throws:
java.io.IOException

setAuthenticated

public void setAuthenticated(boolean value)
um nach einem Fehler zu restten

Parameters:
value - TODO Missing Constructuor Parameter Documentation

isAuthenticated

public boolean isAuthenticated()
TODO Missing Method Documentation

Returns:
TODO Missing Return Method Documentation

isCookieSet

public boolean isCookieSet()

getEconomy

public java.lang.String getEconomy()
                            throws java.io.IOException
holt die Finanzen

Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getHattrickIPAdress

public java.lang.String getHattrickIPAdress()
                                     throws java.io.IOException
lädt die IP Adress-Seite

Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getHattrickXMLFile

public java.lang.String getHattrickXMLFile(java.lang.String file)
                                    throws java.io.IOException
downloads an xml File from hattrick

Specified by:
getHattrickXMLFile in interface IDownloadHelper
Parameters:
file - ex. = /common/leagueDetails.asp?outputType=XML&actionType=view
Returns:
the complete file as String
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getLeagueDetails

public java.lang.String getLeagueDetails()
                                  throws java.io.IOException
lädt die Tabelle

Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getLeagueFixtures

public java.lang.String getLeagueFixtures(int season,
                                          int ligaID)
                                   throws java.io.IOException
lädt den Spielplan

Parameters:
season - angabe der Saison ( optinal < 1 für aktuelle
ligaID - TODO Missing Constructuor Parameter Documentation
Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getMatchArchiv

public java.lang.String getMatchArchiv(int teamId,
                                       java.lang.String firstDate,
                                       java.lang.String lastDate)
                                throws java.io.IOException
lädt das MatchArchiv als xml

Parameters:
teamId - TODO Missing Constructuor Parameter Documentation
firstDate - TODO Missing Constructuor Parameter Documentation
lastDate - TODO Missing Constructuor Parameter Documentation
Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getMatchLineup

public java.lang.String getMatchLineup(int matchId,
                                       int teamId)
                                throws java.io.IOException
lädt den Die Aufstellungsbewertung zu einem Spiel

Parameters:
matchId - angabe der Saison ( optinal < 1 für aktuelle
teamId - TODO Missing Constructuor Parameter Documentation
Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getMatchOrder

public java.lang.String getMatchOrder(int matchId)
                               throws java.io.IOException
lädt den Die Aufstellung zu einem Spiel

Parameters:
matchId - angabe der Saison ( optinal < 1 für aktuelle
Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getMatchdetails

public java.lang.String getMatchdetails(int matchId)
                                 throws java.io.IOException
lädt den Die Aufstellungsbewertung zu einem Spiel

Parameters:
matchId - angabe der Saison ( optinal < 1 für aktuelle
Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getMatchesASP

public java.lang.String getMatchesASP(int teamId,
                                      boolean forceRefresh)
                               throws java.io.IOException
lädt die matches.asp seite als xml

Parameters:
teamId - TODO Missing Constructuor Parameter Documentation
forceRefresh - TODO Missing Constructuor Parameter Documentation
Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getPage

public java.lang.String getPage(java.lang.String url)
                         throws java.io.IOException
Throws:
java.io.IOException

getPage

public java.lang.String getPage(java.lang.String surl,
                                boolean needLogin)
                         throws java.io.IOException
TODO Missing Method Documentation

Parameters:
surl - TODO Missing Method Parameter Documentation
needLogin - TODO Missing Method Parameter Documentation
Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Method Exception Documentation

getPlayersAsp

public java.lang.String getPlayersAsp()
                               throws java.io.IOException
holt die Spielerdaten

Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

setProxyAuthentifactionNeeded

public void setProxyAuthentifactionNeeded(boolean m_bProxyAuthentifactionNeeded)
Setter for property m_bProxyAuthentifactionNeeded.

Parameters:
m_bProxyAuthentifactionNeeded - New value of property m_bProxyAuthentifactionNeeded.

isProxyAuthentifactionNeeded

public boolean isProxyAuthentifactionNeeded()
Getter for property m_bProxyAuthentifactionNeeded.

Returns:
Value of property m_bProxyAuthentifactionNeeded.

setProxyHost

public void setProxyHost(java.lang.String m_sProxyHost)
Setter for property m_sProxyHost.

Parameters:
m_sProxyHost - New value of property m_sProxyHost.

getProxyHost

public java.lang.String getProxyHost()
Getter for property m_sProxyHost.

Returns:
Value of property m_sProxyHost.

setProxyPort

public void setProxyPort(java.lang.String m_sProxyPort)
Setter for property m_sProxyPort.

Parameters:
m_sProxyPort - New value of property m_sProxyPort.

getProxyPort

public java.lang.String getProxyPort()
Getter for property m_sProxyPort.

Returns:
Value of property m_sProxyPort.

setProxyUserName

public void setProxyUserName(java.lang.String m_ProxyUserName)
Setter for property m_ProxyUserName.

Parameters:
m_ProxyUserName - New value of property m_ProxyUserName.

getProxyUserName

public java.lang.String getProxyUserName()
Getter for property m_ProxyUserName.

Returns:
Value of property m_ProxyUserName.

setProxyUserPWD

public void setProxyUserPWD(java.lang.String m_ProxyUserPWD)
Setter for property m_ProxyUserPWD.

Parameters:
m_ProxyUserPWD - New value of property m_ProxyUserPWD.

getProxyUserPWD

public java.lang.String getProxyUserPWD()
Getter for property m_ProxyUserPWD.

Returns:
Value of property m_ProxyUserPWD.

getServerList

public ServerVerweis[] getServerList()
holt die Liste der verfügbaren Server aus der I-Net-Server-DB

Returns:
Array-Liste mit ServerVerweis Objekten

getTeamdetails

public java.lang.String getTeamdetails(int teamId)
                                throws java.io.IOException
holt die Teamdetails

Parameters:
teamId - TODO Missing Constructuor Parameter Documentation
Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getTraining

public java.lang.String getTraining()
                             throws java.io.IOException
holt das Training

Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getTransferCompare

public java.lang.String getTransferCompare(int playerID)
                                    throws java.io.IOException
lädt die Tabelle

Parameters:
playerID - TODO Missing Constructuor Parameter Documentation
Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

setUseProxy

public void setUseProxy(boolean m_UseProxy)
Setter for property m_UseProxy.

Parameters:
m_UseProxy - New value of property m_UseProxy.

isUseProxy

public boolean isUseProxy()
Getter for property m_UseProxy.

Returns:
Value of property m_UseProxy.

setUserName

public void setUserName(java.lang.String m_sUserName)
Setter for property m_sUserName.

Parameters:
m_sUserName - New value of property m_sUserName.

getUserName

public java.lang.String getUserName()
Getter for property m_sUserName.

Returns:
Value of property m_sUserName.

setUserPwd

public void setUserPwd(java.lang.String m_sUserPwd)
Setter for property m_sUserPwd.

Parameters:
m_sUserPwd - New value of property m_sUserPwd.

getUserPwd

public java.lang.String getUserPwd()
Getter for property m_sUserPwd.

Returns:
Value of property m_sUserPwd.

getVerein

public java.lang.String getVerein()
                           throws java.io.IOException
holt die Vereinsdaten

Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getWebPage

public java.lang.String getWebPage(java.lang.String surl,
                                   boolean needCookie)
                            throws java.io.IOException
TODO Missing Method Documentation

Parameters:
surl - TODO Missing Method Parameter Documentation
needCookie - TODO Missing Method Parameter Documentation
Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Method Exception Documentation

getWorldDetails

public java.lang.String getWorldDetails()
                                 throws java.io.IOException
holt die Weltdaten

Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Constructuor Exception Documentation

getLatestVersion

public double getLatestVersion()

getEpvVersion

public Extension getEpvVersion()

getRatingsVersion

public Extension getRatingsVersion()

getLatestNews

public News getLatestNews()

enableProxy

public void enableProxy()

fetchRegionID

public java.lang.String fetchRegionID(int teamID)
TODO Missing Method Documentation

Specified by:
fetchRegionID in interface IDownloadHelper
Parameters:
teamID - TODO Missing Method Parameter Documentation
Returns:
TODO Missing Return Method Documentation

hasSecLogin

public boolean hasSecLogin()
TODO Missing Method Documentation

Returns:
TODO Missing Return Method Documentation

login

public boolean login()
              throws java.io.IOException
Throws:
java.io.IOException

logout

public void logout()
            throws java.io.IOException
TODO Missing Method Documentation

Throws:
java.io.IOException - TODO Missing Method Exception Documentation

getFileFromWeb

public java.io.InputStream getFileFromWeb(java.lang.String url,
                                          boolean displaysettingsScreen)
                                   throws java.io.IOException
TODO Missing Method Documentation

Specified by:
getFileFromWeb in interface IDownloadHelper
Parameters:
url - TODO Missing Method Parameter Documentation
displaysettingsScreen - TODO Missing Method Parameter Documentation
Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Method Exception Documentation

getUsalWebPage

public java.lang.String getUsalWebPage(java.lang.String url,
                                       boolean displaysettingsScreen)
                                throws java.io.IOException
TODO Missing Method Documentation

Specified by:
getUsalWebPage in interface IDownloadHelper
Parameters:
url - TODO Missing Method Parameter Documentation
displaysettingsScreen - TODO Missing Method Parameter Documentation
Returns:
TODO Missing Return Method Documentation
Throws:
java.io.IOException - TODO Missing Method Exception Documentation

registerServer

public int registerServer(java.lang.String ipAdress,
                          int port,
                          java.lang.String info)
registriert einen HO! Friendly Server im Internet

Parameters:
ipAdress - TODO Missing Constructuor Parameter Documentation
port - TODO Missing Constructuor Parameter Documentation
info - TODO Missing Constructuor Parameter Documentation
Returns:
MatchId, -1 == Error

sendAlive

public boolean sendAlive(int matchId)
Informiert Inet Db das Friendly-Server weiterhin lauscht

Parameters:
matchId - TODO Missing Constructuor Parameter Documentation
Returns:
TODO Missing Return Method Documentation

sendSpielbericht

public boolean sendSpielbericht(Spielbericht sb,
                                boolean isServer)
holt die Liste der verfügbaren Server aus der I-Net-Server-DB

Parameters:
sb - TODO Missing Constructuor Parameter Documentation
isServer - TODO Missing Constructuor Parameter Documentation
Returns:
Array-Liste mit ServerVerweis Objekten

unregisterServer

public boolean unregisterServer(int matchId)
Informiert die DB das der Server nicht mehr zur verfügung steht

Parameters:
matchId - TODO Missing Constructuor Parameter Documentation
Returns:
TODO Missing Return Method Documentation

getInitialHTConnectionUrl

public static final java.lang.String getInitialHTConnectionUrl()