kr.co.hanwha.hifive.data.source

## Class TaskDataRepository

- java.lang.Object
- - kr.co.hanwha.hifive.data.source.TaskDataRepository

All Implemented Interfaces:
  BaseDataSource, TaskDataSource

    public class TaskDataRepository
    extends java.lang.Object
    implements TaskDataSource

TASK 관련 데이터 저장소 Created by sanghoonkwon on 2018. 1. 11..

### Field Summary

Fields
`private static CampaignData` `sCampaignData`
`private static TaskDataRepository` `sInstance`
`private static boolean` `sIsMemberChanged`
`private static java.util.ArrayList<ProjectCampaignData>` `sListCampaignInfo`
`private static java.util.ArrayList<MemberInfoData>` `sListMemberInfo`
`private static java.util.ArrayList<ProjectInfoData>` `sListProjectInfo`
`private static MemberInfoData` `sMemberInfoData`
`private static java.util.Comparator<MemberInfoData>` `sort`
`private static java.util.HashMap<java.lang.String,MemberInfoData>` `sSelectedMemberInfo`
`private static java.lang.String` `sUnverifiedCampaignKey`
`private static java.util.HashMap<java.lang.String,MemberInfoData>` `sUnverifiedMemberInfo`
`private static java.lang.String` `sVerifiedCampaignKey`

### Constructor Summary

Constructors
Constructor and Description
`TaskDataRepository()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `clearData()` Clear data
`static void` `clearSelectedCampaignData()`
`static void` `destroyInstance()`
`static TaskDataRepository` `getInstance()`
`static MemberInfoData` `getMemberInfoData()`
`static ProjectCampaignData` `getSelectedCampaignData()`
`static java.util.ArrayList<MemberInfoData>` `getSelectedMemberList()`
`static java.util.HashMap<java.lang.String,MemberInfoData>` `getUnverifyMemberInfo()`
`static java.util.ArrayList<MemberInfoData>` `getUnverifySelectedMemberList()`
`static java.lang.String` `getVerifiedCampaignKey()`
`void` `requestAddMessage(android.content.Context context, int task_id, java.lang.String contents, HanwhaNetworkCallback<MessageAddData> callback)` 댓글 - 댓글 등록
`void` `requestAllMember(android.content.Context context, HanwhaNetworkCallback callback)` 전체 Member 목록
`void` `requestCampaignListByMemberId(android.content.Context context, java.util.ArrayList<java.lang.Integer> listMemberInfo, HanwhaNetworkCallback callback)` 해당 멤보에 속한 Campaign 목록
`void` `requestCampaignListByProjectId(android.content.Context context, java.util.ArrayList<java.lang.Integer> listReqProjectId, HanwhaNetworkCallback callback)` 해당 프로젝트에 속한 Campaign 목록
`void` `requestDeleteMessage(android.content.Context context, int id, HanwhaNetworkCallback callback)` 댓글 삭제
`void` `requestDeleteTask(android.content.Context context, TaskData taskData, HanwhaNetworkCallback callback)` TASK 삭제
`void` `requestGetMessageList(android.content.Context context, int task_id, int current_page, HanwhaNetworkCallback<MessageListRoot> callback)` 댓글 - 댓글 목록 조회
`void` `requestGetTaskDetail(android.content.Context context, int task_id, int project_id, HanwhaNetworkCallback<TaskDetailRoot> callback)` TASK 조회(상세조회)
`void` `requestSearchTaskByTag(android.content.Context context, java.lang.String searchTag, HanwhaNetworkCallback<SearchTagData> callback)` Task 검색(태그)
`void` `requestSendTask(android.content.Context context, java.lang.String task_name, java.lang.String due_to, java.util.ArrayList<MemberInfoData> listMemberInfo, CampaignData campaignData, HanwhaNetworkCallback callback)` TASK 생성
`void` `requestSetTaskDeleteRequest(android.content.Context context, TaskData taskData, HanwhaNetworkCallback callback)` 반려된 TASK 요청 삭제(취소) : STATUS 80
`void` `requestSetTaskEvaluation(android.content.Context context, TaskData taskData, TaskEvaluationType taskEvaluationType, HanwhaNetworkCallback<BaseData> callback)` TASK 평가(Resolved) : STATUS 60
`void` `requestSetTaskEvaluationAccept(android.content.Context context, TaskData taskData, HanwhaNetworkCallback callback)` TASK 평가 - 수락 : STATUS 80
`void` `requestSetTaskEvaluationReject(android.content.Context context, TaskData taskData, java.lang.String message, HanwhaNetworkCallback callback)` TASK 평가 - 완료 : STATUS 70
`void` `requestSetTaskReRequest(android.content.Context context, TaskData taskData, HanwhaNetworkCallback callback)` 반려된 TASK 재 요청 : STATUS 30
`void` `requestSetTaskToday(android.content.Context context, TaskData taskData, boolean isToday, HanwhaNetworkCallback callback)` 내 TASK -> 오늘 할일 등록
`void` `requestTaskAccept(android.content.Context context, TaskData taskData, HanwhaNetworkCallback<BaseData> callback)` TASK 수락 : STATUS 20
`void` `requestTaskReject(android.content.Context context, TaskData taskData, java.lang.String message, HanwhaNetworkCallback<BaseData> callback)` TASK 반려 : STATUS 40
`void` `requestTasksGetMainAssigned(android.content.Context context, HanwhaNetworkCallback<MainHomeAssignedRoot> callback)` MAIN - HOME : TASK 목록 - 나의 업무 목록 조회
`void` `requestTasksGetMainRequest(android.content.Context context, HanwhaNetworkCallback<MainHomeRequestRoot> callback)` MAIN - HOME : TASK 목록 - 요청한 업무 목록 조회
`void` `requestUpdateTask(android.content.Context context, TaskData taskData, CampaignData campaignData, HanwhaNetworkCallback callback)` TASK 수정
`static void` `setCampaignListSelect(CampaignData data)`
`static void` `setMemberInfoData(MemberInfoData memberInfoData)`
`static void` `setSelectMember(MemberInfoData data, boolean isSelect)`
`static void` `setUnverifiedCampaignInfo()`
`static void` `setUnverifiedMemberInfo()`
`static void` `setVerifyCampaignInfo()`
`static void` `setVerifyCampaignInfo(java.lang.String verifyCampaignKey)`
`static void` `setVerifyMemberInfo()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### sInstance

    private static TaskDataRepository sInstance

