Java Code Examples for org.json.JSONObject.getString()

The following are Jave code examples for showing how to use getString() of the org.json.JSONObject class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: J-Cord   File: GuildDeleteEventHandler.java   View Source Code Vote up 6 votes
@Override
public void dispatchEvent(JSONObject json, int sequence) {
    String id = json.getString("id");
    boolean unavailable = json.has("unavailable") && json.getBoolean("unavailable");

    Guild guild = (Guild) identity.getGuild(id);
    if (guild == null) {
        logger.log(LogLevel.FETAL, "[UNKNOWN GUILD] [GUILD_DELETE_EVENT]");
        return;
    }

    if (unavailable) {
        guild.setUnavailable(true);
        dispatchEvent(new GuildUnavailableEvent(identity, sequence, guild));
    } else {
        identity.removeGuild(id);
        dispatchEvent(new GuildDeleteEvent(identity, sequence, guild, OffsetDateTime.now()));
    }
}
 
Example 2
Project: discord.jar   File: ReadyPoll.java   View Source Code Vote up 6 votes
public void setupContacts(JSONObject key) {
    JSONArray array = key.getJSONArray("private_channels");
    for (int i = 0; i < array.length(); i++) {
        JSONObject item = array.getJSONObject(i);
        JSONObject contact = item.getJSONObject("recipient");

        String id = contact.getString("id");

        if (item.getString("id").equals(api.getSelfInfo().getId()))
            api.setAs(contact.getString("id"));

        UserImpl userImpl = new UserImpl(contact.getString("username"), id, item.getString("id"), api);
        userImpl.setAvatar(contact.isNull("avatar") ? "" : "https://cdn.discordapp.com/avatars/" + id + "/" +
                contact.getString("avatar") + ".jpg");
        userImpl.setAvatarId(contact.isNull("avatar") ? "" : userImpl.getId());

        api.getAvailableDms().add(userImpl);
    }
}
 
Example 3
Project: XERUNG   File: AddNewMembers.java   View Source Code Vote up 6 votes
private void parseStatus(String result){
	try {
		JSONObject json = new JSONObject(result);
		String status = json.getString("STATUS");
		rejected = json.getString("REJECTNO");
		if(status.equalsIgnoreCase("SUCCESS")){
			setResult(1001);
			sendNotification();
		}else if(status.equalsIgnoreCase("Already exist")){
			comman.alertDialog(AddNewMembers.this,getString(R.string.group_already_exist_head),getString(R.string.group_already_exist));
			return;
		}else{
			comman.alertDialog(AddNewMembers.this,getString(R.string.group_already_exist_head),getString(R.string.group_already_exist_error));
			return;
		}
	} catch (Exception e) {
		// TODO: handle exception
	}
}
 
Example 4
Project: Blockly   File: BlocklyEvent.java   View Source Code Vote up 6 votes
/**
 * Constructs a UIEvent from the JSON serialized representation.
 *
 * @param json The serialized UIEvent.
 * @throws JSONException
 */
public UIEvent(JSONObject json) throws JSONException {
    super(TYPE_UI, json);
    String element = json.getString(JSON_ELEMENT);
    try {
        mUiElement = validateUiElement(element);
    } catch (IllegalArgumentException e) {
        throw new JSONException("Invalid UI element: " + element);
    }
    if (mUiElement != ELEMENT_CATEGORY && TextUtils.isEmpty(mBlockId)) {
        throw new JSONException("UI element " + mUiElement + " requires " + JSON_BLOCK_ID);
    }
    this.mOldValue = json.optString(JSON_OLD_VALUE);  // Rarely used.
    this.mNewValue = json.optString(JSON_NEW_VALUE);
    if (mUiElement != ELEMENT_CATEGORY && mUiElement != ELEMENT_CLICK
            && TextUtils.isEmpty(mNewValue)) {
        throw new JSONException("UI element " + mUiElement + " requires " + JSON_NEW_VALUE);
    }
}
 
