@Override
public List<Widget> getWidgetsByTag(String tagKeyword, int offset, int pageSize) {
if (tagKeyword != null) {
tagKeyword = tagKeyword.toLowerCase();
}
Tag tag = tagRepository.getByKeyword(tagKeyword);
TypedQuery<JpaWidget> query = manager.createNamedQuery(JpaWidget.WIDGET_GET_BY_TAG, JpaWidget.class);
query.setParameter(JpaWidget.PARAM_TAG_ID, tag == null ? null : Long.parseLong(tag.getId()));
return expandProperties(getPagedResultList(query, offset, pageSize));
}