#### sListProjectInfo

    private static java.util.ArrayList<ProjectInfoData> sListProjectInfo

#### sListMemberInfo

    private static java.util.ArrayList<MemberInfoData> sListMemberInfo

#### sSelectedMemberInfo

    private static java.util.HashMap<java.lang.String,MemberInfoData> sSelectedMemberInfo

#### sUnverifiedMemberInfo

    private static java.util.HashMap<java.lang.String,MemberInfoData> sUnverifiedMemberInfo

#### sMemberInfoData

    private static MemberInfoData sMemberInfoData

#### sIsMemberChanged

    private static boolean sIsMemberChanged

#### sListCampaignInfo

    private static java.util.ArrayList<ProjectCampaignData> sListCampaignInfo

#### sUnverifiedCampaignKey

    private static java.lang.String sUnverifiedCampaignKey

#### sVerifiedCampaignKey

    private static java.lang.String sVerifiedCampaignKey

#### sCampaignData

    private static CampaignData sCampaignData

#### sort

    private static final java.util.Comparator<MemberInfoData> sort

### Constructor Detail

#### TaskDataRepository

    public TaskDataRepository()

### Method Detail

#### getInstance

    public static TaskDataRepository getInstance()

#### destroyInstance

    public static void destroyInstance()

#### clearData

    public void clearData()

Description copied from interface: `BaseDataSource`
Clear data

Specified by:
  `clearData` in interface `BaseDataSource`

