edu.uoc.pfc.social.data
Class SocialNetworkProfileXMLHelper
java.lang.Object
edu.uoc.pfc.profile.xml.ProfileXMLHelper
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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