Search in sources :

Example 11 with AppGroup

use of ai.elimu.model.project.AppGroup in project webapp by elimu-ai.

the class JavaToGsonConverter method getAppCategoryGson.

public static AppCategoryGson getAppCategoryGson(AppCategory appCategory) {
    if (appCategory == null) {
        return null;
    } else {
        AppCategoryGson appCategoryGson = new AppCategoryGson();
        appCategoryGson.setId(appCategory.getId());
        appCategoryGson.setName(appCategory.getName());
        List<AppGroupGson> appGroups = new ArrayList<>();
        for (AppGroup appGroup : appCategory.getAppGroups()) {
            AppGroupGson appGroupGson = getAppGroupGson(appGroup);
            appGroups.add(appGroupGson);
        }
        appCategoryGson.setAppGroups(appGroups);
        return appCategoryGson;
    }
}
Also used : AppCategoryGson(ai.elimu.model.gson.project.AppCategoryGson) ArrayList(java.util.ArrayList) AppGroupGson(ai.elimu.model.gson.project.AppGroupGson) AppGroup(ai.elimu.model.project.AppGroup)

Aggregations

AppGroup (ai.elimu.model.project.AppGroup)11 AppCategory (ai.elimu.model.project.AppCategory)9 Project (ai.elimu.model.project.Project)8 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)7 ApplicationVersion (ai.elimu.model.admin.ApplicationVersion)5 Application (ai.elimu.model.admin.Application)4 Contributor (ai.elimu.model.Contributor)3 ArrayList (java.util.ArrayList)3 ApplicationGson (ai.elimu.model.gson.admin.ApplicationGson)1 ApplicationVersionGson (ai.elimu.model.gson.admin.ApplicationVersionGson)1 AppCategoryGson (ai.elimu.model.gson.project.AppCategoryGson)1 AppGroupGson (ai.elimu.model.gson.project.AppGroupGson)1 AppCollection (ai.elimu.model.project.AppCollection)1 License (ai.elimu.model.project.License)1 Gson (com.google.gson.Gson)1 IOException (java.io.IOException)1 Date (java.util.Date)1 ByteArrayApkFile (net.dongliu.apk.parser.ByteArrayApkFile)1 ApkMeta (net.dongliu.apk.parser.bean.ApkMeta)1 JSONArray (org.json.JSONArray)1