#### setSelectMember

    public static void setSelectMember(MemberInfoData data,
                                       boolean isSelect)

#### setUnverifiedMemberInfo

    public static void setUnverifiedMemberInfo()

#### setVerifyMemberInfo

    public static void setVerifyMemberInfo()

#### getUnverifyMemberInfo

    public static java.util.HashMap<java.lang.String,MemberInfoData> getUnverifyMemberInfo()

#### getMemberInfoData

    public static MemberInfoData getMemberInfoData()

#### setMemberInfoData

    public static void setMemberInfoData(MemberInfoData memberInfoData)

#### getSelectedMemberList

    public static java.util.ArrayList<MemberInfoData> getSelectedMemberList()

#### getUnverifySelectedMemberList

    public static java.util.ArrayList<MemberInfoData> getUnverifySelectedMemberList()

#### getVerifiedCampaignKey

    public static java.lang.String getVerifiedCampaignKey()

#### setUnverifiedCampaignInfo

    public static void setUnverifiedCampaignInfo()

#### setVerifyCampaignInfo

    public static void setVerifyCampaignInfo()

#### setVerifyCampaignInfo

    public static void setVerifyCampaignInfo(java.lang.String verifyCampaignKey)

#### setCampaignListSelect

    public static void setCampaignListSelect(CampaignData data)

#### getSelectedCampaignData

    public static ProjectCampaignData getSelectedCampaignData()

#### clearSelectedCampaignData

    public static void clearSelectedCampaignData()

#### requestSetTaskToday

    public void requestSetTaskToday(@NonNull
                                    android.content.Context context,
                                    @NonNull
                                    TaskData taskData,
                                    @NonNull
                                    boolean isToday,
                                    @Nullable
                                    HanwhaNetworkCallback callback)

Description copied from interface: `TaskDataSource`
내 TASK -> 오늘 할일 등록

Specified by:
  `requestSetTaskToday` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `taskData` - Task 데이터
  `isToday` - TRUE : 오늘할 업무로 추가 / FALSE : 오늘할 업무에서 삭제
  `callback` - 콜백

#### requestTasksGetMainAssigned

    public void requestTasksGetMainAssigned(@NonNull
                                            android.content.Context context,
                                            @NonNull
                                            HanwhaNetworkCallback<MainHomeAssignedRoot> callback)

Description copied from interface: `TaskDataSource`
MAIN - HOME : TASK 목록 - 나의 업무 목록 조회

Specified by:
  `requestTasksGetMainAssigned` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `callback` - 콜백

#### requestTasksGetMainRequest

    public void requestTasksGetMainRequest(@NonNull
                                           android.content.Context context,
                                           @NonNull
                                           HanwhaNetworkCallback<MainHomeRequestRoot> callback)

Description copied from interface: `TaskDataSource`
MAIN - HOME : TASK 목록 - 요청한 업무 목록 조회

Specified by:
  `requestTasksGetMainRequest` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `callback` - 콜백

#### requestAllMember

    public void requestAllMember(@NonNull
                                 android.content.Context context,
                                 @NonNull
                                 HanwhaNetworkCallback callback)

Description copied from interface: `TaskDataSource`
전체 Member 목록

Specified by:
  `requestAllMember` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `callback` - 콜백

#### requestCampaignListByProjectId

    public void requestCampaignListByProjectId(@NonNull
                                               android.content.Context context,
                                               @NonNull
                                               java.util.ArrayList<java.lang.Integer> listReqProjectId,
                                               @NonNull
                                               HanwhaNetworkCallback callback)

Description copied from interface: `TaskDataSource`
해당 프로젝트에 속한 Campaign 목록

Specified by:
  `requestCampaignListByProjectId` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `listReqProjectId` - 받는 사람 목록에 있는 Project Id(Default 내가 속한 프로젝트 추가)
  `callback` - 콜백

#### requestCampaignListByMemberId

    public void requestCampaignListByMemberId(@NonNull
                                              android.content.Context context,
                                              @NonNull
                                              java.util.ArrayList<java.lang.Integer> listMemberInfo,
                                              @NonNull
                                              HanwhaNetworkCallback callback)

