[Jiemamy-notify:2476] commit [3469] チェックインその1 .

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 8月 13日 (木) 22:48:19 JST


Revision: 3469
          http://sourceforge.jp/projects/jiemamy/svn/view?view=rev&revision=3469
Author:   shin1
Date:     2009-08-13 22:48:18 +0900 (Thu, 13 Aug 2009)

Log Message:
-----------
チェックインその1.

warフォルダ以外をコミットする。

Added Paths:
-----------
    sandbox/jiemamy-feeds/.amateras
    sandbox/jiemamy-feeds/.classpath
    sandbox/jiemamy-feeds/.djunitplugin
    sandbox/jiemamy-feeds/.project
    sandbox/jiemamy-feeds/.settings/
    sandbox/jiemamy-feeds/.settings/com.google.appengine.eclipse.core.prefs
    sandbox/jiemamy-feeds/.settings/org.eclipse.core.resources.prefs
    sandbox/jiemamy-feeds/.settings/org.eclipse.jdt.core.prefs
    sandbox/jiemamy-feeds/.settings/org.eclipse.jdt.ui.prefs
    sandbox/jiemamy-feeds/launches/
    sandbox/jiemamy-feeds/launches/jiemamy-feeds.web.launch
    sandbox/jiemamy-feeds/pom.xml
    sandbox/jiemamy-feeds/src/
    sandbox/jiemamy-feeds/src/main/
    sandbox/jiemamy-feeds/src/main/java/
    sandbox/jiemamy-feeds/src/main/java/com/
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/JdoModule.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/RunInTransaction.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/WicketApplication.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityKeyLabel.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityLabel.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityModel.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/QueryCounterLabel.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/QueryDataProvider.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/cron/
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/cron/Fetch.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/cron/Tweet.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/Entry.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/FeedUrl.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/FetchHistory.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/AppengineBaseWebPage.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Feeds.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Fetch.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Index.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Setting.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/service/
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/service/GetEntries.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/service/SaveFetchHistory.java
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/util/
    sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/util/ApplicationSettingUtil.java
    sandbox/jiemamy-feeds/src/main/resources/
    sandbox/jiemamy-feeds/src/main/resources/META-INF/
    sandbox/jiemamy-feeds/src/main/resources/META-INF/jdoconfig.xml
    sandbox/jiemamy-feeds/src/main/resources/com/
    sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/
    sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/cron/
    sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/cron/Fetch.html
    sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/cron/Tweet.html
    sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/
    sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Feeds.html
    sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Fetch.html
    sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Index.html
    sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Setting.html
    sandbox/jiemamy-feeds/src/main/resources/log4j.properties
    sandbox/jiemamy-feeds/src/main/resources/logging.properties
    sandbox/jiemamy-feeds/src/test/
    sandbox/jiemamy-feeds/src/test/java/
    sandbox/jiemamy-feeds/src/test/java/com/
    sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/
    sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/TestEnvironment.java
    sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/
    sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/FeedsTest.java
    sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/FetchTest.java
    sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/IndexTest.java
    sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/PageTestUtil.java
    sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/SettingTest.java
    sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/util/
    sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/util/GenerateTestDataUtil.java
    sandbox/jiemamy-feeds/src/test/resources/

Added: sandbox/jiemamy-feeds/.amateras
===================================================================
--- sandbox/jiemamy-feeds/.amateras	                        (rev 0)
+++ sandbox/jiemamy-feeds/.amateras	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,12 @@
+#EclipseHTMLEditor configuration file
+#Tue Aug 11 22:26:49 JST 2009
+validateDTD=true
+javaScriptCompleters=
+useDTD=true
+validateJSP=true
+validateXML=true
+validateJS=true
+removeMarkers=true
+root=/
+validateHTML=true
+javaScripts=

Added: sandbox/jiemamy-feeds/.classpath
===================================================================
--- sandbox/jiemamy-feeds/.classpath	                        (rev 0)
+++ sandbox/jiemamy-feeds/.classpath	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,62 @@
+<classpath>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+  <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="output" path="war/WEB-INF/classes"/>
+  <classpathentry kind="var" path="M2_REPO/javax/transaction/transaction-api/1.1/transaction-api-1.1.jar" sourcepath="M2_REPO/javax/transaction/transaction-api/1.1/transaction-api-1.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/google/appengine/appengine-api-1.0-runtime/1.2.2/appengine-api-1.0-runtime-1.2.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/google/appengine/appengine-api-1.0-stubs/1.2.2/appengine-api-1.0-stubs-1.2.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar" sourcepath="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.4/commons-io-1.4.jar" sourcepath="M2_REPO/commons-io/commons-io/1.4/commons-io-1.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4-sources.jar">
+    <attributes>
+      <attribute value="jar:file:/Users/shin1/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4-javadoc.jar!/" name="javadoc_location"/>
+    </attributes>
+  </classpathentry>
+  <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/net/sourceforge/cssparser/cssparser/0.9.5/cssparser-0.9.5.jar" sourcepath="M2_REPO/net/sourceforge/cssparser/cssparser/0.9.5/cssparser-0.9.5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jpa_3.0_spec/1.1.1/geronimo-jpa_3.0_spec-1.1.1.jar" sourcepath="M2_REPO/org/apache/geronimo/specs/geronimo-jpa_3.0_spec/1.1.1/geronimo-jpa_3.0_spec-1.1.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar" sourcepath="M2_REPO/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1-sources.jar">
+    <attributes>
+      <attribute value="jar:file:/Users/shin1/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1-javadoc.jar!/" name="javadoc_location"/>
+    </attributes>
+  </classpathentry>
+  <classpathentry kind="var" path="M2_REPO/com/google/code/guice/guice/1.0/guice-1.0.jar" sourcepath="M2_REPO/com/google/code/guice/guice/1.0/guice-1.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-library/1.1/hamcrest-library-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-library/1.1/hamcrest-library-1.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/htmlunit/2.4/htmlunit-2.4.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/htmlunit/2.4/htmlunit-2.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/htmlunit-core-js/2.4/htmlunit-core-js-2.4.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/htmlunit-core-js/2.4/htmlunit-core-js-2.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jdom/jdom/1.0/jdom-1.0.jar" sourcepath="M2_REPO/jdom/jdom/1.0/jdom-1.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/json/json/20080701/json-20080701.jar" sourcepath="M2_REPO/org/json/json/20080701/json-20080701-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/4.5/junit-4.5.jar" sourcepath="M2_REPO/junit/junit/4.5/junit-4.5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/net/sourceforge/nekohtml/nekohtml/1.9.11/nekohtml-1.9.11.jar" sourcepath="M2_REPO/net/sourceforge/nekohtml/nekohtml/1.9.11/nekohtml-1.9.11-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/rome/rome/1.0/rome-1.0.jar" sourcepath="M2_REPO/rome/rome/1.0/rome-1.0-sources.jar">
+    <attributes>
+      <attribute value="jar:file:/Users/shin1/.m2/repository/rome/rome/1.0/rome-1.0-javadoc.jar!/" name="javadoc_location"/>
+    </attributes>
+  </classpathentry>
+  <classpathentry kind="var" path="M2_REPO/org/w3c/css/sac/1.3/sac-1.3.jar" sourcepath="M2_REPO/org/w3c/css/sac/1.3/sac-1.3-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/xalan/serializer/2.7.1/serializer-2.7.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.4.2/slf4j-api-1.4.2.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.4.2/slf4j-api-1.4.2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.4.2/slf4j-log4j12-1.4.2.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.4.2/slf4j-log4j12-1.4.2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/springframework/spring-core/2.5.2/spring-core-2.5.2.jar" sourcepath="M2_REPO/org/springframework/spring-core/2.5.2/spring-core-2.5.2-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/net/homeip/yusuke/twitter4j/2.0.9/twitter4j-2.0.9.jar" sourcepath="M2_REPO/net/homeip/yusuke/twitter4j/2.0.9/twitter4j-2.0.9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/openqa/selenium/webdriver/webdriver-common/0.6.870/webdriver-common-0.6.870.jar" sourcepath="M2_REPO/org/openqa/selenium/webdriver/webdriver-common/0.6.870/webdriver-common-0.6.870-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/openqa/selenium/webdriver/webdriver-firefox/0.6.870/webdriver-firefox-0.6.870.jar" sourcepath="M2_REPO/org/openqa/selenium/webdriver/webdriver-firefox/0.6.870/webdriver-firefox-0.6.870-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/openqa/selenium/webdriver/webdriver-htmlunit/0.6.870/webdriver-htmlunit-0.6.870.jar" sourcepath="M2_REPO/org/openqa/selenium/webdriver/webdriver-htmlunit/0.6.870/webdriver-htmlunit-0.6.870-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/openqa/selenium/webdriver/webdriver-safari/0.6.870/webdriver-safari-0.6.870.jar" sourcepath="M2_REPO/org/openqa/selenium/webdriver/webdriver-safari/0.6.870/webdriver-safari-0.6.870-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/wicket/wicket/1.4.0/wicket-1.4.0.jar" sourcepath="M2_REPO/org/apache/wicket/wicket/1.4.0/wicket-1.4.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/wicket/wicket-auth-roles/1.4.0/wicket-auth-roles-1.4.0.jar" sourcepath="M2_REPO/org/apache/wicket/wicket-auth-roles/1.4.0/wicket-auth-roles-1.4.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/wicket/wicket-extensions/1.4.0/wicket-extensions-1.4.0.jar" sourcepath="M2_REPO/org/apache/wicket/wicket-extensions/1.4.0/wicket-extensions-1.4.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/wicket/wicket-guice/1.4.0/wicket-guice-1.4.0.jar" sourcepath="M2_REPO/org/apache/wicket/wicket-guice/1.4.0/wicket-guice-1.4.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/wicket/wicket-ioc/1.4.0/wicket-ioc-1.4.0.jar" sourcepath="M2_REPO/org/apache/wicket/wicket-ioc/1.4.0/wicket-ioc-1.4.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/wicketstuff/wicketstuff-annotation/1.1/wicketstuff-annotation-1.1.jar" sourcepath="M2_REPO/org/wicketstuff/wicketstuff-annotation/1.1/wicketstuff-annotation-1.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04-sources.jar"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER"/>
+</classpath>
\ No newline at end of file


Property changes on: sandbox/jiemamy-feeds/.classpath
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/.project
===================================================================
--- sandbox/jiemamy-feeds/.project	                        (rev 0)
+++ sandbox/jiemamy-feeds/.project	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,24 @@
+<projectDescription>
+  <name>jiemamy-feeds</name>
+  <comment/>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
+    </buildCommand>
+    <buildCommand>
+      <name>com.google.appengine.eclipse.core.enhancerbuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>com.google.appengine.eclipse.core.projectValidator</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+    <nature>com.google.appengine.eclipse.core.gaeNature</nature>
+    <nature>com.google.gdt.eclipse.core.webAppNature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file


