/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

  1. /**
  2. * Autogenerated by Thrift
  3. *
  4. * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. */
  6. package com.evernote.edam.notestore;
  7. import java.util.List;
  8. import java.util.ArrayList;
  9. import java.util.Map;
  10. import java.util.HashMap;
  11. import java.util.Set;
  12. import java.util.HashSet;
  13. import com.evernote.thrift.*;
  14. import com.evernote.thrift.protocol.*;
  15. public interface NoteStoreIface {
  16. /**
  17. * Asks the NoteStore to provide information about the status of the user
  18. * account corresponding to the provided authentication token.
  19. */
  20. public SyncState getSyncState(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
  21. /**
  22. * Asks the NoteStore to provide information about the status of the user
  23. * account corresponding to the provided authentication token.
  24. * This version of 'getSyncState' allows the client to upload coarse-
  25. * grained usage metrics to the service.
  26. *
  27. * @param clientMetrics see the documentation of the ClientUsageMetrics
  28. * structure for an explanation of the fields that clients can pass to
  29. * the service.
  30. */
  31. public SyncState getSyncStateWithMetrics(String authenticationToken, ClientUsageMetrics clientMetrics) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
  32. /**
  33. * DEPRECATED - use getFilteredSyncChunk.
  34. */
  35. public SyncChunk getSyncChunk(String authenticationToken, int afterUSN, int maxEntries, boolean fullSyncOnly) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
  36. /**
  37. * Asks the NoteStore to provide the state of the account in order of
  38. * last modification. This request retrieves one block of the server's
  39. * state so that a client can make several small requests against a large
  40. * account rather than getting the entire state in one big message.
  41. * This call gives fine-grained control of the data that will
  42. * be received by a client by omitting data elements that a client doesn't
  43. * need. This may reduce network traffic and sync times.
  44. *
  45. * @param afterUSN
  46. * The client can pass this value to ask only for objects that
  47. * have been updated after a certain point. This allows the client to
  48. * receive updates after its last checkpoint rather than doing a full
  49. * synchronization on every pass. The default value of "0" indicates
  50. * that the client wants to get objects from the start of the account.
  51. *
  52. * @param maxEntries
  53. * The maximum number of modified objects that should be
  54. * returned in the result SyncChunk. This can be used to limit the size
  55. * of each individual message to be friendly for network transfer.
  56. *
  57. * @param filter
  58. * The caller must set some of the flags in this structure to specify which
  59. * data types should be returned during the synchronization. See
  60. * the SyncChunkFilter structure for information on each flag.
  61. *
  62. * @throws EDAMUserException <ul>
  63. * <li> BAD_DATA_FORMAT "afterUSN" - if negative
  64. * </li>
  65. * <li> BAD_DATA_FORMAT "maxEntries" - if less than 1
  66. * </li>
  67. * </ul>
  68. */
  69. public SyncChunk getFilteredSyncChunk(String authenticationToken, int afterUSN, int maxEntries, SyncChunkFilter filter) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
  70. /**
  71. * Asks the NoteStore to provide information about the status of a linked
  72. * notebook that has been shared with the caller, or that is public to the
  73. * world.
  74. * This will return a result that is similar to getSyncState, but may omit
  75. * SyncState.uploaded if the caller doesn't have permission to write to
  76. * the linked notebook.
  77. *
  78. * This function must be called on the shard that owns the referenced
  79. * notebook. (I.e. the shardId in /shard/shardId/edam/note must be the
  80. * same as LinkedNotebook.shardId.)
  81. *
  82. * @param authenticationToken
  83. * This should be an authenticationToken for the guest who has received
  84. * the invitation to the share. (I.e. this should not be the result of
  85. * NoteStore.authenticateToSharedNotebook)
  86. *
  87. * @param linkedNotebook
  88. * This structure should contain identifying information and permissions
  89. * to access the notebook in question.
  90. */
  91. 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;
  92. /**
  93. * Asks the NoteStore to provide information about the contents of a linked
  94. * notebook that has been shared with the caller, or that is public to the
  95. * world.
  96. * This will return a result that is similar to getSyncChunk, but will only
  97. * contain entries that are visible to the caller. I.e. only that particular
  98. * Notebook will be visible, along with its Notes, and Tags on those Notes.
  99. *
  100. * This function must be called on the shard that owns the referenced
  101. * notebook. (I.e. the shardId in /shard/shardId/edam/note must be the
  102. * same as LinkedNotebook.shardId.)
  103. *
  104. * @param authenticationToken
  105. * This should be an authenticationToken for the guest who has received
  106. * the invitation to the share. (I.e. this should not be the result of
  107. * NoteStore.authenticateToSharedNotebook)
  108. *
  109. * @param linkedNotebook
  110. * This structure should contain identifying information and permissions
  111. * to access the notebook in question. This must contain the valid fields
  112. * for either a shared notebook (e.g. shareKey)
  113. * or a public notebook (e.g. username, uri)
  114. *
  115. * @param afterUSN
  116. * The client can pass this value to ask only for objects that
  117. * have been updated after a certain point. This allows the client to
  118. * receive updates after its last checkpoint rather than doing a full
  119. * synchronization on every pass. The default value of "0" indicates
  120. * that the client wants to get objects from the start of the account.
  121. *
  122. * @param maxEntries
  123. * The maximum number of modified objects that should be
  124. * returned in the result SyncChunk. This can be used to limit the size
  125. * of each individual message to be friendly for network transfer.
  126. * Applications should not request more than 256 objects at a time,
  127. * and must handle the case where the service returns less than the
  128. * requested number of objects in a given request even though more
  129. * objects are available on the service.
  130. *
  131. * @param fullSyncOnly
  132. * If true, then the client only wants initial data for a full sync.
  133. * In this case, the service will not return any expunged objects,
  134. * and will not return any Resources, since these are also provided
  135. * in their corresponding Notes.
  136. *
  137. * @throws EDAMUserException <ul>
  138. * <li> BAD_DATA_FORMAT "afterUSN" - if negative
  139. * </li>
  140. * <li> BAD_DATA_FORMAT "maxEntries" - if less than 1
  141. * </li>
  142. * </ul>
  143. *
  144. * @throws EDAMNotFoundException <ul>
  145. * <li> "LinkedNotebook" - if the provided information doesn't match any
  146. * valid notebook
  147. * </li>
  148. * <li> "LinkedNotebook.uri" - if the provided public URI doesn't match any
  149. * valid notebook
  150. * </li>
  151. * <li> "SharedNotebook.id" - if the provided information indicates a
  152. * shared notebook that no longer exists
  153. * </li>
  154. * </ul>
  155. */
  156. 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;
  157. /**
  158. * Returns a list of all of the notebooks in the account.
  159. */
  160. public List<com.evernote.edam.type.Notebook> listNotebooks(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
  161. /**
  162. * Returns the current state of the notebook with the provided GUID.
  163. * The notebook may be active or deleted (but not expunged).
  164. *
  165. * @param guid
  166. * The GUID of the notebook to be retrieved.
  167. *
  168. * @throws EDAMUserException <ul>
  169. * <li> BAD_DATA_FORMAT "Notebook.guid" - if the parameter is missing
  170. * </li>
  171. * <li> PERMISSION_DENIED "Notebook" - private notebook, user doesn't own
  172. * </li>
  173. * </ul>
  174. *
  175. * @throws EDAMNotFoundException <ul>
  176. * <li> "Notebook.guid" - tag not found, by GUID
  177. * </li>
  178. * </ul>
  179. */
  180. 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;
  181. /**
  182. * Returns the notebook that should be used to store new notes in the
  183. * user's account when no other notebooks are specified.
  184. */
  185. public com.evernote.edam.type.Notebook getDefaultNotebook(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
  186. /**
  187. * Asks the service to make a notebook with the provided name.
  188. *
  189. * @param notebook
  190. * The desired fields for the notebook must be provided on this
  191. * object. The name of the notebook must be set, and either the 'active'
  192. * or 'defaultNotebook' fields may be set by the client at creation.
  193. * If a notebook exists in the account with the same name (via
  194. * case-insensitive compare), this will throw an EDAMUserException.
  195. *
  196. * @return
  197. * The newly created Notebook. The server-side GUID will be
  198. * saved in this object's 'guid' field.
  199. *
  200. * @throws EDAMUserException <ul>
  201. * <li> BAD_DATA_FORMAT "Notebook.name" - invalid length or pattern
  202. * </li>
  203. * <li> BAD_DATA_FORMAT "Notebook.stack" - invalid length or pattern
  204. * </li>
  205. * <li> BAD_DATA_FORMAT "Publishing.uri" - if publishing set but bad uri
  206. * </li>
  207. * <li> BAD_DATA_FORMAT "Publishing.publicDescription" - if too long
  208. * </li>
  209. * <li> DATA_CONFLICT "Notebook.name" - name already in use
  210. * </li>
  211. * <li> DATA_CONFLICT "Publishing.uri" - if URI already in use
  212. * </li>
  213. * <li> DATA_REQUIRED "Publishing.uri" - if publishing set but uri missing
  214. * </li>
  215. * <li> LIMIT_REACHED "Notebook" - at max number of notebooks
  216. * </li>
  217. * </ul>
  218. */
  219. 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;
  220. /**
  221. * Submits notebook changes to the service. The provided data must include
  222. * the notebook's guid field for identification.
  223. *
  224. * @param notebook
  225. * The notebook object containing the requested changes.
  226. *
  227. * @return
  228. * The Update Sequence Number for this change within the account.
  229. *
  230. * @throws EDAMUserException <ul>
  231. * <li> BAD_DATA_FORMAT "Notebook.name" - invalid length or pattern
  232. * </li>
  233. * <li> BAD_DATA_FORMAT "Notebook.stack" - invalid length or pattern
  234. * </li>
  235. * <li> BAD_DATA_FORMAT "Publishing.uri" - if publishing set but bad uri
  236. * </li>
  237. * <li> BAD_DATA_FORMAT "Publishing.publicDescription" - if too long
  238. * </li>
  239. * <li> DATA_CONFLICT "Notebook.name" - name already in use
  240. * </li>
  241. * <li> DATA_CONFLICT "Publishing.uri" - if URI already in use
  242. * </li>
  243. * <li> DATA_REQUIRED "Publishing.uri" - if publishing set but uri missing
  244. * </li>
  245. * </ul>
  246. *
  247. * @throws EDAMNotFoundException <ul>
  248. * <li> "Notebook.guid" - not found, by GUID
  249. * </li>
  250. * </ul>
  251. */
  252. 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;
  253. /**
  254. * Permanently removes the notebook from the user's account.
  255. * After this action, the notebook is no longer available for undeletion, etc.
  256. * If the notebook contains any Notes, they will be moved to the current
  257. * default notebook and moved into the trash (i.e. Note.active=false).
  258. * <p/>
  259. * NOTE: This function is generally not available to third party applications.
  260. * Calls will result in an EDAMUserException with the error code
  261. * PERMISSION_DENIED.
  262. *
  263. * @param guid
  264. * The GUID of the notebook to delete.
  265. *
  266. * @return
  267. * The Update Sequence Number for this change within the account.
  268. *
  269. * @throws EDAMUserException <ul>
  270. * <li> BAD_DATA_FORMAT "Notebook.guid" - if the parameter is missing
  271. * </li>
  272. * <li> LIMIT_REACHED "Notebook" - trying to expunge the last Notebook
  273. * </li>
  274. * <li> PERMISSION_DENIED "Notebook" - private notebook, user doesn't own
  275. * </li>
  276. * </ul>
  277. */
  278. public int expungeNotebook(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  279. /**
  280. * Returns a list of the tags in the account. Evernote does not support
  281. * the undeletion of tags, so this will only include active tags.
  282. */
  283. public List<com.evernote.edam.type.Tag> listTags(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
  284. /**
  285. * Returns a list of the tags that are applied to at least one note within
  286. * the provided notebook. If the notebook is public, the authenticationToken
  287. * may be ignored.
  288. *
  289. * @param notebookGuid
  290. * the GUID of the notebook to use to find tags
  291. *
  292. * @throws EDAMNotFoundException <ul>
  293. * <li> "Notebook.guid" - notebook not found by GUID
  294. * </li>
  295. * </ul>
  296. */
  297. 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;
  298. /**
  299. * Returns the current state of the Tag with the provided GUID.
  300. *
  301. * @param guid
  302. * The GUID of the tag to be retrieved.
  303. *
  304. * @throws EDAMUserException <ul>
  305. * <li> BAD_DATA_FORMAT "Tag.guid" - if the parameter is missing
  306. * </li>
  307. * <li> PERMISSION_DENIED "Tag" - private Tag, user doesn't own
  308. * </li>
  309. * </ul>
  310. *
  311. * @throws EDAMNotFoundException <ul>
  312. * <li> "Tag.guid" - tag not found, by GUID
  313. * </li>
  314. * </ul>
  315. */
  316. 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;
  317. /**
  318. * Asks the service to make a tag with a set of information.
  319. *
  320. * @param tag
  321. * The desired list of fields for the tag are specified in this
  322. * object. The caller must specify the tag name, and may provide
  323. * the parentGUID.
  324. *
  325. * @return
  326. * The newly created Tag. The server-side GUID will be
  327. * saved in this object.
  328. *
  329. * @throws EDAMUserException <ul>
  330. * <li> BAD_DATA_FORMAT "Tag.name" - invalid length or pattern
  331. * </li>
  332. * <li> BAD_DATA_FORMAT "Tag.parentGuid" - malformed GUID
  333. * </li>
  334. * <li> DATA_CONFLICT "Tag.name" - name already in use
  335. * </li>
  336. * <li> LIMIT_REACHED "Tag" - at max number of tags
  337. * </li>
  338. * </ul>
  339. *
  340. * @throws EDAMNotFoundException <ul>
  341. * <li> "Tag.parentGuid" - not found, by GUID
  342. * </li>
  343. * </ul>
  344. */
  345. 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;
  346. /**
  347. * Submits tag changes to the service. The provided data must include
  348. * the tag's guid field for identification. The service will apply
  349. * updates to the following tag fields: name, parentGuid
  350. *
  351. * @param tag
  352. * The tag object containing the requested changes.
  353. *
  354. * @return
  355. * The Update Sequence Number for this change within the account.
  356. *
  357. * @throws EDAMUserException <ul>
  358. * <li> BAD_DATA_FORMAT "Tag.name" - invalid length or pattern
  359. * </li>
  360. * <li> BAD_DATA_FORMAT "Tag.parentGuid" - malformed GUID
  361. * </li>
  362. * <li> DATA_CONFLICT "Tag.name" - name already in use
  363. * </li>
  364. * <li> DATA_CONFLICT "Tag.parentGuid" - can't set parent: circular
  365. * </li>
  366. * <li> PERMISSION_DENIED "Tag" - user doesn't own tag
  367. * </li>
  368. * </ul>
  369. *
  370. * @throws EDAMNotFoundException <ul>
  371. * <li> "Tag.guid" - tag not found, by GUID
  372. * </li>
  373. * <li> "Tag.parentGuid" - parent not found, by GUID
  374. * </li>
  375. * </ul>
  376. */
  377. 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;
  378. /**
  379. * Removes the provided tag from every note that is currently tagged with
  380. * this tag. If this operation is successful, the tag will still be in
  381. * the account, but it will not be tagged on any notes.
  382. *
  383. * This function is not indended for use by full synchronizing clients, since
  384. * it does not provide enough result information to the client to reconcile
  385. * the local state without performing a follow-up sync from the service. This
  386. * is intended for "thin clients" that need to efficiently support this as
  387. * a UI operation.
  388. *
  389. * @param guid
  390. * The GUID of the tag to remove from all notes.
  391. *
  392. * @throws EDAMUserException <ul>
  393. * <li> BAD_DATA_FORMAT "Tag.guid" - if the guid parameter is missing
  394. * </li>
  395. * <li> PERMISSION_DENIED "Tag" - user doesn't own tag
  396. * </li>
  397. * </ul>
  398. *
  399. * @throws EDAMNotFoundException <ul>
  400. * <li> "Tag.guid" - tag not found, by GUID
  401. * </li>
  402. * </ul>
  403. */
  404. public void untagAll(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  405. /**
  406. * Permanently deletes the tag with the provided GUID, if present.
  407. * <p/>
  408. * NOTE: This function is generally not available to third party applications.
  409. * Calls will result in an EDAMUserException with the error code
  410. * PERMISSION_DENIED.
  411. *
  412. * @param guid
  413. * The GUID of the tag to delete.
  414. *
  415. * @return
  416. * The Update Sequence Number for this change within the account.
  417. *
  418. * @throws EDAMUserException <ul>
  419. * <li> BAD_DATA_FORMAT "Tag.guid" - if the guid parameter is missing
  420. * </li>
  421. * <li> PERMISSION_DENIED "Tag" - user doesn't own tag
  422. * </li>
  423. * </ul>
  424. *
  425. * @throws EDAMNotFoundException <ul>
  426. * <li> "Tag.guid" - tag not found, by GUID
  427. * </li>
  428. * </ul>
  429. */
  430. public int expungeTag(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  431. /**
  432. * Returns a list of the searches in the account. Evernote does not support
  433. * the undeletion of searches, so this will only include active searches.
  434. */
  435. public List<com.evernote.edam.type.SavedSearch> listSearches(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
  436. /**
  437. * Returns the current state of the search with the provided GUID.
  438. *
  439. * @param guid
  440. * The GUID of the search to be retrieved.
  441. *
  442. * @throws EDAMUserException <ul>
  443. * <li> BAD_DATA_FORMAT "SavedSearch.guid" - if the parameter is missing
  444. * </li>
  445. * <li> PERMISSION_DENIED "SavedSearch" - private Tag, user doesn't own
  446. * </li>
  447. *
  448. * @throws EDAMNotFoundException <ul>
  449. * <li> "SavedSearch.guid" - not found, by GUID
  450. * </li>
  451. * </ul>
  452. */
  453. 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;
  454. /**
  455. * Asks the service to make a saved search with a set of information.
  456. *
  457. * @param search
  458. * The desired list of fields for the search are specified in this
  459. * object. The caller must specify the name and query for the
  460. * search, and may optionally specify a search scope.
  461. * The SavedSearch.format field is ignored by the service.
  462. *
  463. * @return
  464. * The newly created SavedSearch. The server-side GUID will be
  465. * saved in this object.
  466. *
  467. * @throws EDAMUserException <ul>
  468. * <li> BAD_DATA_FORMAT "SavedSearch.name" - invalid length or pattern
  469. * </li>
  470. * <li> BAD_DATA_FORMAT "SavedSearch.query" - invalid length
  471. * </li>
  472. * <li> DATA_CONFLICT "SavedSearch.name" - name already in use
  473. * </li>
  474. * <li> LIMIT_REACHED "SavedSearch" - at max number of searches
  475. * </li>
  476. * </ul>
  477. */
  478. 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;
  479. /**
  480. * Submits search changes to the service. The provided data must include
  481. * the search's guid field for identification. The service will apply
  482. * updates to the following search fields: name, query, and scope.
  483. *
  484. * @param search
  485. * The search object containing the requested changes.
  486. *
  487. * @return
  488. * The Update Sequence Number for this change within the account.
  489. *
  490. * @throws EDAMUserException <ul>
  491. * <li> BAD_DATA_FORMAT "SavedSearch.name" - invalid length or pattern
  492. * </li>
  493. * <li> BAD_DATA_FORMAT "SavedSearch.query" - invalid length
  494. * </li>
  495. * <li> DATA_CONFLICT "SavedSearch.name" - name already in use
  496. * </li>
  497. * <li> PERMISSION_DENIED "SavedSearch" - user doesn't own tag
  498. * </li>
  499. * </ul>
  500. *
  501. * @throws EDAMNotFoundException <ul>
  502. * <li> "SavedSearch.guid" - not found, by GUID
  503. * </li>
  504. * </ul>
  505. */
  506. 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;
  507. /**
  508. * Permanently deletes the saved search with the provided GUID, if present.
  509. * <p/>
  510. * NOTE: This function is generally not available to third party applications.
  511. * Calls will result in an EDAMUserException with the error code
  512. * PERMISSION_DENIED.
  513. *
  514. * @param guid
  515. * The GUID of the search to delete.
  516. *
  517. * @return
  518. * The Update Sequence Number for this change within the account.
  519. *
  520. * @throws EDAMUserException <ul>
  521. * <li> BAD_DATA_FORMAT "SavedSearch.guid" - if the guid parameter is empty
  522. * </li>
  523. * <li> PERMISSION_DENIED "SavedSearch" - user doesn't own
  524. * </li>
  525. * </ul>
  526. *
  527. * @throws EDAMNotFoundException <ul>
  528. * <li> "SavedSearch.guid" - not found, by GUID
  529. * </li>
  530. * </ul>
  531. */
  532. public int expungeSearch(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  533. /**
  534. * DEPRECATED. Use findNotesMetadata.
  535. */
  536. 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;
  537. /**
  538. * Finds the position of a note within a sorted subset of all of the user's
  539. * notes. This may be useful for thin clients that are displaying a paginated
  540. * listing of a large account, which need to know where a particular note
  541. * sits in the list without retrieving all notes first.
  542. *
  543. * @param authenticationToken
  544. * Must be a valid token for the user's account unless the NoteFilter
  545. * 'notebookGuid' is the GUID of a public notebook.
  546. *
  547. * @param filter
  548. * The list of criteria that will constrain the notes to be returned.
  549. *
  550. * @param guid
  551. * The GUID of the note to be retrieved.
  552. *
  553. * @return
  554. * If the note with the provided GUID is found within the matching note
  555. * list, this will return the offset of that note within that list (where
  556. * the first offset is 0). If the note is not found within the set of
  557. * notes, this will return -1.
  558. *
  559. * @throws EDAMUserException <ul>
  560. * <li> BAD_DATA_FORMAT "offset" - not between 0 and EDAM_USER_NOTES_MAX
  561. * </li>
  562. * <li> BAD_DATA_FORMAT "maxNotes" - not between 0 and EDAM_USER_NOTES_MAX
  563. * </li>
  564. * <li> BAD_DATA_FORMAT "NoteFilter.notebookGuid" - if malformed
  565. * </li>
  566. * <li> BAD_DATA_FORMAT "NoteFilter.tagGuids" - if any are malformed
  567. * </li>
  568. * <li> BAD_DATA_FORMAT "NoteFilter.words" - if search string too long
  569. * </li>
  570. *
  571. * @throws EDAMNotFoundException <ul>
  572. * <li> "Notebook.guid" - not found, by GUID
  573. * </li>
  574. * <li> "Note.guid" - not found, by GUID
  575. * </li>
  576. * </ul>
  577. */
  578. 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;
  579. /**
  580. * Used to find the high-level information about a set of the notes from a
  581. * user's account based on various criteria specified via a NoteFilter object.
  582. * <p/>
  583. * Web applications that wish to periodically check for new content in a user's
  584. * Evernote account should consider using webhooks instead of polling this API.
  585. * See http://dev.evernote.com/documentation/cloud/chapters/polling_notification.php
  586. * for more information.
  587. *
  588. * @param authenticationToken
  589. * Must be a valid token for the user's account unless the NoteFilter
  590. * 'notebookGuid' is the GUID of a public notebook.
  591. *
  592. * @param filter
  593. * The list of criteria that will constrain the notes to be returned.
  594. *
  595. * @param offset
  596. * The numeric index of the first note to show within the sorted
  597. * results. The numbering scheme starts with "0". This can be used for
  598. * pagination.
  599. *
  600. * @param maxNotes
  601. * The mximum notes to return in this query. The service will return a set
  602. * of notes that is no larger than this number, but may return fewer notes
  603. * if needed. The NoteList.totalNotes field in the return value will
  604. * indicate whether there are more values available after the returned set.
  605. *
  606. * @param resultSpec
  607. * This specifies which information should be returned for each matching
  608. * Note. The fields on this structure can be used to eliminate data that
  609. * the client doesn't need, which will reduce the time and bandwidth
  610. * to receive and process the reply.
  611. *
  612. * @return
  613. * The list of notes that match the criteria.
  614. *
  615. * @throws EDAMUserException <ul>
  616. * <li> BAD_DATA_FORMAT "offset" - not between 0 and EDAM_USER_NOTES_MAX
  617. * </li>
  618. * <li> BAD_DATA_FORMAT "maxNotes" - not between 0 and EDAM_USER_NOTES_MAX
  619. * </li>
  620. * <li> BAD_DATA_FORMAT "NoteFilter.notebookGuid" - if malformed
  621. * </li>
  622. * <li> BAD_DATA_FORMAT "NoteFilter.tagGuids" - if any are malformed
  623. * </li>
  624. * <li> BAD_DATA_FORMAT "NoteFilter.words" - if search string too long
  625. * </li>
  626. * </ul>
  627. *
  628. * @throws EDAMNotFoundException <ul>
  629. * <li> "Notebook.guid" - not found, by GUID
  630. * </li>
  631. * </ul>
  632. */
  633. 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;
  634. /**
  635. * This function is used to determine how many notes are found for each
  636. * notebook and tag in the user's account, given a current set of filter
  637. * parameters that determine the current selection. This function will
  638. * return a structure that gives the note count for each notebook and tag
  639. * that has at least one note under the requested filter. Any notebook or
  640. * tag that has zero notes in the filtered set will not be listed in the
  641. * reply to this function (so they can be assumed to be 0).
  642. *
  643. * @param authenticationToken
  644. * Must be a valid token for the user's account unless the NoteFilter
  645. * 'notebookGuid' is the GUID of a public notebook.
  646. *
  647. * @param filter
  648. * The note selection filter that is currently being applied. The note
  649. * counts are to be calculated with this filter applied to the total set
  650. * of notes in the user's account.
  651. *
  652. * @param withTrash
  653. * If true, then the NoteCollectionCounts.trashCount will be calculated
  654. * and supplied in the reply. Otherwise, the trash value will be omitted.
  655. *
  656. * @throws EDAMUserException <ul>
  657. * <li> BAD_DATA_FORMAT "NoteFilter.notebookGuid" - if malformed
  658. * </li>
  659. * <li> BAD_DATA_FORMAT "NoteFilter.notebookGuids" - if any are malformed
  660. * </li>
  661. * <li> BAD_DATA_FORMAT "NoteFilter.words" - if search string too long
  662. * </li>
  663. *
  664. * @throws EDAMNotFoundException <ul>
  665. * <li> "Notebook.guid" - not found, by GUID
  666. * </li>
  667. * </ul>
  668. */
  669. 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;
  670. /**
  671. * Returns the current state of the note in the service with the provided
  672. * GUID. The ENML contents of the note will only be provided if the
  673. * 'withContent' parameter is true. The service will include the meta-data
  674. * for each resource in the note, but the binary contents of the resources
  675. * and their recognition data will be omitted.
  676. * If the Note is found in a public notebook, the authenticationToken
  677. * will be ignored (so it could be an empty string). The applicationData
  678. * fields are returned as keysOnly.
  679. *
  680. * @param guid
  681. * The GUID of the note to be retrieved.
  682. *
  683. * @param withContent
  684. * If true, the note will include the ENML contents of its
  685. * 'content' field.
  686. *
  687. * @param withResourcesData
  688. * If true, any Resource elements in this Note will include the binary
  689. * contents of their 'data' field's body.
  690. *
  691. * @param withResourcesRecognition
  692. * If true, any Resource elements will include the binary contents of the
  693. * 'recognition' field's body if recognition data is present.
  694. *
  695. * @param withResourcesAlternateData
  696. * If true, any Resource elements in this Note will include the binary
  697. * contents of their 'alternateData' fields' body, if an alternate form
  698. * is present.
  699. *
  700. * @throws EDAMUserException <ul>
  701. * <li> BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
  702. * </li>
  703. * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
  704. * </li>
  705. * </ul>
  706. *
  707. * @throws EDAMNotFoundException <ul>
  708. * <li> "Note.guid" - not found, by GUID
  709. * </li>
  710. * </ul>
  711. */
  712. 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;
  713. /**
  714. * Get all of the application data for the note identified by GUID,
  715. * with values returned within the LazyMap fullMap field.
  716. * If there are no applicationData entries, then a LazyMap
  717. * with an empty fullMap will be returned. If your application
  718. * only needs to fetch its own applicationData entry, use
  719. * getNoteApplicationDataEntry instead.
  720. */
  721. 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;
  722. /**
  723. * Get the value of a single entry in the applicationData map
  724. * for the note identified by GUID.
  725. *
  726. * @throws EDAMNotFoundException <ul>
  727. * <li> "Note.guid" - note not found, by GUID</li>
  728. * <li> "NoteAttributes.applicationData.key" - note not found, by key</li>
  729. * </ul>
  730. */
  731. 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;
  732. /**
  733. * Update, or create, an entry in the applicationData map for
  734. * the note identified by guid.
  735. */
  736. 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;
  737. /**
  738. * Remove an entry identified by 'key' from the applicationData map for
  739. * the note identified by 'guid'. Silently ignores an unset of a
  740. * non-existing key.
  741. */
  742. 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;
  743. /**
  744. * Returns XHTML contents of the note with the provided GUID.
  745. * If the Note is found in a public notebook, the authenticationToken
  746. * will be ignored (so it could be an empty string).
  747. *
  748. * @param guid
  749. * The GUID of the note to be retrieved.
  750. *
  751. * @throws EDAMUserException <ul>
  752. * <li> BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
  753. * </li>
  754. * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
  755. * </li>
  756. * </ul>
  757. *
  758. * @throws EDAMNotFoundException <ul>
  759. * <li> "Note.guid" - not found, by GUID
  760. * </li>
  761. * </ul>
  762. */
  763. public String getNoteContent(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  764. /**
  765. * Returns a block of the extracted plain text contents of the note with the
  766. * provided GUID. This text can be indexed for search purposes by a light
  767. * client that doesn't have capabilities to extract all of the searchable
  768. * text content from the note and its resources.
  769. *
  770. * If the Note is found in a public notebook, the authenticationToken
  771. * will be ignored (so it could be an empty string).
  772. *
  773. * @param guid
  774. * The GUID of the note to be retrieved.
  775. *
  776. * @param noteOnly
  777. * If true, this will only return the text extracted from the ENML contents
  778. * of the note itself. If false, this will also include the extracted text
  779. * from any text-bearing resources (PDF, recognized images)
  780. *
  781. * @param tokenizeForIndexing
  782. * If true, this will break the text into cleanly separated and sanitized
  783. * tokens. If false, this will return the more raw text extraction, with
  784. * its original punctuation, capitalization, spacing, etc.
  785. *
  786. * @throws EDAMUserException <ul>
  787. * <li> BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
  788. * </li>
  789. * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
  790. * </li>
  791. * </ul>
  792. *
  793. * @throws EDAMNotFoundException <ul>
  794. * <li> "Note.guid" - not found, by GUID
  795. * </li>
  796. * </ul>
  797. */
  798. 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;
  799. /**
  800. * Returns a block of the extracted plain text contents of the resource with
  801. * the provided GUID. This text can be indexed for search purposes by a light
  802. * client that doesn't have capability to extract all of the searchable
  803. * text content from a resource.
  804. *
  805. * If the Resource is found in a public notebook, the authenticationToken
  806. * will be ignored (so it could be an empty string).
  807. *
  808. * @param guid
  809. * The GUID of the resource to be retrieved.
  810. *
  811. * @throws EDAMUserException <ul>
  812. * <li> BAD_DATA_FORMAT "Resource.guid" - if the parameter is missing
  813. * </li>
  814. * <li> PERMISSION_DENIED "Resource" - private resource, user doesn't own
  815. * </li>
  816. * </ul>
  817. *
  818. * @throws EDAMNotFoundException <ul>
  819. * <li> "Resource.guid" - not found, by GUID
  820. * </li>
  821. * </ul>
  822. */
  823. public String getResourceSearchText(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  824. /**
  825. * Returns a list of the names of the tags for the note with the provided
  826. * guid. This can be used with authentication to get the tags for a
  827. * user's own note, or can be used without valid authentication to retrieve
  828. * the names of the tags for a note in a public notebook.
  829. *
  830. * @throws EDAMUserException <ul>
  831. * <li> BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
  832. * </li>
  833. * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
  834. * </li>
  835. * </ul>
  836. *
  837. * @throws EDAMNotFoundException <ul>
  838. * <li> "Note.guid" - not found, by GUID
  839. * </li>
  840. * </ul>
  841. */
  842. 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;
  843. /**
  844. * Asks the service to make a note with the provided set of information.
  845. *
  846. * @param note
  847. * A Note object containing the desired fields to be populated on
  848. * the service.
  849. *
  850. * @return
  851. * The newly created Note from the service. The server-side
  852. * GUIDs for the Note and any Resources will be saved in this object.
  853. *
  854. * @throws EDAMUserException <ul>
  855. * <li> BAD_DATA_FORMAT "Note.title" - invalid length or pattern
  856. * </li>
  857. * <li> BAD_DATA_FORMAT "Note.content" - invalid length for ENML content
  858. * </li>
  859. * <li> BAD_DATA_FORMAT "Resource.mime" - invalid resource MIME type
  860. * </li>
  861. * <li> BAD_DATA_FORMAT "NoteAttributes.*" - bad resource string
  862. * </li>
  863. * <li> BAD_DATA_FORMAT "ResourceAttributes.*" - bad resource string
  864. * </li>
  865. * <li> DATA_CONFLICT "Note.deleted" - deleted time set on active note
  866. * </li>
  867. * <li> DATA_REQUIRED "Resource.data" - resource data body missing
  868. * </li>
  869. * <li> ENML_VALIDATION "*" - note content doesn't validate against DTD
  870. * </li>
  871. * <li> LIMIT_REACHED "Note" - at max number per account
  872. * </li>
  873. * <li> LIMIT_REACHED "Note.size" - total note size too large
  874. * </li>
  875. * <li> LIMIT_REACHED "Note.resources" - too many resources on Note
  876. * </li>
  877. * <li> LIMIT_REACHED "Note.tagGuids" - too many Tags on Note
  878. * </li>
  879. * <li> LIMIT_REACHED "Resource.data.size" - resource too large
  880. * </li>
  881. * <li> LIMIT_REACHED "NoteAttribute.*" - attribute string too long
  882. * </li>
  883. * <li> LIMIT_REACHED "ResourceAttribute.*" - attribute string too long
  884. * </li>
  885. * <li> PERMISSION_DENIED "Note.notebookGuid" - NB not owned by user
  886. * </li>
  887. * <li> QUOTA_REACHED "Accounting.uploadLimit" - note exceeds upload quota
  888. * </li>
  889. * <li> BAD_DATA_FORMAT "Tag.name" - Note.tagNames was provided, and one
  890. * of the specified tags had an invalid length or pattern
  891. * </li>
  892. * <li> LIMIT_REACHED "Tag" - Note.tagNames was provided, and the required
  893. * new tags would exceed the maximum number per account
  894. * </li>
  895. * </ul>
  896. *
  897. * @throws EDAMNotFoundException <ul>
  898. * <li> "Note.notebookGuid" - not found, by GUID
  899. * </li>
  900. * </ul>
  901. */
  902. 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;
  903. /**
  904. * Submit a set of changes to a note to the service. The provided data
  905. * must include the note's guid field for identification. The note's
  906. * title must also be set.
  907. *
  908. * @param note
  909. * A Note object containing the desired fields to be populated on
  910. * the service. With the exception of the note's title and guid, fields
  911. * that are not being changed do not need to be set. If the content is not
  912. * being modified, note.content should be left unset. If the list of
  913. * resources is not being modified, note.resources should be left unset.
  914. *
  915. * @return
  916. * The metadata (no contents) for the Note on the server after the update
  917. *
  918. * @throws EDAMUserException <ul>
  919. * <li> BAD_DATA_FORMAT "Note.title" - invalid length or pattern
  920. * </li>
  921. * <li> BAD_DATA_FORMAT "Note.content" - invalid length for ENML body
  922. * </li>
  923. * <li> BAD_DATA_FORMAT "NoteAttributes.*" - bad resource string
  924. * </li>
  925. * <li> BAD_DATA_FORMAT "ResourceAttributes.*" - bad resource string
  926. * </li>
  927. * <li> BAD_DATA_FORMAT "Resource.mime" - invalid resource MIME type
  928. * </li>
  929. * <li> DATA_CONFLICT "Note.deleted" - deleted time set on active note
  930. * </li>
  931. * <li> DATA_REQUIRED "Resource.data" - resource data body missing
  932. * </li>
  933. * <li> ENML_VALIDATION "*" - note content doesn't validate against DTD
  934. * </li>
  935. * <li> LIMIT_REACHED "Note.tagGuids" - too many Tags on Note
  936. * </li>
  937. * <li> LIMIT_REACHED "Note.resources" - too many resources on Note
  938. * </li>
  939. * <li> LIMIT_REACHED "Note.size" - total note size too large
  940. * </li>
  941. * <li> LIMIT_REACHED "Resource.data.size" - resource too large
  942. * </li>
  943. * <li> LIMIT_REACHED "NoteAttribute.*" - attribute string too long
  944. * </li>
  945. * <li> LIMIT_REACHED "ResourceAttribute.*" - attribute string too long
  946. * </li>
  947. * <li> PERMISSION_DENIED "Note" - user doesn't own
  948. * </li>
  949. * <li> PERMISSION_DENIED "Note.notebookGuid" - user doesn't own destination
  950. * </li>
  951. * <li> QUOTA_REACHED "Accounting.uploadLimit" - note exceeds upload quota
  952. * </li>
  953. * <li> BAD_DATA_FORMAT "Tag.name" - Note.tagNames was provided, and one
  954. * of the specified tags had an invalid length or pattern
  955. * </li>
  956. * <li> LIMIT_REACHED "Tag" - Note.tagNames was provided, and the required
  957. * new tags would exceed the maximum number per account
  958. * </li>
  959. * </ul>
  960. *
  961. * @throws EDAMNotFoundException <ul>
  962. * <li> "Note.guid" - note not found, by GUID
  963. * </li>
  964. * <li> "Note.notebookGuid" - if notebookGuid provided, but not found
  965. * </li>
  966. * </ul>
  967. */
  968. 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;
  969. /**
  970. * Moves the note into the trash. The note may still be undeleted, unless it
  971. * is expunged. This is equivalent to calling updateNote() after setting
  972. * Note.active = false
  973. *
  974. * @param guid
  975. * The GUID of the note to delete.
  976. *
  977. * @return
  978. * The Update Sequence Number for this change within the account.
  979. *
  980. * @throws EDAMUserException <ul>
  981. * <li> PERMISSION_DENIED "Note" - user doesn't have permission to
  982. * update the note.
  983. * </li>
  984. * </ul>
  985. *
  986. * @throws EDAMUserException <ul>
  987. * <li> DATA_CONFLICT "Note.guid" - the note is already deleted
  988. * </li>
  989. * </ul>
  990. * @throws EDAMNotFoundException <ul>
  991. * <li> "Note.guid" - not found, by GUID
  992. * </li>
  993. * </ul>
  994. */
  995. public int deleteNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  996. /**
  997. * Permanently removes a Note, and all of its Resources,
  998. * from the service.
  999. * <p/>
  1000. * NOTE: This function is not available to third party applications.
  1001. * Calls will result in an EDAMUserException with the error code
  1002. * PERMISSION_DENIED.
  1003. *
  1004. * @param guid
  1005. * The GUID of the note to delete.
  1006. *
  1007. * @return
  1008. * The Update Sequence Number for this change within the account.
  1009. *
  1010. * @throws EDAMUserException <ul>
  1011. * <li> PERMISSION_DENIED "Note" - user doesn't own
  1012. * </li>
  1013. * </ul>
  1014. *
  1015. * @throws EDAMNotFoundException <ul>
  1016. * <li> "Note.guid" - not found, by GUID
  1017. * </li>
  1018. * </ul>
  1019. */
  1020. public int expungeNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1021. /**
  1022. * Permanently removes a list of Notes, and all of their Resources, from
  1023. * the service. This should be invoked with a small number of Note GUIDs
  1024. * (e.g. 100 or less) on each call. To expunge a larger number of notes,
  1025. * call this method multiple times. This should also be used to reduce the
  1026. * number of Notes in a notebook before calling expungeNotebook() or
  1027. * in the trash before calling expungeInactiveNotes(), since these calls may
  1028. * be prohibitively slow if there are more than a few hundred notes.
  1029. * If an exception is thrown for any of the GUIDs, then none of the notes
  1030. * will be deleted. I.e. this call can be treated as an atomic transaction.
  1031. * <p/>
  1032. * NOTE: This function is not available to third party applications.
  1033. * Calls will result in an EDAMUserException with the error code
  1034. * PERMISSION_DENIED.
  1035. *
  1036. * @param noteGuids
  1037. * The list of GUIDs for the Notes to remove.
  1038. *
  1039. * @return
  1040. * The account's updateCount at the end of this operation
  1041. *
  1042. * @throws EDAMUserException <ul>
  1043. * <li> PERMISSION_DENIED "Note" - user doesn't own
  1044. * </li>
  1045. * </ul>
  1046. *
  1047. * @throws EDAMNotFoundException <ul>
  1048. * <li> "Note.guid" - not found, by GUID
  1049. * </li>
  1050. * </ul>
  1051. */
  1052. 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;
  1053. /**
  1054. * Permanently removes all of the Notes that are currently marked as
  1055. * inactive. This is equivalent to "emptying the trash", and these Notes
  1056. * will be gone permanently.
  1057. * <p/>
  1058. * This operation may be relatively slow if the account contains a large
  1059. * number of inactive Notes.
  1060. * <p/>
  1061. * NOTE: This function is not available to third party applications.
  1062. * Calls will result in an EDAMUserException with the error code
  1063. * PERMISSION_DENIED.
  1064. *
  1065. * @return
  1066. * The number of notes that were expunged.
  1067. */
  1068. public int expungeInactiveNotes(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException;
  1069. /**
  1070. * Performs a deep copy of the Note with the provided GUID 'noteGuid' into
  1071. * the Notebook with the provided GUID 'toNotebookGuid'.
  1072. * The caller must be the owner of both the Note and the Notebook.
  1073. * This creates a new Note in the destination Notebook with new content and
  1074. * Resources that match all of the content and Resources from the original
  1075. * Note, but with new GUID identifiers.
  1076. * The original Note is not modified by this operation.
  1077. * The copied note is considered as an "upload" for the purpose of upload
  1078. * transfer limit calculation, so its size is added to the upload count for
  1079. * the owner.
  1080. *
  1081. * @param noteGuid
  1082. * The GUID of the Note to copy.
  1083. *
  1084. * @param toNotebookGuid
  1085. * The GUID of the Notebook that should receive the new Note.
  1086. *
  1087. * @return
  1088. * The metadata for the new Note that was created. This will include the
  1089. * new GUID for this Note (and any copied Resources), but will not include
  1090. * the content body or the binary bodies of any Resources.
  1091. *
  1092. * @throws EDAMUserException <ul>
  1093. * <li> LIMIT_REACHED "Note" - at max number per account
  1094. * </li>
  1095. * <li> PERMISSION_DENIED "Notebook.guid" - destination not owned by user
  1096. * </li>
  1097. * <li> PERMISSION_DENIED "Note" - user doesn't own
  1098. * </li>
  1099. * <li> QUOTA_REACHED "Accounting.uploadLimit" - note exceeds upload quota
  1100. * </li>
  1101. * </ul>
  1102. *
  1103. * @throws EDAMNotFoundException <ul>
  1104. * <li> "Notebook.guid" - not found, by GUID
  1105. * </li>
  1106. * </ul>
  1107. */
  1108. public com.evernote.edam.type.Note copyNote(String authenticationToken, String noteGuid, String toN