Description copied from interface: `TaskDataSource`
해당 멤보에 속한 Campaign 목록

Specified by:
  `requestCampaignListByMemberId` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `listMemberInfo` - 받는 사람 목록에 있는 Member Id
  `callback` - 콜백

#### requestSendTask

    public void requestSendTask(@NonNull
                                android.content.Context context,
                                @NonNull
                                java.lang.String task_name,
                                @NonNull
                                java.lang.String due_to,
                                @NonNull
                                java.util.ArrayList<MemberInfoData> listMemberInfo,
                                @Nullable
                                CampaignData campaignData,
                                @Nullable
                                HanwhaNetworkCallback callback)

Description copied from interface: `TaskDataSource`
TASK 생성

Specified by:
  `requestSendTask` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `task_name` - TASK 내용
  `due_to` - 기한 설정
  `listMemberInfo` - 받는사람 정보
  `campaignData` - Campaign Info
  `callback` - 콜백

#### requestUpdateTask

    public void requestUpdateTask(@NonNull
                                  android.content.Context context,
                                  @NonNull
                                  TaskData taskData,
                                  @Nullable
                                  CampaignData campaignData,
                                  @Nullable
                                  HanwhaNetworkCallback callback)

Description copied from interface: `TaskDataSource`
TASK 수정

Specified by:
  `requestUpdateTask` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `taskData` - TASK 데이터
  `campaignData` - Campaign Info
  `callback` - 콜백

#### requestGetTaskDetail

    public void requestGetTaskDetail(@NonNull
                                     android.content.Context context,
                                     @NonNull
                                     int task_id,
                                     @NonNull
                                     int project_id,
                                     @Nullable
                                     HanwhaNetworkCallback<TaskDetailRoot> callback)

Description copied from interface: `TaskDataSource`
TASK 조회(상세조회)

Specified by:
  `requestGetTaskDetail` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `task_id` - TASK ID
  `project_id` - PROJECT ID
  `callback` - 콜백

#### requestDeleteTask

    public void requestDeleteTask(@NonNull
                                  android.content.Context context,
                                  @NonNull
                                  TaskData taskData,
                                  @Nullable
                                  HanwhaNetworkCallback callback)

Description copied from interface: `TaskDataSource`
TASK 삭제

Specified by:
  `requestDeleteTask` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `taskData` - TASK 데이터
  `callback` - 콜백

#### requestTaskAccept

    public void requestTaskAccept(@NonNull
                                  android.content.Context context,
                                  @NonNull
                                  TaskData taskData,
                                  @Nullable
                                  HanwhaNetworkCallback<BaseData> callback)

Description copied from interface: `TaskDataSource`
TASK 수락 : STATUS 20

Specified by:
  `requestTaskAccept` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `taskData` - TASK DATA
  `callback` - 콜백

#### requestTaskReject

    public void requestTaskReject(@NonNull
                                  android.content.Context context,
                                  @NonNull
                                  TaskData taskData,
                                  @NonNull
                                  java.lang.String message,
                                  @Nullable
                                  HanwhaNetworkCallback<BaseData> callback)

Description copied from interface: `TaskDataSource`
TASK 반려 : STATUS 40

Specified by:
  `requestTaskReject` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `taskData` - TASK DATA
  `message` - 반려 메세지
  `callback` - 콜백

#### requestGetMessageList

    public void requestGetMessageList(@NonNull
                                      android.content.Context context,
                                      @NonNull
                                      int task_id,
                                      @NonNull
                                      int current_page,
                                      @Nullable
                                      HanwhaNetworkCallback<MessageListRoot> callback)

Description copied from interface: `TaskDataSource`
댓글 - 댓글 목록 조회

Specified by:
  `requestGetMessageList` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `task_id` - TASK ID
  `current_page` - 현재 페에지 No
  `callback` - 콜백