Property changes on: sandbox/jiemamy-feeds/.project
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/.settings/com.google.appengine.eclipse.core.prefs
===================================================================
--- sandbox/jiemamy-feeds/.settings/com.google.appengine.eclipse.core.prefs	                        (rev 0)
+++ sandbox/jiemamy-feeds/.settings/com.google.appengine.eclipse.core.prefs	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+filesCopiedToWebInfLib=appengine-api-1.0-sdk-1.2.2.jar|datanucleus-appengine-1.0.2.final.jar|datanucleus-core-1.1.4.jar|datanucleus-jpa-1.1.4.jar|geronimo-jpa_3.0_spec-1.1.1.jar|geronimo-jta_1.1_spec-1.1.1.jar|jdo2-api-2.3-ea.jar
+ormEnhancementInclusions=src/main/java/**/*.java
\ No newline at end of file


Property changes on: sandbox/jiemamy-feeds/.settings/com.google.appengine.eclipse.core.prefs
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/.settings/org.eclipse.core.resources.prefs
===================================================================
--- sandbox/jiemamy-feeds/.settings/org.eclipse.core.resources.prefs	                        (rev 0)
+++ sandbox/jiemamy-feeds/.settings/org.eclipse.core.resources.prefs	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
\ No newline at end of file


Property changes on: sandbox/jiemamy-feeds/.settings/org.eclipse.core.resources.prefs
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- sandbox/jiemamy-feeds/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ sandbox/jiemamy-feeds/.settings/org.eclipse.jdt.core.prefs	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,325 @@
+#Wed Aug 12 23:35:44 JST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=100
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true


Property changes on: sandbox/jiemamy-feeds/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- sandbox/jiemamy-feeds/.settings/org.eclipse.jdt.ui.prefs	                        (rev 0)
+++ sandbox/jiemamy-feeds/.settings/org.eclipse.jdt.ui.prefs	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,4 @@
+#Wed Aug 12 23:34:58 JST 2009
+eclipse.preferences.version=1
+formatter_profile=_AppEngine
+formatter_settings_version=11


Property changes on: sandbox/jiemamy-feeds/.settings/org.eclipse.jdt.ui.prefs
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/launches/jiemamy-feeds.web.launch
===================================================================
--- sandbox/jiemamy-feeds/launches/jiemamy-feeds.web.launch	                        (rev 0)
+++ sandbox/jiemamy-feeds/launches/jiemamy-feeds.web.launch	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/jiemamy-feeds"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jiemamy-feeds"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:jiemamy-feeds/war}"/>
+</launchConfiguration>