Example 5
Project: android-mobile-engage-sdk   File: IamJsBridge.java   View Source Code Vote up 6 votes
@JavascriptInterface
public void buttonClicked(String jsonString) {
    try {
        final JSONObject json = new JSONObject(jsonString);
        final JSONObject result = new JSONObject().put("id", json.getString("id"));

        if (json.has("buttonId")) {
            final String buttonId = json.getString("buttonId");
            coreSdkHandler.post(new Runnable() {
                @Override
                public void run() {
                    repository.add(new ButtonClicked(campaignId, buttonId, System.currentTimeMillis()));
                }
            });
            result.put("success", true);
        } else {
            result.put("success", false)
                    .put("error", "Missing buttonId!");
        }
        sendResult(result);
    } catch (JSONException je) {
        EMSLogger.log(MobileEngageTopic.IN_APP_MESSAGE, "Exception occurred, exception: %s json: %s", je, jsonString);
    }
}
 
Example 6
Project: DMS   File: JSONParser.java   View Source Code Vote up 6 votes
private static List<Attachment> parseAttachmentsJSON(JSONObject attachmentsJSONObject) throws JSONException {
    List<Attachment> attachmentList = new ArrayList<>();

    JSONArray listJSONArray = attachmentsJSONObject.getJSONArray("List");
    int jsonArraySize = attachmentsJSONObject.getInt("Size");

    for (int index = 0; index < jsonArraySize; index++) {
        JSONObject listJSONObject = listJSONArray.getJSONObject(index);
        String name = listJSONObject.getString("Name");
        String link = listJSONObject.getString("Link");

        attachmentList.add(new Attachment(name, link));
    }

    return attachmentList;
}
 
Example 7
Project: poly-sample-android   File: HelloArActivity.java   View Source Code Vote up 5 votes
private void requestDataFiles(JSONObject objFormat) throws JSONException {
    // objFormat has the list of data files for the OBJ format (OBJ file, MTL file, textures).
    // We will use a AsyncFileDownloader to download all those files.
    mFileDownloader = new AsyncFileDownloader();

    // The "root file" is the OBJ.
    JSONObject rootFile = objFormat.getJSONObject("root");
    mFileDownloader.add(rootFile.getString("relativePath"), rootFile.getString("url"));

    // The "resource files" are the MTL file and textures.
    JSONArray resources = objFormat.getJSONArray("resources");
    for (int i = 0; i < resources.length(); i++) {
        JSONObject resourceFile = resources.getJSONObject(i);
        String path = resourceFile.getString("relativePath");
        String url = resourceFile.getString("url");
        // For this example, we only care about OBJ and PNG files.
        if (path.toLowerCase().endsWith(".obj") || path.toLowerCase().endsWith(".png")) {
            mFileDownloader.add(path, url);
        }
    }

    // Now start downloading the data files. When this is done, the callback will call
    // processDataFiles().
    Log.d(TAG, "Starting to download data files, # files: " + mFileDownloader.getEntryCount());
    mFileDownloader.start(mBackgroundThreadHandler, new AsyncFileDownloader.CompletionListener() {
        @Override
        public void onPolyDownloadFinished(AsyncFileDownloader downloader) {
            if (downloader.isError()) {
                Log.e(TAG, "Failed to download data files for asset.");
                return;
            }
            // Signal to the GL thread that download is complete, so it can go ahead and
            // import the model.
            Log.d(TAG, "Download complete, ready to import model.");
            mReadyToImport = true;
        }
    });
}
 
Example 8
Project: chilly   File: Chilly.java   View Source Code Vote up 5 votes
private String getAccessToken() {
    String token = "";
    SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(mContext);
    String token_string = sharedPreferences.getString("trakt_token", "");
    if(token_string.equals("")) return "";
    try {
        JSONObject json_token = new JSONObject(token_string);
        token = json_token.getString("access_token");
    } catch (JSONException e) {
        e.printStackTrace();
    }

    return token;
}
 
Example 9
Project: alfresco-remote-api   File: BlogServiceTest.java   View Source Code Vote up 5 votes
public void testUpdateWithEmptyValues() throws Exception
{
    JSONObject item = createPost("test", "test", null, false, 200);
    String name = item.getString("name");
    assertEquals(false, item.getBoolean("isUpdated"));
    
    item = updatePost(item.getString("name"), null, null, null, false, 200);
    assertEquals("", item.getString("title"));
    assertEquals("", item.getString("content"));
}
 
Example 10
Project: hybrid   File: SyncVersion.java   View Source Code Vote up 5 votes
/**
 *
 * @param file 文件路径
 * @param versionKey 下载版本文件的url
 * @return 旧的版本文件中file的版本号 是文件的md5值
 * @return 新版本文件中file的版本号 是文件的crc32值
 * @throws JSONException
 */