#### requestAddMessage

    public void requestAddMessage(@NonNull
                                  android.content.Context context,
                                  @NonNull
                                  int task_id,
                                  @NonNull
                                  java.lang.String contents,
                                  @Nullable
                                  HanwhaNetworkCallback<MessageAddData> callback)

Description copied from interface: `TaskDataSource`
댓글 - 댓글 등록

Specified by:
  `requestAddMessage` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `task_id` - TASK ID
  `contents` - 댓글 내용
  `callback` - 콜백

#### requestDeleteMessage

    public void requestDeleteMessage(@NonNull
                                     android.content.Context context,
                                     @NonNull
                                     int id,
                                     @Nullable
                                     HanwhaNetworkCallback callback)

Description copied from interface: `TaskDataSource`
댓글 삭제

Specified by:
  `requestDeleteMessage` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `id` - 댓글 ID
  `callback` - 콜백

#### requestSearchTaskByTag

    public void requestSearchTaskByTag(@NonNull
                                       android.content.Context context,
                                       @NonNull
                                       java.lang.String searchTag,
                                       @Nullable
                                       HanwhaNetworkCallback<SearchTagData> callback)

Description copied from interface: `TaskDataSource`
Task 검색(태그)

Specified by:
  `requestSearchTaskByTag` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `searchTag` - 태그(검색어)
  `callback` - 콜백

#### requestSetTaskDeleteRequest

    public void requestSetTaskDeleteRequest(@NonNull
                                            android.content.Context context,
                                            @NonNull
                                            TaskData taskData,
                                            @Nullable
                                            HanwhaNetworkCallback callback)

Description copied from interface: `TaskDataSource`
반려된 TASK 요청 삭제(취소) : STATUS 80

Specified by:
  `requestSetTaskDeleteRequest` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `taskData` - Task 데이터
  `callback` - 콜백

#### requestSetTaskReRequest

    public void requestSetTaskReRequest(@NonNull
                                        android.content.Context context,
                                        @NonNull
                                        TaskData taskData,
                                        @Nullable
                                        HanwhaNetworkCallback callback)

Description copied from interface: `TaskDataSource`
반려된 TASK 재 요청 : STATUS 30

Specified by:
  `requestSetTaskReRequest` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `taskData` - Task 데이터
  `callback` - 콜백

#### requestSetTaskEvaluation

    public void requestSetTaskEvaluation(@NonNull
                                         android.content.Context context,
                                         @NonNull
                                         TaskData taskData,
                                         @NonNull
                                         TaskEvaluationType taskEvaluationType,
                                         @Nullable
                                         HanwhaNetworkCallback<BaseData> callback)

Description copied from interface: `TaskDataSource`
TASK 평가(Resolved) : STATUS 60

Specified by:
  `requestSetTaskEvaluation` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `taskData` - TASK DATA
  `taskEvaluationType` - 평가
  `callback` - 콜백

#### requestSetTaskEvaluationAccept

    public void requestSetTaskEvaluationAccept(@NonNull
                                               android.content.Context context,
                                               @NonNull
                                               TaskData taskData,
                                               @Nullable
                                               HanwhaNetworkCallback callback)

Description copied from interface: `TaskDataSource`
TASK 평가 - 수락 : STATUS 80

Specified by:
  `requestSetTaskEvaluationAccept` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `taskData` - Task 데이터
  `callback` - 콜백

#### requestSetTaskEvaluationReject

    public void requestSetTaskEvaluationReject(@NonNull
                                               android.content.Context context,
                                               @NonNull
                                               TaskData taskData,
                                               @NonNull
                                               java.lang.String message,
                                               @Nullable
                                               HanwhaNetworkCallback callback)

Description copied from interface: `TaskDataSource`
TASK 평가 - 완료 : STATUS 70

Specified by:
  `requestSetTaskEvaluationReject` in interface `TaskDataSource`
Parameters:
  `context` - Context
  `taskData` - Task 데이터
  `message` - 메세지
  `callback` - 콜백