// Path: domain/src/main/java/domain/foundation/UseCase.java
// public abstract class UseCase<D> {
//     protected final UI ui;
// 
//     public UseCase(UI ui) {
//         this.ui = ui;
//     }
// 
//     /**
//      * Observable built for every use case
//      */
//     public abstract Observable<D> react();
// }
// 
// Path: domain/src/main/java/domain/sections/UI.java
// public interface UI {
//     Observable<String> errorNonEmptyFields();
//     Subscription showFeedback(Observable<String> oFeedback);
//     Subscription showAnchoredScreenFeedback(Observable<String> oFeedback);
// 
//     void showLoading();
//     void hideLoading();
// }
// 
// Path: domain/src/main/java/domain/sections/user_demo/UserDemoRepository.java
// public interface UserDemoRepository extends Repository {
//     Observable<UserDemoEntity> searchByUserName(String nameUser);
//     Observable<List<UserDemoEntity>> askForUsers();
//     Observable<UserDemoEntity> getSelectedUserDemoList();
//     Observable<Boolean> saveSelectedUserDemoList(UserDemoEntity user);
// }
// 
// Path: domain/src/main/java/domain/sections/user_demo/entities/UserDemoEntity.java
// @AllArgsConstructor(access = AccessLevel.PROTECTED)
// @Data
// public class UserDemoEntity {
//     private final int id;
//     private final String login;
//     private String avatar_url = "";
// 
//     public String getAvatarUrl() {
//         if (avatar_url.isEmpty()) return avatar_url;
//         return avatar_url.split("\\?")[0];
//     }
// }


import javax.inject.Inject;
import domain.foundation.UseCase;
import domain.sections.UI;
import domain.sections.user_demo.UserDemoRepository;
import domain.sections.user_demo.entities.UserDemoEntity;
import rx.Observable;
/*
 * Copyright 2015 RefineriaWeb
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package domain.sections.user_demo.search;



public class SearchUserDemoUseCase extends UseCase<UserDemoEntity> {
    private final UserDemoRepository repository;
    private String name;

// Path: domain/src/main/java/domain/foundation/UseCase.java
// public abstract class UseCase<D> {
//     protected final UI ui;
// 
//     public UseCase(UI ui) {
//         this.ui = ui;
//     }
// 
//     /**
//      * Observable built for every use case
//      */
//     public abstract Observable<D> react();
// }
// 
// Path: domain/src/main/java/domain/sections/UI.java
// public interface UI {
//     Observable<String> errorNonEmptyFields();
//     Subscription showFeedback(Observable<String> oFeedback);
//     Subscription showAnchoredScreenFeedback(Observable<String> oFeedback);
// 
//     void showLoading();
//     void hideLoading();
// }
// 
// Path: domain/src/main/java/domain/sections/user_demo/UserDemoRepository.java
// public interface UserDemoRepository extends Repository {
//     Observable<UserDemoEntity> searchByUserName(String nameUser);
//     Observable<List<UserDemoEntity>> askForUsers();
//     Observable<UserDemoEntity> getSelectedUserDemoList();
//     Observable<Boolean> saveSelectedUserDemoList(UserDemoEntity user);
// }
// 
// Path: domain/src/main/java/domain/sections/user_demo/entities/UserDemoEntity.java
// @AllArgsConstructor(access = AccessLevel.PROTECTED)
// @Data
// public class UserDemoEntity {
//     private final int id;
//     private final String login;
//     private String avatar_url = "";
// 
//     public String getAvatarUrl() {
//         if (avatar_url.isEmpty()) return avatar_url;
//         return avatar_url.split("\\?")[0];
//     }
// }


// Path: domain/src/main/java/domain/sections/user_demo/search/SearchUserDemoUseCase.java
import javax.inject.Inject;
import domain.foundation.UseCase;
import domain.sections.UI;
import domain.sections.user_demo.UserDemoRepository;
import domain.sections.user_demo.entities.UserDemoEntity;
import rx.Observable;

/*
 * Copyright 2015 RefineriaWeb
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package domain.sections.user_demo.search;



public class SearchUserDemoUseCase extends UseCase<UserDemoEntity> {
    private final UserDemoRepository repository;
    private String name;

    @Inject public SearchUserDemoUseCase(UI ui, UserDemoRepository repository) {