本文整理汇总了Java中com.evernote.edam.type.Note.setNotebookGuid方法的典型用法代码示例。如果您正苦于以下问题:Java Note.setNotebookGuid方法的具体用法?Java Note.setNotebookGuid怎么用?Java Note.setNotebookGuid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.evernote.edam.type.Note
的用法示例。
在下文中一共展示了Note.setNotebookGuid方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
private void create(final ENNote args) throws EDAMUserException, EDAMSystemException, EDAMNotFoundException, TException, ParserConfigurationException, SAXException, IOException {
Note note = new Note();
note.setTitle(StringUtils.abbreviate(args.getName(), EDAMLimits.EDAM_NOTE_TITLE_LEN_MAX));
if (StringUtils.isNotBlank(args.getNotebook().getGuid())) {
note.setNotebookGuid(args.getNotebook().getGuid());
}
ENML enml = new ENML();
enml.setTabWidth(args.getTabWidth());
enml.addComment(args.getComments());
enml.addContent(args.getContent());
note.setContent(enml.get());
for (String tagName : args.getTags()) {
tagName = tagName.trim();
if (StringUtils.isNotBlank(tagName)) {
note.addToTagNames(tagName);
}
}
getNoteStoreClient(args).createNote(note);
}
示例2: toNote
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
public Note toNote() {
Note note = new Note();
note.setTitle("PureNote " + Util.timeStamp(this));
note.setContent(convertContentToEvernote());
if (!"".equals(bookGuid)) {
note.setNotebookGuid(bookGuid);
}
if (!"".equals(guid)) {
note.setGuid(guid);
}
return note;
}
示例3: create
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
private void create(final ENNote args) throws EDAMUserException, EDAMSystemException, EDAMNotFoundException, TException, NoSuchAlgorithmException, IOException, ParserConfigurationException, SAXException {
Note note = new Note();
note.setTitle(StringUtils.abbreviate(args.getName(), EDAMLimits.EDAM_NOTE_TITLE_LEN_MAX));
if (StringUtils.isNotBlank(args.getNotebook().getGuid())) {
note.setNotebookGuid(args.getNotebook().getGuid());
}
ENML enml = new ENML();
enml.setTabWidth(args.getTabWidth());
enml.addComment(args.getComments());
for (File f : args.getAttachments()) {
// create resource
String mimeType = FileUtil.mimeType(f); // E.g "image/png"
Resource resource = EvernoteUtil.createResource(f, mimeType);
note.addToResources(resource);
// create content
String hashHex = FileUtil.bytesToHex(resource.getData().getBodyHash());
enml.addResource(hashHex, mimeType);
}
note.setContent(enml.get());
// create tags
for (String tagName : args.getTags()) {
tagName = tagName.trim();
if (StringUtils.isNotBlank(tagName)) {
note.addToTagNames(tagName);
}
}
getNoteStoreClient(args).createNote(note);
}
示例4: createNoteInLinkedNotebook
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
/**
* @param note The new note.
* @return The new created note from the server.
*/
public Note createNoteInLinkedNotebook(@NonNull Note note) throws EDAMUserException, EDAMSystemException, TException, EDAMNotFoundException {
SharedNotebook sharedNotebook = mClient.getSharedNotebookByAuth();
note.setNotebookGuid(sharedNotebook.getNotebookGuid());
return mClient.createNote(note);
}
示例5: toNote
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
public Note toNote(String notebookGuid) {
Note note = toNote();
note.setNotebookGuid(notebookGuid);
return note;
}
示例6: createNote
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
/**
* Helper method to create a note synchronously in a business notebook
*
* @param note
* @param linkedNotebook
* @return
* @throws com.evernote.edam.error.EDAMUserException
*
* @throws com.evernote.edam.error.EDAMSystemException
*
* @throws com.evernote.thrift.TException
* @throws com.evernote.edam.error.EDAMNotFoundException
*
*/
@Override
public Note createNote(Note note, LinkedNotebook linkedNotebook) throws EDAMUserException, EDAMSystemException, TException, EDAMNotFoundException {
AsyncLinkedNoteStoreClient sharedNoteStore = getClientFactory().createLinkedNoteStoreClient(linkedNotebook);
SharedNotebook sharedNotebook = sharedNoteStore.getAsyncClient().getClient().getSharedNotebookByAuth(sharedNoteStore.getAuthenticationToken());
note.setNotebookGuid(sharedNotebook.getNotebookGuid());
sharedNoteStore.getAsyncClient().getClient().createNote(sharedNoteStore.getAuthenticationToken(), note);
return note;
}
示例7: createNote
import com.evernote.edam.type.Note; //导入方法依赖的package包/类
/**
* Helper method to create a note synchronously in a linked notebook
*
* @param note
* @param linkedNotebook
* @return
* @throws com.evernote.edam.error.EDAMUserException
*
* @throws com.evernote.edam.error.EDAMSystemException
*
* @throws com.evernote.thrift.TException
* @throws com.evernote.edam.error.EDAMNotFoundException
*
*/
public Note createNote(Note note, LinkedNotebook linkedNotebook) throws EDAMUserException, EDAMSystemException, TException, EDAMNotFoundException {
SharedNotebook sharedNotebook = getAsyncClient().getClient().getSharedNotebookByAuth(getAuthenticationToken());
note.setNotebookGuid(sharedNotebook.getNotebookGuid());
return getAsyncClient().getClient().createNote(getAuthenticationToken(), note);
}