src/main/java/zoot/tube/schedule/TaskScheduler.java
/**
     * Creates the appropriate Runnable for a Task.
     *
     * @param task the Task to use.
     * @return a Runnable for the Task.
     */
Creates the appropriate Runnable for a Task.
@param task the Task to use.
@return a Runnable for the Task.
Creates the appropriate Runnable for a Task . @param task the Task to use . @return a Runnable for the Task .
private Runnable createRunnableFromTask(Task task) {
        Runnable runnable = null;
        String refreshToken = RefreshTokenSaver.loadRefreshToken(task.getUser());
        Credential credential = authenticator.authorizeUsingRefreshToken(refreshToken);
        if (task.getTaskType().equals(TaskType.MAKE_VIDEOS_IN_PLAYLIST_PRIVATE)) {
            runnable = this.getMakeVideosInPlaylistPrivateRunnable(task, credential);
        }
        return runnable;
    }
private Runnable createRunnableFromTask ( Task task ) { Runnable runnable = null ; String refreshToken = RefreshTokenSaver . loadRefreshToken ( task . getUser ( ) ) ; Credential credential = authenticator . authorizeUsingRefreshToken ( refreshToken ) ; if ( task . getTaskType ( ) . equals ( TaskType . MAKE_VIDEOS_IN_PLAYLIST_PRIVATE ) ) { runnable = this . getMakeVideosInPlaylistPrivateRunnable ( task , credential ) ; } return runnable ; }
Creates the appropriate Runnable for a Task.
Creates the appropriate Runnable for a Task .