Search in sources :

Example 31 with JsonValue

use of org.activityinfo.json.JsonValue in project activityinfo by bedatadriven.

the class RowSource method toJson.

@Override
public JsonValue toJson() {
    JsonValue object = createObject();
    object.put("rootFormId", rootFormId.asString());
    return object;
}
Also used : JsonValue(org.activityinfo.json.JsonValue)

Example 32 with JsonValue

use of org.activityinfo.json.JsonValue in project activityinfo by bedatadriven.

the class ExportResult method toJson.

@Override
public JsonValue toJson() {
    JsonValue object = createObject();
    object.put("downloadUrl", downloadUrl);
    return object;
}
Also used : JsonValue(org.activityinfo.json.JsonValue)

Example 33 with JsonValue

use of org.activityinfo.json.JsonValue in project activityinfo by bedatadriven.

the class JobRequest method toJsonObject.

public JsonValue toJsonObject() {
    JsonValue object = createObject();
    object.put("type", descriptor.getType());
    object.put("descriptor", descriptor.toJson());
    if (locale != null) {
        object.put("locale", locale);
    }
    return object;
}
Also used : JsonValue(org.activityinfo.json.JsonValue)

Example 34 with JsonValue

use of org.activityinfo.json.JsonValue in project activityinfo by bedatadriven.

the class JobStatus method toJsonObject.

public JsonValue toJsonObject() {
    JsonValue object = createObject();
    object.put("id", id);
    object.put("type", descriptor.getType());
    object.put("descriptor", descriptor.toJson());
    object.put("state", state.name().toLowerCase());
    if (result != null) {
        object.put("result", result.toJson());
    }
    return object;
}
Also used : JsonValue(org.activityinfo.json.JsonValue)

Example 35 with JsonValue

use of org.activityinfo.json.JsonValue in project activityinfo by bedatadriven.

the class ColumnModel method toJson.

public JsonValue toJson() {
    JsonValue object = createObject();
    object.put("id", id);
    object.put("expression", getFormulaAsString());
    return object;
}
Also used : JsonValue(org.activityinfo.json.JsonValue)

Aggregations

JsonValue (org.activityinfo.json.JsonValue)117 Test (org.junit.Test)24 ResourceId (org.activityinfo.model.resource.ResourceId)19 FormClass (org.activityinfo.model.form.FormClass)13 FormField (org.activityinfo.model.form.FormField)9 FieldValue (org.activityinfo.model.type.FieldValue)8 HashMap (java.util.HashMap)6 Map (java.util.Map)6 QuantityType (org.activityinfo.model.type.number.QuantityType)5 ByteArrayInputStream (java.io.ByteArrayInputStream)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)3 Annotation (java.lang.annotation.Annotation)3 ArrayList (java.util.ArrayList)3 FormTreeBuilder (org.activityinfo.model.formTree.FormTreeBuilder)3 JaxRsJsonReader (org.activityinfo.server.endpoint.rest.JaxRsJsonReader)3 TypedRecordUpdate (org.activityinfo.store.spi.TypedRecordUpdate)3 EmbeddedEntity (com.google.appengine.api.datastore.EmbeddedEntity)2 URL (java.net.URL)2 JsonException (org.activityinfo.json.JsonException)2 JsonMappingException (org.activityinfo.json.JsonMappingException)2