本文整理匯總了Java中com.taskadapter.redmineapi.bean.Journal類的典型用法代碼示例。如果您正苦於以下問題:Java Journal類的具體用法?Java Journal怎麽用?Java Journal使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Journal類屬於com.taskadapter.redmineapi.bean包,在下文中一共展示了Journal類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addMissingInformationsToIssueFromCachedConfiguration
import com.taskadapter.redmineapi.bean.Journal; //導入依賴的package包/類
private void addMissingInformationsToIssueFromCachedConfiguration(Issue issue,
CachedRepositoryConfiguration configuration)
{
//Data transfer object members of issue are not populated with all the info,
//we should hit the server to retrieve missing fields but instead we hit our
//local cache.
issue.setProject(configuration.getProjectById(issue.getProject().getId()));
issue.setAssignee(configuration.getUserById(issue.getAssignee().getId()));
issue.setAuthor(configuration.getUserById(issue.getAuthor().getId()));
for(Journal j : issue.getJournals())
{
j.setUser(configuration.getUserById(j.getUser().getId()));
}
for(Attachment a : issue.getAttachments())
{
a.setAuthor(configuration.getUserById(a.getAuthor().getId()));
}
}
示例2: parseJournal
import com.taskadapter.redmineapi.bean.Journal; //導入依賴的package包/類
public static Journal parseJournal(JSONObject content) throws JSONException {
final Journal result = JournalFactory.create(JsonInput.getInt(content, "id"));
result.setCreatedOn(getDateOrNull(content, "created_on"));
result.setNotes(JsonInput.getStringOrNull(content, "notes"));
result.setUser(JsonInput.getObjectOrNull(content, "user", USER_PARSER));
result.addDetails(JsonInput.getListOrEmpty(content, "details", JOURNAL_DETAIL_PARSER));
return result;
}
示例3: parseJournal
import com.taskadapter.redmineapi.bean.Journal; //導入依賴的package包/類
public static Journal parseJournal(JSONObject content) throws JSONException {
final Journal result = new Journal();
result.setId(JsonInput.getInt(content, "id"));
result.setCreatedOn(getDateOrNull(content, "created_on"));
result.setNotes(JsonInput.getStringOrNull(content, "notes"));
result.setUser(JsonInput.getObjectOrNull(content, "user", USER_PARSER));
result.setDetails(JsonInput.getListOrEmpty(content, "details", JOURNAL_DETAIL_PARSER));
return result;
}
示例4: isIssueWithCommits
import com.taskadapter.redmineapi.bean.Journal; //導入依賴的package包/類
protected boolean isIssueWithCommits(com.taskadapter.redmineapi.bean.Issue issue) {
List<Journal> journals = issue.getJournals();
boolean commits = false;
for (Journal journal : journals) {
if (isCommitJournal(journal)) {
commits=true;
break;
}
}
return commits;
}
示例5: parse
import com.taskadapter.redmineapi.bean.Journal; //導入依賴的package包/類
@Override
public Journal parse(JSONObject input) throws JSONException {
return parseJournal(input);
}
示例6: isCommitJournal
import com.taskadapter.redmineapi.bean.Journal; //導入依賴的package包/類
protected boolean isCommitJournal(Journal journal) {
User user = journal.getUser();
String login = user.getLogin();
String firstName = user.getFirstName();
return login!=null?login.equals(project.getScmUsername()):firstName.equals(project.getScmUsername());
}