use of com.haulmont.cuba.security.app.UserSessionService in project cuba by cuba-platform.
the class ClientUserSession method setAttribute.
@Override
public void setAttribute(String name, Serializable value) {
super.setAttribute(name, value);
if (authenticated) {
UserSessionService uss = AppBeans.get(UserSessionService.NAME);
uss.setSessionAttribute(id, name, value);
}
}
use of com.haulmont.cuba.security.app.UserSessionService in project cuba by cuba-platform.
the class ClientUserSession method setLocale.
@Override
public void setLocale(Locale locale) {
super.setLocale(locale);
if (authenticated) {
UserSessionService uss = AppBeans.get(UserSessionService.NAME);
uss.setSessionLocale(id, locale);
}
}
use of com.haulmont.cuba.security.app.UserSessionService in project cuba by cuba-platform.
the class UserSessionsDatasource method loadData.
@Override
protected void loadData(Map<String, Object> params) {
TimeSource timeSource = AppBeans.get(TimeSource.NAME);
updateTs = timeSource.currentTimestamp();
data.clear();
if (!AppBeans.get(Security.class).isEntityOpPermitted(UserSessionEntity.class, EntityOp.READ))
return;
UserSessionService uss = AppBeans.get(UserSessionService.NAME);
Collection<UserSessionEntity> userSessionList = uss.loadUserSessionEntities(createFilter(params));
for (UserSessionEntity entity : userSessionList) {
if (!sessionFilter.test(entity)) {
continue;
}
data.put(entity.getId(), entity);
}
}
use of com.haulmont.cuba.security.app.UserSessionService in project cuba by cuba-platform.
the class ClientUserSession method removeAttribute.
@Override
public void removeAttribute(String name) {
super.removeAttribute(name);
if (authenticated) {
UserSessionService uss = AppBeans.get(UserSessionService.NAME);
uss.removeSessionAttribute(id, name);
}
}
use of com.haulmont.cuba.security.app.UserSessionService in project cuba by cuba-platform.
the class ClientUserSession method setAddress.
@Override
public void setAddress(String address) {
super.setAddress(address);
if (authenticated) {
UserSessionService uss = AppBeans.get(UserSessionService.NAME);
uss.setSessionAddress(id, address);
}
}
Aggregations