* @return true
*/
@Override
public Serializable execute(final TaskHandlerActionContext<PrincipalActionContext> inActionContext)
{
SetSharedResourceLikeRequest request = (SetSharedResourceLikeRequest) inActionContext.getActionContext()
.getParams();
if (request == null || request.getUniqueKey() == null)
{
return new Boolean(false);
}
final String sharedResourceUniqueKey = request.getUniqueKey().toLowerCase();
final Long personId = inActionContext.getActionContext().getPrincipal().getId();
// find the shared resource
SharedResource sr = findOrInsertSharedResourceMapper.execute(new SharedResourceRequest(
sharedResourceUniqueKey, null));
SetSharedResourceLikeMapperRequest mapperRequest = new SetSharedResourceLikeMapperRequest(personId, sr,
request.getLikes());
setLikedResourceStatusMapper.execute(mapperRequest);
// clean up the cache
String cacheKey = CacheKeys.SHARED_RESOURCE_BY_UNIQUE_KEY