nl.surfnet.coin.portal.service
Interface TabService

All Superinterfaces:
nl.surfnet.coin.shared.service.GenericService<Tab>
All Known Implementing Classes:
TabServiceHibernateImpl

public interface TabService
extends nl.surfnet.coin.shared.service.GenericService<Tab>

Service for managing tabs


Method Summary
 ClonedTab cloneTab(Tab tab, List<Gadget> sharedGadgets)
          Clone a tab.
 Tab findByIdAndOwner(Long id, String ownerId)
          Finds a tab by Id and owner
 List<Tab> findFavorites(String ownerId, boolean favorites)
          Find favorites.
 int getCountByOwner(String ownerId, boolean favorites)
          Get a count of all tabs.
 List<Tab> getTabsByOwner(String ownerId)
          Get all the tabs of a person.
 boolean reorderTabs(String[] newOrder, String ownerId, boolean favorites)
          Reorder favorite tabs.
 
Methods inherited from interface nl.surfnet.coin.shared.service.GenericService
createCriteria, delete, detachFromSession, findAll, findByExample, findByExample, findById, getCount, getPersistentClass, saveOrUpdate, saveOrUpdate
 

Method Detail

findFavorites

List<Tab> findFavorites(String ownerId,
                        boolean favorites)
Find favorites.

Parameters:
ownerId - the String with the Id of the owner
favorites - true for all favorites, false for non-favorites.
Returns:
Tabs

reorderTabs

boolean reorderTabs(String[] newOrder,
                    String ownerId,
                    boolean favorites)
Reorder favorite tabs.

Parameters:
newOrder - the String[] containing the new order
ownerId - the String with the Id of the owner
{@link - boolean} saying whether these tabs are favorites or not.
Returns:
true if the reordering was succesful false if it wasn't

getCountByOwner

int getCountByOwner(String ownerId,
                    boolean favorites)
Get a count of all tabs.

Parameters:
ownerId - the String with the Id of the owner
favorites - boolean indicating the favorite nature.
Returns:
int the number of all tabs by the given owner

cloneTab

ClonedTab cloneTab(Tab tab,
                   List<Gadget> sharedGadgets)
Clone a tab.

Parameters:
tab - the tab to clone.
sharedGadgets - the List containing the Gadgets
Returns:
the ClonedTab

getTabsByOwner

List<Tab> getTabsByOwner(String ownerId)
Get all the tabs of a person.

Parameters:
ownerId@return -
Returns:
a List of all Gadgets

findByIdAndOwner

Tab findByIdAndOwner(Long id,
                     String ownerId)
Finds a tab by Id and owner

Parameters:
id - of the Tab
ownerId - the String with the Id of the owner
Returns:
Tab or null if it can't be found


Copyright © 2009-2012 SURFnet bv, The Netherlands. All Rights Reserved.