use of com.liferay.portlet.expando.model.ExpandoBridge in project liferay-ide by liferay.
the class GadgetModelImpl method setExpandoBridgeAttributes.
@Override
public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
ExpandoBridge expandoBridge = getExpandoBridge();
expandoBridge.setAttributes(serviceContext);
}
use of com.liferay.portlet.expando.model.ExpandoBridge in project liferay-ide by liferay.
the class OAuthConsumerModelImpl method setExpandoBridgeAttributes.
@Override
public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
ExpandoBridge expandoBridge = getExpandoBridge();
expandoBridge.setAttributes(serviceContext);
}
use of com.liferay.portlet.expando.model.ExpandoBridge in project sw360portal by sw360.
the class CustomFieldHelper method loadField.
public static <T extends Serializable> Optional<T> loadField(Class<T> type, PortletRequest request, User user, String field) {
try {
ExpandoBridge exp = getUserExpandoBridge(request, user);
T viewSize = type.cast(exp.getAttribute(field));
return Optional.ofNullable(viewSize);
} catch (PortalException | SystemException e) {
log.error("Could not load custom field " + field, e);
return Optional.empty();
}
}
use of com.liferay.portlet.expando.model.ExpandoBridge in project sw360portal by sw360.
the class CustomFieldHelper method saveField.
public static <T extends Serializable> void saveField(PortletRequest request, User user, String field, T value) {
try {
ExpandoBridge exp = getUserExpandoBridge(request, user);
exp.setAttribute(field, value);
} catch (PortalException | SystemException e) {
log.error("Could not save custom field " + field, e);
}
}
Aggregations