org.kuali.rice.kew.useroptions
Class UserOptionsServiceCache

java.lang.Object
  extended by org.kuali.rice.kew.useroptions.UserOptionsServiceCache
All Implemented Interfaces:
UserOptionsService

public class UserOptionsServiceCache
extends Object
implements UserOptionsService

This class decorates a UserOptionsService and provides distributed caching for findByOptionId calls, and intelligently clears cache entries on update/delete type calls.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
UserOptionsServiceCache()
           
 
Method Summary
 void deleteUserOptions(UserOptions userOptions)
          clears any entry in the cache for this option id
 UserOptions findByOptionId(String optionId, String principalId)
          Checks the cache for results.
 Collection<UserOptions> findByOptionValue(String optionId, String optionValue)
          This overridden method delegates the call.
 List<UserOptions> findByUserQualified(String principalId, String likeString)
          This overridden method delegates the call.
 Collection<UserOptions> findByWorkflowUser(String principalId)
          This overridden method delegates the call.
 boolean refreshActionList(String principalId)
          This overridden method ...
 void save(String principalId, Map<String,String> optionsMap)
          This overridden method ...
 void save(String principalId, String optionId, String optionValue)
          This overridden method ...
 void save(UserOptions userOptions)
          This overridden method ...
 void saveRefreshUserOption(String principalId)
          This overridden method ...
 void setInnerService(UserOptionsService inner)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserOptionsServiceCache

public UserOptionsServiceCache()
Method Detail

deleteUserOptions

public void deleteUserOptions(UserOptions userOptions)
clears any entry in the cache for this option id

Specified by:
deleteUserOptions in interface UserOptionsService
See Also:
UserOptionsService.deleteUserOptions(org.kuali.rice.kew.useroptions.UserOptions)

findByOptionId

public UserOptions findByOptionId(String optionId,
                                  String principalId)
Checks the cache for results. On cache miss, delegates the call and caches the result before returning.

Specified by:
findByOptionId in interface UserOptionsService
See Also:
UserOptionsService.findByOptionId(java.lang.String, java.lang.String)

findByOptionValue

public Collection<UserOptions> findByOptionValue(String optionId,
                                                 String optionValue)
This overridden method delegates the call.

Specified by:
findByOptionValue in interface UserOptionsService
See Also:
UserOptionsService.findByOptionValue(java.lang.String, java.lang.String)

findByUserQualified

public List<UserOptions> findByUserQualified(String principalId,
                                             String likeString)
This overridden method delegates the call.

Specified by:
findByUserQualified in interface UserOptionsService
See Also:
UserOptionsService.findByUserQualified(java.lang.String, java.lang.String)

findByWorkflowUser

public Collection<UserOptions> findByWorkflowUser(String principalId)
This overridden method delegates the call.

Specified by:
findByWorkflowUser in interface UserOptionsService
See Also:
UserOptionsService.findByWorkflowUser(java.lang.String)

refreshActionList

public boolean refreshActionList(String principalId)
This overridden method ...

Specified by:
refreshActionList in interface UserOptionsService
See Also:
UserOptionsService.refreshActionList(java.lang.String)

save

public void save(String principalId,
                 Map<String,String> optionsMap)
This overridden method ...

Specified by:
save in interface UserOptionsService
See Also:
UserOptionsService.save(java.lang.String, java.util.Map)

save

public void save(String principalId,
                 String optionId,
                 String optionValue)
This overridden method ...

Specified by:
save in interface UserOptionsService
See Also:
UserOptionsService.save(java.lang.String, java.lang.String, java.lang.String)

save

public void save(UserOptions userOptions)
This overridden method ...

Specified by:
save in interface UserOptionsService
See Also:
UserOptionsService.save(org.kuali.rice.kew.useroptions.UserOptions)

saveRefreshUserOption

public void saveRefreshUserOption(String principalId)
This overridden method ...

Specified by:
saveRefreshUserOption in interface UserOptionsService
See Also:
UserOptionsService.saveRefreshUserOption(java.lang.String)

setInnerService

public void setInnerService(UserOptionsService inner)
Parameters:
inner - the decorated service


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.