private final LoginProfile loginProfile;
private final ProxyProfile proxyProfile;
+ private final VideoProfile videoProfile;
+ private final CommentProfile commentProfile;
+ private final GeneralProfile generalProfile;
private InqubusDownloadProfile() {
this.loginProfile = new InqubusLoginProfile();
this.proxyProfile = new InqubusProxyProfile();
+ this.videoProfile = new InqubusVideoProfile();
+ this.commentProfile = new InqubusCommentProfile();
+ this.generalProfile = new InqubusGeneralProfile();
}
@Override
@Override
public VideoProfile getVideoProfile() {
- throw new UnsupportedOperationException("Not supported yet.");
+ return this.videoProfile;
}
@Override
public CommentProfile getCommentProfile() {
- throw new UnsupportedOperationException("Not supported yet.");
+ return this.commentProfile;
}
@Override
public GeneralProfile getGeneralProfile() {
- throw new UnsupportedOperationException("Not supported yet.");
+ return this.generalProfile;
}
}
return this.port;
}
}
+
+ private class InqubusVideoProfile implements VideoProfile {
+ private final boolean download;
+ private final File dir;
+ private final String fileName;
+ private final File localFile;
+
+ private InqubusVideoProfile(){
+ this.download = !cbVideoLocal.isSelected();
+ if (this.download) {
+ this.dir = new File(fldVideo.getText());
+ // TODO ディレクトリとファイル名の入力欄を分ける
+ this.fileName = "{id}_{title}";
+ this.localFile = null;
+ } else {
+ this.dir = null;
+ this.fileName = null;
+ this.localFile = new File(fldVideo.getText());
+ }
+ }
+
+ @Override
+ public boolean isDownload() {
+ return this.download;
+ }
+
+ @Override
+ public File getDir() {
+ return this.dir;
+ }
+
+ @Override
+ public String getFileName() {
+ return this.fileName;
+ }
+
+ @Override
+ public File getLocalFile() {
+ return this.localFile;
+ }
+ }
+
+ private class InqubusCommentProfile implements CommentProfile {
+
+ @Override
+ public int getLengthRelatedCommentSize() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean isDisablePerMinComment() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getPerMinCommentSize() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public long getBackLogPoint() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean isDownload() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public File getDir() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getFileName() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public File getLocalFile() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ }
+
+ private class InqubusGeneralProfile implements GeneralProfile {
+// private final String replaceFrom;
+ private InqubusGeneralProfile() {
+ final Config p = Config.INSTANCE;
+ // TODO 置換文字設定コンフィグが無い
+// this.replaceFrom = p.get
+ }
+
+ @Override
+ public String getReplaceFrom() {
+// return this.replaceFrom;
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public String getReplaceTo() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ }
}