org.openwms.core.domain.preferences
Class Preferences

java.lang.Object
  extended by org.openwms.core.domain.preferences.Preferences
All Implemented Interfaces:
Serializable

public class Preferences
extends Object
implements Serializable

An instance of a Preferences represents the root of a preferences XML file and aggregates all other types of preference.

Since:
0.1
Version:
$Revision: 1475 $
Author:
Heiko Scherrer
See Also:
Serialized Form

Constructor Summary
Preferences()
           
 
Method Summary
 List<AbstractPreference> getAll()
          Return a list of all preferences.
 List<AbstractPreference> getApplicationOrRoleOrUserOrModule()
          Gets the value of the applicationOrRoleOrUserOrModule property.
 List<ApplicationPreference> getApplications()
          Return a list of all ApplicationPreferences or an empty ArrayList when no ApplicationPreferences exist.
 List<ModulePreference> getModules()
          Return a list of all ModulePreferences or an empty ArrayList when no ModulePreferences exist.
<T extends AbstractPreference>
List<T>
getOfType(Class<T> clazz)
          Return a list of preferences filtered by a specific type, defined by the parameter clazz.
 List<RolePreference> getRoles()
          Return a list of all RolePreferences or an empty ArrayList when no RolePreferences exist.
 List<UserPreference> getUsers()
          Return a list of all UserPreferences or an empty ArrayList when no UserPreferences exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Preferences

public Preferences()
Method Detail

getApplicationOrRoleOrUserOrModule

public List<AbstractPreference> getApplicationOrRoleOrUserOrModule()
Gets the value of the applicationOrRoleOrUserOrModule property. This method is called by the JAXB unmarshaller only.

Returns:
a list of all preferences

getAll

public List<AbstractPreference> getAll()
Return a list of all preferences. Simple call to getApplicationOrRoleOrUserOrModule(). Is only added due to naming purpose.

Returns:
a list of all preferences

getApplications

public List<ApplicationPreference> getApplications()
Return a list of all ApplicationPreferences or an empty ArrayList when no ApplicationPreferences exist.

Returns:
a list of all ApplicationPreferences

getModules

public List<ModulePreference> getModules()
Return a list of all ModulePreferences or an empty ArrayList when no ModulePreferences exist.

Returns:
a list of all ModulePreferences

getUsers

public List<UserPreference> getUsers()
Return a list of all UserPreferences or an empty ArrayList when no UserPreferences exist.

Returns:
a list of all UserPreferences

getRoles

public List<RolePreference> getRoles()
Return a list of all RolePreferences or an empty ArrayList when no RolePreferences exist.

Returns:
a list of all RolePreferences

getOfType

public <T extends AbstractPreference> List<T> getOfType(Class<T> clazz)
Return a list of preferences filtered by a specific type, defined by the parameter clazz.

Type Parameters:
T - Expected types are ApplicationPreference, ModulePreference, RolePreference UserPreference
Parameters:
clazz - The class type of the preference to filter for
Returns:
a list of T.


Copyright © 2005-2011 openwms.org. All Rights Reserved.