private String getOldFileVersionStr(String file, String versionKey) throws JSONException {
    String v ="";

    String versionTxt = cookie.getCookie(versionKey);//得到sp中保存的cookievalue实体中的版本文件 json字符串,和上次版本的版本文件比较,文件的版本号
    //如果本地本来就没有下载version.txt文件,那么return "",即下载本次的版本文件
    if (versionTxt.equals("")){
        return "";
    }

    JSONObject json = new JSONObject(versionTxt);
    json = json.getJSONObject("update");
    Iterator<String> it = json.keys();

    boolean lock = true;
    while (it.hasNext()) {
        String str = (String) it.next();
        JSONArray array = json.getJSONArray(str);
        lock = true;
        for (int i = 0; i < array.length(); i++) {
            JSONObject obj = array.getJSONObject(i);
            v = obj.getString("ver");//是文件的crc32值,是String类型
            String p = obj.getString("file");

            if (p.equals(file)) {//如果旧的版本文件中file文件名称和新的版本文件中file文件名称相同
                lock = false;
                break;
            }
        }

        if (!lock) {
            break;
        }
    }
    if (lock) {
        v = "0";
    }
    return v;
}
 
Example 11
Project: XERUNG   File: SignIn.java   View Source Code Vote up 5 votes
private void parseJson(String result){
	try {
		JSONObject json = new JSONObject(result);
		StatusId = json.getString("STATUS");
		shared.saveSharedData("State", StatusId);
		String mOTP = json.getString("OTP");
		shared.saveSharedData("mOTP", mOTP);
		if(StatusId.equalsIgnoreCase("0")){
			//If phone number not exist.fill all the parameter manually
			 //senOTPJson("+"+countryPrefix+edtMobile.getText().toString().trim());
			sendComposedSms(countryPrefix+edtMobile.getText().toString().trim(), mOTP+" "+getString(R.string.verify_otp));
			/*Intent i = new Intent(SignIn.this, VerifyOTP.class);
			i.putExtra("State", StatusId);
			i.putExtra("MobileNum", edtMobile.getText().toString().trim());
			i.putExtra("CountryCode", countryPrefix);
			i.putExtra("CountryName", countryName);
			startActivity(i);*/
			//SignIn.this.finish();
		}else if(StatusId.equalsIgnoreCase("2")){
			//If user already registered login  & enter OTP
			sendComposedSms(countryPrefix+edtMobile.getText().toString().trim(), mOTP+" "+getString(R.string.verify_otp));
			/*Intent i = new Intent(SignIn.this, VerifyOTP.class);
			i.putExtra("State", StatusId);
			i.putExtra("MobileNum", edtMobile.getText().toString().trim());
			i.putExtra("CountryCode", countryPrefix);
			i.putExtra("CountryName", countryName);
			startActivity(i);
			SignIn.this.finish();*/
		}
	} catch (Exception e) {
		// TODO: handle exception
	}
}
 
Example 12
Project: J-Cord   File: Requester.java   View Source Code Vote up 5 votes
private void handleErrorResponse(JSONObject response) {
    if (response.has("code")) {
        if (!(response.get("code") instanceof Integer)) return;
        ErrorResponse errorResponse = ErrorResponse.getByKey(response.getInt("code"));
        if (errorResponse != ErrorResponse.UNKNOWN) {
            throw new ErrorResponseException(errorResponse);
        } else {
            throw new ErrorResponseException(response.getInt("code"), response.getString("message"));
        }
    }
}
 
Example 13
Project: CrashCoin   File: AbstractConnection.java   View Source Code Vote up 5 votes
/**
 * Create a concrete object from the JSONObject received.
 *
 * The class to instanciate is deduced from the value of the "type" field of
 * JSONObject.
 * @param jsonData
 * @return the object newly created
 */
private JSONable getObjectFromJsonObject(final JSONObject jsonData) {
    JSONable result = null;
    switch (jsonData.getString("type")) {

        case "Block":
            result = new Block(jsonData);
            break;

        case "BlockChain":
            result = new BlockChain(jsonData);
            break;

        case "Address":
            result = new Address(jsonData);
            break;

        case "Transaction":
            result = new Transaction(jsonData);
            break;

        case "TestStr":
            result = new TestStrJSONable(jsonData);
            break;

        case "Message":
            result = new Message(jsonData);
            break;
    }

    return result;
}
 
