Interface Favourites

  • All Known Implementing Classes:
    FavouritesImpl

    public interface Favourites
    Centralises access to favourites functionality and maps between representations repository and api representations.
    Since:
    publicapi1.0
    Author:
    steveglover
    • Field Detail

      • PARAM_INCLUDE_PROPERTIES

        static final java.lang.String PARAM_INCLUDE_PROPERTIES
        See Also:
        Constant Field Values
    • Method Detail

      • addFavourite

        Favourite addFavourite​(java.lang.String personId,
                               Favourite favourite)
        Add a favourite for user personId
        Parameters:
        personId - the personId for which the favourite is to be added
        favourite - the favourite to add
      • addFavourite

        Favourite addFavourite​(java.lang.String personId,
                               Favourite favourite,
                               Parameters parameters)
        Add a favourite for user personId taking parameters into account
        Parameters:
        personId - the personId for which the favourite is to be added
        favourite - the favourite to add
        parameters - the parameters
      • removeFavourite

        void removeFavourite​(java.lang.String personId,
                             java.lang.String id)
        Add a favourite for user personId
        Parameters:
        personId - the personId for which the favourite is to be removed
        id - the id of the favourite to remove (id is a uuid)
      • getFavourites

        CollectionWithPagingInfo<Favourite> getFavourites​(java.lang.String personId,
                                                          Parameters parameters)
        Get a paged list of favourites for user personId
        Parameters:
        personId - the personId for which the favourite is to be removed
        parameters - Parameters
        Returns:
        paged favourites
      • getFavourite

        Favourite getFavourite​(java.lang.String personId,
                               java.lang.String favouriteId)
        Get a specific favourite for user personId
        Parameters:
        personId - the personId for which the favourite is to be removed
        favouriteId - the favourite id
        Returns:
        the favourite
      • getFavourite

        Favourite getFavourite​(java.lang.String personId,
                               java.lang.String favouriteId,
                               Parameters parameters)
        Get a specific favourite for user personId taking parameters into account
        Parameters:
        personId - the personId for which the favourite is to be removed
        favouriteId - the favourite id
        parameters - the parameters
        Returns:
        the favourite