OSDN Git Service

398b3427011ce9d01d5181d0f487b07689895513
[coroid/inqubus.git] / frontend / src / saccubus / converter / classic / profile / Profile.java
1 /* $Id$ */
2 package saccubus.converter.classic.profile;
3
4 import saccubus.converter.filegetter.LoginInfo;
5
6 /**
7  * Converterに処理させるための設定.
8  * @author yuki
9  */
10 public class Profile implements saccubus.converter.profile.Profile {
11
12     private final GeneralSetting generalSetting;
13     private final LoginInfo loginInfo;
14     private final InputFileSetting videoSetting;
15     private final InputFileSetting commentSetting;
16     private final CommentGetInfo commentGetInfo;
17     private final InputFileSetting tcommentSetting;
18     private final OutputFileSetting outputFileSetting;
19     private final Ffmpeg ffmpeg;
20
21     public Profile(
22             GeneralSetting generalSetting,
23             LoginInfo loginInfo,
24             InputFileSetting videoSetting,
25             InputFileSetting commentSetting,
26             CommentGetInfo commentGetInfo,
27             InputFileSetting tcommentSetting,
28             OutputFileSetting outputFileSetting,
29             Ffmpeg ffmpeg) {
30         this.generalSetting = generalSetting;
31         this.loginInfo = loginInfo;
32         this.videoSetting = videoSetting;
33         this.commentSetting = commentSetting;
34         this.commentGetInfo = commentGetInfo;
35         this.tcommentSetting = tcommentSetting;
36         this.outputFileSetting = outputFileSetting;
37         this.ffmpeg = ffmpeg;
38     }
39
40     @Override
41     public LoginInfo getLoginInfo() {
42         return loginInfo;
43     }
44
45     /** @return 何かダウンロードするものがあればtrue. */
46     @Override
47     public boolean needsDownload() {
48         return (videoSetting.isDownload() || commentSetting.isDownload() || tcommentSetting.isDownload());
49     }
50
51     @Override
52     public InputFileSetting getVideoSetting() {
53         return videoSetting;
54     }
55
56     @Override
57     public InputFileSetting getCommentSetting() {
58         return commentSetting;
59     }
60
61     @Override
62     public InputFileSetting getTcommentSetting() {
63         return tcommentSetting;
64     }
65
66     @Override
67     public OutputFileSetting getOutputFileSetting() {
68         return outputFileSetting;
69     }
70
71     @Override
72     public CommentGetInfo getCommentGetInfo() {
73         return commentGetInfo;
74     }
75
76     @Override
77     public boolean needsConvert() {
78         return getOutputFileSetting().isConvert();
79     }
80
81     @Override
82     public Ffmpeg getFfmpeg() {
83         return ffmpeg;
84     }
85
86     @Override
87     public GeneralSetting getGeneralSetting() {
88         return generalSetting;
89     }
90 }