Example 14
Project: TransLinkMe-App   File: BusStopRadiusLoader.java   View Source Code Vote up 4 votes
private List<BusStop> extractBusStopsFromJson(String realTimeTransitInformationJson) {

        // If the JSON is empty, return null and exit early.
        if (TextUtils.isEmpty(realTimeTransitInformationJson)) {
            return null;
        }

        List<BusStop> busStopList = new ArrayList<>();

        try {

            JSONArray busStopArray = new JSONArray(realTimeTransitInformationJson);

            for (int i = 0; i < busStopArray.length(); i++) {
                JSONObject currentBusStop = busStopArray.getJSONObject(i);

                String name = null;
                if (currentBusStop.has("Name")) {
                    name = currentBusStop.getString("Name");
                }

                String routes = null;
                if (currentBusStop.has("Routes")) {
                    routes = currentBusStop.getString("Routes");
                }

                String stopNumber = null;
                if (currentBusStop.has("StopNo")) {
                    stopNumber = currentBusStop.getString("StopNo");
                }

                String atStreet = null;
                if (currentBusStop.has("AtStreet")) {
                    atStreet = currentBusStop.getString("AtStreet");
                }

                String onStreet = null;
                if (currentBusStop.has("OnStreet")) {
                    onStreet = currentBusStop.getString("OnStreet");
                }


                busStopList.add(new BusStop(name, routes, stopNumber, atStreet, onStreet));
            }

        } catch (JSONException e) {
            e.printStackTrace();
        }

        return busStopList;
    }
 
Example 15
Project: AppRTC-Android   File: WebSocketRTCClient.java   View Source Code Vote up 4 votes
IceCandidate toJavaCandidate(JSONObject json) throws JSONException {
  return new IceCandidate(
      json.getString("id"), json.getInt("label"), json.getString("candidate"));
}
 
Example 16
Project: Shadbot   File: TriviaManager.java   View Source Code Vote up 4 votes
@Override
public void start() throws JSONException, IOException, ParseException {
	String url = String.format("https://opentdb.com/api.php?amount=1&category=%s", categoryID == null ? "" : categoryID.toString());
	String jsonStr = NetUtils.getBody(url);
	if(jsonStr.isEmpty()) {
		throw new ParseException("Body is empty.");
	}

	JSONObject resultObj = new JSONObject(jsonStr).getJSONArray("results").getJSONObject(0);

	String questionType = resultObj.getString("type");

	correctAnswer = Jsoup.parse(resultObj.getString("correct_answer")).text();

	if("multiple".equals(questionType)) {
		answers = Utils.toList(resultObj.getJSONArray("incorrect_answers"), String.class);
		answers.add(ThreadLocalRandom.current().nextInt(answers.size()), correctAnswer);
	} else {
		answers = new ArrayList<>(Arrays.asList("True", "False"));
	}

	String description = String.format("**%s**%n%s",
			Jsoup.parse(resultObj.getString("question")).text(),
			FormatUtils.numberedList(answers.size(), answers.size(),
					count -> "\t**" + count + "**. " + Jsoup.parse(answers.get(count - 1)).text()));

	EmbedBuilder embed = EmbedUtils.getDefaultEmbed()
			.withAuthorName("Trivia")
			.appendDescription(description)
			.appendField("Category", String.format("`%s`", resultObj.getString("category")), true)
			.appendField("Type", String.format("`%s`", questionType), true)
			.appendField("Difficulty", String.format("`%s`", resultObj.getString("difficulty")), true)
			.withFooterText(String.format("You have %d seconds to answer.", LIMITED_TIME));

	BotUtils.sendMessage(embed.build(), this.getChannel());

	MessageManager.addListener(this.getChannel(), this);

	startTime = System.currentTimeMillis();
	this.schedule(() -> {
		BotUtils.sendMessage(String.format(Emoji.HOURGLASS + " Time elapsed, the correct answer was **%s**.", correctAnswer), this.getChannel());
		this.stop();
	}, LIMITED_TIME, TimeUnit.SECONDS);
}
 
