Search in sources :

Example 6 with IStatus

use of org.eclipse.scout.rt.platform.status.IStatus in project scout.rt by eclipse.

the class JsonStatus method toJson.

@Override
public JSONObject toJson() {
    JSONObject json = new JSONObject();
    json.put("message", m_status.getMessage());
    json.put("severity", m_status.getSeverity());
    json.put("iconId", m_status.getIconId());
    json.put("code", m_status.getCode());
    if (m_status.isMultiStatus()) {
        for (IStatus cs : ((IMultiStatus) m_status).getChildren()) {
            json.append("children", new JsonStatus(cs).toJson());
        }
    }
    return json;
}
Also used : IStatus(org.eclipse.scout.rt.platform.status.IStatus) JSONObject(org.json.JSONObject) IMultiStatus(org.eclipse.scout.rt.platform.status.IMultiStatus)

Aggregations

IStatus (org.eclipse.scout.rt.platform.status.IStatus)6 IMultiStatus (org.eclipse.scout.rt.platform.status.IMultiStatus)2 Status (org.eclipse.scout.rt.platform.status.Status)2 JSONObject (org.json.JSONObject)2 Test (org.junit.Test)2 ArrayList (java.util.ArrayList)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 IAction (org.eclipse.scout.rt.client.ui.action.IAction)1 GroupingStyle (org.eclipse.scout.rt.client.ui.basic.table.GroupingStyle)1 ITable (org.eclipse.scout.rt.client.ui.basic.table.ITable)1 ITableControl (org.eclipse.scout.rt.client.ui.basic.table.controls.ITableControl)1 ResourceListTransferObject (org.eclipse.scout.rt.client.ui.dnd.ResourceListTransferObject)1 TextTransferObject (org.eclipse.scout.rt.client.ui.dnd.TextTransferObject)1 TransferObject (org.eclipse.scout.rt.client.ui.dnd.TransferObject)1 JsonAdapterPropertyConfig (org.eclipse.scout.rt.ui.html.json.form.fields.JsonAdapterPropertyConfig)1 JsonAdapterPropertyConfigBuilder (org.eclipse.scout.rt.ui.html.json.form.fields.JsonAdapterPropertyConfigBuilder)1