/src/main/java/com/evernote/edam/notestore/NoteStoreIface.java
http://github.com/evernote/evernote-sdk-java · Java · 2012 lines · 86 code · 80 blank · 1846 comment · 0 complexity · f97fbc8568cb4207debddaa17557b886 MD5 · raw file
Large files are truncated click here to view the full file
- /**
- * Autogenerated by Thrift
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- */
- package com.evernote.edam.notestore;
- import java.util.List;
- import java.util.ArrayList;
- import java.util.Map;
- import java.util.HashMap;
- import java.util.Set;
- import java.util.HashSet;
- import com.evernote.thrift.*;
- import com.evernote.thrift.protocol.*;
- public interface NoteStoreIface {
- /**
- * Asks the NoteStore to provide information about the status of the user
- * account corresponding to the provided authentication token.
- */
- public SyncState getSyncState(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
- /**
- * Asks the NoteStore to provide information about the status of the user
- * account corresponding to the provided authentication token.
- * This version of 'getSyncState' allows the client to upload coarse-
- * grained usage metrics to the service.
- *
- * @param clientMetrics see the documentation of the ClientUsageMetrics
- * structure for an explanation of the fields that clients can pass to
- * the service.
- */
- public SyncState getSyncStateWithMetrics(String authenticationToken, ClientUsageMetrics clientMetrics) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
- /**
- * DEPRECATED - use getFilteredSyncChunk.
- */
- public SyncChunk getSyncChunk(String authenticationToken, int afterUSN, int maxEntries, boolean fullSyncOnly) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
- /**
- * Asks the NoteStore to provide the state of the account in order of
- * last modification. This request retrieves one block of the server's
- * state so that a client can make several small requests against a large
- * account rather than getting the entire state in one big message.
- * This call gives fine-grained control of the data that will
- * be received by a client by omitting data elements that a client doesn't
- * need. This may reduce network traffic and sync times.
- *
- * @param afterUSN
- * The client can pass this value to ask only for objects that
- * have been updated after a certain point. This allows the client to
- * receive updates after its last checkpoint rather than doing a full
- * synchronization on every pass. The default value of "0" indicates
- * that the client wants to get objects from the start of the account.
- *
- * @param maxEntries
- * The maximum number of modified objects that should be
- * returned in the result SyncChunk. This can be used to limit the size
- * of each individual message to be friendly for network transfer.
- *
- * @param filter
- * The caller must set some of the flags in this structure to specify which
- * data types should be returned during the synchronization. See
- * the SyncChunkFilter structure for information on each flag.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "afterUSN" - if negative
- * </li>
- * <li> BAD_DATA_FORMAT "maxEntries" - if less than 1
- * </li>
- * </ul>
- */
- public SyncChunk getFilteredSyncChunk(String authenticationToken, int afterUSN, int maxEntries, SyncChunkFilter filter) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
- /**
- * Asks the NoteStore to provide information about the status of a linked
- * notebook that has been shared with the caller, or that is public to the
- * world.
- * This will return a result that is similar to getSyncState, but may omit
- * SyncState.uploaded if the caller doesn't have permission to write to
- * the linked notebook.
- *
- * This function must be called on the shard that owns the referenced
- * notebook. (I.e. the shardId in /shard/shardId/edam/note must be the
- * same as LinkedNotebook.shardId.)
- *
- * @param authenticationToken
- * This should be an authenticationToken for the guest who has received
- * the invitation to the share. (I.e. this should not be the result of
- * NoteStore.authenticateToSharedNotebook)
- *
- * @param linkedNotebook
- * This structure should contain identifying information and permissions
- * to access the notebook in question.
- */
- public SyncState getLinkedNotebookSyncState(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Asks the NoteStore to provide information about the contents of a linked
- * notebook that has been shared with the caller, or that is public to the
- * world.
- * This will return a result that is similar to getSyncChunk, but will only
- * contain entries that are visible to the caller. I.e. only that particular
- * Notebook will be visible, along with its Notes, and Tags on those Notes.
- *
- * This function must be called on the shard that owns the referenced
- * notebook. (I.e. the shardId in /shard/shardId/edam/note must be the
- * same as LinkedNotebook.shardId.)
- *
- * @param authenticationToken
- * This should be an authenticationToken for the guest who has received
- * the invitation to the share. (I.e. this should not be the result of
- * NoteStore.authenticateToSharedNotebook)
- *
- * @param linkedNotebook
- * This structure should contain identifying information and permissions
- * to access the notebook in question. This must contain the valid fields
- * for either a shared notebook (e.g. shareKey)
- * or a public notebook (e.g. username, uri)
- *
- * @param afterUSN
- * The client can pass this value to ask only for objects that
- * have been updated after a certain point. This allows the client to
- * receive updates after its last checkpoint rather than doing a full
- * synchronization on every pass. The default value of "0" indicates
- * that the client wants to get objects from the start of the account.
- *
- * @param maxEntries
- * The maximum number of modified objects that should be
- * returned in the result SyncChunk. This can be used to limit the size
- * of each individual message to be friendly for network transfer.
- * Applications should not request more than 256 objects at a time,
- * and must handle the case where the service returns less than the
- * requested number of objects in a given request even though more
- * objects are available on the service.
- *
- * @param fullSyncOnly
- * If true, then the client only wants initial data for a full sync.
- * In this case, the service will not return any expunged objects,
- * and will not return any Resources, since these are also provided
- * in their corresponding Notes.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "afterUSN" - if negative
- * </li>
- * <li> BAD_DATA_FORMAT "maxEntries" - if less than 1
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "LinkedNotebook" - if the provided information doesn't match any
- * valid notebook
- * </li>
- * <li> "LinkedNotebook.uri" - if the provided public URI doesn't match any
- * valid notebook
- * </li>
- * <li> "SharedNotebook.id" - if the provided information indicates a
- * shared notebook that no longer exists
- * </li>
- * </ul>
- */
- public SyncChunk getLinkedNotebookSyncChunk(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook, int afterUSN, int maxEntries, boolean fullSyncOnly) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Returns a list of all of the notebooks in the account.
- */
- public List<com.evernote.edam.type.Notebook> listNotebooks(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
- /**
- * Returns the current state of the notebook with the provided GUID.
- * The notebook may be active or deleted (but not expunged).
- *
- * @param guid
- * The GUID of the notebook to be retrieved.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Notebook.guid" - if the parameter is missing
- * </li>
- * <li> PERMISSION_DENIED "Notebook" - private notebook, user doesn't own
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Notebook.guid" - tag not found, by GUID
- * </li>
- * </ul>
- */
- public com.evernote.edam.type.Notebook getNotebook(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Returns the notebook that should be used to store new notes in the
- * user's account when no other notebooks are specified.
- */
- public com.evernote.edam.type.Notebook getDefaultNotebook(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
- /**
- * Asks the service to make a notebook with the provided name.
- *
- * @param notebook
- * The desired fields for the notebook must be provided on this
- * object. The name of the notebook must be set, and either the 'active'
- * or 'defaultNotebook' fields may be set by the client at creation.
- * If a notebook exists in the account with the same name (via
- * case-insensitive compare), this will throw an EDAMUserException.
- *
- * @return
- * The newly created Notebook. The server-side GUID will be
- * saved in this object's 'guid' field.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Notebook.name" - invalid length or pattern
- * </li>
- * <li> BAD_DATA_FORMAT "Notebook.stack" - invalid length or pattern
- * </li>
- * <li> BAD_DATA_FORMAT "Publishing.uri" - if publishing set but bad uri
- * </li>
- * <li> BAD_DATA_FORMAT "Publishing.publicDescription" - if too long
- * </li>
- * <li> DATA_CONFLICT "Notebook.name" - name already in use
- * </li>
- * <li> DATA_CONFLICT "Publishing.uri" - if URI already in use
- * </li>
- * <li> DATA_REQUIRED "Publishing.uri" - if publishing set but uri missing
- * </li>
- * <li> LIMIT_REACHED "Notebook" - at max number of notebooks
- * </li>
- * </ul>
- */
- public com.evernote.edam.type.Notebook createNotebook(String authenticationToken, com.evernote.edam.type.Notebook notebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
- /**
- * Submits notebook changes to the service. The provided data must include
- * the notebook's guid field for identification.
- *
- * @param notebook
- * The notebook object containing the requested changes.
- *
- * @return
- * The Update Sequence Number for this change within the account.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Notebook.name" - invalid length or pattern
- * </li>
- * <li> BAD_DATA_FORMAT "Notebook.stack" - invalid length or pattern
- * </li>
- * <li> BAD_DATA_FORMAT "Publishing.uri" - if publishing set but bad uri
- * </li>
- * <li> BAD_DATA_FORMAT "Publishing.publicDescription" - if too long
- * </li>
- * <li> DATA_CONFLICT "Notebook.name" - name already in use
- * </li>
- * <li> DATA_CONFLICT "Publishing.uri" - if URI already in use
- * </li>
- * <li> DATA_REQUIRED "Publishing.uri" - if publishing set but uri missing
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Notebook.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public int updateNotebook(String authenticationToken, com.evernote.edam.type.Notebook notebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Permanently removes the notebook from the user's account.
- * After this action, the notebook is no longer available for undeletion, etc.
- * If the notebook contains any Notes, they will be moved to the current
- * default notebook and moved into the trash (i.e. Note.active=false).
- * <p/>
- * NOTE: This function is generally not available to third party applications.
- * Calls will result in an EDAMUserException with the error code
- * PERMISSION_DENIED.
- *
- * @param guid
- * The GUID of the notebook to delete.
- *
- * @return
- * The Update Sequence Number for this change within the account.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Notebook.guid" - if the parameter is missing
- * </li>
- * <li> LIMIT_REACHED "Notebook" - trying to expunge the last Notebook
- * </li>
- * <li> PERMISSION_DENIED "Notebook" - private notebook, user doesn't own
- * </li>
- * </ul>
- */
- public int expungeNotebook(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Returns a list of the tags in the account. Evernote does not support
- * the undeletion of tags, so this will only include active tags.
- */
- public List<com.evernote.edam.type.Tag> listTags(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
- /**
- * Returns a list of the tags that are applied to at least one note within
- * the provided notebook. If the notebook is public, the authenticationToken
- * may be ignored.
- *
- * @param notebookGuid
- * the GUID of the notebook to use to find tags
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Notebook.guid" - notebook not found by GUID
- * </li>
- * </ul>
- */
- public List<com.evernote.edam.type.Tag> listTagsByNotebook(String authenticationToken, String notebookGuid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Returns the current state of the Tag with the provided GUID.
- *
- * @param guid
- * The GUID of the tag to be retrieved.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Tag.guid" - if the parameter is missing
- * </li>
- * <li> PERMISSION_DENIED "Tag" - private Tag, user doesn't own
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Tag.guid" - tag not found, by GUID
- * </li>
- * </ul>
- */
- public com.evernote.edam.type.Tag getTag(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Asks the service to make a tag with a set of information.
- *
- * @param tag
- * The desired list of fields for the tag are specified in this
- * object. The caller must specify the tag name, and may provide
- * the parentGUID.
- *
- * @return
- * The newly created Tag. The server-side GUID will be
- * saved in this object.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Tag.name" - invalid length or pattern
- * </li>
- * <li> BAD_DATA_FORMAT "Tag.parentGuid" - malformed GUID
- * </li>
- * <li> DATA_CONFLICT "Tag.name" - name already in use
- * </li>
- * <li> LIMIT_REACHED "Tag" - at max number of tags
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Tag.parentGuid" - not found, by GUID
- * </li>
- * </ul>
- */
- public com.evernote.edam.type.Tag createTag(String authenticationToken, com.evernote.edam.type.Tag tag) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Submits tag changes to the service. The provided data must include
- * the tag's guid field for identification. The service will apply
- * updates to the following tag fields: name, parentGuid
- *
- * @param tag
- * The tag object containing the requested changes.
- *
- * @return
- * The Update Sequence Number for this change within the account.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Tag.name" - invalid length or pattern
- * </li>
- * <li> BAD_DATA_FORMAT "Tag.parentGuid" - malformed GUID
- * </li>
- * <li> DATA_CONFLICT "Tag.name" - name already in use
- * </li>
- * <li> DATA_CONFLICT "Tag.parentGuid" - can't set parent: circular
- * </li>
- * <li> PERMISSION_DENIED "Tag" - user doesn't own tag
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Tag.guid" - tag not found, by GUID
- * </li>
- * <li> "Tag.parentGuid" - parent not found, by GUID
- * </li>
- * </ul>
- */
- public int updateTag(String authenticationToken, com.evernote.edam.type.Tag tag) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Removes the provided tag from every note that is currently tagged with
- * this tag. If this operation is successful, the tag will still be in
- * the account, but it will not be tagged on any notes.
- *
- * This function is not indended for use by full synchronizing clients, since
- * it does not provide enough result information to the client to reconcile
- * the local state without performing a follow-up sync from the service. This
- * is intended for "thin clients" that need to efficiently support this as
- * a UI operation.
- *
- * @param guid
- * The GUID of the tag to remove from all notes.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Tag.guid" - if the guid parameter is missing
- * </li>
- * <li> PERMISSION_DENIED "Tag" - user doesn't own tag
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Tag.guid" - tag not found, by GUID
- * </li>
- * </ul>
- */
- public void untagAll(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Permanently deletes the tag with the provided GUID, if present.
- * <p/>
- * NOTE: This function is generally not available to third party applications.
- * Calls will result in an EDAMUserException with the error code
- * PERMISSION_DENIED.
- *
- * @param guid
- * The GUID of the tag to delete.
- *
- * @return
- * The Update Sequence Number for this change within the account.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Tag.guid" - if the guid parameter is missing
- * </li>
- * <li> PERMISSION_DENIED "Tag" - user doesn't own tag
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Tag.guid" - tag not found, by GUID
- * </li>
- * </ul>
- */
- public int expungeTag(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Returns a list of the searches in the account. Evernote does not support
- * the undeletion of searches, so this will only include active searches.
- */
- public List<com.evernote.edam.type.SavedSearch> listSearches(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
- /**
- * Returns the current state of the search with the provided GUID.
- *
- * @param guid
- * The GUID of the search to be retrieved.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "SavedSearch.guid" - if the parameter is missing
- * </li>
- * <li> PERMISSION_DENIED "SavedSearch" - private Tag, user doesn't own
- * </li>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "SavedSearch.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public com.evernote.edam.type.SavedSearch getSearch(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Asks the service to make a saved search with a set of information.
- *
- * @param search
- * The desired list of fields for the search are specified in this
- * object. The caller must specify the name and query for the
- * search, and may optionally specify a search scope.
- * The SavedSearch.format field is ignored by the service.
- *
- * @return
- * The newly created SavedSearch. The server-side GUID will be
- * saved in this object.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "SavedSearch.name" - invalid length or pattern
- * </li>
- * <li> BAD_DATA_FORMAT "SavedSearch.query" - invalid length
- * </li>
- * <li> DATA_CONFLICT "SavedSearch.name" - name already in use
- * </li>
- * <li> LIMIT_REACHED "SavedSearch" - at max number of searches
- * </li>
- * </ul>
- */
- public com.evernote.edam.type.SavedSearch createSearch(String authenticationToken, com.evernote.edam.type.SavedSearch search) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
- /**
- * Submits search changes to the service. The provided data must include
- * the search's guid field for identification. The service will apply
- * updates to the following search fields: name, query, and scope.
- *
- * @param search
- * The search object containing the requested changes.
- *
- * @return
- * The Update Sequence Number for this change within the account.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "SavedSearch.name" - invalid length or pattern
- * </li>
- * <li> BAD_DATA_FORMAT "SavedSearch.query" - invalid length
- * </li>
- * <li> DATA_CONFLICT "SavedSearch.name" - name already in use
- * </li>
- * <li> PERMISSION_DENIED "SavedSearch" - user doesn't own tag
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "SavedSearch.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public int updateSearch(String authenticationToken, com.evernote.edam.type.SavedSearch search) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Permanently deletes the saved search with the provided GUID, if present.
- * <p/>
- * NOTE: This function is generally not available to third party applications.
- * Calls will result in an EDAMUserException with the error code
- * PERMISSION_DENIED.
- *
- * @param guid
- * The GUID of the search to delete.
- *
- * @return
- * The Update Sequence Number for this change within the account.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "SavedSearch.guid" - if the guid parameter is empty
- * </li>
- * <li> PERMISSION_DENIED "SavedSearch" - user doesn't own
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "SavedSearch.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public int expungeSearch(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * DEPRECATED. Use findNotesMetadata.
- */
- public NoteList findNotes(String authenticationToken, NoteFilter filter, int offset, int maxNotes) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Finds the position of a note within a sorted subset of all of the user's
- * notes. This may be useful for thin clients that are displaying a paginated
- * listing of a large account, which need to know where a particular note
- * sits in the list without retrieving all notes first.
- *
- * @param authenticationToken
- * Must be a valid token for the user's account unless the NoteFilter
- * 'notebookGuid' is the GUID of a public notebook.
- *
- * @param filter
- * The list of criteria that will constrain the notes to be returned.
- *
- * @param guid
- * The GUID of the note to be retrieved.
- *
- * @return
- * If the note with the provided GUID is found within the matching note
- * list, this will return the offset of that note within that list (where
- * the first offset is 0). If the note is not found within the set of
- * notes, this will return -1.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "offset" - not between 0 and EDAM_USER_NOTES_MAX
- * </li>
- * <li> BAD_DATA_FORMAT "maxNotes" - not between 0 and EDAM_USER_NOTES_MAX
- * </li>
- * <li> BAD_DATA_FORMAT "NoteFilter.notebookGuid" - if malformed
- * </li>
- * <li> BAD_DATA_FORMAT "NoteFilter.tagGuids" - if any are malformed
- * </li>
- * <li> BAD_DATA_FORMAT "NoteFilter.words" - if search string too long
- * </li>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Notebook.guid" - not found, by GUID
- * </li>
- * <li> "Note.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public int findNoteOffset(String authenticationToken, NoteFilter filter, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Used to find the high-level information about a set of the notes from a
- * user's account based on various criteria specified via a NoteFilter object.
- * <p/>
- * Web applications that wish to periodically check for new content in a user's
- * Evernote account should consider using webhooks instead of polling this API.
- * See http://dev.evernote.com/documentation/cloud/chapters/polling_notification.php
- * for more information.
- *
- * @param authenticationToken
- * Must be a valid token for the user's account unless the NoteFilter
- * 'notebookGuid' is the GUID of a public notebook.
- *
- * @param filter
- * The list of criteria that will constrain the notes to be returned.
- *
- * @param offset
- * The numeric index of the first note to show within the sorted
- * results. The numbering scheme starts with "0". This can be used for
- * pagination.
- *
- * @param maxNotes
- * The mximum notes to return in this query. The service will return a set
- * of notes that is no larger than this number, but may return fewer notes
- * if needed. The NoteList.totalNotes field in the return value will
- * indicate whether there are more values available after the returned set.
- *
- * @param resultSpec
- * This specifies which information should be returned for each matching
- * Note. The fields on this structure can be used to eliminate data that
- * the client doesn't need, which will reduce the time and bandwidth
- * to receive and process the reply.
- *
- * @return
- * The list of notes that match the criteria.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "offset" - not between 0 and EDAM_USER_NOTES_MAX
- * </li>
- * <li> BAD_DATA_FORMAT "maxNotes" - not between 0 and EDAM_USER_NOTES_MAX
- * </li>
- * <li> BAD_DATA_FORMAT "NoteFilter.notebookGuid" - if malformed
- * </li>
- * <li> BAD_DATA_FORMAT "NoteFilter.tagGuids" - if any are malformed
- * </li>
- * <li> BAD_DATA_FORMAT "NoteFilter.words" - if search string too long
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Notebook.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public NotesMetadataList findNotesMetadata(String authenticationToken, NoteFilter filter, int offset, int maxNotes, NotesMetadataResultSpec resultSpec) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * This function is used to determine how many notes are found for each
- * notebook and tag in the user's account, given a current set of filter
- * parameters that determine the current selection. This function will
- * return a structure that gives the note count for each notebook and tag
- * that has at least one note under the requested filter. Any notebook or
- * tag that has zero notes in the filtered set will not be listed in the
- * reply to this function (so they can be assumed to be 0).
- *
- * @param authenticationToken
- * Must be a valid token for the user's account unless the NoteFilter
- * 'notebookGuid' is the GUID of a public notebook.
- *
- * @param filter
- * The note selection filter that is currently being applied. The note
- * counts are to be calculated with this filter applied to the total set
- * of notes in the user's account.
- *
- * @param withTrash
- * If true, then the NoteCollectionCounts.trashCount will be calculated
- * and supplied in the reply. Otherwise, the trash value will be omitted.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "NoteFilter.notebookGuid" - if malformed
- * </li>
- * <li> BAD_DATA_FORMAT "NoteFilter.notebookGuids" - if any are malformed
- * </li>
- * <li> BAD_DATA_FORMAT "NoteFilter.words" - if search string too long
- * </li>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Notebook.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public NoteCollectionCounts findNoteCounts(String authenticationToken, NoteFilter filter, boolean withTrash) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Returns the current state of the note in the service with the provided
- * GUID. The ENML contents of the note will only be provided if the
- * 'withContent' parameter is true. The service will include the meta-data
- * for each resource in the note, but the binary contents of the resources
- * and their recognition data will be omitted.
- * If the Note is found in a public notebook, the authenticationToken
- * will be ignored (so it could be an empty string). The applicationData
- * fields are returned as keysOnly.
- *
- * @param guid
- * The GUID of the note to be retrieved.
- *
- * @param withContent
- * If true, the note will include the ENML contents of its
- * 'content' field.
- *
- * @param withResourcesData
- * If true, any Resource elements in this Note will include the binary
- * contents of their 'data' field's body.
- *
- * @param withResourcesRecognition
- * If true, any Resource elements will include the binary contents of the
- * 'recognition' field's body if recognition data is present.
- *
- * @param withResourcesAlternateData
- * If true, any Resource elements in this Note will include the binary
- * contents of their 'alternateData' fields' body, if an alternate form
- * is present.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
- * </li>
- * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Note.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public com.evernote.edam.type.Note getNote(String authenticationToken, String guid, boolean withContent, boolean withResourcesData, boolean withResourcesRecognition, boolean withResourcesAlternateData) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Get all of the application data for the note identified by GUID,
- * with values returned within the LazyMap fullMap field.
- * If there are no applicationData entries, then a LazyMap
- * with an empty fullMap will be returned. If your application
- * only needs to fetch its own applicationData entry, use
- * getNoteApplicationDataEntry instead.
- */
- public com.evernote.edam.type.LazyMap getNoteApplicationData(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Get the value of a single entry in the applicationData map
- * for the note identified by GUID.
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Note.guid" - note not found, by GUID</li>
- * <li> "NoteAttributes.applicationData.key" - note not found, by key</li>
- * </ul>
- */
- public String getNoteApplicationDataEntry(String authenticationToken, String guid, String key) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Update, or create, an entry in the applicationData map for
- * the note identified by guid.
- */
- public int setNoteApplicationDataEntry(String authenticationToken, String guid, String key, String value) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Remove an entry identified by 'key' from the applicationData map for
- * the note identified by 'guid'. Silently ignores an unset of a
- * non-existing key.
- */
- public int unsetNoteApplicationDataEntry(String authenticationToken, String guid, String key) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Returns XHTML contents of the note with the provided GUID.
- * If the Note is found in a public notebook, the authenticationToken
- * will be ignored (so it could be an empty string).
- *
- * @param guid
- * The GUID of the note to be retrieved.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
- * </li>
- * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Note.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public String getNoteContent(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Returns a block of the extracted plain text contents of the note with the
- * provided GUID. This text can be indexed for search purposes by a light
- * client that doesn't have capabilities to extract all of the searchable
- * text content from the note and its resources.
- *
- * If the Note is found in a public notebook, the authenticationToken
- * will be ignored (so it could be an empty string).
- *
- * @param guid
- * The GUID of the note to be retrieved.
- *
- * @param noteOnly
- * If true, this will only return the text extracted from the ENML contents
- * of the note itself. If false, this will also include the extracted text
- * from any text-bearing resources (PDF, recognized images)
- *
- * @param tokenizeForIndexing
- * If true, this will break the text into cleanly separated and sanitized
- * tokens. If false, this will return the more raw text extraction, with
- * its original punctuation, capitalization, spacing, etc.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
- * </li>
- * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Note.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public String getNoteSearchText(String authenticationToken, String guid, boolean noteOnly, boolean tokenizeForIndexing) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Returns a block of the extracted plain text contents of the resource with
- * the provided GUID. This text can be indexed for search purposes by a light
- * client that doesn't have capability to extract all of the searchable
- * text content from a resource.
- *
- * If the Resource is found in a public notebook, the authenticationToken
- * will be ignored (so it could be an empty string).
- *
- * @param guid
- * The GUID of the resource to be retrieved.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Resource.guid" - if the parameter is missing
- * </li>
- * <li> PERMISSION_DENIED "Resource" - private resource, user doesn't own
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Resource.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public String getResourceSearchText(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Returns a list of the names of the tags for the note with the provided
- * guid. This can be used with authentication to get the tags for a
- * user's own note, or can be used without valid authentication to retrieve
- * the names of the tags for a note in a public notebook.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
- * </li>
- * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Note.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public List<String> getNoteTagNames(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Asks the service to make a note with the provided set of information.
- *
- * @param note
- * A Note object containing the desired fields to be populated on
- * the service.
- *
- * @return
- * The newly created Note from the service. The server-side
- * GUIDs for the Note and any Resources will be saved in this object.
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Note.title" - invalid length or pattern
- * </li>
- * <li> BAD_DATA_FORMAT "Note.content" - invalid length for ENML content
- * </li>
- * <li> BAD_DATA_FORMAT "Resource.mime" - invalid resource MIME type
- * </li>
- * <li> BAD_DATA_FORMAT "NoteAttributes.*" - bad resource string
- * </li>
- * <li> BAD_DATA_FORMAT "ResourceAttributes.*" - bad resource string
- * </li>
- * <li> DATA_CONFLICT "Note.deleted" - deleted time set on active note
- * </li>
- * <li> DATA_REQUIRED "Resource.data" - resource data body missing
- * </li>
- * <li> ENML_VALIDATION "*" - note content doesn't validate against DTD
- * </li>
- * <li> LIMIT_REACHED "Note" - at max number per account
- * </li>
- * <li> LIMIT_REACHED "Note.size" - total note size too large
- * </li>
- * <li> LIMIT_REACHED "Note.resources" - too many resources on Note
- * </li>
- * <li> LIMIT_REACHED "Note.tagGuids" - too many Tags on Note
- * </li>
- * <li> LIMIT_REACHED "Resource.data.size" - resource too large
- * </li>
- * <li> LIMIT_REACHED "NoteAttribute.*" - attribute string too long
- * </li>
- * <li> LIMIT_REACHED "ResourceAttribute.*" - attribute string too long
- * </li>
- * <li> PERMISSION_DENIED "Note.notebookGuid" - NB not owned by user
- * </li>
- * <li> QUOTA_REACHED "Accounting.uploadLimit" - note exceeds upload quota
- * </li>
- * <li> BAD_DATA_FORMAT "Tag.name" - Note.tagNames was provided, and one
- * of the specified tags had an invalid length or pattern
- * </li>
- * <li> LIMIT_REACHED "Tag" - Note.tagNames was provided, and the required
- * new tags would exceed the maximum number per account
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Note.notebookGuid" - not found, by GUID
- * </li>
- * </ul>
- */
- public com.evernote.edam.type.Note createNote(String authenticationToken, com.evernote.edam.type.Note note) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Submit a set of changes to a note to the service. The provided data
- * must include the note's guid field for identification. The note's
- * title must also be set.
- *
- * @param note
- * A Note object containing the desired fields to be populated on
- * the service. With the exception of the note's title and guid, fields
- * that are not being changed do not need to be set. If the content is not
- * being modified, note.content should be left unset. If the list of
- * resources is not being modified, note.resources should be left unset.
- *
- * @return
- * The metadata (no contents) for the Note on the server after the update
- *
- * @throws EDAMUserException <ul>
- * <li> BAD_DATA_FORMAT "Note.title" - invalid length or pattern
- * </li>
- * <li> BAD_DATA_FORMAT "Note.content" - invalid length for ENML body
- * </li>
- * <li> BAD_DATA_FORMAT "NoteAttributes.*" - bad resource string
- * </li>
- * <li> BAD_DATA_FORMAT "ResourceAttributes.*" - bad resource string
- * </li>
- * <li> BAD_DATA_FORMAT "Resource.mime" - invalid resource MIME type
- * </li>
- * <li> DATA_CONFLICT "Note.deleted" - deleted time set on active note
- * </li>
- * <li> DATA_REQUIRED "Resource.data" - resource data body missing
- * </li>
- * <li> ENML_VALIDATION "*" - note content doesn't validate against DTD
- * </li>
- * <li> LIMIT_REACHED "Note.tagGuids" - too many Tags on Note
- * </li>
- * <li> LIMIT_REACHED "Note.resources" - too many resources on Note
- * </li>
- * <li> LIMIT_REACHED "Note.size" - total note size too large
- * </li>
- * <li> LIMIT_REACHED "Resource.data.size" - resource too large
- * </li>
- * <li> LIMIT_REACHED "NoteAttribute.*" - attribute string too long
- * </li>
- * <li> LIMIT_REACHED "ResourceAttribute.*" - attribute string too long
- * </li>
- * <li> PERMISSION_DENIED "Note" - user doesn't own
- * </li>
- * <li> PERMISSION_DENIED "Note.notebookGuid" - user doesn't own destination
- * </li>
- * <li> QUOTA_REACHED "Accounting.uploadLimit" - note exceeds upload quota
- * </li>
- * <li> BAD_DATA_FORMAT "Tag.name" - Note.tagNames was provided, and one
- * of the specified tags had an invalid length or pattern
- * </li>
- * <li> LIMIT_REACHED "Tag" - Note.tagNames was provided, and the required
- * new tags would exceed the maximum number per account
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Note.guid" - note not found, by GUID
- * </li>
- * <li> "Note.notebookGuid" - if notebookGuid provided, but not found
- * </li>
- * </ul>
- */
- public com.evernote.edam.type.Note updateNote(String authenticationToken, com.evernote.edam.type.Note note) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Moves the note into the trash. The note may still be undeleted, unless it
- * is expunged. This is equivalent to calling updateNote() after setting
- * Note.active = false
- *
- * @param guid
- * The GUID of the note to delete.
- *
- * @return
- * The Update Sequence Number for this change within the account.
- *
- * @throws EDAMUserException <ul>
- * <li> PERMISSION_DENIED "Note" - user doesn't have permission to
- * update the note.
- * </li>
- * </ul>
- *
- * @throws EDAMUserException <ul>
- * <li> DATA_CONFLICT "Note.guid" - the note is already deleted
- * </li>
- * </ul>
- * @throws EDAMNotFoundException <ul>
- * <li> "Note.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public int deleteNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Permanently removes a Note, and all of its Resources,
- * from the service.
- * <p/>
- * NOTE: This function is not available to third party applications.
- * Calls will result in an EDAMUserException with the error code
- * PERMISSION_DENIED.
- *
- * @param guid
- * The GUID of the note to delete.
- *
- * @return
- * The Update Sequence Number for this change within the account.
- *
- * @throws EDAMUserException <ul>
- * <li> PERMISSION_DENIED "Note" - user doesn't own
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Note.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public int expungeNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Permanently removes a list of Notes, and all of their Resources, from
- * the service. This should be invoked with a small number of Note GUIDs
- * (e.g. 100 or less) on each call. To expunge a larger number of notes,
- * call this method multiple times. This should also be used to reduce the
- * number of Notes in a notebook before calling expungeNotebook() or
- * in the trash before calling expungeInactiveNotes(), since these calls may
- * be prohibitively slow if there are more than a few hundred notes.
- * If an exception is thrown for any of the GUIDs, then none of the notes
- * will be deleted. I.e. this call can be treated as an atomic transaction.
- * <p/>
- * NOTE: This function is not available to third party applications.
- * Calls will result in an EDAMUserException with the error code
- * PERMISSION_DENIED.
- *
- * @param noteGuids
- * The list of GUIDs for the Notes to remove.
- *
- * @return
- * The account's updateCount at the end of this operation
- *
- * @throws EDAMUserException <ul>
- * <li> PERMISSION_DENIED "Note" - user doesn't own
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Note.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public int expungeNotes(String authenticationToken, List<String> noteGuids) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
- /**
- * Permanently removes all of the Notes that are currently marked as
- * inactive. This is equivalent to "emptying the trash", and these Notes
- * will be gone permanently.
- * <p/>
- * This operation may be relatively slow if the account contains a large
- * number of inactive Notes.
- * <p/>
- * NOTE: This function is not available to third party applications.
- * Calls will result in an EDAMUserException with the error code
- * PERMISSION_DENIED.
- *
- * @return
- * The number of notes that were expunged.
- */
- public int expungeInactiveNotes(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
- /**
- * Performs a deep copy of the Note with the provided GUID 'noteGuid' into
- * the Notebook with the provided GUID 'toNotebookGuid'.
- * The caller must be the owner of both the Note and the Notebook.
- * This creates a new Note in the destination Notebook with new content and
- * Resources that match all of the content and Resources from the original
- * Note, but with new GUID identifiers.
- * The original Note is not modified by this operation.
- * The copied note is considered as an "upload" for the purpose of upload
- * transfer limit calculation, so its size is added to the upload count for
- * the owner.
- *
- * @param noteGuid
- * The GUID of the Note to copy.
- *
- * @param toNotebookGuid
- * The GUID of the Notebook that should receive the new Note.
- *
- * @return
- * The metadata for the new Note that was created. This will include the
- * new GUID for this Note (and any copied Resources), but will not include
- * the content body or the binary bodies of any Resources.
- *
- * @throws EDAMUserException <ul>
- * <li> LIMIT_REACHED "Note" - at max number per account
- * </li>
- * <li> PERMISSION_DENIED "Notebook.guid" - destination not owned by user
- * </li>
- * <li> PERMISSION_DENIED "Note" - user doesn't own
- * </li>
- * <li> QUOTA_REACHED "Accounting.uploadLimit" - note exceeds upload quota
- * </li>
- * </ul>
- *
- * @throws EDAMNotFoundException <ul>
- * <li> "Notebook.guid" - not found, by GUID
- * </li>
- * </ul>
- */
- public com.evernote.edam.type.Note copyNote(String authenticationToken, String noteGuid, String toN…