org.openwms.core.service
Interface ConfigurationService

All Known Implementing Classes:
ConfigurationServiceImpl

public interface ConfigurationService

A ConfigurationService is responsible to deal with preferences. Whereby preferences have particular defined scopes, e.g. some preferences are in a global scope which means they are visible and valid for the whole application. Others are only valid in a certain scope, probably only visible for a particular Module, Role or User. Other subclasses of AbstractPreference may be implemented as well.

Since:
0.1
Version:
$Revision: 1538 $
Author:
Heiko Scherrer
See Also:
AbstractPreference, PropertyScope

Method Summary
 List<AbstractPreference> findAll()
          Find and return all preferences.
<T extends AbstractPreference>
List<T>
findByType(Class<T> clazz)
          Find and return all preferences in the scope of the application.
 void remove(AbstractPreference preference)
          Remove a AbstractPreference.
 AbstractPreference save(AbstractPreference preference)
          Save the given AbstractPreference or persist it when it is a transient instance.
 

Method Detail

findAll

List<AbstractPreference> findAll()
Find and return all preferences. The order of elements is not guaranteed and is specific to the implementation.

Returns:
a list of all preferences

findByType

<T extends AbstractPreference> List<T> findByType(Class<T> clazz)
Find and return all preferences in the scope of the application.

Type Parameters:
T - Any subtype of AbstractPreference
Parameters:
clazz - The class of preference to search for
Returns:
a list of preferences of type T

save

AbstractPreference save(AbstractPreference preference)
Save the given AbstractPreference or persist it when it is a transient instance.

Parameters:
preference - AbstractPreference entity to save
Returns:
Saved AbstractPreference entity instance

remove

void remove(AbstractPreference preference)
Remove a AbstractPreference.

Parameters:
preference - The AbstractPreference to remove


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