edu.uoc.pfc.social.data
Class SocialNetworkProfileXMLHelper

java.lang.Object
  extended by edu.uoc.pfc.profile.xml.ProfileXMLHelper
      extended by edu.uoc.pfc.social.data.SocialNetworkProfileXMLHelper

public class SocialNetworkProfileXMLHelper
extends ProfileXMLHelper

Classe encarregada de mantenir actualitzat el fitxer corresponent al perfil de l'usuari dins del protocol de cerques anònimes. Es tracta d'una implementació de la interface ProfileXMLHelper adaptada a la xarxa social desenvolupada en aquest projecte.

Author:
Rubén Salvador Gareta

Field Summary
 
Fields inherited from class edu.uoc.pfc.profile.xml.ProfileXMLHelper
PROFILE_XML
 
Constructor Summary
SocialNetworkProfileXMLHelper(InputStream dbProperties)
          Mètode constructor.
 
Method Summary
 Profile downloadProfile(String ipAddress, String port, File file)
          Mètode encarregat d'obtenir un fitxer XML amb les dades.
 Profile updateProfile(String ipAddress, String port, File file)
          Mètode encarregat d'actualitzar el fitxer XML amb les noves dades.
 
Methods inherited from class edu.uoc.pfc.profile.xml.ProfileXMLHelper
saveProfile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocialNetworkProfileXMLHelper

public SocialNetworkProfileXMLHelper(InputStream dbProperties)
                              throws SocialNetworkException
Mètode constructor.

Parameters:
dbProperties - InputStream del fitxer de propietats de connexió a la base de dades.
Throws:
SocialNetworkException
Method Detail

downloadProfile

public Profile downloadProfile(String ipAddress,
                               String port,
                               File file)
                        throws ProfileException
Mètode encarregat d'obtenir un fitxer XML amb les dades.

Specified by:
downloadProfile in class ProfileXMLHelper
Parameters:
ipAddress - Adreça IP de l'usuari.
port - Port de connexió de l'usuari.
file - Fitxer on s'escriurà l'XML obtingut.
Returns:
Objecte Profile amb les dades del perfil d'usuari.
Throws:
ProfileException

updateProfile

public Profile updateProfile(String ipAddress,
                             String port,
                             File file)
                      throws ProfileException
Mètode encarregat d'actualitzar el fitxer XML amb les noves dades.

Specified by:
updateProfile in class ProfileXMLHelper
Parameters:
ipAddress - Adreça IP de l'usuari.
port - Port de connexió de l'usuari.
file - Fitxer que conté l'XML que s'ha d'actualitzar.
Throws:
ProfileException