org.eclipse.higgins.icard.userprofile
Interface ICardUsageManager


public interface ICardUsageManager

Author:
PilipenkoYN

Method Summary
 CardUsage addCardHistory(CUID cuid, URI uri)
          Adds info about card usage event
 void clearCardHistory(CUID cuid)
          Deletes all the usage events of the given card on all URIs unless it is checked as "Use Always".
 void clearUsedAlwaysURLs(CUID cuid)
          Deletes state "Use Always" on all URIs for the given card
 void close()
          Finishes all the work done, releases contexts, resourses etc.
 CardUsage deleteUsedAlways(CUID cuid, URI uri)
          Deletes the "Use Always" relation between this card and this site
 List getCardHistory(CUID cuid)
          Returns the card usage history
 List getCardHistory(CUID cuid, int startFrom, int size, String orderBy, boolean desc)
          Returns the card usage history in a paging manner
 List getCardUsageSummary(CUID cuid)
          Returns card relations to URI with last used dates and state remembered it on this site or not
 List getCardUsageSummary(CUID cuid, int startFrom, int size, String orderBy, boolean desc)
          Returns card relations to URI with last used dates and state remembered it on this site or not
 int getHistoryTotalSize(CUID cuid)
          Returns the total size of history for paging output
 int getSummaryTotalSize(CUID cuid)
           
 CUID getUsedAlwaysCard(URI uri)
          Returns the card remebered for the given site
 List getUsedAlwaysURLs(CUID cuid)
          Returns the List of CardUsage objects with URIs for which the given card is remembered
 List getUsedCards(URI uri)
          Returns the List of CardUsage objects of all the cards, which ever been logged in to this site
 CardUsage setUsedAlways(CUID cuid, URI uri)
          Remembers this card for this site
 

Method Detail

addCardHistory

public CardUsage addCardHistory(CUID cuid,
                                URI uri)
                         throws UserProfileException
Adds info about card usage event

Returns:
newly added CardUsage object
Throws:
UserProfileException

getCardHistory

public List getCardHistory(CUID cuid)
                    throws UserProfileException
Returns the card usage history

Parameters:
cuid -
Returns:
Array List of CardUsage objects
Throws:
UserProfileException

getCardHistory

public List getCardHistory(CUID cuid,
                           int startFrom,
                           int size,
                           String orderBy,
                           boolean desc)
                    throws UserProfileException
Returns the card usage history in a paging manner

Parameters:
cuid -
startFrom -
size -
orderBy - - string constants from CardUsage class, by what field to order output
desc -
Returns:
Throws:
UserProfileException

getHistoryTotalSize

public int getHistoryTotalSize(CUID cuid)
                        throws UserProfileException
Returns the total size of history for paging output

Returns:
Throws:
UserProfileException

clearCardHistory

public void clearCardHistory(CUID cuid)
                      throws UserProfileException
Deletes all the usage events of the given card on all URIs unless it is checked as "Use Always".

Parameters:
cuid -
Throws:
UserProfileException

setUsedAlways

public CardUsage setUsedAlways(CUID cuid,
                               URI uri)
                        throws UserProfileException
Remembers this card for this site

Parameters:
cuid -
Returns:
CardUsage object with just added card-URI relation
Throws:
UserProfileException

deleteUsedAlways

public CardUsage deleteUsedAlways(CUID cuid,
                                  URI uri)
                           throws UserProfileException
Deletes the "Use Always" relation between this card and this site

Parameters:
cuid -
Returns:
CardInformation object with all related card information, or null if card info not found
Throws:
UserProfileException

getUsedCards

public List getUsedCards(URI uri)
                  throws UserProfileException
Returns the List of CardUsage objects of all the cards, which ever been logged in to this site

Returns:
Throws:
UserProfileException

getUsedAlwaysURLs

public List getUsedAlwaysURLs(CUID cuid)
                       throws UserProfileException
Returns the List of CardUsage objects with URIs for which the given card is remembered

Parameters:
cuid -
Returns:
Throws:
UserProfileException

getUsedAlwaysCard

public CUID getUsedAlwaysCard(URI uri)
                       throws UserProfileException
Returns the card remebered for the given site

Returns:
Throws:
UserProfileException

clearUsedAlwaysURLs

public void clearUsedAlwaysURLs(CUID cuid)
                         throws UserProfileException
Deletes state "Use Always" on all URIs for the given card

Parameters:
cuid -
Throws:
UserProfileException

getCardUsageSummary

public List getCardUsageSummary(CUID cuid)
                         throws UserProfileException
Returns card relations to URI with last used dates and state remembered it on this site or not

Parameters:
cuid -
Returns:
Throws:
UserProfileException

getCardUsageSummary

public List getCardUsageSummary(CUID cuid,
                                int startFrom,
                                int size,
                                String orderBy,
                                boolean desc)
                         throws UserProfileException
Returns card relations to URI with last used dates and state remembered it on this site or not

Parameters:
cuid -
startFrom -
size -
orderBy - - string constants from CardUsage class, by what field to order output
desc -
Returns:
Throws:
UserProfileException

getSummaryTotalSize

public int getSummaryTotalSize(CUID cuid)
                        throws UserProfileException
Parameters:
cuid -
Returns:
Throws:
UserProfileException

close

public void close()
           throws UserProfileException
Finishes all the work done, releases contexts, resourses etc.

Throws:
UserProfileException