Example 17
Project: solo-spring   File: ArticleCommentReplyNotifier.java   View Source Code Vote up 4 votes
public void action(final Event<JSONObject> event) throws EventException {
	final JSONObject eventData = event.getData();
	final JSONObject comment = eventData.optJSONObject(Comment.COMMENT);
	final JSONObject article = eventData.optJSONObject(Article.ARTICLE);

	logger.debug("Processing an event[type={}, data={}] in listener[className={}]", event.getType(), eventData,
			ArticleCommentReplyNotifier.class);
	final String originalCommentId = comment.optString(Comment.COMMENT_ORIGINAL_COMMENT_ID);

	if (StringUtils.isBlank(originalCommentId)) {
		logger.debug("This comment[id={}] is not a reply", comment.optString(Keys.OBJECT_ID));

		return;
	}

	if (Latkes.getServePath().contains("localhost")) {
		logger.info("Solo runs on local server, so should not send mail");

		return;
	}

	try {
		final String commentEmail = comment.getString(Comment.COMMENT_EMAIL);
		final JSONObject originalComment = commentDao.get(originalCommentId);
		final String originalCommentEmail = originalComment.getString(Comment.COMMENT_EMAIL);

		if (originalCommentEmail.equalsIgnoreCase(commentEmail)) {
			return;
		}

		final JSONObject preference = preferenceQueryService.getPreference();

		if (null == preference) {
			throw new EventException("Not found preference");
		}

		final String blogTitle = preference.getString(Option.ID_C_BLOG_TITLE);
		final String adminEmail = preference.getString(Option.ID_C_ADMIN_EMAIL);

		final String commentContent = comment.getString(Comment.COMMENT_CONTENT);
		final String commentSharpURL = comment.getString(Comment.COMMENT_SHARP_URL);
		final MailMessage message = new MailMessage();

		message.setFrom(adminEmail);
		message.addRecipient(originalCommentEmail);
		final JSONObject replyNotificationTemplate = preferenceQueryService.getReplyNotificationTemplate();

		final String articleTitle = article.getString(Article.ARTICLE_TITLE);
		final String articleLink = Latkes.getServePath() + article.getString(Article.ARTICLE_PERMALINK);
		final String commentName = comment.getString(Comment.COMMENT_NAME);
		final String commentURL = comment.getString(Comment.COMMENT_URL);
		String commenter;

		if (!"http://".equals(commentURL)) {
			commenter = "<a target=\"_blank\" " + "href=\"" + commentURL + "\">" + commentName + "</a>";
		} else {
			commenter = commentName;
		}
		final String mailSubject = replyNotificationTemplate.getString("subject")
				.replace("${postLink}", articleLink).replace("${postTitle}", articleTitle)
				.replace("${replier}", commenter).replace("${blogTitle}", blogTitle)
				.replace("${replyURL}", Latkes.getServePath() + commentSharpURL)
				.replace("${replyContent}", commentContent);

		message.setSubject(mailSubject);
		final String mailBody = replyNotificationTemplate.getString("body").replace("${postLink}", articleLink)
				.replace("${postTitle}", articleTitle).replace("${replier}", commenter)
				.replace("${blogTitle}", blogTitle).replace("${replyURL}", Latkes.getServePath() + commentSharpURL)
				.replace("${replyContent}", commentContent);

		message.setHtmlBody(mailBody);
		logger.debug("Sending a mail[mailSubject={}, mailBody=[{}] to [{}]", mailSubject, mailBody,
				originalCommentEmail);
		mailService.send(message);

	} catch (final Exception e) {
		logger.error(e.getMessage(), e);
		throw new EventException("Reply notifier error!");
	}
}
 
Example 18
Project: sa-android   File: MessageBoardModels.java   View Source Code Vote up 4 votes
public static void fetchList(int page, final ModelListener<List<Post>> listener) {
    JsonObjectRequest r = new JsonObjectRequest(Request.Method.GET, baseURL + "/posts?page=" + page, null,
            new Response.Listener<JSONObject>() {
                @Override
                public void onResponse(JSONObject response) {
                    try {
                        JSONObject result = response.getJSONObject("result");
                        JSONArray posts = result.getJSONArray("posts");

                        // Generate result
                        ArrayList<Post> list = new ArrayList<>();
                        for (int i = 0; i < posts.length(); i++) {
                            JSONObject post = posts.getJSONObject(i);

                            Post p = new Post();

                            // Required fields
                            p.user_name = post.getString("user_name");
                            p.text = post.getString("text");
                            p.creation_time = post.getString("creation_time");

                            // Optional fields
                            if (post.has("user_title") && !post.isNull("user_title"))
                                p.user_title = post.getString("user_title");
                            if (post.has("user_department") && !post.isNull("user_title"))
                                p.user_department = post.getString("user_department");

                            list.add(p);
                        }
                        listener.onData(list, "ok");
                    } catch (Exception e) {
                        e.printStackTrace();
                        listener.onData(null, "获取留言失败");
                    }
                }
            }, new Response.ErrorListener() {
        @Override
        public void onErrorResponse(VolleyError error) {
            error.printStackTrace();
            listener.onData(null, "获取留言失败");
        }
    });
    SAGlobal.sharedRequestQueue.add(r);
}
 
