本文整理汇总了Java中com.amazonaws.mturk.requester.HIT.getDescription方法的典型用法代码示例。如果您正苦于以下问题:Java HIT.getDescription方法的具体用法?Java HIT.getDescription怎么用?Java HIT.getDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.amazonaws.mturk.requester.HIT
的用法示例。
在下文中一共展示了HIT.getDescription方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateHIT
import com.amazonaws.mturk.requester.HIT; //导入方法依赖的package包/类
/**
* Updates a HIT with new title, description, keywords, and reward. If new values are
* not specified, the values from the original HIT are used. The following default values
* are used:
* <ul>
* <li>AssignmentDurationInSeconds: 1 hour</li>
* <li>AutoApprovalDelayInSeconds: 15 days</li>
* <li>QualificationRequirement: null</li>
* </ul>
*
* @param hitId the Id of the HIT to update
* @param title the title of the updated HIT. If null, the current title
* of the HIT is used.
* @param description the description of the updated HIT. If null, the current description
* of the HIT is used.
* @param keywords one or more words or phrases to describe the updated HIT. If null,
* the current keywords are used.
* @param reward the amount to pay for the updated HIT when completed. If null, the
* the current reward of the HIT is used.
* @return the new HITType Id
* @throws ServiceException
*/
public String updateHIT(String hitId, String title, String description, String keywords,
Double reward) throws ServiceException {
if (title == null || description == null || keywords == null || reward == null) {
HIT currentHIT = this.getHIT(hitId);
if (title == null) {
title = currentHIT.getTitle();
}
if (description == null) {
description = currentHIT.getDescription();
}
if (keywords == null) {
keywords = currentHIT.getKeywords();
}
if (reward == null) {
reward = currentHIT.getReward().getAmount().doubleValue();
}
}
String newHITTypeId = this.registerHITType(
DEFAULT_AUTO_APPROVAL_DELAY_IN_SECONDS,
DEFAULT_ASSIGNMENT_DURATION_IN_SECONDS,
reward,
title,
keywords,
description,
null); // qualificationRequirements
this.changeHITTypeOfHIT(hitId, newHITTypeId);
return newHITTypeId;
}