Property changes on: sandbox/jiemamy-feeds/launches/jiemamy-feeds.web.launch
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/pom.xml
===================================================================
--- sandbox/jiemamy-feeds/pom.xml	                        (rev 0)
+++ sandbox/jiemamy-feeds/pom.xml	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,424 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>com.shin1ogawa</groupId>
+  <artifactId>jiemamy-feeds</artifactId>
+  <packaging>war</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <properties>
+    <maven.test.failure.ignore>true</maven.test.failure.ignore>
+    <wicket.version>1.4.0</wicket.version>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.5</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.hamcrest</groupId>
+      <artifactId>hamcrest-library</artifactId>
+      <version>1.1</version>
+      <scope>test</scope>
+    </dependency>
+    <!-- GAE for java(compile) -->
+    <dependency>
+      <groupId>com.google.appengine</groupId>
+      <artifactId>appengine-api-1.0-sdk</artifactId>
+      <version>1.2.2</version>
+    </dependency>
+    <!-- GAE for java(test) -->
+    <dependency>
+      <groupId>com.google.appengine</groupId>
+      <artifactId>appengine-api-1.0-stubs</artifactId>
+      <version>1.2.2</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.appengine</groupId>
+      <artifactId>appengine-api-1.0-runtime</artifactId>
+      <version>1.2.2</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.appengine</groupId>
+      <artifactId>appengine-tools-sdk</artifactId>
+      <version>1.2.2</version>
+      <scope>test</scope>
+    </dependency>
+    <!-- GAE for java(jdo, datanucleus) -->
+    <dependency>
+      <groupId>javax.jdo</groupId>
+      <artifactId>jdo2-api</artifactId>
+      <version>2.3-ea</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.appengine.orm</groupId>
+      <artifactId>datanucleus-appengine</artifactId>
+      <version>1.0.2</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.datanucleus</groupId>
+      <artifactId>datanucleus-core</artifactId>
+      <version>1.1.4</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.datanucleus</groupId>
+      <artifactId>datanucleus-jpa</artifactId>
+      <version>1.1.4</version>
+      <scope>provided</scope>
+    </dependency>
+    <!--servlet -->
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <version>2.5</version>
+      <scope>provided</scope>
+    </dependency>
+    <!-- wicket -->
+    <dependency>
+      <groupId>org.apache.wicket</groupId>
+      <artifactId>wicket</artifactId>
+      <version>${wicket.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.wicket</groupId>
+      <artifactId>wicket-extensions</artifactId>
+      <version>${wicket.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.wicket</groupId>
+      <artifactId>wicket-guice</artifactId>
+      <version>${wicket.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.wicketstuff</groupId>
+      <artifactId>wicketstuff-annotation</artifactId>
+      <version>1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.wicket</groupId>
+      <artifactId>wicket-auth-roles</artifactId>
+      <version>${wicket.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <version>1.4.2</version>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.14</version>
+    </dependency>
+    <!-- rome -->
+    <dependency>
+      <groupId>rome</groupId>
+      <artifactId>rome</artifactId>
+      <version>1.0</version>
+    </dependency>
+    <!-- twitter4j -->
+    <dependency>
+      <groupId>net.homeip.yusuke</groupId>
+      <artifactId>twitter4j</artifactId>
+      <version>[2.0,)</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>nlog4j</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    
+    <!-- WebDriver(for integration-test) -->
+    <dependency>
+      <groupId>org.openqa.selenium.webdriver</groupId>
+      <artifactId>webdriver-htmlunit</artifactId>
+      <version>0.6.870</version>
+    </dependency>
+    <dependency>
+      <groupId>org.openqa.selenium.webdriver</groupId>
+      <artifactId>webdriver-safari</artifactId>
+      <version>0.6.870</version>
+    </dependency>
+    <dependency>
+      <groupId>org.openqa.selenium.webdriver</groupId>
+      <artifactId>webdriver-firefox</artifactId>
+      <version>0.6.870</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <finalName>${artifactId}</finalName>
+    <outputDirectory>war/WEB-INF/classes</outputDirectory>
+    <testOutputDirectory>target/test-classes</testOutputDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+          <encoding>UTF-8</encoding>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <configuration>
+          <downloadSources>true</downloadSources>
+          <excludes>
+            <exclude>xerces:xercesImpl</exclude>
+            <exclude>javax.servlet:servlet-api</exclude>
+            <exclude>javax.servlet:jsp-api</exclude>
+            <exclude>javax.jdo:jdo2-api</exclude>
+            <exclude>com.google.appengine:appengine-api-1.0-sdk</exclude>
+            <exclude>com.google.appengine:appengine-tools-sdk</exclude>
+            <exclude>com.google.appengine.orm:datanucleus-appengine</exclude>
+            <exclude>org.datanucleus:datanucleus-core</exclude>
+			<exclude>org.datanucleus:datanucleus-jpa</exclude>
+            <exclude>xalan:xalan</exclude>
+          </excludes>
+          <additionalProjectnatures>
+            <projectnature>com.google.appengine.eclipse.core.gaeNature</projectnature>
+            <projectnature>com.google.gdt.eclipse.core.webAppNature</projectnature>
+          </additionalProjectnatures>
+          <additionalBuildcommands>
+            <buildcommand>com.google.gdt.eclipse.core.webAppProjectValidator</buildcommand>
+            <buildcommand>com.google.appengine.eclipse.core.enhancerbuilder</buildcommand>
+            <buildcommand>com.google.appengine.eclipse.core.projectValidator</buildcommand>
+          </additionalBuildcommands>
+          <classpathContainers>
+            <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
+            <classpathContainer>com.google.appengine.eclipse.core.GAE_CONTAINER</classpathContainer>
+          </classpathContainers>
+          <additionalConfig>
+            <file>
+              <name>.settings/org.eclipse.core.resources.prefs</name>
+              <content>
+                <![CDATA[
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
+                 ]]>
+              </content>
+            </file>
+            <file>
+              <name>.settings/com.google.appengine.eclipse.core.prefs</name>
+              <content>
+                <![CDATA[
+eclipse.preferences.version=1
+filesCopiedToWebInfLib=appengine-api-1.0-sdk-1.2.2.jar|datanucleus-appengine-1.0.2.final.jar|datanucleus-core-1.1.4.jar|datanucleus-jpa-1.1.4.jar|geronimo-jpa_3.0_spec-1.1.1.jar|geronimo-jta_1.1_spec-1.1.1.jar|jdo2-api-2.3-ea.jar
+ormEnhancementInclusions=src/main/java/**/*.java
+                 ]]>
+              </content>
+            </file>
+          </additionalConfig>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-clean-plugin</artifactId>
+        <configuration>
+          <filesets>
+            <fileset>
+              <directory>war/WEB-INF/lib</directory>
+              <includes>
+                <include>**/*.jar</include>
+              </includes>
+            </fileset>
+          </filesets>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <configuration>
+          <outputDirectory>war/WEB-INF/lib</outputDirectory>
+          <excludeScope>provided</excludeScope>
+          <includeScope>compile</includeScope>
+          <excludeGroupIds>javax.servlet,javax.transaction,org.openqa.selenium.webdriver,net.sourceforge.htmlunit,net.sourceforge.nekohtml</excludeGroupIds>
+          <overWriteReleases>false</overWriteReleases>
+          <overWriteSnapshots>true</overWriteSnapshots>
+          <overWriteIfNewer>true</overWriteIfNewer>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>process-resources</phase>
+            <goals>
+              <goal>copy-dependencies</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <warSourceDirectory>war</warSourceDirectory>
+        </configuration>
+      </plugin>
+      <plugin>
+        <!-- http://www.datanucleus.org/products/accessplatform/enhancer.html#maven2 -->
+        <groupId>org.datanucleus</groupId>
+        <artifactId>maven-datanucleus-plugin</artifactId>
+        <version>1.1.3</version>
+        <configuration>
+          <verbose>true</verbose>
+          <mappingIncludes>**/*.class</mappingIncludes>
+          <fork>false</fork>
+          <enhancerName>ASM</enhancerName>
+          <api>JDO</api>
+          <jdkLogConfiguration>war/WEB-INF/logging.properties</jdkLogConfiguration>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>compile</phase>
+            <goals>
+              <goal>enhance</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>**/*TestEnvironment.java</exclude>
+            <exclude>**/Abstract*.java</exclude>
+            <exclude>**/itest/*Test.java</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>test</phase>
+            <goals>
+              <goal>report-only</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <repositories>
+    <repository>
+      <id>openqa-releases</id>
+      <name>OpenQA Releases</name>
+      <url>http://nexus.openqa.org/content/repositories/releases</url>
+      <releases>
+        <enabled>true</enabled>
+      </releases>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>jpox</id>
+      <url>http://www.jpox.org/downloads/maven2</url>
+    </repository>
+    <repository>
+      <id>maven2-repository.dev.java.net</id>
+      <name>Java.net Repository for Maven</name>
+      <url>http://download.java.net/maven/2/</url>
+      <layout>default</layout>
+    </repository>
+    <repository>
+      <id>wicket-stuff.org</id>
+      <url>http://wicketstuff.org/maven/repository/</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>DataNucleus</id>
+      <url>http://www.datanucleus.org/downloads/maven2</url>
+    </repository>
+    <repository>
+      <id>DataNucleus_Nightly_Repos</id>
+      <url>http://www.datanucleus.org/downloads/maven-nightly</url>
+      <layout>legacy</layout>
+    </repository>
+    <repository>
+      <id>mvnsearch</id>
+      <url>http://www.mvnsearch.org/maven2</url>
+    </repository>
+  </repositories>
+  <pluginRepositories>
+    <pluginRepository>
+      <id>DataNucleus</id>
+      <url>http://www.datanucleus.org/downloads/maven2</url>
+    </pluginRepository>
+  </pluginRepositories>
+  <profiles>
+    <profile>
+      <id>integration-test</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.shin1ogawa</groupId>
+            <artifactId>gae-maven2-plugin</artifactId>
+            <version>1.2.2-SNAPSHOT</version>
+            <configuration>
+              <sdkUnZipDirectory>target/sdk/</sdkUnZipDirectory>
+              <sdkSaveAs>appengine-java-sdk-1.2.2.zip</sdkSaveAs>
+              <wait>true</wait>
+            </configuration>
+            <executions>
+              <execution>
+                <id>start container</id>
+                <phase>pre-integration-test</phase>
+                <goals>
+                  <goal>start</goal>
+                </goals>
+                <configuration>
+                  <wait>false</wait>
+                </configuration>
+              </execution>
+              <execution>
+                <id>stop container</id>
+                <phase>post-integration-test</phase>
+                <goals>
+                  <goal>stop</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <skip>true</skip>
+            </configuration>
+            <executions>
+              <execution>
+                <phase>integration-test</phase>
+                <goals>
+                  <goal>test</goal>
+                </goals>
+                <configuration>
+                  <skip>false</skip>
+                  <includes>
+                    <include>**/itest/*Test.java</include>
+                  </includes>
+                  <excludes>
+                    <exclude> **/*TestEnvironment.java</exclude>
+                    <exclude>**/Abstract*.java</exclude>
+                  </excludes>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>shin1ogawa gae-j</id>
+          <url> http://gae-j-samples.sourceforge.jp/maven/repository</url>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+</project>


Property changes on: sandbox/jiemamy-feeds/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/JdoModule.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/JdoModule.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/JdoModule.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,31 @@
+package com.shin1ogawa;
+
+import javax.jdo.JDOHelper;
+import javax.jdo.PersistenceManager;
+import javax.jdo.PersistenceManagerFactory;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Provider;
+
+/**
+ * @author shin1ogawa
+ */
+public class JdoModule extends AbstractModule {
+
+	static PersistenceManagerFactory factory;
+
+	static {
+		factory = JDOHelper.getPersistenceManagerFactory("transactions-optional");
+	}
+
+	@Override
+	protected void configure() {
+		bind(PersistenceManagerFactory.class).toInstance(factory);
+		bind(PersistenceManager.class).toProvider(new Provider<PersistenceManager>() {
+
+			public PersistenceManager get() {
+				return factory.getPersistenceManager();
+			}
+		});
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/JdoModule.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/RunInTransaction.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/RunInTransaction.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/RunInTransaction.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,164 @@
+package com.shin1ogawa;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import com.google.appengine.api.datastore.DatastoreFailureException;
+import com.google.appengine.api.datastore.DatastoreService;
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.DatastoreTimeoutException;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.Key;
+import com.google.appengine.api.datastore.Transaction;
+
+public class RunInTransaction {
+	public static void run(InTransaction inTransaction, int retryCount) {
+		if (inTransaction == null) {
+			throw new IllegalArgumentException();
+		}
+		DatastoreService service = DatastoreServiceFactory.getDatastoreService();
+		for (int i = 0; i < retryCount; i++) {
+			Transaction transaction = service.beginTransaction();
+			if (i == 0) {
+				LOGGER.log(Level.INFO, String.format("start runInTransaction(%s): run=%s:%s",
+						transaction.getId(), inTransaction.getClass().getName(), Integer
+								.toHexString(inTransaction.hashCode())));
+			} else {
+				LOGGER.log(Level.INFO, String.format("retry(%d) runInTransaction(%s): run=%s:%s",
+						i, transaction.getId(), inTransaction.getClass().getName(), Integer
+								.toHexString(inTransaction.hashCode())));
+			}
+			try {
+				inTransaction.setUp(service);
+			} catch (Exception ex) {
+				inTransaction.onException(service, ex);
+				inTransaction.onAbnormalEnd(service);
+				inTransaction.tearDown(service);
+				throw new RunInTransactionException(ex);
+			}
+			try {
+				inTransaction.run(service);
+				transaction.commit();
+				inTransaction.onEnd(service);
+				inTransaction.tearDown(service);
+				return;
+			} catch (DatastoreTimeoutException e) {
+				onDatastoreException(inTransaction, service, transaction, e);
+			} catch (DatastoreFailureException e) {
+				onDatastoreException(inTransaction, service, transaction, e);
+			} catch (Exception e) {
+				inTransaction.onException(service, e);
+				inTransaction.onAbnormalEnd(service);
+				inTransaction.tearDown(service);
+				throw new RunInTransactionException(e);
+			} finally {
+				if (transaction != null && transaction.isActive()) {
+					transaction.rollback();
+				}
+			}
+		}
+		inTransaction.onAbnormalEnd(service);
+		inTransaction.tearDown(service);
+	}
+
+	private static void onDatastoreException(InTransaction inTransaction, DatastoreService service,
+			Transaction transaction, Exception e) {
+		if (transaction != null && transaction.isActive()) {
+			transaction.rollback();
+		}
+		inTransaction.onException(service, e);
+		LOGGER.log(Level.WARNING, String.format("failure to runInTransaction(%s): run=%s:%s",
+				transaction.getId(), inTransaction.getClass().getName(), Integer
+						.toHexString(inTransaction.hashCode())), e);
+	}
+
+	public static void run(InTransaction inTransaction) {
+		run(inTransaction, 5);
+	}
+
+	public static interface InTransaction {
+		void setUp(DatastoreService service);
+
+		void run(DatastoreService service);
+
+		void onException(DatastoreService service, Exception ex);
+
+		void onEnd(DatastoreService service);
+
+		void onAbnormalEnd(DatastoreService service);
+
+		void tearDown(DatastoreService service);
+	}
+
+	public static abstract class AbstractInTransaction implements InTransaction {
+		protected static final Logger LOGGER = Logger.getLogger(InTransaction.class.getName());
+
+		public void setUp(DatastoreService service) {
+		}
+
+		public void onEnd(DatastoreService service) {
+		}
+
+		public void onAbnormalEnd(DatastoreService service) {
+		}
+
+		public void onException(DatastoreService service, Exception ex) {
+		}
+
+		public void tearDown(DatastoreService service) {
+		}
+	}
+
+	public static class SaveInTransaction extends AbstractInTransaction {
+
+		final List<Entity> entities;
+
+		public SaveInTransaction(Entity entity) {
+			this.entities = new ArrayList<Entity>(1);
+			this.entities.add(entity);
+		}
+
+		public SaveInTransaction(Entity... entities) {
+			this.entities = Arrays.asList(entities);
+		}
+
+		public void run(DatastoreService service) {
+			service.put(entities);
+		}
+	}
+
+	public static class DeleteInTransaction extends AbstractInTransaction {
+
+		final Set<Key> keySet;
+
+		public DeleteInTransaction(Key key) {
+			this.keySet = new HashSet<Key>(1);
+			this.keySet.add(key);
+		}
+
+		public DeleteInTransaction(Key... entities) {
+			this.keySet = new HashSet<Key>();
+			this.keySet.addAll(Arrays.asList(entities));
+		}
+
+		public void run(DatastoreService service) {
+			service.delete(keySet);
+		}
+	}
+
+	public static class RunInTransactionException extends RuntimeException {
+
+		private static final long serialVersionUID = -5214789198371244428L;
+
+		public RunInTransactionException(Throwable cause) {
+			super(cause);
+		}
+	}
+
+	static final Logger LOGGER = Logger.getLogger(RunInTransaction.class.getName());
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/RunInTransaction.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/WicketApplication.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/WicketApplication.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/WicketApplication.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,191 @@
+package com.shin1ogawa;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Logger;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.guice.GuiceComponentInjector;
+import org.apache.wicket.protocol.http.HttpSessionStore;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.protocol.http.WebRequest;
+import org.apache.wicket.session.ISessionStore;
+import org.apache.wicket.util.listener.ChangeListenerSet;
+import org.apache.wicket.util.listener.IChangeListener;
+import org.apache.wicket.util.time.Duration;
+import org.apache.wicket.util.time.Time;
+import org.apache.wicket.util.watch.IModifiable;
+import org.apache.wicket.util.watch.IModificationWatcher;
+import org.wicketstuff.annotation.scan.AnnotatedMountScanner;
+
+import com.google.apphosting.api.ApiProxy;
+import com.google.inject.AbstractModule;
+import com.google.inject.Module;
+import com.shin1ogawa.page.Index;
+
+public class WicketApplication extends WebApplication {
+	ConfigurationType configurationType = null;
+
+	private static final Logger LOGGER = Logger.getLogger(WicketApplication.class.getName());
+
+	public Class<Index> getHomePage() {
+		return Index.class;
+	}
+
+	@Override
+	public String getConfigurationType() {
+		if (configurationType == null) {
+			configurationType = ConfigurationType.getCurrent(getServletContext());
+		}
+		return configurationType.getType();
+	}
+
+	@Override
+	protected void init() {
+		super.init();
+		LOGGER.info("getServletContext().getServerInfo()=" + getServletContext().getServerInfo());
+		LOGGER.info("configurationType=\"" + getConfigurationType() + "\"で動作します。");
+		LOGGER.info("[ENV]Application Id=" + ApiProxy.getCurrentEnvironment().getAppId());
+		LOGGER.info("[ENV]Application Version=" + ApiProxy.getCurrentEnvironment().getVersionId());
+		if (configurationType == ConfigurationType.DEVELOPMENT) {
+			getResourceSettings().setResourceWatcher(new AppEngineModificationWatcher());
+		}
+		addComponentInstantiationListener(new GuiceComponentInjector(this, getGuiceModule()));
+		AnnotatedMountScanner annotatedMountScanner = new AnnotatedMountScanner();
+		annotatedMountScanner.scanPackage("com.shin1ogawa.page").mount(this);
+		annotatedMountScanner.scanPackage("com.shin1ogawa.cron").mount(this);
+	}
+
+	protected Module getGuiceModule() {
+		return new AbstractModule() {
+
+			@Override
+			protected void configure() {
+				install(new JdoModule());
+			}
+		};
+	}
+
+	@Override
+	protected ISessionStore newSessionStore() {
+		return new HttpSessionStore(this);
+	}
+
+	@Override
+	protected WebRequest newWebRequest(HttpServletRequest servletRequest) {
+		if (configurationType == ConfigurationType.DEVELOPMENT) {
+			getResourceSettings().getResourceWatcher(true).start(
+					getResourceSettings().getResourcePollFrequency());
+		}
+		return super.newWebRequest(servletRequest);
+	}
+
+	public enum ConfigurationType {
+		DEVELOPMENT(Application.DEVELOPMENT), DEPLOYMENT(Application.DEPLOYMENT);
+
+		private final String type;
+
+		private ConfigurationType(String type) {
+			this.type = type;
+		}
+
+		public static ConfigurationType getCurrent(ServletContext servletContext) {
+			if (servletContext.getServerInfo().startsWith("Google App Engine Development")
+					|| servletContext.getServerInfo().startsWith("Wicket Mock Test Environment")) {
+				return DEVELOPMENT;
+			}
+			return DEPLOYMENT;
+		}
+
+		/**
+		 * @return the type
+		 */
+		public String getType() {
+			return type;
+		}
+	}
+
+	/**
+	 * AppEngineSDKの制限にひっかからない{@link IModificationWatcher}の実装。
+	 * <p>
+	 * DEVELOPMENTモードで使用する。
+	 * </p>
+	 * <ul>
+	 * <li>http://blog.manufacturers-hub.com/article/123006024.html</li>
+	 * </ul>
+	 * <p>
+	 * 上記URLのサイトで紹介されていていた、wicket-1.4-RC6から使用できる機能を活用したモジュール。
+	 * </p>
+	 * 
+	 * @author Shinichi Ogawa
+	 */
+	private static class AppEngineModificationWatcher implements IModificationWatcher {
+
+		private static class Entry {
+
+			Time lastModifiedTime;
+
+			ChangeListenerSet listeners = new ChangeListenerSet();
+
+			IModifiable modifiable;
+		}
+
+		private final Map<IModifiable, Entry> modifiableToEntry = new ConcurrentHashMap<IModifiable, Entry>();
+
+		public boolean add(IModifiable modifiable, IChangeListener listener) {
+
+			Entry entry = modifiableToEntry.get(modifiable);
+			if (entry == null) {
+				Time lastModifiedTime = modifiable.lastModifiedTime();
+				if (lastModifiedTime != null) {
+					Entry newEntry = new Entry();
+
+					newEntry.modifiable = modifiable;
+					newEntry.lastModifiedTime = lastModifiedTime;
+					newEntry.listeners.add(listener);
+
+					modifiableToEntry.put(modifiable, newEntry);
+				}
+
+				return true;
+			} else {
+				return entry.listeners.add(listener);
+			}
+		}
+
+		public void destroy() {
+		}
+
+		public Set<IModifiable> getEntries() {
+			return modifiableToEntry.keySet();
+		}
+
+		public IModifiable remove(IModifiable modifiable) {
+			Entry entry = modifiableToEntry.remove(modifiable);
+			if (entry != null) {
+				return entry.modifiable;
+			}
+
+			return null;
+		}
+
+		public void start(Duration pollFrequency) {
+			Iterator<Entry> iterator = new ArrayList<Entry>(modifiableToEntry.values()).iterator();
+			while (iterator.hasNext()) {
+				Entry entry = iterator.next();
+				Time modifiableLastModified = entry.modifiable.lastModifiedTime();
+				if ((modifiableLastModified != null)
+						&& modifiableLastModified.after(entry.lastModifiedTime)) {
+					entry.listeners.notifyListeners();
+					entry.lastModifiedTime = modifiableLastModified;
+				}
+			}
+		}
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/WicketApplication.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityKeyLabel.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityKeyLabel.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityKeyLabel.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,34 @@
+package com.shin1ogawa.component;
+
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupStream;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.model.Model;
+
+import com.google.appengine.api.datastore.DatastoreService;
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.EntityNotFoundException;
+import com.google.appengine.api.datastore.Key;
+
+public class EntityKeyLabel extends Label {
+	private static final long serialVersionUID = 3866861248963522135L;
+
+	public EntityKeyLabel(String id, Key key) {
+		super(id, new Model<Key>(key));
+	}
+
+	@Override
+	protected void onComponentTagBody(MarkupStream markupStream, ComponentTag tag) {
+		DatastoreService service = DatastoreServiceFactory.getDatastoreService();
+		Entity entity = null;
+		try {
+			entity = service.get((Key) getDefaultModelObject());
+		} catch (EntityNotFoundException e) {
+			e.printStackTrace();
+		}
+		Object propertyValue = entity.getProperty(getId());
+		String labelString = propertyValue != null ? propertyValue.toString() : "";
+		super.replaceComponentTagBody(markupStream, tag, labelString);
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityKeyLabel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityLabel.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityLabel.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityLabel.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,23 @@
+package com.shin1ogawa.component;
+
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupStream;
+import org.apache.wicket.markup.html.basic.Label;
+
+import com.google.appengine.api.datastore.Entity;
+
+public class EntityLabel extends Label {
+	private static final long serialVersionUID = -5835638617478814973L;
+
+	public EntityLabel(String id, Entity entity) {
+		super(id, new EntityModel(entity));
+	}
+
+	@Override
+	protected void onComponentTagBody(MarkupStream markupStream, ComponentTag tag) {
+		Entity entity = (Entity) getDefaultModel().getObject();
+		Object propertyValue = entity.getProperty(getId());
+		String labelString = propertyValue != null ? propertyValue.toString() : "";
+		super.replaceComponentTagBody(markupStream, tag, labelString);
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityLabel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityModel.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityModel.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityModel.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,27 @@
+package com.shin1ogawa.component;
+
+import org.apache.wicket.model.IModel;
+
+import com.google.appengine.api.datastore.Entity;
+
+public class EntityModel implements IModel<Entity> {
+
+	private static final long serialVersionUID = -7876720231855818008L;
+
+	private Entity entity;
+
+	public EntityModel(Entity entity) {
+		this.entity = entity;
+	}
+
+	public Entity getObject() {
+		return entity;
+	}
+
+	public void setObject(Entity object) {
+		this.entity = object;
+	}
+
+	public void detach() {
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/EntityModel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/QueryCounterLabel.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/QueryCounterLabel.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/QueryCounterLabel.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,28 @@
+package com.shin1ogawa.component;
+
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.MarkupStream;
+import org.apache.wicket.markup.html.basic.Label;
+
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Query;
+
+public class QueryCounterLabel extends Label {
+
+	private static final long serialVersionUID = 2839105908253091700L;
+
+	final Query query;
+
+	public QueryCounterLabel(String id, Query query) {
+		super(id);
+		this.query = query;
+	}
+
+	@Override
+	protected void onComponentTagBody(MarkupStream markupStream, ComponentTag tag) {
+		query.setKeysOnly();
+		int countEntities = DatastoreServiceFactory.getDatastoreService().prepare(query)
+				.countEntities();
+		super.replaceComponentTagBody(markupStream, tag, String.valueOf(countEntities));
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/QueryCounterLabel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/QueryDataProvider.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/QueryDataProvider.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/QueryDataProvider.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,85 @@
+package com.shin1ogawa.component;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.wicket.markup.repeater.data.IDataProvider;
+import org.apache.wicket.model.IModel;
+
+import com.google.appengine.api.datastore.DatastoreService;
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.FetchOptions;
+import com.google.appengine.api.datastore.Query;
+
+public class QueryDataProvider implements IDataProvider<Entity> {
+
+	private static final long serialVersionUID = 8111193930513699825L;
+
+	final Query query;
+
+	public QueryDataProvider(Query query) {
+		this.query = query;
+	}
+
+	@SuppressWarnings("unchecked")
+	public Iterator<? extends Entity> iterator(int first, int count) {
+		if (count == 0) {
+			return CollectionUtils.EMPTY_COLLECTION.iterator();
+		}
+
+		DatastoreService service = DatastoreServiceFactory.getDatastoreService();
+		List<Entity> list = service.prepare(query).asList(
+				FetchOptions.Builder.withOffset(first).limit(count));
+		return list.iterator();
+	}
+
+	public IModel<Entity> model(Entity object) {
+		return new EntityModel(object);
+	}
+
+	public int size() {
+		DatastoreService service = DatastoreServiceFactory.getDatastoreService();
+		Query keyOnlyQuery = null;
+		keyOnlyQuery = query.isKeysOnly() ? query : cloneQuery().setKeysOnly();
+		int count = service.prepare(keyOnlyQuery).countEntities();
+		return count;
+	}
+
+	private Query cloneQuery() {
+		ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+		ObjectOutputStream out = null;
+		try {
+			out = new ObjectOutputStream(byteOut);
+			out.writeObject(query);
+		} catch (IOException e) {
+			e.printStackTrace();
+			return null;
+		} finally {
+			IOUtils.closeQuietly(out);
+		}
+		Query clonedQuery = null;
+		byte[] byteArray = byteOut.toByteArray();
+		ObjectInputStream in = null;
+		try {
+			in = new ObjectInputStream(new ByteArrayInputStream(byteArray));
+			clonedQuery = (Query) in.readObject();
+		} catch (Exception e) {
+			e.printStackTrace();
+			return null;
+		} finally {
+			IOUtils.closeQuietly(in);
+		}
+		return clonedQuery;
+	}
+
+	public void detach() {
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/component/QueryDataProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/cron/Fetch.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/cron/Fetch.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/cron/Fetch.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,44 @@
+package com.shin1ogawa.cron;
+
+import java.util.List;
+import java.util.logging.Level;
+
+import org.apache.wicket.PageParameters;
+import org.wicketstuff.annotation.mount.MountPath;
+import org.wicketstuff.annotation.strategy.MountQueryString;
+
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.Query;
+import com.google.appengine.api.datastore.Query.FilterOperator;
+import com.google.inject.Inject;
+import com.shin1ogawa.RunInTransaction;
+import com.shin1ogawa.entity.FeedUrl;
+import com.shin1ogawa.page.AppengineBaseWebPage;
+import com.shin1ogawa.service.GetEntries;
+import com.shin1ogawa.service.SaveFetchHistory;
+import com.sun.syndication.feed.synd.SyndEntry;
+
+ @ MountPath(path = "/cron/fetch")
+ @ MountQueryString
+public class Fetch extends AppengineBaseWebPage {
+
+	@Inject
+	GetEntries service;
+
+	public Fetch(PageParameters parameters) {
+		String name = parameters.getString("name");
+		LOGGER.log(Level.INFO, name + "のFetchを開始。");
+		Query query = new Query(FeedUrl.kind()).addFilter("name", FilterOperator.EQUAL, name);
+		Entity entity = DatastoreServiceFactory.getDatastoreService().prepare(query)
+				.asSingleEntity();
+		String url = (String) entity.getProperty("url");
+		LOGGER.log(Level.INFO, "url=" + url);
+		try {
+			List<SyndEntry> entries = service.service(url);
+			RunInTransaction.run(new SaveFetchHistory(entity.getKey(), entries));
+		} catch (Exception e) {
+			LOGGER.log(Level.WARNING, "failure to url fetch. url=" + url, e);
+		}
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/cron/Fetch.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/cron/Tweet.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/cron/Tweet.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/cron/Tweet.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,64 @@
+package com.shin1ogawa.cron;
+
+import java.util.List;
+import java.util.logging.Level;
+
+import org.wicketstuff.annotation.mount.MountPath;
+
+import twitter4j.Status;
+import twitter4j.Twitter;
+
+import com.google.appengine.api.datastore.DatastoreService;
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.FetchOptions;
+import com.google.appengine.api.datastore.Query;
+import com.google.appengine.api.datastore.Query.FilterOperator;
+import com.google.appengine.api.datastore.Query.SortDirection;
+import com.shin1ogawa.RunInTransaction;
+import com.shin1ogawa.RunInTransaction.SaveInTransaction;
+import com.shin1ogawa.entity.Entry;
+import com.shin1ogawa.page.AppengineBaseWebPage;
+import com.shin1ogawa.util.ApplicationSettingUtil;
+
+ @ MountPath(path = "/cron/tweet")
+public class Tweet extends AppengineBaseWebPage {
+
+	public Tweet() {
+		Query query = new Query(Entry.kind());
+		query.addFilter(Entry.tweeted.name(), FilterOperator.EQUAL, false);
+		query.addSort(Entry.published.name(), SortDirection.ASCENDING);
+		int limitSizeForTweet = Integer.valueOf((String) ApplicationSettingUtil
+				.getSettingValue("limitSizeForTweet"));
+		DatastoreService service = DatastoreServiceFactory.getDatastoreService();
+		List<Entity> entries = service.prepare(query).asList(
+				FetchOptions.Builder.withLimit(limitSizeForTweet));
+		LOGGER.log(Level.INFO, "クエリの実行が完了。size=" + entries.size());
+		String user = (String) ApplicationSettingUtil.getSettingValue("twitter-user");
+		String password = (String) ApplicationSettingUtil.getSettingValue("twitter-password");
+		Twitter twitter = new Twitter(user, password);
+		LOGGER.log(Level.INFO, "Twitterの認証完了。");
+		int failureCount = 0;
+		int successCount = 0;
+		for (Entity entry : entries) {
+			StringBuilder b = new StringBuilder();
+			Object title = entry.getProperty("title");
+			b.append(title).append(" ").append(entry.getProperty("link"));
+			LOGGER.log(Level.FINE, "Post の準備を開始。 title=" + title);
+			try {
+				Status status = twitter.updateStatus(b.toString());
+				successCount++;
+				LOGGER.log(Level.FINE, "Post が終了。 title=" + title + ", status=" + status);
+			} catch (Exception e) {
+				LOGGER.log(Level.WARNING, "Post に失敗. title=" + title, e);
+				failureCount++;
+				continue;
+			}
+			entry.setProperty(Entry.tweeted.name(), true);
+			RunInTransaction.run(new SaveInTransaction(entry));
+			LOGGER.log(Level.FINE, "Datastoreの更新が終了。 title=" + title);
+		}
+		LOGGER.log(Level.INFO, "Twitterの認証完了。Postに成功した件数=" + successCount + " Postに失敗した件数="
+				+ failureCount);
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/cron/Tweet.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/Entry.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/Entry.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/Entry.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,28 @@
+package com.shin1ogawa.entity;
+
+import java.util.Date;
+
+import com.google.appengine.api.datastore.Text;
+import com.sun.syndication.feed.synd.SyndEntry;
+
+public enum Entry {
+	title(String.class), uri(String.class), link(String.class), published(Date.class), description(
+			Text.class), raw(SyndEntry.class), author(String.class), tweeted(Boolean.class);
+
+	public static String kind() {
+		return Entry.class.getSimpleName();
+	}
+
+	private final Class<?> type;
+
+	private Entry(Class<?> type) {
+		this.type = type;
+	}
+
+	/**
+	 * @return the type
+	 */
+	public Class<?> type() {
+		return type;
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/Entry.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/FeedUrl.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/FeedUrl.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/FeedUrl.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,25 @@
+package com.shin1ogawa.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public enum FeedUrl {
+	name(String.class), url(String.class), created(Date.class), lastFetched(Date.class);
+
+	public static String kind() {
+		return FeedUrl.class.getSimpleName();
+	}
+
+	private final Class<? extends Serializable> type;
+
+	private FeedUrl(Class<? extends Serializable> type) {
+		this.type = type;
+	}
+
+	/**
+	 * @return the type
+	 */
+	public Class<? extends Serializable> type() {
+		return type;
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/FeedUrl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/FetchHistory.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/FetchHistory.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/FetchHistory.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,25 @@
+package com.shin1ogawa.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public enum FetchHistory {
+	url(String.class), created(Date.class), status(Boolean.class);
+
+	public static String kind() {
+		return FetchHistory.class.getSimpleName();
+	}
+
+	private final Class<? extends Serializable> type;
+
+	private FetchHistory(Class<? extends Serializable> type) {
+		this.type = type;
+	}
+
+	/**
+	 * @return the type
+	 */
+	public Class<? extends Serializable> type() {
+		return type;
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/entity/FetchHistory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/AppengineBaseWebPage.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/AppengineBaseWebPage.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/AppengineBaseWebPage.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,48 @@
+package com.shin1ogawa.page;
+
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.io.output.ByteArrayOutputStream;
+import org.apache.wicket.Application;
+import org.apache.wicket.markup.html.WebPage;
+
+public class AppengineBaseWebPage extends WebPage {
+
+	protected static final Logger LOGGER = Logger.getLogger(AppengineBaseWebPage.class.getName());
+
+	public AppengineBaseWebPage() {
+		setVersioned(false);
+		LOGGER.log(Level.INFO, getLogPrefix() + "constructor");
+	}
+
+	@Override
+	protected void onDetach() {
+		super.onDetach();
+		if (Application.get().getConfigurationType() == Application.DEVELOPMENT) {
+			testSerialize();
+		}
+		LOGGER.log(Level.INFO, getLogPrefix() + "session.size=" + getSession().getSizeInBytes());
+	}
+
+	private String getLogPrefix() {
+		return String.format("%s:%s sessionId=%s, version=%d, %s, pageMapName=%s: ", this
+				.getClass().getSimpleName(), Integer.toHexString(hashCode()), getSession().getId(),
+				getVersions(), isStateless() ? "stateless" : "stateful", getPageMapName());
+	}
+
+	private void testSerialize() {
+		ObjectOutputStream out = null;
+		try {
+			out = new ObjectOutputStream(new ByteArrayOutputStream());
+			out.writeObject(getSession());
+		} catch (IOException e) {
+			LOGGER.log(Level.WARNING, "failure to serialize", e);
+		} finally {
+			IOUtils.closeQuietly(out);
+		}
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/AppengineBaseWebPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Feeds.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Feeds.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Feeds.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,125 @@
+package com.shin1ogawa.page;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.RequiredTextField;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.panel.FeedbackPanel;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.markup.repeater.data.DataView;
+import org.apache.wicket.markup.repeater.data.IDataProvider;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.validation.validator.StringValidator;
+import org.apache.wicket.validation.validator.UrlValidator;
+import org.wicketstuff.annotation.mount.MountPath;
+
+import com.google.appengine.api.datastore.DatastoreService;
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.FetchOptions;
+import com.google.appengine.api.datastore.Query;
+import com.google.appengine.api.datastore.Query.SortDirection;
+import com.shin1ogawa.RunInTransaction;
+import com.shin1ogawa.component.EntityLabel;
+import com.shin1ogawa.component.EntityModel;
+import com.shin1ogawa.entity.FeedUrl;
+
+ @ MountPath(path = "Feeds")
+public class Feeds extends AppengineBaseWebPage {
+
+	final MarkupContainer container;
+
+	private String name;
+	private String url;
+
+	public Feeds() {
+		add(container = (MarkupContainer) new WebMarkupContainer("container")
+				.setOutputMarkupId(true));
+
+		createList();
+		createForm();
+	}
+
+	private void createForm() {
+		Form<Feeds> form = new Form<Feeds>("form", new CompoundPropertyModel<Feeds>(this)) {
+
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected void onSubmit() {
+				Entity entity = new Entity(FeedUrl.kind());
+				entity.setProperty(FeedUrl.name.name(), name);
+				entity.setProperty(FeedUrl.url.name(), url);
+				RunInTransaction.run(new RunInTransaction.SaveInTransaction(entity));
+				super.setResponsePage(new Feeds());
+			}
+		};
+		add(form);
+		form.add(new FeedbackPanel("feedback"));
+		form.add(new RequiredTextField<String>("name").add(StringValidator.maximumLength(500)));
+		form.add(new RequiredTextField<String>("url").add(StringValidator.maximumLength(500)).add(
+				new UrlValidator()));
+	}
+
+	private void createList() {
+		DataView<Entity> list = new DataView<Entity>("list", new DataProvider(), 10) {
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected void populateItem(Item<Entity> item) {
+				item.add(new BookmarkablePageLink<Void>("link", Fetch.class, new PageParameters(
+						"id=" + item.getModelObject().getKey().getId())));
+				item.add(new EntityLabel("name", item.getModelObject()));
+				item.add(new EntityLabel("url", item.getModelObject()));
+			}
+		};
+		container.add(list);
+		container.add(new AjaxPagingNavigator("navi", list));
+	}
+
+	static class DataProvider implements IDataProvider<Entity> {
+		private static final long serialVersionUID = 1L;
+
+		private List<Entity> list;
+
+		public DataProvider() {
+			DatastoreService service = DatastoreServiceFactory.getDatastoreService();
+			Query query = new Query(FeedUrl.kind()).addSort(FeedUrl.url.name(),
+					SortDirection.ASCENDING);
+			List<Entity> list = service.prepare(query).asList(FetchOptions.Builder.withLimit(1000));
+			this.list = list;
+		}
+
+		public Iterator<? extends Entity> iterator(int first, int count) {
+			if (CollectionUtils.isEmpty(list)) {
+				return new ArrayList<Entity>(0).iterator();
+			}
+			int size = size();
+			int toIndex = first + count;
+			if (toIndex > size) {
+				toIndex = size() - 1;
+			}
+			return list.subList(first, toIndex).iterator();
+		}
+
+		public IModel<Entity> model(Entity object) {
+			return new EntityModel(object);
+		}
+
+		public int size() {
+			return list.size();
+		}
+
+		public void detach() {
+		}
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Feeds.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Fetch.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Fetch.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Fetch.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,105 @@
+package com.shin1ogawa.page;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.RedirectToUrlException;
+import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.markup.repeater.data.DataView;
+import org.wicketstuff.annotation.mount.MountPath;
+
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.EntityNotFoundException;
+import com.google.appengine.api.datastore.Key;
+import com.google.appengine.api.datastore.KeyFactory;
+import com.google.appengine.api.datastore.Query;
+import com.google.appengine.api.datastore.Query.SortDirection;
+import com.google.inject.Inject;
+import com.shin1ogawa.RunInTransaction;
+import com.shin1ogawa.component.EntityLabel;
+import com.shin1ogawa.component.QueryCounterLabel;
+import com.shin1ogawa.component.QueryDataProvider;
+import com.shin1ogawa.entity.Entry;
+import com.shin1ogawa.entity.FeedUrl;
+import com.shin1ogawa.entity.FetchHistory;
+import com.shin1ogawa.service.GetEntries;
+import com.shin1ogawa.service.SaveFetchHistory;
+import com.sun.syndication.feed.synd.SyndEntry;
+
+ @ MountPath(path = "Fetch")
+public class Fetch extends AppengineBaseWebPage {
+	final Key feedUrlKey;
+	final String url;
+
+	final MarkupContainer container;
+
+	List<String> list = new ArrayList<String>();
+
+	DataView<Entity> dataView;
+
+	@Inject
+	GetEntries service;
+
+	public Fetch(final PageParameters parameters) {
+		Entity feedUrl = null;
+		try {
+			this.feedUrlKey = KeyFactory.createKey(FeedUrl.kind(), parameters.getLong("id"));
+			feedUrl = DatastoreServiceFactory.getDatastoreService().get(this.feedUrlKey);
+		} catch (EntityNotFoundException e) {
+			throw new RedirectToUrlException("/Feeds");
+		}
+		this.url = (String) feedUrl.getProperty(FeedUrl.url.name());
+		if (this.url == null) {
+			throw new IllegalArgumentException("url is null.");
+		}
+		add(container = (MarkupContainer) new WebMarkupContainer("container")
+				.setOutputMarkupId(true));
+
+		add(new Label("url", url));
+		createForm(parameters);
+		createList();
+	}
+
+	private void createList() {
+		Query query = new Query(FetchHistory.kind(), feedUrlKey);
+		query.addSort(FetchHistory.created.name(), SortDirection.DESCENDING);
+		dataView = new DataView<Entity>("list", new QueryDataProvider(query), 10) {
+
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected void populateItem(Item<Entity> item) {
+				item.add(new EntityLabel("created", item.getModelObject()));
+				Query query = new Query(Entry.kind(), item.getModelObject().getKey());
+				item.add(new QueryCounterLabel("count", query));
+			}
+		};
+		container.addOrReplace(dataView);
+		container.addOrReplace(new AjaxPagingNavigator("navi", dataView));
+	}
+
+	private void createForm(final PageParameters parameters) {
+		Form<Void> form = new Form<Void>("form") {
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected void onSubmit() {
+				try {
+					List<SyndEntry> entries = service.service(url);
+					RunInTransaction.run(new SaveFetchHistory(feedUrlKey, entries));
+				} catch (Exception e) {
+					LOGGER.log(Level.WARNING, "failure to url fetch. url=" + url, e);
+				}
+			}
+		};
+		add(form);
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Fetch.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Index.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Index.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Index.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,43 @@
+package com.shin1ogawa.page;
+
+import java.util.logging.Logger;
+
+import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.markup.repeater.data.DataView;
+
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.Query;
+import com.google.appengine.api.datastore.Query.FilterOperator;
+import com.google.appengine.api.datastore.Query.SortDirection;
+import com.shin1ogawa.component.EntityKeyLabel;
+import com.shin1ogawa.component.EntityLabel;
+import com.shin1ogawa.component.QueryDataProvider;
+import com.shin1ogawa.entity.Entry;
+
+public class Index extends AppengineBaseWebPage {
+	static final Logger logger = Logger.getLogger(Index.class.getName());
+
+	public Index() {
+		WebMarkupContainer container = new WebMarkupContainer("container");
+		add(container.setOutputMarkupId(true));
+		Query query = new Query(Entry.kind());
+		query.addFilter(Entry.tweeted.name(), FilterOperator.EQUAL, false);
+		query.addSort(Entry.published.name(), SortDirection.ASCENDING);
+		DataView<Entity> dataView = new DataView<Entity>("list", new QueryDataProvider(query), 10) {
+
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected void populateItem(Item<Entity> item) {
+				Entity entry = item.getModelObject();
+				item.add(new EntityLabel("published", entry));
+				item.add(new EntityLabel("title", item.getModelObject()));
+				item.add(new EntityKeyLabel("name", entry.getKey().getParent()));
+			}
+		};
+		container.add(dataView);
+		container.add(new AjaxPagingNavigator("navi", dataView));
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Index.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Setting.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Setting.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Setting.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,115 @@
+package com.shin1ogawa.page;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.RequiredTextField;
+import org.apache.wicket.markup.html.panel.FeedbackPanel;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.markup.repeater.data.DataView;
+import org.apache.wicket.markup.repeater.data.IDataProvider;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.util.lang.Objects;
+import org.apache.wicket.validation.validator.StringValidator;
+import org.wicketstuff.annotation.mount.MountPath;
+
+import com.google.appengine.api.datastore.DatastoreService;
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.FetchOptions;
+import com.google.appengine.api.datastore.Query;
+import com.shin1ogawa.component.EntityModel;
+import com.shin1ogawa.util.ApplicationSettingUtil;
+
+ @ MountPath(path = "Setting")
+public class Setting extends AppengineBaseWebPage {
+
+	final MarkupContainer container;
+
+	private String key;
+	private String value;
+
+	public Setting() {
+		add(container = (MarkupContainer) new WebMarkupContainer("container")
+				.setOutputMarkupId(true));
+
+		createList();
+		createForm();
+	}
+
+	private void createForm() {
+		Form<Setting> form = new Form<Setting>("form", new CompoundPropertyModel<Setting>(this)) {
+
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected void onSubmit() {
+				ApplicationSettingUtil.setSettingValue(key, value);
+				super.setResponsePage(new Setting());
+			}
+		};
+		add(form);
+		form.add(new FeedbackPanel("feedback"));
+		form.add(new RequiredTextField<String>("key").add(StringValidator.maximumLength(500)));
+		form.add(new RequiredTextField<String>("value").add(StringValidator.maximumLength(500)));
+	}
+
+	private void createList() {
+		DataView<Entity> list = new DataView<Entity>("list", new DataProvider(), 10) {
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected void populateItem(Item<Entity> item) {
+				Entity entity = item.getModelObject();
+				item.add(new Label("key", entity.getKey().getName()));
+				item.add(new Label("size", Objects.sizeof(entity.getProperty("value")) + "byte"));
+			}
+		};
+		container.add(list);
+		container.add(new AjaxPagingNavigator("navi", list));
+	}
+
+	static class DataProvider implements IDataProvider<Entity> {
+		private static final long serialVersionUID = 1L;
+
+		private List<Entity> list;
+
+		public DataProvider() {
+			DatastoreService service = DatastoreServiceFactory.getDatastoreService();
+			Query query = new Query("ApplicationSetting");
+			List<Entity> list = service.prepare(query).asList(FetchOptions.Builder.withLimit(1000));
+			this.list = list;
+		}
+
+		public Iterator<? extends Entity> iterator(int first, int count) {
+			if (CollectionUtils.isEmpty(list)) {
+				return new ArrayList<Entity>(0).iterator();
+			}
+			int size = size();
+			int toIndex = first + count;
+			if (toIndex > size) {
+				toIndex = size() - 1;
+			}
+			return list.subList(first, toIndex).iterator();
+		}
+
+		public IModel<Entity> model(Entity object) {
+			return new EntityModel(object);
+		}
+
+		public int size() {
+			return list.size();
+		}
+
+		public void detach() {
+		}
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/page/Setting.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/service/GetEntries.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/service/GetEntries.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/service/GetEntries.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,37 @@
+package com.shin1ogawa.service;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.xml.sax.InputSource;
+
+import com.google.inject.Singleton;
+import com.sun.syndication.feed.synd.SyndEntry;
+import com.sun.syndication.feed.synd.SyndFeed;
+import com.sun.syndication.io.FeedException;
+import com.sun.syndication.io.SyndFeedInput;
+
+ @ Singleton
+public class GetEntries {
+
+	static final Logger LOGGER = Logger.getLogger(GetEntries.class.getName());
+
+	public List<SyndEntry> service(String urlString) throws IllegalArgumentException,
+			MalformedURLException, FeedException, IOException {
+		SyndFeedInput input = new SyndFeedInput();
+
+		LOGGER.info("openConnection() start. url=" + urlString);
+		InputStream inputStream = new URL(urlString).openConnection().getInputStream();
+		LOGGER.info("openConnection() end. url=" + urlString);
+		LOGGER.info("fetch start. url=" + urlString);
+		SyndFeed feed = input.build(new InputSource(inputStream));
+		@SuppressWarnings("unchecked")
+		List<SyndEntry> entries = (List<SyndEntry>) feed.getEntries();
+		LOGGER.info("fetch end. url=" + urlString);
+		return entries;
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/service/GetEntries.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/service/SaveFetchHistory.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/service/SaveFetchHistory.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/service/SaveFetchHistory.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,70 @@
+package com.shin1ogawa.service;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import com.google.appengine.api.datastore.DatastoreService;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.Key;
+import com.google.appengine.api.datastore.Query;
+import com.google.appengine.api.datastore.Text;
+import com.google.appengine.api.datastore.Query.FilterOperator;
+import com.shin1ogawa.RunInTransaction.AbstractInTransaction;
+import com.shin1ogawa.entity.Entry;
+import com.shin1ogawa.entity.FetchHistory;
+import com.sun.syndication.feed.synd.SyndEntry;
+
+public class SaveFetchHistory extends AbstractInTransaction {
+
+	final Key feedUrlKey;
+	final List<SyndEntry> entries;
+
+	public SaveFetchHistory(Key feedUrlKey, List<SyndEntry> entries) {
+		super();
+		this.feedUrlKey = feedUrlKey;
+		this.entries = entries;
+	}
+
+	public void run(DatastoreService service) {
+		Entity histryEntity = new Entity(FetchHistory.kind(), feedUrlKey);
+		histryEntity.setProperty("created", new Date(System.currentTimeMillis()));
+		service.put(histryEntity);
+		Key parentKey = histryEntity.getKey();
+		List<Entity> entities = new ArrayList<Entity>(entries.size());
+		for (SyndEntry syndEntry : entries) {
+			String link = syndEntry.getLink();
+			if (isAlreadyExist(service, link)) {
+				LOGGER.fine("alreadyExists:" + link + ", title=" + syndEntry.getTitle()
+						+ ", published=" + syndEntry.getPublishedDate());
+				continue;
+			}
+			Entity entity = new Entity(Entry.kind(), parentKey);
+			entity.setProperty(Entry.tweeted.name(), false);
+			entity.setProperty(Entry.published.name(), syndEntry.getPublishedDate());
+			entity.setProperty(Entry.author.name(), syndEntry.getAuthor());
+			entity.setProperty(Entry.title.name(), syndEntry.getTitle());
+			entity.setProperty(Entry.uri.name(), syndEntry.getUri());
+			entity.setProperty(Entry.link.name(), link);
+			if (syndEntry.getDescription() != null) {
+				entity.setProperty(Entry.description.name(), new Text(syndEntry.getDescription()
+						.getValue()));
+			}
+//			entity.setUnindexedProperty(Entry.raw.name(), new Blob(Objects
+//					.objectToByteArray(syndEntry)));
+			entities.add(entity);
+		}
+		if (!entities.isEmpty()) {
+			service.put(entities);
+			LOGGER.fine(entities.size() + "件更新しました。");
+		} else {
+			LOGGER.fine("更新するEntryはありませんでした。");
+		}
+	}
+
+	private boolean isAlreadyExist(DatastoreService service, String link) {
+		return service.prepare(
+				new Query(Entry.kind()).addFilter(Entry.link.name(), FilterOperator.EQUAL, link))
+				.asIterator().hasNext();
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/service/SaveFetchHistory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/util/ApplicationSettingUtil.java
===================================================================
--- sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/util/ApplicationSettingUtil.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/util/ApplicationSettingUtil.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,29 @@
+package com.shin1ogawa.util;
+
+import com.google.appengine.api.datastore.DatastoreService;
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.EntityNotFoundException;
+import com.google.appengine.api.datastore.KeyFactory;
+import com.shin1ogawa.RunInTransaction;
+import com.shin1ogawa.RunInTransaction.SaveInTransaction;
+
+public class ApplicationSettingUtil {
+	private static final String KIND = "ApplicationSetting";
+
+	public static void setSettingValue(String key, Object value) {
+		Entity entity = new Entity(KIND, key);
+		entity.setProperty("value", value);
+		RunInTransaction.run(new SaveInTransaction(entity));
+	}
+
+	public static Object getSettingValue(String key) {
+		DatastoreService service = DatastoreServiceFactory.getDatastoreService();
+		try {
+			Entity entity = service.get(KeyFactory.createKey(KIND, key));
+			return entity.getProperty("value");
+		} catch (EntityNotFoundException e) {
+			return null;
+		}
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/main/java/com/shin1ogawa/util/ApplicationSettingUtil.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/resources/META-INF/jdoconfig.xml
===================================================================
--- sandbox/jiemamy-feeds/src/main/resources/META-INF/jdoconfig.xml	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/resources/META-INF/jdoconfig.xml	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
+  
+  <persistence-manager-factory name="transactions-optional">
+    <property name="javax.jdo.PersistenceManagerFactoryClass" value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
+    <property name="javax.jdo.option.ConnectionURL" value="appengine"/>
+    <property name="javax.jdo.option.NontransactionalRead" value="true"/>
+    <property name="javax.jdo.option.NontransactionalWrite" value="true"/>
+    <property name="javax.jdo.option.RetainValues" value="true"/>
+    <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
+    <property name="datanucleus.DetachOnClose" value="true"/>
+  </persistence-manager-factory>
+</jdoconfig>


Property changes on: sandbox/jiemamy-feeds/src/main/resources/META-INF/jdoconfig.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/cron/Fetch.html
===================================================================
--- sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/cron/Fetch.html	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/cron/Fetch.html	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF8"?>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<title></title>
+</head>
+<body>
+</body>
+</html>


Property changes on: sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/cron/Fetch.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/cron/Tweet.html
===================================================================
--- sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/cron/Tweet.html	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/cron/Tweet.html	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF8"?>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<title></title>
+</head>
+<body>
+</body>
+</html>


Property changes on: sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/cron/Tweet.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Feeds.html
===================================================================
--- sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Feeds.html	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Feeds.html	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd" xml:lang="ja" lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<title>Feed一覧</title>
+</head>
+<body>
+<h1>Feed一覧</h1>
+<div wicket:id="container">
+<table>
+<thead><th colspan="2">name</th><th>url</th></thead>
+<tbody><tr wicket:id="list">
+<td><a href="#" wicket:id="link">*</a></td><td><span wicket:id="name"/></td><td><span wicket:id="url"/></td>
+</tr></tbody>
+</table>
+<div wicket:id="navi"></div>
+</div>
+<form action="post" wicket:id="form">
+<div wicket:id="feedback"></div>
+<div><label for="name">名称:</label><input type="text" name="name" size="100" wicket:id="name" /></div>
+<div><label for="url">URL:</label><input type="text" name="url" size="100" wicket:id="url" /></div>
+<div><input type="submit" /></div>
+</form>
+</body>
+</html>


Property changes on: sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Feeds.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Fetch.html
===================================================================
--- sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Fetch.html	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Fetch.html	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd" xml:lang="ja" lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<title>Fetch</title>
+</head>
+<body>
+<h1>Fetch</h1>
+<h2><span wicket:id="url"></span></h2>
+<div><form action="post" wicket:id="form">
+<div><input type="submit" value="fetch" /></div>
+</form></div>
+<h2>Fetch結果</h2>
+<div wicket:id="container">
+<table>
+<thead><th>created</th><th>entry count</th></thead>
+<tbody><tr wicket:id="list"><td><span wicket:id="created"/></td><td><span wicket:id="count"></span></td></tr></tbody>
+</table>
+<div wicket:id="navi"></div>
+</div>
+</body>
+</html>


Property changes on: sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Fetch.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Index.html
===================================================================
--- sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Index.html	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Index.html	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd" xml:lang="ja" lang="ja">
+<head>
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+<title>index</title>
+</head>
+<body>
+<h1>未処理のEntry</h1>
+<div wicket:id="container">
+<table>
+<thead><th>published</th><th>title</th><th>datasource</th></thead>
+<tbody><tr wicket:id="list">
+<td><span wicket:id="published" /></td><td><span wicket:id="title"/></td><td><span wicket:id="name" /></td>
+</tr></tbody>
+</table>
+<div wicket:id="navi"></div>
+</div>
+</body>
+</html>


Property changes on: sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Setting.html
===================================================================
--- sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Setting.html	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Setting.html	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd" xml:lang="ja" lang="ja">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<title>ApplicationSetting</title>
+</head>
+<body>
+<h1>ApplicationSetting</h1>
+<div wicket:id="container">
+<table>
+<thead><th>key</th><th>size</th></thead>
+<tbody><tr wicket:id="list"><td><span wicket:id="key" /></td><td><span wicket:id="size" /></td></tr></tbody>
+</table>
+<div wicket:id="navi"></div>
+</div>
+<form action="post" wicket:id="form">
+<div wicket:id="feedback"></div>
+<div><label for="key">Key:</label><input type="text" name="key" size="100" wicket:id="key" /></div>
+<div><label for="value">Value:</label><input type="text" name="value" size="100" wicket:id="value" /></div>
+<div><input type="submit" /></div>
+</form>
+</body>
+</html>


Property changes on: sandbox/jiemamy-feeds/src/main/resources/com/shin1ogawa/page/Setting.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/resources/log4j.properties
===================================================================
--- sandbox/jiemamy-feeds/src/main/resources/log4j.properties	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/resources/log4j.properties	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,13 @@
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n
+
+log4j.rootLogger=INFO,A1
+
+log4j.logger.org.apache.wicket=INFO
+log4j.logger.org.apache.wicket.protocol.http.HttpSessionStore=INFO
+log4j.logger.org.apache.wicket.version=INFO
+log4j.logger.org.apache.wicket.RequestCycle=INFO
+
+log4j.category.DataNucleus.Connection=DEBUG, A1
+log4j.category.DataNucleus.Query=DEBUG, A1


Property changes on: sandbox/jiemamy-feeds/src/main/resources/log4j.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/main/resources/logging.properties
===================================================================
--- sandbox/jiemamy-feeds/src/main/resources/logging.properties	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/main/resources/logging.properties	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,20 @@
+.level = WARNING
+
+DataNucleus.JDO.level=WARNING
+DataNucleus.Persistence.level=WARNING
+DataNucleus.MetaData.level=WARNING
+DataNucleus.General.level=WARNING
+DataNucleus.Utility.level=WARNING
+DataNucleus.Transaction.level=WARNING
+DataNucleus.ClassLoading.level=WARNING
+DataNucleus.Plugin.level=WARNING
+DataNucleus.ValueGeneration.level=WARNING
+DataNucleus.Enhancer.level=WARNING
+DataNucleus.SchemaTool.level=WARNING
+
+DataNucleus.Cache.level=FINE
+DataNucleus.Datastore.level=CONFIG
+DataNucleus.Connection.level=WARNING
+DataNucleus.Query.level=FINE
+
+com.shin1ogawa.level=FINEST


Property changes on: sandbox/jiemamy-feeds/src/main/resources/logging.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/TestEnvironment.java
===================================================================
--- sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/TestEnvironment.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/TestEnvironment.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,45 @@
+package com.shin1ogawa;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.google.apphosting.api.ApiProxy;
+
+public class TestEnvironment implements ApiProxy.Environment {
+	public String getAppId() {
+		return "Unit Tests";
+	}
+
+	public String getVersionId() {
+		return "1.0";
+	}
+
+	public String getRequestNamespace() {
+		return "";
+	}
+
+	public String getDefaultNamespace() {
+		return null;
+	}
+
+	public String getAuthDomain() {
+		return "hoge.com";
+	}
+
+	public boolean isLoggedIn() {
+		return true;
+	}
+
+	public String getEmail() {
+		return "hoge****@hoge*****";
+	}
+
+	public boolean isAdmin() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Map<String, Object> getAttributes() {
+		Map<String, Object> map = new HashMap<String, Object>();
+		return map;
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/TestEnvironment.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/FeedsTest.java
===================================================================
--- sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/FeedsTest.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/FeedsTest.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,98 @@
+package com.shin1ogawa.page;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
+import org.apache.wicket.feedback.FeedbackMessages;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.RequiredTextField;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.panel.FeedbackPanel;
+import org.apache.wicket.markup.repeater.data.DataView;
+import org.apache.wicket.util.tester.FormTester;
+import org.apache.wicket.util.tester.WicketTester;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.google.appengine.api.datastore.DatastoreService;
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.Query;
+import com.shin1ogawa.WicketApplication;
+import com.shin1ogawa.component.EntityLabel;
+import com.shin1ogawa.entity.FeedUrl;
+
+public class FeedsTest {
+	static WicketTester tester;
+
+	static final String[] URLS = { "http://hoge.url/atom", "http://fuga.jp/rss" };
+
+	@BeforeClass
+	public static void setUpBeforeClass() {
+		PageTestUtil.setUpBeforePageTest();
+		tester = new WicketTester(new WicketApplication());
+		//
+		List<Entity> entities = new ArrayList<Entity>(URLS.length);
+		for (String url : URLS) {
+			Entity entity = new Entity(FeedUrl.kind());
+			entity.setProperty(FeedUrl.url.name(), url);
+			entities.add(entity);
+		}
+		DatastoreService service = DatastoreServiceFactory.getDatastoreService();
+		service.put(entities);
+	}
+
+	@AfterClass
+	public static void tearDownAfterClass() {
+		PageTestUtil.tearDownAfterPageTest();
+	}
+
+	@Before
+	public void setUp() {
+		tester.startPage(Feeds.class);
+		tester.assertRenderedPage(Feeds.class);
+	}
+
+	@Test
+	public void render() {
+		int count = DatastoreServiceFactory.getDatastoreService()
+				.prepare(new Query(FeedUrl.kind())).countEntities();
+		tester.assertComponent("container", WebMarkupContainer.class);
+		tester.assertComponent("container:list", DataView.class);
+		tester.assertComponent("container:list:" + (count - 1) + ":name", EntityLabel.class);
+		tester.assertComponent("container:list:" + (count - 1) + ":url", EntityLabel.class);
+		tester.assertComponent("container:list:" + (count - 1) + ":link",
+				BookmarkablePageLink.class);
+		tester.assertComponent("container:navi", AjaxPagingNavigator.class);
+		tester.assertComponent("form", Form.class);
+		tester.assertComponent("form:feedback", FeedbackPanel.class);
+		tester.assertComponent("form:name", RequiredTextField.class);
+		tester.assertComponent("form:url", RequiredTextField.class);
+	}
+
+	@Test
+	public void post() {
+		int beforeCount = DatastoreServiceFactory.getDatastoreService().prepare(
+				new Query(FeedUrl.kind())).countEntities();
+		FormTester formTester = tester.newFormTester("form");
+		formTester.setValue("name", "foobar");
+		formTester.setValue("url", "http://foobar.org/rss2");
+		formTester.submit();
+		FeedbackMessages feedbackMessages = tester.getLastRenderedPage().getSession()
+				.getFeedbackMessages();
+		assertThat(feedbackMessages.size(), is(equalTo(0)));
+
+		tester.assertRenderedPage(Feeds.class);
+		int afterCount = DatastoreServiceFactory.getDatastoreService().prepare(
+				new Query(FeedUrl.kind())).countEntities();
+		assertThat(afterCount, is(equalTo(beforeCount + 1)));
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/FeedsTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/FetchTest.java
===================================================================
--- sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/FetchTest.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/FetchTest.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,82 @@
+package com.shin1ogawa.page;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.greaterThan;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.repeater.data.DataView;
+import org.apache.wicket.util.tester.FormTester;
+import org.apache.wicket.util.tester.WicketTester;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.Query;
+import com.shin1ogawa.RunInTransaction;
+import com.shin1ogawa.WicketApplication;
+import com.shin1ogawa.entity.Entry;
+import com.shin1ogawa.entity.FeedUrl;
+import com.shin1ogawa.entity.FetchHistory;
+
+public class FetchTest {
+	static WicketTester tester;
+
+	@BeforeClass
+	public static void setUpBeforeClass() {
+		PageTestUtil.setUpBeforePageTest();
+		tester = new WicketTester(new WicketApplication());
+		Entity entity = new Entity(FeedUrl.kind());
+		entity.setProperty(FeedUrl.name.name(), "jiemamy");
+		entity
+				.setProperty(FeedUrl.url.name(),
+						"http://sourceforge.jp/projects/jiemamy/history/rss");
+		RunInTransaction.run(new RunInTransaction.SaveInTransaction(entity));
+	}
+
+	@AfterClass
+	public static void tearDownAfterClass() {
+		PageTestUtil.tearDownAfterPageTest();
+	}
+
+	@Before
+	public void setUp() {
+		Entity entity = DatastoreServiceFactory.getDatastoreService().prepare(
+				new Query(FeedUrl.kind())).asSingleEntity();
+		tester.startPage(Fetch.class, new PageParameters("id=" + entity.getKey().getId()));
+		tester.assertRenderedPage(Fetch.class);
+	}
+
+	@Test
+	public void render() {
+		tester.assertComponent("url", Label.class);
+		tester.assertComponent("form", Form.class);
+		tester.assertComponent("container", WebMarkupContainer.class);
+		tester.assertComponent("container:list", DataView.class);
+	}
+
+	@Test
+	public void fetch() {
+		int beforeCount1 = DatastoreServiceFactory.getDatastoreService().prepare(
+				new Query(FetchHistory.kind())).countEntities();
+		int beforeCount2 = DatastoreServiceFactory.getDatastoreService().prepare(
+				new Query(Entry.kind())).countEntities();
+		FormTester formTester = tester.newFormTester("form");
+		formTester.submit();
+		tester.debugComponentTrees();
+		tester.assertRenderedPage(Fetch.class);
+		int afterCount1 = DatastoreServiceFactory.getDatastoreService().prepare(
+				new Query(FetchHistory.kind())).countEntities();
+		int afterCount2 = DatastoreServiceFactory.getDatastoreService().prepare(
+				new Query(Entry.kind())).countEntities();
+		assertThat(afterCount1, is(equalTo(beforeCount1 + 1)));
+		assertThat(afterCount2, is(greaterThan(beforeCount2)));
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/FetchTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/IndexTest.java
===================================================================
--- sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/IndexTest.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/IndexTest.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,30 @@
+package com.shin1ogawa.page;
+
+import org.apache.wicket.util.tester.WicketTester;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.shin1ogawa.WicketApplication;
+
+public class IndexTest {
+	static WicketTester tester;
+
+	@BeforeClass
+	public static void setUpBeforeClass() {
+		PageTestUtil.setUpBeforePageTest();
+		tester = new WicketTester(new WicketApplication());
+	}
+
+	@AfterClass
+	public static void tearDownAfterClass() {
+		PageTestUtil.tearDownAfterPageTest();
+	}
+
+	@Test
+	public void simpleTest() {
+		tester.startPage(Index.class);
+		tester.assertRenderedPage(Index.class);
+		tester.debugComponentTrees();
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/IndexTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/PageTestUtil.java
===================================================================
--- sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/PageTestUtil.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/PageTestUtil.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,31 @@
+package com.shin1ogawa.page;
+
+import java.io.File;
+
+import com.google.appengine.api.datastore.dev.LocalDatastoreService;
+import com.google.appengine.tools.development.ApiProxyLocalImpl;
+import com.google.apphosting.api.ApiProxy;
+import com.shin1ogawa.TestEnvironment;
+
+public class PageTestUtil {
+
+	private PageTestUtil() {
+	}
+
+	public static void setUpBeforePageTest() {
+		ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment());
+		ApiProxy.setDelegate(new ApiProxyLocalImpl(new File("target/testAppDir")) {
+		});
+		ApiProxyLocalImpl proxy = (ApiProxyLocalImpl) ApiProxy.getDelegate();
+		proxy.setProperty(LocalDatastoreService.NO_STORAGE_PROPERTY, Boolean.TRUE.toString());
+	}
+
+	public static void tearDownAfterPageTest() {
+		ApiProxyLocalImpl proxy = (ApiProxyLocalImpl) ApiProxy.getDelegate();
+		LocalDatastoreService datastoreService = (LocalDatastoreService) proxy
+				.getService("datastore_v3");
+		datastoreService.clearProfiles();
+		ApiProxy.setDelegate(null);
+		ApiProxy.setEnvironmentForCurrentThread(null);
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/PageTestUtil.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/SettingTest.java
===================================================================
--- sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/SettingTest.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/SettingTest.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,77 @@
+package com.shin1ogawa.page;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.RequiredTextField;
+import org.apache.wicket.markup.html.panel.FeedbackPanel;
+import org.apache.wicket.markup.repeater.data.DataView;
+import org.apache.wicket.util.tester.FormTester;
+import org.apache.wicket.util.tester.WicketTester;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Query;
+import com.shin1ogawa.WicketApplication;
+import com.shin1ogawa.util.ApplicationSettingUtil;
+
+public class SettingTest {
+	static WicketTester tester;
+
+	@BeforeClass
+	public static void setUpBeforeClass() {
+		PageTestUtil.setUpBeforePageTest();
+		tester = new WicketTester(new WicketApplication());
+		ApplicationSettingUtil.setSettingValue("DummyKey", "DummyValue");
+	}
+
+	@AfterClass
+	public static void tearDownAfterClass() {
+		PageTestUtil.tearDownAfterPageTest();
+	}
+
+	@Before
+	public void setUp() {
+		tester.startPage(Setting.class);
+		tester.assertRenderedPage(Setting.class);
+	}
+
+	@Test
+	public void render() {
+		int count = DatastoreServiceFactory.getDatastoreService().prepare(
+				new Query("ApplicationSetting")).countEntities();
+		tester.assertComponent("container", WebMarkupContainer.class);
+		tester.assertComponent("container:list", DataView.class);
+		tester.assertComponent("container:list:" + (count - 1) + ":key", Label.class);
+		tester.assertComponent("container:list:" + (count - 1) + ":size", Label.class);
+		tester.assertComponent("container:navi", AjaxPagingNavigator.class);
+		tester.assertComponent("form", Form.class);
+		tester.assertComponent("form:feedback", FeedbackPanel.class);
+		tester.assertComponent("form:key", RequiredTextField.class);
+		tester.assertComponent("form:value", RequiredTextField.class);
+	}
+
+	@Test
+	public void post() {
+		int beforeCount = DatastoreServiceFactory.getDatastoreService().prepare(
+				new Query("ApplicationSetting")).countEntities();
+		FormTester formTester = tester.newFormTester("form");
+		formTester.setValue("key", "hoge");
+		formTester.setValue("value", "fuga");
+		formTester.submit();
+
+		tester.assertRenderedPage(Setting.class);
+		int afterCount = DatastoreServiceFactory.getDatastoreService().prepare(
+				new Query("ApplicationSetting")).countEntities();
+		assertThat(afterCount, is(equalTo(beforeCount + 1)));
+	}
+
+}


Property changes on: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/page/SettingTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/util/GenerateTestDataUtil.java
===================================================================
--- sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/util/GenerateTestDataUtil.java	                        (rev 0)
+++ sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/util/GenerateTestDataUtil.java	2009-08-13 13:48:18 UTC (rev 3469)
@@ -0,0 +1,55 @@
+package com.shin1ogawa.util;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import com.google.appengine.tools.development.ApiProxyLocalImpl;
+import com.google.apphosting.api.ApiProxy;
+
+public class GenerateTestDataUtil {
+
+	public static void setUpBeforePageTest() {
+		ApiProxy.setEnvironmentForCurrentThread(new ApiProxy.Environment() {
+			public String getAppId() {
+				return "shin1ogawa";
+			}
+
+			public String getVersionId() {
+				return "jiemamy-feeds.1";
+			}
+
+			public String getRequestNamespace() {
+				return "";
+			}
+
+			public String getAuthDomain() {
+				return "hoge.com";
+			}
+
+			public boolean isLoggedIn() {
+				return true;
+			}
+
+			public String getEmail() {
+				return "hoge****@hoge*****";
+			}
+
+			public boolean isAdmin() {
+				throw new UnsupportedOperationException();
+			}
+
+			public Map<String, Object> getAttributes() {
+				Map<String, Object> map = new HashMap<String, Object>();
+				return map;
+			}
+		});
+		ApiProxy.setDelegate(new ApiProxyLocalImpl(new File("target/testData")) {
+		});
+	}
+
+	public static void tearDownAfterPageTest() {
+		ApiProxy.setDelegate(null);
+		ApiProxy.setEnvironmentForCurrentThread(null);
+	}
+}


Property changes on: sandbox/jiemamy-feeds/src/test/java/com/shin1ogawa/util/GenerateTestDataUtil.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain




Jiemamy-notify メーリングリストの案内
Back to archive index