info.magnolia.ui.admincentral.shellapp.favorites
Class FavoritesManagerImpl

java.lang.Object
  extended by info.magnolia.ui.admincentral.shellapp.favorites.FavoritesManagerImpl
All Implemented Interfaces:
FavoritesManager

public final class FavoritesManagerImpl
extends Object
implements FavoritesManager

Implementation of a Manager for Favorites.


Constructor Summary
FavoritesManagerImpl(FavoriteStore favoriteStore)
           
 
Method Summary
 void addFavorite(JcrNewNodeAdapter favorite)
           
 void addGroup(JcrNewNodeAdapter newGroup)
           
 JcrNewNodeAdapter createFavoriteGroupSuggestion(String title)
           
 JcrNewNodeAdapter createFavoriteSuggestion(String location, String title, String icon)
           
 void editFavorite(String path, String title)
           
 void editGroup(String path, String newTitle)
           
 AbstractJcrNodeAdapter getFavorites()
           
 Map<String,String> getGroupsNames()
           
 void moveFavorite(String relPath, String group)
           
 void orderFavoriteAfter(String relPath, String sibling)
           
 void orderFavoriteBefore(String relPath, String sibling)
           
 void orderGroupAfter(String relPath, String sibling)
           
 void orderGroupBefore(String relPath, String sibling)
           
 void removeFavorite(String path)
           
 void removeGroup(String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FavoritesManagerImpl

@Inject
public FavoritesManagerImpl(FavoriteStore favoriteStore)
Method Detail

getFavorites

public AbstractJcrNodeAdapter getFavorites()
Specified by:
getFavorites in interface FavoritesManager

getGroupsNames

public Map<String,String> getGroupsNames()
Specified by:
getGroupsNames in interface FavoritesManager
Returns:
A map whose key is the group jcr name and whose value is its title (human-readable) property. The map elements are sorted alphabetically (descending) by their value.

addFavorite

public void addFavorite(JcrNewNodeAdapter favorite)
Specified by:
addFavorite in interface FavoritesManager

createFavoriteSuggestion

public JcrNewNodeAdapter createFavoriteSuggestion(String location,
                                                  String title,
                                                  String icon)
Specified by:
createFavoriteSuggestion in interface FavoritesManager

removeFavorite

public void removeFavorite(String path)
Specified by:
removeFavorite in interface FavoritesManager

editFavorite

public void editFavorite(String path,
                         String title)
Specified by:
editFavorite in interface FavoritesManager

createFavoriteGroupSuggestion

public JcrNewNodeAdapter createFavoriteGroupSuggestion(String title)
Specified by:
createFavoriteGroupSuggestion in interface FavoritesManager

addGroup

public void addGroup(JcrNewNodeAdapter newGroup)
Specified by:
addGroup in interface FavoritesManager

editGroup

public void editGroup(String path,
                      String newTitle)
Specified by:
editGroup in interface FavoritesManager

removeGroup

public void removeGroup(String path)
Specified by:
removeGroup in interface FavoritesManager

moveFavorite

public void moveFavorite(String relPath,
                         String group)
Specified by:
moveFavorite in interface FavoritesManager

orderFavoriteBefore

public void orderFavoriteBefore(String relPath,
                                String sibling)
Specified by:
orderFavoriteBefore in interface FavoritesManager

orderFavoriteAfter

public void orderFavoriteAfter(String relPath,
                               String sibling)
Specified by:
orderFavoriteAfter in interface FavoritesManager

orderGroupBefore

public void orderGroupBefore(String relPath,
                             String sibling)
Specified by:
orderGroupBefore in interface FavoritesManager

orderGroupAfter

public void orderGroupAfter(String relPath,
                            String sibling)
Specified by:
orderGroupAfter in interface FavoritesManager


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.