@@ -0,0 +1,2067 @@
+/*%0A * Copyright (c) 2015 Ushahidi Inc%0A *%0A * This program is free software: you can redistribute it and/or modify it under%0A *  the terms of the GNU Affero General Public License as published by the Free%0A *  Software Foundation, either version 3 of the License, or (at your option)%0A *  any later version.%0A *%0A *  This program is distributed in the hope that it will be useful, but WITHOUT%0A *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS%0A *  FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.%0A *%0A *  You should have received a copy of the GNU Affero General Public License%0A *  along with this program in the file LICENSE-AGPL. If not, see%0A *  https://www.gnu.org/licenses/agpl-3.0.html%0A */%0A%0Apackage com.ushahidi.android.domain.usecase.post;%0A%0Aimport com.addhen.android.raiburari.domain.executor.PostExecutionThread;%0Aimport com.addhen.android.raiburari.domain.executor.ThreadExecutor;%0Aimport com.addhen.android.raiburari.domain.usecase.Usecase;%0Aimport com.ushahidi.android.domain.repository.PostRepository;%0A%0Aimport rx.Observable;%0A%0A/**%0A * Usecase for getting a %7B@link Post%7D%0A *%0A * @author Ushahidi Team %3Cteam@ushahidi.com%3E%0A */%0Apublic class GetPostUsecase extends Usecase %7B%0A%0A    private final PostRepository mPostRepository;%0A%0A    private Long mDeploymentId = null;%0A%0A    private Long mPostId;%0A%0A    public GetPostUsecase(PostRepository postRepository, ThreadExecutor threadExecutor,%0A            PostExecutionThread postExecutionThread) %7B%0A        super(threadExecutor, postExecutionThread);%0A        mPostRepository = postRepository;%0A    %7D%0A%0A    public void setGetPost(Long deploymentId, Long postId) %7B%0A        mDeploymentId = deploymentId;%0A        mPostId = postId;%0A    %7D%0A%0A    @Override%0A    protected Observable buildUseCaseObservable() %7B%0A        if (mDeploymentId == null %7C%7C mPostId == null) %7B%0A            throw new RuntimeException(%0A                    %22Deployment id or postId cannot be null. You must call setGetPost(...)%22);%0A        %7D%0A        return mPostRepository.getPost(mDeploymentId, mPostId);%0A    %7D%0A%7D%0A

Implement get post use case