@Service public class PreferenceServiceImpl extends Object implements PreferenceService
Constructor and Description |
---|
PreferenceServiceImpl() |
Modifier and Type | Method and Description |
---|---|
Preference |
findPreference(long id)
Find and return preferences for a given username.
|
Preference |
findPreference(String username,
Sender sender)
Find and return preferences for a given username.
|
Preference |
findPreference(String username,
String shortName)
Find and return preferences for a given username.
|
List<Preference> |
findPreferencesByUsername(String username)
Find and return preferences for a given username.
|
PreferenceDao |
getPreferenceDao()
Gets the reference to the
PreferenceDao |
boolean |
removePreference(Preference preference)
Removes a
Sender object. |
void |
savePreference(Preference preference)
Persists a
Preference object. |
void |
setPreference(Preference preference,
boolean enabled)
Set a specific Preference to be enabled or disabled.
|
void |
setPreferenceDao(PreferenceDao preferenceDao)
Sets the reference to the
PreferenceDao |
public PreferenceServiceImpl()
@Transactional public List<Preference> findPreferencesByUsername(String username)
PreferenceService
findPreferencesByUsername
in interface PreferenceService
username
- Username of the user for which the preferences are being searched.Preference
objects for a given user.@Transactional public Preference findPreference(String username, String shortName)
PreferenceService
findPreference
in interface PreferenceService
username
- Username of the user for which the preferences are being searched.shortName
- Shortname of the Sender
for which a preference is sought.Preference
objects for a given user and sender shortname.@Transactional public Preference findPreference(String username, Sender sender)
PreferenceService
findPreference
in interface PreferenceService
username
- Username of the user for which the preferences are being searched.sender
- Sender
for which a perference is sought.Preference
objects for a given user.@Transactional public Preference findPreference(long id)
PreferenceService
findPreference
in interface PreferenceService
id
- Id for the preference being sought.Preference
objects for a given user.@Transactional public void savePreference(Preference preference)
PreferenceService
Preference
object.savePreference
in interface PreferenceService
preference
- Preference to persist.@Transactional public boolean removePreference(Preference preference)
PreferenceService
Sender
object.removePreference
in interface PreferenceService
@Transactional public void setPreference(Preference preference, boolean enabled)
PreferenceService
setPreference
in interface PreferenceService
preference
- Preference
to be set as enabled or disabled.enabled
- Boolean to set the given Preference.public PreferenceDao getPreferenceDao()
PreferenceDao
@Autowired public void setPreferenceDao(PreferenceDao preferenceDao)
PreferenceDao
dao
- Copyright © 2011–2014 The Kuali Foundation. All rights reserved.