Example 19
Project: Lavalink   File: LavalinkSocket.java   View Source Code Vote up 4 votes
@Override
public void onMessage(String message) {
    JSONObject json = new JSONObject(message);

    if (!Objects.equals(json.getString("op"), "playerUpdate")) {
        log.debug(message);
    }

    switch (json.getString("op")) {
        case "sendWS":
            JDAImpl jda = (JDAImpl) lavalink.getJda(json.getInt("shardId"));
            jda.getClient().send(json.getString("message"));
            break;
        case "validationReq":
            int sId = LavalinkUtil.getShardFromSnowflake(json.getString("guildId"), lavalink.getNumShards());
            JDA jda2 = lavalink.getJda(sId);

            String guildId = json.getString("guildId");
            String channelId = json.optString("channelId");
            if (channelId.equals("")) channelId = null;


            JSONObject res = new JSONObject();
            res.put("op", "validationRes");
            res.put("guildId", guildId);
            VoiceChannel vc = null;
            if (channelId != null)
                vc = jda2.getVoiceChannelById(channelId);

            Guild guild = jda2.getGuildById(guildId);

            if (guild == null && channelId == null) {
                res.put("valid", false);
                send(res.toString());
            } else if (guild == null) {
                res.put("valid", false);
                res.put("channelId", channelId);
                send(res.toString());
            } else if (channelId != null) {
                res.put("valid", vc != null
                        && PermissionUtil.checkPermission(vc, guild.getSelfMember(),
                        Permission.VOICE_CONNECT, Permission.VOICE_SPEAK));
                res.put("channelId", channelId);
                send(res.toString());
            } else {
                res.put("valid", true);
                send(res.toString());
            }
            break;
        case "isConnectedReq":
            JDAImpl jda3 = (JDAImpl) lavalink.getJda(json.getInt("shardId"));
            JSONObject res2 = new JSONObject();
            res2.put("op", "isConnectedRes");
            res2.put("shardId", json.getInt("shardId"));
            res2.put("connected", jda3.getClient().isConnected());
            send(res2.toString());
            break;
        case "playerUpdate":
            lavalink.getLink(json.getString("guildId"))
                    .getPlayer()
                    .provideState(json.getJSONObject("state"));
            break;
        case "stats":
            stats = new RemoteStats(json);
            break;
        case "event":
            try {
                handleEvent(json);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            break;
        default:
            log.warn("Unexpected operation: " + json.getString("op"));
            break;
    }
}
 
Example 20
Project: solo-spring   File: ArticleMgmtService.java   View Source Code Vote up 3 votes
/**
 * Decrements reference count of archive date of an published article
 * specified by the given article id.
 *
 * @param articleId
 *            the given article id
 * @throws JSONException
 *             json exception
 * @throws RepositoryException
 *             repository exception
 */
private void decArchiveDatePublishedRefCount(final String articleId) throws JSONException, RepositoryException {
	final JSONObject archiveDateArticleRelation = archiveDateArticleDao.getByArticleId(articleId);
	final String archiveDateId = archiveDateArticleRelation
			.getString(ArchiveDate.ARCHIVE_DATE + "_" + Keys.OBJECT_ID);
	final JSONObject archiveDate = archiveDateDao.get(archiveDateId);

	archiveDate.put(ArchiveDate.ARCHIVE_DATE_PUBLISHED_ARTICLE_COUNT,
			archiveDate.getInt(ArchiveDate.ARCHIVE_DATE_PUBLISHED_ARTICLE_COUNT) - 1);
	archiveDateDao.update(archiveDateId, archiveDate);
}