org.strutsme.wishlist.persistence.facade
Interface WishlistPersistenceFacade

All Known Implementing Classes:
AbstractWishlistPersistenceFacade, WishlistPersistenceFacadeFake, WishlistPersistenceFacadeFile

public interface WishlistPersistenceFacade

The WishlistPersistenceFacade.

Author:
lbusmann

Method Summary
 WishDto createWish()
          Creates a new wish.
 void deleteWish(java.lang.String wishId)
          Deletes an wish with this id.
 UserDto getUserById(java.lang.String userId)
          Returns the user with this id.
 UserDto getUserByName(java.lang.String userName)
          Returns a user with this name.
 WishDto getWishById(java.lang.String wishId)
          Returns the wish with this id.
 java.util.List getWishes()
          Returns all wishes.
 java.lang.String saveWish(WishDto wish)
          Saves an wish.
 

Method Detail

getUserById

UserDto getUserById(java.lang.String userId)
Returns the user with this id.

Parameters:
userId - the id of user.
Returns:
a userDTO.

getUserByName

UserDto getUserByName(java.lang.String userName)
Returns a user with this name.

Parameters:
userName - the name of user
Returns:
a userDTO

createWish

WishDto createWish()
Creates a new wish.

Returns:
an wish

saveWish

java.lang.String saveWish(WishDto wish)
                          throws java.io.IOException
Saves an wish.

Parameters:
wish - the wish to save.
Returns:
the id of the saved wish.
Throws:
java.io.IOException - if the wish can't be saved.

deleteWish

void deleteWish(java.lang.String wishId)
                throws java.io.IOException
Deletes an wish with this id.

Parameters:
wishId - the id of the wish to delete.
Throws:
java.io.IOException - if the wish can't be deleted.

getWishById

WishDto getWishById(java.lang.String wishId)
                    throws java.io.IOException
Returns the wish with this id.

Parameters:
wishId - the id of the wish.
Returns:
an wishDto
Throws:
java.io.IOException - if the wish can't be accessed.

getWishes

java.util.List getWishes()
                         throws java.io.IOException
Returns all wishes.

Returns:
a list of wishes.
Throws:
java.io.IOException - if the wishes couldn't be loaded.