Search in sources :

Example 1 with SMSessionData

use of com.sun.identity.console.session.model.SMSessionData in project OpenAM by OpenRock.

the class SMProfileViewBean method populateTableModel.

private void populateTableModel(List sessionList) {
    SMProfileModel model = (SMProfileModel) getModel();
    tblModel.clearAll();
    tblModel.setMaxRows(model.getPageSize());
    SerializedField szCache = (SerializedField) getChild(SZ_CACHE);
    if (sessionList != null && !sessionList.isEmpty()) {
        for (int i = 0; i < sessionList.size(); i++) {
            SMSessionData sData = (SMSessionData) sessionList.get(i);
            tblModel.appendRow();
            tblModel.setValue(TBL_DATA_SESSION_ID, sData.getId());
            tblModel.setValue(TBL_DATA_USER_ID, sData.getUserId());
            tblModel.setValue(TBL_DATA_TIME_LEFT, String.valueOf(sData.getTimeRemain()));
            tblModel.setValue(TBL_DATA_MAX_SESSION_TIME, String.valueOf(sData.getMaxSessionTime()));
            tblModel.setValue(TBL_DATA_IDLE_TIME, String.valueOf(sData.getIdleTime()));
            tblModel.setValue(TBL_DATA_MAX_IDLE_TIME, String.valueOf(sData.getMaxIdleTime()));
        }
        szCache.setValue((Serializable) sessionList);
    } else {
        szCache.setValue(null);
    }
}
Also used : SMSessionData(com.sun.identity.console.session.model.SMSessionData) SMProfileModel(com.sun.identity.console.session.model.SMProfileModel) SerializedField(com.sun.identity.console.components.view.html.SerializedField)

Aggregations

SerializedField (com.sun.identity.console.components.view.html.SerializedField)1 SMProfileModel (com.sun.identity.console.session.model.SMProfileModel)1 SMSessionData (com.sun.identity.console.session.model.SMSessionData)1