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 boolean ownerCommentOnly;
18 private final File dir;
19 private final String fileName;
21 public ConfigCommentProfile() {
22 final Config p = Config.INSTANCE;
23 this.lengthRelatedCommentSize = (p.getCommentSizeAutosize()) ? -1 : Integer.parseInt(p.getCommentSizeManual());
24 this.perMinCommentSize = (p.getCommentMinSizeAutosize()) ? -1 : Integer.parseInt(p.getCommentMinSizeManual());
25 this.disablePerMinComment = p.getCommentMinDisabled();
26 this.backLogPoint = -1L;
27 this.download = !p.getCommentUseLocal();
28 this.ownerCommentOnly = p.getCommentOwnerOnly();
29 this.dir = new File(p.getCommentDir());
30 this.fileName = p.getCommentFileNamePattern();
34 public int getLengthRelatedCommentSize() {
35 return lengthRelatedCommentSize;
39 public boolean isDisablePerMinComment() {
40 return disablePerMinComment;
44 public int getPerMinCommentSize() {
45 return perMinCommentSize;
49 public long getBackLogPoint() {
54 public boolean isOwnerCommentOnly() {
55 return ownerCommentOnly;
59 public boolean isDownload() {
64 public File getDir() {
69 public String getFileName() {
74 public File getLocalFile() {