OSDN Git Service

画面で設定した情報を変換処理に回す実装
authoryukihane <yukihane.feather@gmail.com>
Wed, 17 Aug 2011 07:14:31 +0000 (16:14 +0900)
committeryukihane <yukihane.feather@gmail.com>
Wed, 17 Aug 2011 07:14:31 +0000 (16:14 +0900)
frontend/src/yukihane/inqubus/model/Item.java [new file with mode: 0644]
frontend/src/yukihane/inqubus/worker/EventManager.java [new file with mode: 0644]

diff --git a/frontend/src/yukihane/inqubus/model/Item.java b/frontend/src/yukihane/inqubus/model/Item.java
new file mode 100644 (file)
index 0000000..6fa8b7d
--- /dev/null
@@ -0,0 +1,28 @@
+package yukihane.inqubus.model;
+
+/**
+ *
+ * @author yuki
+ */
+public class Item {
+
+    private final String id;
+    private final boolean useMovieLocal;
+    private final String movieName;
+    private final boolean useCommentLocal;
+    private final String commentName;
+    private final boolean needConvert;
+    private final String ouputName;
+    private Status status = Status.WAITING;
+
+    public Item(String id, boolean useMovieLocal, String movieName, boolean useCommentLocal, String commentName,
+            boolean needConvert, String ouputName) {
+        this.id = id;
+        this.useMovieLocal = useMovieLocal;
+        this.movieName = movieName;
+        this.useCommentLocal = useCommentLocal;
+        this.commentName = commentName;
+        this.needConvert = needConvert;
+        this.ouputName = ouputName;
+    }
+}
diff --git a/frontend/src/yukihane/inqubus/worker/EventManager.java b/frontend/src/yukihane/inqubus/worker/EventManager.java
new file mode 100644 (file)
index 0000000..e4260ce
--- /dev/null
@@ -0,0 +1,33 @@
+package yukihane.inqubus.worker;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import yukihane.inqubus.model.Item;
+
+/**
+ * いんきゅばすが行う処理を管理します.
+ * @author yuki
+ */
+public enum EventManager {
+
+    INSTANCE;
+    private static final Logger logger = Logger.getLogger(EventManager.class.getName());
+    private final List<Item> itemList = new ArrayList<Item>();
+
+    /**
+     * 処理対象を追加します.
+     * @param i 処理対象.
+     */
+    public synchronized void addItem(Item i) {
+        itemList.add(i);
+        process();
+    }
+
+    /**
+     * アイテムリストに入っているアイテムを処理します.
+     */
+    private void process() {
+    }
+}