1 package yukihane.inqubus.config;
4 import saccubus.worker.profile.CommentProfile;
7 * コンフィグに設定された値を基にしたCommentProfile実装.
10 public class ConfigCommentProfile implements CommentProfile {
12 private final int lengthRelatedCommentSize;
13 private final int perMinCommentSize;
14 private final boolean disablePerMinComment;
15 private final long backLogPoint;
16 private final boolean download;
17 private final File dir;
18 private final String fileName;
20 public ConfigCommentProfile() {
21 final Config p = Config.INSTANCE;
22 this.lengthRelatedCommentSize = (p.getCommentSizeAutosize()) ? -1 : Integer.parseInt(p.getCommentSizeManual());
23 this.perMinCommentSize = (p.getCommentMinSizeAutosize()) ? -1 : Integer.parseInt(p.getCommentMinSizeManual());
24 this.disablePerMinComment = p.getCommentMinDisabled();
25 this.backLogPoint = -1L;
26 this.download = !p.getCommentUseLocal();
27 this.dir = new File(p.getCommentDir());
28 this.fileName = p.getCommentFileNamePattern();
32 public int getLengthRelatedCommentSize() {
33 return lengthRelatedCommentSize;
37 public boolean isDisablePerMinComment() {
38 return disablePerMinComment;
42 public int getPerMinCommentSize() {
43 return perMinCommentSize;
47 public long getBackLogPoint() {
52 public boolean isOwnerCommentOnly() {
57 public boolean isDownload() {
62 public File getDir() {
67 public String getFileName() {
72 public File getLocalFile() {