base.user.jcard
Interface IVCard

All Known Implementing Classes:
JCard

public interface IVCard

This interface defines some IO methods to export and import an internet-cafe User instance to/in a JCard (vCard format).

Author:
skunk

Method Summary
 JCard newJCard(User user)
          This method has to be implemented in order to create a new JCard instance given a valid and alredy instanced internet-cafe user.
 User newUser(JCard jcard)
          This method has to be implemented in order to create a new internet-cafe User instance given a valid and alredy instanced JCard.
 void read(java.io.Reader reader)
          This method should be imlemented in order to import and create a new vCard instance from a vCard file.
 void write(java.io.Writer writer)
          This method should be imlemented in order to export a vCard instace to a file.
 

Method Detail

read

void read(java.io.Reader reader)
          throws JCardException
This method should be imlemented in order to import and create a new vCard instance from a vCard file.

Parameters:
reader - The reader associated to the file to be loaded as a vCard.
Throws:
JCardException

write

void write(java.io.Writer writer)
           throws JCardException
This method should be imlemented in order to export a vCard instace to a file.

Parameters:
writer - The writer associated to the file where the vCard must be saved.
Throws:
JCardException

newUser

User newUser(JCard jcard)
This method has to be implemented in order to create a new internet-cafe User instance given a valid and alredy instanced JCard.

Parameters:
jcard - The JCard from wich the user must be instantiated.
Returns:
A new instance of User with parameters taken from the jcard instance.

newJCard

JCard newJCard(User user)
This method has to be implemented in order to create a new JCard instance given a valid and alredy instanced internet-cafe user.

Parameters:
user - The internet-cafe User instance whose parameters must be exported as a JCard.
Returns:
A new instance of JCard whose parameters and properties are contained in the internet-cafe User instance passes as formal parameter.


Copyright © 2006 SF.net. All Rights Reserved.