Search in sources :

Example 11 with GeneratedDownload

use of com.willshex.blogwt.shared.api.datatype.GeneratedDownload in project blogwt by billy1380.

the class DeleteGeneratedDownloadsRequest method fromJson.

@Override
public void fromJson(JsonObject jsonObject) {
    super.fromJson(jsonObject);
    if (jsonObject.has("downloads")) {
        JsonElement jsonDownloads = jsonObject.get("downloads");
        if (jsonDownloads != null) {
            downloads = new ArrayList<GeneratedDownload>();
            GeneratedDownload item = null;
            for (int i = 0; i < jsonDownloads.getAsJsonArray().size(); i++) {
                if (jsonDownloads.getAsJsonArray().get(i) != null) {
                    (item = new GeneratedDownload()).fromJson(jsonDownloads.getAsJsonArray().get(i).getAsJsonObject());
                    downloads.add(item);
                }
            }
        }
    }
}
Also used : GeneratedDownload(com.willshex.blogwt.shared.api.datatype.GeneratedDownload) JsonElement(com.google.gson.JsonElement)

Example 12 with GeneratedDownload

use of com.willshex.blogwt.shared.api.datatype.GeneratedDownload in project blogwt by billy1380.

the class GenerateDownloadRequest method fromJson.

@Override
public void fromJson(JsonObject jsonObject) {
    super.fromJson(jsonObject);
    if (jsonObject.has("download")) {
        JsonElement jsonDownload = jsonObject.get("download");
        if (jsonDownload != null) {
            download = new GeneratedDownload();
            download.fromJson(jsonDownload.getAsJsonObject());
        }
    }
}
Also used : GeneratedDownload(com.willshex.blogwt.shared.api.datatype.GeneratedDownload) JsonElement(com.google.gson.JsonElement)

Example 13 with GeneratedDownload

use of com.willshex.blogwt.shared.api.datatype.GeneratedDownload in project blogwt by billy1380.

the class GenerateDownloadResponse method fromJson.

@Override
public void fromJson(JsonObject jsonObject) {
    super.fromJson(jsonObject);
    if (jsonObject.has("download")) {
        JsonElement jsonDownload = jsonObject.get("download");
        if (jsonDownload != null) {
            download = new GeneratedDownload();
            download.fromJson(jsonDownload.getAsJsonObject());
        }
    }
}
Also used : GeneratedDownload(com.willshex.blogwt.shared.api.datatype.GeneratedDownload) JsonElement(com.google.gson.JsonElement)

Aggregations

GeneratedDownload (com.willshex.blogwt.shared.api.datatype.GeneratedDownload)13 JsonElement (com.google.gson.JsonElement)5 Filter (com.willshex.blogwt.shared.page.search.Filter)3 User (com.willshex.blogwt.shared.api.datatype.User)2 Stack (com.willshex.blogwt.shared.page.Stack)2 Date (java.util.Date)2 BlobKey (com.google.appengine.api.blobstore.BlobKey)1 JsonObject (com.google.gson.JsonObject)1 JsonParser (com.google.gson.JsonParser)1 SafeHtml (com.google.gwt.safehtml.shared.SafeHtml)1 Column (com.google.gwt.user.cellview.client.Column)1 TextColumn (com.google.gwt.user.cellview.client.TextColumn)1 GetPostsActionHandler (com.willshex.blogwt.server.api.blog.action.GetPostsActionHandler)1 IGenerator (com.willshex.blogwt.server.background.generatedownload.generator.IGenerator)1 Pager (com.willshex.blogwt.shared.api.Pager)1 GetPostsRequest (com.willshex.blogwt.shared.api.blog.call.GetPostsRequest)1 MetaNotification (com.willshex.blogwt.shared.api.datatype.MetaNotification)1 Permission (com.willshex.blogwt.shared.api.datatype.Permission)1 Resource (com.willshex.blogwt.shared.api.datatype.Resource)1 Role (com.willshex.blogwt.shared.api.datatype.Role)1