{"action":"created","issue":{"url":"https://api.github.com/repos/open-keychain/open-keychain/issues/1771","repository_url":"https://api.github.com/repos/open-keychain/open-keychain","labels_url":"https://api.github.com/repos/open-keychain/open-keychain/issues/1771/labels{/name}","comments_url":"https://api.github.com/repos/open-keychain/open-keychain/issues/1771/comments","events_url":"https://api.github.com/repos/open-keychain/open-keychain/issues/1771/events","html_url":"https://github.com/open-keychain/open-keychain/pull/1771","id":139426368,"number":1771,"title":"WIP: PgpSignEncryptOperation refactoring","user":{"login":"runnerway","id":2026137,"avatar_url":"https://avatars.githubusercontent.com/u/2026137?v=3","gravatar_id":"","url":"https://api.github.com/users/runnerway","html_url":"https://github.com/runnerway","followers_url":"https://api.github.com/users/runnerway/followers","following_url":"https://api.github.com/users/runnerway/following{/other_user}","gists_url":"https://api.github.com/users/runnerway/gists{/gist_id}","starred_url":"https://api.github.com/users/runnerway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runnerway/subscriptions","organizations_url":"https://api.github.com/users/runnerway/orgs","repos_url":"https://api.github.com/users/runnerway/repos","events_url":"https://api.github.com/users/runnerway/events{/privacy}","received_events_url":"https://api.github.com/users/runnerway/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-03-08T23:31:27Z","updated_at":"2016-04-06T22:37:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/open-keychain/open-keychain/pulls/1771","html_url":"https://github.com/open-keychain/open-keychain/pull/1771","diff_url":"https://github.com/open-keychain/open-keychain/pull/1771.diff","patch_url":"https://github.com/open-keychain/open-keychain/pull/1771.patch"},"body":"This refactoring is needed for two reasons:\r\n\r\n1) Because https://github.com/open-keychain/open-keychain/blob/8b8b91e24722f254ad84916d3e1b6c6210906924/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpSignEncryptOperation.java#L108\r\n2) Because it's needed to produce good code for my other PR #1760\r\n\r\nIt's a WIP because it needs a bit more testing, a bit of code clean up and probably tests should be adapted too. This doesn't introduce functional changes. I will continue to work on this during next days. Advices and suggestions are welcome :)"},"comment":{"url":"https://api.github.com/repos/open-keychain/open-keychain/issues/comments/206598866","html_url":"https://github.com/open-keychain/open-keychain/pull/1771#issuecomment-206598866","issue_url":"https://api.github.com/repos/open-keychain/open-keychain/issues/1771","id":206598866,"user":{"login":"runnerway","id":2026137,"avatar_url":"https://avatars.githubusercontent.com/u/2026137?v=3","gravatar_id":"","url":"https://api.github.com/users/runnerway","html_url":"https://github.com/runnerway","followers_url":"https://api.github.com/users/runnerway/followers","following_url":"https://api.github.com/users/runnerway/following{/other_user}","gists_url":"https://api.github.com/users/runnerway/gists{/gist_id}","starred_url":"https://api.github.com/users/runnerway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runnerway/subscriptions","organizations_url":"https://api.github.com/users/runnerway/orgs","repos_url":"https://api.github.com/users/runnerway/repos","events_url":"https://api.github.com/users/runnerway/events{/privacy}","received_events_url":"https://api.github.com/users/runnerway/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T22:37:56Z","updated_at":"2016-04-06T22:37:56Z","body":"Fixed a remaining little bug of this PR. Now it should be ok.\r\n\r\n@Valodim \r\nI agree that this commit is bigger than what it should be.\r\n(The final size is the result of incremental changes closely connected, but now i see how it could be split at least into 2 different commits)\r\nNext time i will split a change in smaller commits.\r\n\r\nBut i think there is a semantic change in the line you pointed out. \r\nThis is a quick explanation on this entire PR:\r\n\r\nPreviously \"SignEncryptParcel\" was a subclass of \"PgpSignEncryptInputParcel\". \r\nBut this doesn't seem logically correct. Said in a simple way (leaving out some details):\r\n- SignEncryptParcel is an input to an operation containing one or more inputs to be encrypted using the same options.\r\n- PgpSignEncryptInputParcel is an input to an operation containing one input to be encrypted.\r\nSo, i broke this relationship and introduced the class \"PgpSignEncryptData\" (Maybe we should use another name?). This class contains the encryption options for all the inputs inside a SignEncryptParcel.\r\n\r\nThe flow after this PR will be: \r\n1) Take a SignEncryptParcel\r\n2) For every input in this parcel create a PgpSignEncryptInputParcel taking the PgpSignEncryptData from SignEncryptParcel as options for the current PgpSignEncryptInputParcel.\r\n\r\nThis is the first result achieved with this PR.\r\nDoing so we are able to refactor \"PgpSignEncryptOperation\" to fix its implementation of the \"BaseOperation\" interface. And this is the second result achieved with this PR.\r\n\r\nAll these changes will help me in finishing the work on https://github.com/open-keychain/open-keychain/pull/1760 for saving multiple output files."}}