当前位置: 首页>>代码示例>>Java>>正文


Java Note.setNotebookGuid方法代码示例

本文整理汇总了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);
}
 
开发者ID:LTTPP,项目名称:Eemory,代码行数:24,代码来源:NoteOpsTextImpl.java

示例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;
}
 
开发者ID:duanze,项目名称:PureNote,代码行数:13,代码来源:GNote.java

示例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);
}
 
开发者ID:LTTPP,项目名称:Eemory,代码行数:35,代码来源:NoteOpsFileImpl.java

示例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);
}
 
开发者ID:fivef,项目名称:add_to_evernote_note,代码行数:10,代码来源:EvernoteLinkedNotebookHelper.java

示例5: toNote

import com.evernote.edam.type.Note; //导入方法依赖的package包/类
public Note toNote(String notebookGuid) {
	Note note = toNote();
	note.setNotebookGuid(notebookGuid);
	return note;
}
 
开发者ID:daimajia,项目名称:EverMemo,代码行数:6,代码来源:Memo.java

示例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;
}
 
开发者ID:duanze,项目名称:PureNote,代码行数:26,代码来源:AsyncBusinessNoteStoreClient.java

示例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);

}
 
开发者ID:duanze,项目名称:PureNote,代码行数:22,代码来源:AsyncLinkedNoteStoreClient.java


注:本文中的com.evernote.edam.type.Note.setNotebookGuid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。