Package com.dotcms.repackage.com.google.gson

Examples of com.dotcms.repackage.com.google.gson.Gson.toJson()


            IndiciesInfo info=APILocator.getIndiciesAPI().loadIndicies();
            Gson gson=new Gson();
            String mapping=null;
            try {
                if(con.isWorking()) {
                    mapping=gson.toJson(mappingAPI.toMap(con));
                   
                    if(!reindexOnly)
                        req.add(new IndexRequest(info.working, "content", id)
                                    .source(mapping));
                    if(info.reindex_working!=null)
View Full Code Here


                                    .source(mapping));
                }
   
                if(con.isLive()) {
                    if(mapping==null)
                        mapping=gson.toJson(mappingAPI.toMap(con));
                   
                    if(!reindexOnly)
                        req.add(new IndexRequest(info.live, "content", id)
                                .source(mapping));
                    if(info.reindex_live!=null)
View Full Code Here

                }
                Map<String, String> metaMap = APILocator.getFileAssetAPI().getMetaDataMap(contentlet, binFile);

                if(metaMap!=null) {
                    Gson gson = new GsonBuilder().disableHtmlEscaping().create();
                    contentlet.setProperty(FileAssetAPI.META_DATA_FIELD, gson.toJson(metaMap));
                    contentlet = conFac.save(contentlet);
                    if(!isNewContent){
                        LiveCache.removeAssetFromCache(contentlet);
                        LiveCache.addToLiveAssetToCache(contentlet);
                        WorkingCache.removeAssetFromCache(contentlet);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.