PageRenderTime 58ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/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
Possible License(s): BSD-3-Clause-No-Nuclear-License-2014
  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 toNotebookGuid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1109. /**
  1110. * Returns a list of the prior versions of a particular note that are
  1111. * saved within the service. These prior versions are stored to provide a
  1112. * recovery from unintentional removal of content from a note. The identifiers
  1113. * that are returned by this call can be used with getNoteVersion to retrieve
  1114. * the previous note.
  1115. * The identifiers will be listed from the most recent versions to the oldest.
  1116. *
  1117. * @throws EDAMUserException <ul>
  1118. * <li> BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
  1119. * </li>
  1120. * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
  1121. * </li>
  1122. * </ul>
  1123. *
  1124. * @throws EDAMNotFoundException <ul>
  1125. * <li> "Note.guid" - not found, by GUID
  1126. * </li>
  1127. * </ul>
  1128. */
  1129. public List<NoteVersionId> listNoteVersions(String authenticationToken, String noteGuid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1130. /**
  1131. * This can be used to retrieve a previous version of a Note after it has been
  1132. * updated within the service. The caller must identify the note (via its
  1133. * guid) and the version (via the updateSequenceNumber of that version).
  1134. * to find a listing of the stored version USNs for a note, call
  1135. * listNoteVersions.
  1136. * This call is only available for notes in Premium accounts. (I.e. access
  1137. * to past versions of Notes is a Premium-only feature.)
  1138. *
  1139. * @param noteGuid
  1140. * The GUID of the note to be retrieved.
  1141. *
  1142. * @param updateSequenceNum
  1143. * The USN of the version of the note that is being retrieved
  1144. *
  1145. * @param withResourcesData
  1146. * If true, any Resource elements in this Note will include the binary
  1147. * contents of their 'data' field's body.
  1148. *
  1149. * @param withResourcesRecognition
  1150. * If true, any Resource elements will include the binary contents of the
  1151. * 'recognition' field's body if recognition data is present.
  1152. *
  1153. * @param withResourcesAlternateData
  1154. * If true, any Resource elements in this Note will include the binary
  1155. * contents of their 'alternateData' fields' body, if an alternate form
  1156. * is present.
  1157. *
  1158. * @throws EDAMUserException <ul>
  1159. * <li> BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
  1160. * </li>
  1161. * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
  1162. * </li>
  1163. * <li> PERMISSION_DENIED "updateSequenceNum" -
  1164. * The account isn't permitted to access previous versions of notes.
  1165. * (i.e. this is a Free account.)
  1166. * </li>
  1167. * </ul>
  1168. *
  1169. * @throws EDAMNotFoundException <ul>
  1170. * <li> "Note.guid" - not found, by GUID
  1171. * </li>
  1172. * <li> "Note.updateSequenceNumber" - the Note doesn't have a version with
  1173. * the corresponding USN.
  1174. * </li>
  1175. * </ul>
  1176. */
  1177. public com.evernote.edam.type.Note getNoteVersion(String authenticationToken, String noteGuid, int updateSequenceNum, boolean withResourcesData, boolean withResourcesRecognition, boolean withResourcesAlternateData) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1178. /**
  1179. * Returns the current state of the resource in the service with the
  1180. * provided GUID.
  1181. * If the Resource is found in a public notebook, the authenticationToken
  1182. * will be ignored (so it could be an empty string). Only the
  1183. * keys for the applicationData will be returned.
  1184. *
  1185. * @param guid
  1186. * The GUID of the resource to be retrieved.
  1187. *
  1188. * @param withData
  1189. * If true, the Resource will include the binary contents of the
  1190. * 'data' field's body.
  1191. *
  1192. * @param withRecognition
  1193. * If true, the Resource will include the binary contents of the
  1194. * 'recognition' field's body if recognition data is present.
  1195. *
  1196. * @param withAttributes
  1197. * If true, the Resource will include the attributes
  1198. *
  1199. * @param withAlternateData
  1200. * If true, the Resource will include the binary contents of the
  1201. * 'alternateData' field's body, if an alternate form is present.
  1202. *
  1203. * @throws EDAMUserException <ul>
  1204. * <li> BAD_DATA_FORMAT "Resource.guid" - if the parameter is missing
  1205. * </li>
  1206. * <li> PERMISSION_DENIED "Resource" - private resource, user doesn't own
  1207. * </li>
  1208. * </ul>
  1209. *
  1210. * @throws EDAMNotFoundException <ul>
  1211. * <li> "Resource.guid" - not found, by GUID
  1212. * </li>
  1213. * </ul>
  1214. */
  1215. public com.evernote.edam.type.Resource getResource(String authenticationToken, String guid, boolean withData, boolean withRecognition, boolean withAttributes, boolean withAlternateData) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1216. /**
  1217. * Get all of the application data for the Resource identified by GUID,
  1218. * with values returned within the LazyMap fullMap field.
  1219. * If there are no applicationData entries, then a LazyMap
  1220. * with an empty fullMap will be returned. If your application
  1221. * only needs to fetch its own applicationData entry, use
  1222. * getResourceApplicationDataEntry instead.
  1223. */
  1224. public com.evernote.edam.type.LazyMap getResourceApplicationData(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1225. /**
  1226. * Get the value of a single entry in the applicationData map
  1227. * for the Resource identified by GUID.
  1228. *
  1229. * @throws EDAMNotFoundException <ul>
  1230. * <li> "Resource.guid" - Resource not found, by GUID</li>
  1231. * <li> "ResourceAttributes.applicationData.key" - Resource not found, by key</li>
  1232. * </ul>
  1233. */
  1234. public String getResourceApplicationDataEntry(String authenticationToken, String guid, String key) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1235. /**
  1236. * Update, or create, an entry in the applicationData map for
  1237. * the Resource identified by guid.
  1238. */
  1239. public int setResourceApplicationDataEntry(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;
  1240. /**
  1241. * Remove an entry identified by 'key' from the applicationData map for
  1242. * the Resource identified by 'guid'.
  1243. */
  1244. public int unsetResourceApplicationDataEntry(String authenticationToken, String guid, String key) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1245. /**
  1246. * Submit a set of changes to a resource to the service. This can be used
  1247. * to update the meta-data about the resource, but cannot be used to change
  1248. * the binary contents of the resource (including the length and hash). These
  1249. * cannot be changed directly without creating a new resource and removing the
  1250. * old one via updateNote.
  1251. *
  1252. * @param resource
  1253. * A Resource object containing the desired fields to be populated on
  1254. * the service. The service will attempt to update the resource with the
  1255. * following fields from the client:
  1256. * <ul>
  1257. * <li>guid: must be provided to identify the resource
  1258. * </li>
  1259. * <li>mime
  1260. * </li>
  1261. * <li>width
  1262. * </li>
  1263. * <li>height
  1264. * </li>
  1265. * <li>duration
  1266. * </li>
  1267. * <li>attributes: optional. if present, the set of attributes will
  1268. * be replaced.
  1269. * </li>
  1270. * </ul>
  1271. *
  1272. * @return
  1273. * The Update Sequence Number of the resource after the changes have been
  1274. * applied.
  1275. *
  1276. * @throws EDAMUserException <ul>
  1277. * <li> BAD_DATA_FORMAT "Resource.guid" - if the parameter is missing
  1278. * </li>
  1279. * <li> BAD_DATA_FORMAT "Resource.mime" - invalid resource MIME type
  1280. * </li>
  1281. * <li> BAD_DATA_FORMAT "ResourceAttributes.*" - bad resource string
  1282. * </li>
  1283. * <li> LIMIT_REACHED "ResourceAttribute.*" - attribute string too long
  1284. * </li>
  1285. * <li> PERMISSION_DENIED "Resource" - private resource, user doesn't own
  1286. * </li>
  1287. * </ul>
  1288. *
  1289. * @throws EDAMNotFoundException <ul>
  1290. * <li> "Resource.guid" - not found, by GUID
  1291. * </li>
  1292. * </ul>
  1293. */
  1294. public int updateResource(String authenticationToken, com.evernote.edam.type.Resource resource) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1295. /**
  1296. * Returns binary data of the resource with the provided GUID. For
  1297. * example, if this were an image resource, this would contain the
  1298. * raw bits of the image.
  1299. * If the Resource is found in a public notebook, the authenticationToken
  1300. * will be ignored (so it could be an empty string).
  1301. *
  1302. * @param guid
  1303. * The GUID of the resource to be retrieved.
  1304. *
  1305. * @throws EDAMUserException <ul>
  1306. * <li> BAD_DATA_FORMAT "Resource.guid" - if the parameter is missing
  1307. * </li>
  1308. * <li> PERMISSION_DENIED "Resource" - private resource, user doesn't own
  1309. * </li>
  1310. * </ul>
  1311. *
  1312. * @throws EDAMNotFoundException <ul>
  1313. * <li> "Resource.guid" - not found, by GUID
  1314. * </li>
  1315. * </ul>
  1316. */
  1317. public byte[] getResourceData(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1318. /**
  1319. * Returns the current state of a resource, referenced by containing
  1320. * note GUID and resource content hash.
  1321. *
  1322. * @param noteGuid
  1323. * The GUID of the note that holds the resource to be retrieved.
  1324. *
  1325. * @param contentHash
  1326. * The MD5 checksum of the resource within that note. Note that
  1327. * this is the binary checksum, for example from Resource.data.bodyHash,
  1328. * and not the hex-encoded checksum that is used within an en-media
  1329. * tag in a note body.
  1330. *
  1331. * @param withData
  1332. * If true, the Resource will include the binary contents of the
  1333. * 'data' field's body.
  1334. *
  1335. * @param withRecognition
  1336. * If true, the Resource will include the binary contents of the
  1337. * 'recognition' field's body.
  1338. *
  1339. * @param withAlternateData
  1340. * If true, the Resource will include the binary contents of the
  1341. * 'alternateData' field's body, if an alternate form is present.
  1342. *
  1343. * @throws EDAMUserException <ul>
  1344. * <li> DATA_REQUIRED "Note.guid" - noteGuid param missing
  1345. * </li>
  1346. * <li> DATA_REQUIRED "Note.contentHash" - contentHash param missing
  1347. * </li>
  1348. * <li> PERMISSION_DENIED "Resource" - private resource, user doesn't own
  1349. * </li>
  1350. * </ul>
  1351. *
  1352. * @throws EDAMNotFoundException <ul>
  1353. * <li> "Note" - not found, by guid
  1354. * </li>
  1355. * <li> "Resource" - not found, by hash
  1356. * </li>
  1357. * </ul>
  1358. */
  1359. public com.evernote.edam.type.Resource getResourceByHash(String authenticationToken, String noteGuid, byte[] contentHash, boolean withData, boolean withRecognition, boolean withAlternateData) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1360. /**
  1361. * Returns the binary contents of the recognition index for the resource
  1362. * with the provided GUID. If the caller asks about a resource that has
  1363. * no recognition data, this will throw EDAMNotFoundException.
  1364. * If the Resource is found in a public notebook, the authenticationToken
  1365. * will be ignored (so it could be an empty string).
  1366. *
  1367. * @param guid
  1368. * The GUID of the resource whose recognition data should be retrieved.
  1369. *
  1370. * @throws EDAMUserException <ul>
  1371. * <li> BAD_DATA_FORMAT "Resource.guid" - if the parameter is missing
  1372. * </li>
  1373. * <li> PERMISSION_DENIED "Resource" - private resource, user doesn't own
  1374. * </li>
  1375. * </ul>
  1376. *
  1377. * @throws EDAMNotFoundException <ul>
  1378. * <li> "Resource.guid" - not found, by GUID
  1379. * </li>
  1380. * <li> "Resource.recognition" - resource has no recognition
  1381. * </li>
  1382. * </ul>
  1383. */
  1384. public byte[] getResourceRecognition(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1385. /**
  1386. * If the Resource with the provided GUID has an alternate data representation
  1387. * (indicated via the Resource.alternateData field), then this request can
  1388. * be used to retrieve the binary contents of that alternate data file.
  1389. * If the caller asks about a resource that has no alternate data form, this
  1390. * will throw EDAMNotFoundException.
  1391. *
  1392. * @param guid
  1393. * The GUID of the resource whose recognition data should be retrieved.
  1394. *
  1395. * @throws EDAMUserException <ul>
  1396. * <li> BAD_DATA_FORMAT "Resource.guid" - if the parameter is missing
  1397. * </li>
  1398. * <li> PERMISSION_DENIED "Resource" - private resource, user doesn't own
  1399. * </li>
  1400. * </ul>
  1401. *
  1402. * @throws EDAMNotFoundException <ul>
  1403. * <li> "Resource.guid" - not found, by GUID
  1404. * </li>
  1405. * <li> "Resource.alternateData" - resource has no recognition
  1406. * </li>
  1407. * </ul>
  1408. */
  1409. public byte[] getResourceAlternateData(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1410. /**
  1411. * Returns the set of attributes for the Resource with the provided GUID.
  1412. * If the Resource is found in a public notebook, the authenticationToken
  1413. * will be ignored (so it could be an empty string).
  1414. *
  1415. * @param guid
  1416. * The GUID of the resource whose attributes should be retrieved.
  1417. *
  1418. * @throws EDAMUserException <ul>
  1419. * <li> BAD_DATA_FORMAT "Resource.guid" - if the parameter is missing
  1420. * </li>
  1421. * <li> PERMISSION_DENIED "Resource" - private resource, user doesn't own
  1422. * </li>
  1423. * </ul>
  1424. *
  1425. * @throws EDAMNotFoundException <ul>
  1426. * <li> "Resource.guid" - not found, by GUID
  1427. * </li>
  1428. * </ul>
  1429. */
  1430. public com.evernote.edam.type.ResourceAttributes getResourceAttributes(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1431. /**
  1432. * <p>
  1433. * Looks for a user account with the provided userId on this NoteStore
  1434. * shard and determines whether that account contains a public notebook
  1435. * with the given URI. If the account is not found, or no public notebook
  1436. * exists with this URI, this will throw an EDAMNotFoundException,
  1437. * otherwise this will return the information for that Notebook.
  1438. * </p>
  1439. * <p>
  1440. * If a notebook is visible on the web with a full URL like
  1441. * http://www.evernote.com/pub/sethdemo/api
  1442. * Then 'sethdemo' is the username that can be used to look up the userId,
  1443. * and 'api' is the publicUri.
  1444. * </p>
  1445. *
  1446. * @param userId
  1447. * The numeric identifier for the user who owns the public notebook.
  1448. * To find this value based on a username string, you can invoke
  1449. * UserStore.getPublicUserInfo
  1450. *
  1451. * @param publicUri
  1452. * The uri string for the public notebook, from Notebook.publishing.uri.
  1453. *
  1454. * @throws EDAMNotFoundException <ul>
  1455. * <li>"Publishing.uri" - not found, by URI</li>
  1456. * </ul>
  1457. *
  1458. * @throws EDAMSystemException <ul>
  1459. * <li> TAKEN_DOWN "PublicNotebook" - The specified public notebook is
  1460. * taken down (for all requesters).</li>
  1461. * <li> TAKEN_DOWN "Country" - The specified public notebook is taken
  1462. * down for the requester because of an IP-based country lookup.</li>
  1463. * </ul>
  1464. */
  1465. public com.evernote.edam.type.Notebook getPublicNotebook(int userId, String publicUri) throws com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1466. /**
  1467. * Used to construct a shared notebook object. The constructed notebook will
  1468. * contain a "share key" which serve as a unique identifer and access token
  1469. * for a user to access the notebook of the shared notebook owner.
  1470. *
  1471. * @param sharedNotebook
  1472. * A shared notebook object populated with the email address of the share
  1473. * recipient, the notebook guid and the access permissions. All other
  1474. * attributes of the shared object are ignored. The SharedNotebook.allowPreview
  1475. * field must be explicitly set with either a true or false value.
  1476. *
  1477. * @return
  1478. * The fully populated SharedNotebook object including the server assigned
  1479. * share id and shareKey which can both be used to uniquely identify the
  1480. * SharedNotebook.
  1481. *
  1482. * @throws EDAMUserException <ul>
  1483. * <li>BAD_DATA_FORMAT "SharedNotebook.email" - if the email was not valid</li>
  1484. * <li>BAD_DATA_FORMAT "requireLogin" - if the SharedNotebook.allowPreview field was
  1485. * not set, and the SharedNotebook.requireLogin was also not set or was set to
  1486. * false.</li>
  1487. * <li>PERMISSION_DENIED "SharedNotebook.recipientSettings" - if
  1488. * recipientSettings is set in the sharedNotebook. Only the recipient
  1489. * can set these values via the setSharedNotebookRecipientSettings
  1490. * method.
  1491. * </li>
  1492. * </ul>
  1493. * @throws EDAMNotFoundException <ul>
  1494. * <li>Notebook.guid - if the notebookGuid is not a valid GUID for the user.
  1495. * </li>
  1496. * </ul>
  1497. */
  1498. public com.evernote.edam.type.SharedNotebook createSharedNotebook(String authenticationToken, com.evernote.edam.type.SharedNotebook sharedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1499. /**
  1500. * Update a SharedNotebook object.
  1501. *
  1502. * @param authenticationToken
  1503. * Must be an authentication token from the owner or a shared notebook
  1504. * authentication token or business authentication token with sufficient
  1505. * permissions to change invitations for a notebook.
  1506. *
  1507. * @param sharedNotebook
  1508. * The SharedNotebook object containing the requested changes.
  1509. * The "id" of the shared notebook must be set to allow the service
  1510. * to identify the SharedNotebook to be updated. In addition, you MUST set
  1511. * the email, permission, and allowPreview fields to the desired values.
  1512. * All other fields will be ignored if set.
  1513. *
  1514. * @return
  1515. * The Update Serial Number for this change within the account.
  1516. *
  1517. * @throws EDAMUserException <ul>
  1518. * <li>UNSUPPORTED_OPERATION "updateSharedNotebook" - if this service instance does not support shared notebooks.</li>
  1519. * <li>BAD_DATA_FORMAT "SharedNotebook.email" - if the email was not valid.</li>
  1520. * <li>DATA_REQUIRED "SharedNotebook.id" - if the id field was not set.</li>
  1521. * <li>DATA_REQUIRED "SharedNotebook.privilege" - if the privilege field was not set.</li>
  1522. * <li>DATA_REQUIRED "SharedNotebook.allowPreview" - if the allowPreview field was not set.</li>
  1523. * </ul>
  1524. * @throws EDAMNotFoundException <ul>
  1525. * <li>SharedNotebook.id - if no shared notebook with the specified ID was found.
  1526. * </ul>
  1527. */
  1528. public int updateSharedNotebook(String authenticationToken, com.evernote.edam.type.SharedNotebook sharedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1529. /**
  1530. * Set values for the recipient settings associated with a shared notebook. Having
  1531. * update rights to the shared notebook record itself has no effect on this call;
  1532. * only the recipient of the shared notebook can can the recipient settings.
  1533. *
  1534. * If you do <i>not</i> wish to, or cannot, change one of the reminderNotifyEmail or
  1535. * reminderNotifyInApp fields, you must leave that field unset in recipientSettings.
  1536. * This method will skip that field for updates and leave the existing state as
  1537. * it is.
  1538. *
  1539. * @return The update sequence number of the account to which the shared notebook
  1540. * belongs, which is the account from which we are sharing a notebook.
  1541. *
  1542. * @throws EDAMNotFoundException "sharedNotebookId" - Thrown if the service does not
  1543. * have a shared notebook record for the sharedNotebookId on the given shard. If you
  1544. * receive this exception, it is probable that the shared notebook record has
  1545. * been revoked or expired, or that you accessed the wrong shard.
  1546. *
  1547. * @throws EDAMUserException <ul>
  1548. * <li>PEMISSION_DENIED "authenticationToken" - If you do not have permission to set
  1549. * the recipient settings for the shared notebook. Only the recipient has
  1550. * permission to do this.
  1551. * <li>DATA_CONFLICT "recipientSettings.reminderNotifyEmail" - Setting whether
  1552. * or not you want to receive reminder e-mail notifications is possible on
  1553. * a business notebook in the business to which the user belongs. All
  1554. * others can safely unset the reminderNotifyEmail field from the
  1555. * recipientSettings parameter.
  1556. * </ul>
  1557. */
  1558. public int setSharedNotebookRecipientSettings(String authenticationToken, long sharedNotebookId, com.evernote.edam.type.SharedNotebookRecipientSettings recipientSettings) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1559. /**
  1560. * Send a reminder message to some or all of the email addresses that a notebook has been
  1561. * shared with. The message includes the current link to view the notebook.
  1562. * @param authenticationToken
  1563. * The auth token of the user with permissions to share the notebook
  1564. * @param notebookGuid
  1565. * The guid of the shared notebook
  1566. * @param messageText
  1567. * User provided text to include in the email
  1568. * @param recipients
  1569. * The email addresses of the recipients. If this list is empty then all of the
  1570. * users that the notebook has been shared with are emailed.
  1571. * If an email address doesn't correspond to share invite members then that address
  1572. * is ignored.
  1573. * @return
  1574. * The number of messages sent
  1575. * @throws EDAMUserException <ul>
  1576. * <li> LIMIT_REACHED "(recipients)" -
  1577. * The email can't be sent because this would exceed the user's daily
  1578. * email limit.
  1579. * </li>
  1580. * <li> PERMISSION_DENIED "Notebook.guid" - The user doesn't have permission to
  1581. * send a message for the specified notebook.
  1582. * </li>
  1583. * </ul>
  1584. *
  1585. * @throws EDAMNotFoundException <ul>
  1586. * <li> "Notebook.guid" - not found, by GUID
  1587. * </li>
  1588. * </ul>
  1589. */
  1590. public int sendMessageToSharedNotebookMembers(String authenticationToken, String notebookGuid, String messageText, List<String> recipients) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1591. /**
  1592. * Lists the collection of shared notebooks for all notebooks in the
  1593. * users account.
  1594. *
  1595. * @return
  1596. * The list of all SharedNotebooks for the user
  1597. */
  1598. public List<com.evernote.edam.type.SharedNotebook> listSharedNotebooks(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1599. /**
  1600. * Expunges the SharedNotebooks in the user's account using the
  1601. * SharedNotebook.id as the identifier.
  1602. * <p/>
  1603. * NOTE: This function is generally not available to third party applications.
  1604. * Calls will result in an EDAMUserException with the error code
  1605. * PERMISSION_DENIED.
  1606. *
  1607. * @param
  1608. * sharedNotebookIds - a list of ShardNotebook.id longs identifying the
  1609. * objects to delete permanently.
  1610. *
  1611. * @return
  1612. * The account's update sequence number.
  1613. */
  1614. public int expungeSharedNotebooks(String authenticationToken, List<Long> sharedNotebookIds) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1615. /**
  1616. * Asks the service to make a linked notebook with the provided name, username
  1617. * of the owner and identifiers provided. A linked notebook can be either a
  1618. * link to a public notebook or to a private shared notebook.
  1619. *
  1620. * @param linkedNotebook
  1621. * The desired fields for the linked notebook must be provided on this
  1622. * object. The name of the linked notebook must be set. Either a username
  1623. * uri or a shard id and share key must be provided otherwise a
  1624. * EDAMUserException is thrown.
  1625. *
  1626. * @return
  1627. * The newly created LinkedNotebook. The server-side id will be
  1628. * saved in this object's 'id' field.
  1629. *
  1630. * @throws EDAMUserException <ul>
  1631. * <li> BAD_DATA_FORMAT "LinkedNotebook.name" - invalid length or pattern
  1632. * </li>
  1633. * <li> BAD_DATA_FORMAT "LinkedNotebook.username" - bad username format
  1634. * </li>
  1635. * <li> BAD_DATA_FORMAT "LinkedNotebook.uri" -
  1636. * if public notebook set but bad uri
  1637. * </li>
  1638. * <li> BAD_DATA_FORMAT "LinkedNotebook.shareKey" -
  1639. * if private notebook set but bad shareKey
  1640. * </li>
  1641. * <li> DATA_REQUIRED "LinkedNotebook.shardId" -
  1642. * if private notebook but shard id not provided
  1643. * </li>
  1644. * </ul>
  1645. */
  1646. public com.evernote.edam.type.LinkedNotebook createLinkedNotebook(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1647. /**
  1648. * @param linkedNotebook
  1649. * Updates the name of a linked notebook.
  1650. *
  1651. * @return
  1652. * The Update Sequence Number for this change within the account.
  1653. *
  1654. * @throws EDAMUserException <ul>
  1655. * <li> BAD_DATA_FORMAT "LinkedNotebook.name" - invalid length or pattern
  1656. * </li>
  1657. * </ul>
  1658. */
  1659. public int updateLinkedNotebook(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1660. /**
  1661. * Returns a list of linked notebooks
  1662. */
  1663. public List<com.evernote.edam.type.LinkedNotebook> listLinkedNotebooks(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1664. /**
  1665. * Permanently expunges the linked notebook from the account.
  1666. * <p/>
  1667. * NOTE: This function is generally not available to third party applications.
  1668. * Calls will result in an EDAMUserException with the error code
  1669. * PERMISSION_DENIED.
  1670. *
  1671. * @param guid
  1672. * The LinkedNotebook.guid field of the LinkedNotebook to permanently remove
  1673. * from the account.
  1674. */
  1675. public int expungeLinkedNotebook(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1676. /**
  1677. * Asks the service to produce an authentication token that can be used to
  1678. * access the contents of a shared notebook from someone else's account.
  1679. * This authenticationToken can be used with the various other NoteStore
  1680. * calls to find and retrieve notes, and if the permissions in the shared
  1681. * notebook are sufficient, to make changes to the contents of the notebook.
  1682. *
  1683. * @param shareKey
  1684. * The 'shareKey' identifier from the SharedNotebook that was granted to
  1685. * some recipient. This string internally encodes the notebook identifier
  1686. * and a security signature.
  1687. *
  1688. * @param authenticationToken
  1689. * If a non-empty string is provided, this is the full user-based
  1690. * authentication token that identifies the user who is currently logged in
  1691. * and trying to access the shared notebook. This may be required if the
  1692. * notebook was created with 'requireLogin'.
  1693. * If this string is empty, the service will attempt to authenticate to the
  1694. * shared notebook without any logged in user.
  1695. *
  1696. * @throws EDAMSystemException <ul>
  1697. * <li> BAD_DATA_FORMAT "shareKey" - invalid shareKey string
  1698. * </li>
  1699. * <li> INVALID_AUTH "shareKey" - bad signature on shareKey string
  1700. * </li>
  1701. * </ul>
  1702. *
  1703. * @throws EDAMNotFoundException <ul>
  1704. * <li> "SharedNotebook.id" - the shared notebook no longer exists
  1705. * </li>
  1706. * </ul>
  1707. *
  1708. * @throws EDAMUserException <ul>
  1709. * <li> DATA_REQUIRED "authenticationToken" - the share requires login, and
  1710. * no valid authentication token was provided.
  1711. * </li>
  1712. * <li> PERMISSION_DENIED "SharedNotebook.username" - share requires login,
  1713. * and another username has already been bound to this notebook.
  1714. * </li>
  1715. * </ul>
  1716. */
  1717. public com.evernote.edam.userstore.AuthenticationResult authenticateToSharedNotebook(String shareKey, String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1718. /**
  1719. * This function is used to retrieve extended information about a shared
  1720. * notebook by a guest who has already authenticated to access that notebook.
  1721. * This requires an 'authenticationToken' parameter which should be the
  1722. * resut of a call to authenticateToSharedNotebook(...).
  1723. * I.e. this is the token that gives access to the particular shared notebook
  1724. * in someone else's account -- it's not the authenticationToken for the
  1725. * owner of the notebook itself.
  1726. *
  1727. * @param authenticationToken
  1728. * Should be the authentication token retrieved from the reply of
  1729. * authenticateToSharedNotebook(), proving access to a particular shared
  1730. * notebook.
  1731. *
  1732. * @throws EDAMUserException <ul>
  1733. * <li> PERMISSION_DENIED "authenticationToken" -
  1734. * authentication token doesn't correspond to a valid shared notebook
  1735. * </li>
  1736. * </ul>
  1737. *
  1738. * @throws EDAMNotFoundException <ul>
  1739. * <li> "SharedNotebook.id" - the shared notebook no longer exists
  1740. * </li>
  1741. * </ul>
  1742. */
  1743. public com.evernote.edam.type.SharedNotebook getSharedNotebookByAuth(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1744. /**
  1745. * Attempts to send a single note to one or more email recipients.
  1746. * <p/>
  1747. * NOTE: This function is generally not available to third party applications.
  1748. * Calls will result in an EDAMUserException with the error code
  1749. * PERMISSION_DENIED.
  1750. *
  1751. * @param authenticationToken
  1752. * The note will be sent as the user logged in via this token, using that
  1753. * user's registered email address. If the authenticated user doesn't
  1754. * have permission to read that note, the emailing will fail.
  1755. *
  1756. * @param parameters
  1757. * The note must be specified either by GUID (in which case it will be
  1758. * sent using the existing data in the service), or else the full Note
  1759. * must be passed to this call. This also specifies the additional
  1760. * email fields that will be used in the email.
  1761. *
  1762. * @throws EDAMUserException <ul>
  1763. * <li> LIMIT_REACHED "NoteEmailParameters.toAddresses" -
  1764. * The email can't be sent because this would exceed the user's daily
  1765. * email limit.
  1766. * </li>
  1767. * <li> BAD_DATA_FORMAT "(email address)" -
  1768. * email address malformed
  1769. * </li>
  1770. * <li> DATA_REQUIRED "NoteEmailParameters.toAddresses" -
  1771. * if there are no To: or Cc: addresses provided.
  1772. * </li>
  1773. * <li> DATA_REQUIRED "Note.title" -
  1774. * if the caller provides a Note parameter with no title
  1775. * </li>
  1776. * <li> DATA_REQUIRED "Note.content" -
  1777. * if the caller provides a Note parameter with no content
  1778. * </li>
  1779. * <li> ENML_VALIDATION "*" - note content doesn't validate against DTD
  1780. * </li>
  1781. * <li> DATA_REQUIRED "NoteEmailParameters.note" -
  1782. * if no guid or note provided
  1783. * </li>
  1784. * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
  1785. * </li>
  1786. * </ul>
  1787. *
  1788. * @throws EDAMNotFoundException <ul>
  1789. * <li> "Note.guid" - not found, by GUID
  1790. * </li>
  1791. * </ul>
  1792. */
  1793. public void emailNote(String authenticationToken, NoteEmailParameters parameters) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1794. /**
  1795. * If this note is not already shared (via its own direct URL), then this
  1796. * will start sharing that note.
  1797. * This will return the secret "Note Key" for this note that
  1798. * can currently be used in conjunction with the Note's GUID to gain direct
  1799. * read-only access to the Note.
  1800. * If the note is already shared, then this won't make any changes to the
  1801. * note, and the existing "Note Key" will be returned. The only way to change
  1802. * the Note Key for an existing note is to stopSharingNote first, and then
  1803. * call this function.
  1804. *
  1805. * @param guid
  1806. * The GUID of the note to be shared.
  1807. *
  1808. * @throws EDAMUserException <ul>
  1809. * <li> BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
  1810. * </li>
  1811. * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
  1812. * </li>
  1813. * </ul>
  1814. *
  1815. * @throws EDAMNotFoundException <ul>
  1816. * <li> "Note.guid" - not found, by GUID
  1817. * </li>
  1818. * </ul>
  1819. */
  1820. public String shareNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1821. /**
  1822. * If this note is not already shared then this will stop sharing that note
  1823. * and invalidate its "Note Key", so any existing URLs to access that Note
  1824. * will stop working.
  1825. * If the Note is not shared, then this function will do nothing.
  1826. *
  1827. * @param guid
  1828. * The GUID of the note to be un-shared.
  1829. *
  1830. * @throws EDAMUserException <ul>
  1831. * <li> BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
  1832. * </li>
  1833. * <li> PERMISSION_DENIED "Note" - private note, user doesn't own
  1834. * </li>
  1835. * </ul>
  1836. *
  1837. * @throws EDAMNotFoundException <ul>
  1838. * <li> "Note.guid" - not found, by GUID
  1839. * </li>
  1840. * </ul>
  1841. */
  1842. public void stopSharingNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1843. /**
  1844. * Asks the service to produce an authentication token that can be used to
  1845. * access the contents of a single Note which was individually shared
  1846. * from someone's account.
  1847. * This authenticationToken can be used with the various other NoteStore
  1848. * calls to find and retrieve the Note and its directly-referenced children.
  1849. *
  1850. * @param guid
  1851. * The GUID identifying this Note on this shard.
  1852. *
  1853. * @param noteKey
  1854. * The 'noteKey' identifier from the Note that was originally created via
  1855. * a call to shareNote() and then given to a recipient to access.
  1856. *
  1857. * @param authenticationToken
  1858. * An optional authenticationToken that identifies the user accessing the
  1859. * shared note. This parameter may be required to access some shared notes.
  1860. *
  1861. * @throws EDAMUserException <ul>
  1862. * <li> PERMISSION_DENIED "Note" - the Note with that GUID is either not
  1863. * shared, or the noteKey doesn't match the current key for this note
  1864. * </li>
  1865. * <li> PERMISSION_DENIED "authenticationToken" - an authentication token is
  1866. * required to access this Note, but either no authentication token or a
  1867. * "non-owner" authentication token was provided.
  1868. * </li>
  1869. * </ul>
  1870. *
  1871. * @throws EDAMNotFoundException <ul>
  1872. * <li> "guid" - the note with that GUID is not found
  1873. * </li>
  1874. * </ul>
  1875. *
  1876. * @throws EDAMSystemException <ul>
  1877. * <li> TAKEN_DOWN "Note" - The specified shared note is taken down (for
  1878. * all requesters).
  1879. * </li>
  1880. * <li> TAKEN_DOWN "Country" - The specified shared note is taken down
  1881. * for the requester because of an IP-based country lookup.
  1882. * </ul>
  1883. * </ul>
  1884. */
  1885. public com.evernote.edam.userstore.AuthenticationResult authenticateToSharedNote(String guid, String noteKey, String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException;
  1886. /**
  1887. * Identify related entities on the service, such as notes,
  1888. * notebooks, and tags related to notes or content.
  1889. *
  1890. * @param query
  1891. * The information about which we are finding related entities.
  1892. *
  1893. * @param resultSpec
  1894. * Allows the client to indicate the type and quantity of
  1895. * information to be returned, allowing a saving of time and
  1896. * bandwidth.
  1897. *
  1898. * @return
  1899. * The result of the query, with information considered
  1900. * to likely be relevantly related to the information
  1901. * described by the query.
  1902. *
  1903. * @throws EDAMUserException <ul>
  1904. * <li>BAD_DATA_FORMAT "RelatedQuery.plainText" - If you provided a
  1905. * a zero-length plain text value.
  1906. * </li>
  1907. * <li>BAD_DATA_FORMAT "RelatedQuery.noteGuid" - If you provided an
  1908. * invalid Note GUID, that is, one that does not match the constraints
  1909. * defined by EDAM_GUID_LEN_MIN, EDAM_GUID_LEN_MAX, EDAM_GUID_REGEX.
  1910. * </li>
  1911. * <li> BAD_DATA_FORMAT "NoteFilter.notebookGuid" - if malformed
  1912. * </li>
  1913. * <li> BAD_DATA_FORMAT "NoteFilter.tagGuids" - if any are malformed
  1914. * </li>
  1915. * <li> BAD_DATA_FORMAT "NoteFilter.words" - if search string too long
  1916. * </li>
  1917. * <li>PERMISSION_DENIED "Note" - If the caller does not have access to
  1918. * the note identified by RelatedQuery.noteGuid.
  1919. * </li>
  1920. * <li>DATA_REQUIRED "RelatedResultSpec" - If you did not not set any values
  1921. * in the result spec.
  1922. * </li>
  1923. * </ul>
  1924. *
  1925. * @throws EDAMNotFoundException <ul>
  1926. * <li>"RelatedQuery.noteGuid" - the note with that GUID is not
  1927. * found, if that field has been set in the query.
  1928. * </li>
  1929. * </ul>
  1930. */
  1931. public RelatedResult findRelated(String authenticationToken, RelatedQuery query, RelatedResultSpec resultSpec) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException;
  1932. }