org.geebis.books.model.preference.navigator
Class NavigatorPreferences

java.lang.Object
  extended by org.geebis.books.model.preference.navigator.NavigatorPreferences
All Implemented Interfaces:
java.io.Serializable

@Name(value="navigatorPreferences")
public class NavigatorPreferences
extends java.lang.Object
implements java.io.Serializable

The NavigatorPreferences class represents an employee's preferences for the various navigator toolbars in the Geebis system.

The user has one instance of NavigatorPreferences for each navigator that they use, and the NavigatorPreferences has a NavigatorItemPreferences for each item in the navigator.

Each navigator is defined by a navigator kind which is used to differentiate navigators from each other.

See Also:
Serialized Form

Constructor Summary
NavigatorPreferences()
           
NavigatorPreferences(NavigatorPreferencesKind kind)
           
 
Method Summary
 void addItem(NavigatorItemPreferences item)
          Adds a new NavigatorItemPreferences to this navigator
 java.lang.Integer getCount()
          Gets the number of items to display in the top level part of this navigator.
 java.lang.Long getId()
           
 NavigatorItemPreferences getItemByIndex(int index)
          Gets the navigator item preference object in the list by its index
 NavigatorItemPreferences getItemByName(java.lang.String name)
          Gets the navigator item preference by name
 java.util.List<NavigatorItemPreferences> getItems()
          Gets the navigator item preferences for this navigator
 NavigatorPreferencesKind getKind()
          Gets the kind of this navigator
 java.lang.Integer getVersion()
           
 void removeItem(NavigatorItemPreferences item)
          Removes a NavigatorItemPreferences from this navigator
 void setCount(java.lang.Integer count)
          Sets the number of items to display in the top level part of this navigator.
 void setId(java.lang.Long id)
           
 void setItems(java.util.List<NavigatorItemPreferences> items)
          Sets the list of navigator item preferences for this navigator
 void setKind(NavigatorPreferencesKind kind)
          Sets the kind of this navigator
 void setVersion(java.lang.Integer version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigatorPreferences

public NavigatorPreferences()

NavigatorPreferences

public NavigatorPreferences(NavigatorPreferencesKind kind)
Method Detail

getKind

public NavigatorPreferencesKind getKind()
Gets the kind of this navigator

Returns:
the kind of this navigator

setKind

public void setKind(NavigatorPreferencesKind kind)
Sets the kind of this navigator

Parameters:
kind - the new kind of this navigator

getCount

public java.lang.Integer getCount()
Gets the number of items to display in the top level part of this navigator. Additional items may displayed in the "more" button list.

Returns:
the number of items to display in the top level part of this navigator

setCount

public void setCount(java.lang.Integer count)
Sets the number of items to display in the top level part of this navigator.

Parameters:
count - the new number of elements to display in the top level part of this navigator
See Also:
gegetCount

getItems

public java.util.List<NavigatorItemPreferences> getItems()
Gets the navigator item preferences for this navigator

Returns:
the list of navigator item preferences for this navigator

setItems

public void setItems(java.util.List<NavigatorItemPreferences> items)
Sets the list of navigator item preferences for this navigator

Parameters:
items - the new list of navigator item preferences for this navigator

getVersion

public java.lang.Integer getVersion()

setVersion

public void setVersion(java.lang.Integer version)

getId

public java.lang.Long getId()

setId

public void setId(java.lang.Long id)

addItem

public void addItem(NavigatorItemPreferences item)
Adds a new NavigatorItemPreferences to this navigator

Parameters:
item - the NavigatorItemPreferences to add

removeItem

public void removeItem(NavigatorItemPreferences item)
Removes a NavigatorItemPreferences from this navigator

Parameters:
item - the NavigatorItemPreferences to remove

getItemByIndex

public NavigatorItemPreferences getItemByIndex(int index)
Gets the navigator item preference object in the list by its index

Parameters:
index - the index of the item to find
Returns:
the NavigatorItemPreferences object with the passed in index, or null if the index was not found

getItemByName

public NavigatorItemPreferences getItemByName(java.lang.String name)
Gets the navigator item preference by name

Parameters:
name - the name of the item to find
Returns:
the NavigatorItemPreferences object with the specified name, or null if it doesn't exist