OSDN Git Service

Implementation the Dependency Injection.
authoruyaji <yuichiro.uyama@gmail.com>
Thu, 12 Dec 2013 09:09:56 +0000 (18:09 +0900)
committeruyaji <yuichiro.uyama@gmail.com>
Thu, 12 Dec 2013 09:09:56 +0000 (18:09 +0900)
25 files changed:
PartsList/PartsList/app/controllers/Autocomplete.scala
PartsList/PartsList/app/controllers/PartsListController.scala
PartsList/PartsList/app/controllers/ProjectController.scala
PartsList/PartsList/app/models/services/PartManager.scala
PartsList/PartsList/app/models/services/ProjectManager.scala
PartsList/PartsList/app/models/services/impl/ProjectManagerImpl.scala [new file with mode: 0644]
PartsList/PartsList/app/modules/ServiceModules.scala [new file with mode: 0644]
PartsList/PartsList/app/views/errors/errorNotAuthentication.scala.html
PartsList/PartsList/document/class.class.violet
PartsList/PartsList/document/class.png
PartsList/PartsList/httpconf/index.html
PartsList/PartsList/httpconf/nginx.conf
PartsList/PartsList/lib/aopalliance.jar [new file with mode: 0644]
PartsList/PartsList/lib/guice-3.0.jar [new file with mode: 0644]
PartsList/PartsList/lib/guice-assistedinject-3.0.jar [new file with mode: 0644]
PartsList/PartsList/lib/guice-grapher-3.0.jar [new file with mode: 0644]
PartsList/PartsList/lib/guice-jmx-3.0.jar [new file with mode: 0644]
PartsList/PartsList/lib/guice-jndi-3.0.jar [new file with mode: 0644]
PartsList/PartsList/lib/guice-multibindings-3.0.jar [new file with mode: 0644]
PartsList/PartsList/lib/guice-persist-3.0.jar [new file with mode: 0644]
PartsList/PartsList/lib/guice-servlet-3.0.jar [new file with mode: 0644]
PartsList/PartsList/lib/guice-spring-3.0.jar [new file with mode: 0644]
PartsList/PartsList/lib/guice-struts2-plugin-3.0.jar [new file with mode: 0644]
PartsList/PartsList/lib/guice-throwingproviders-3.0.jar [new file with mode: 0644]
PartsList/PartsList/lib/javax.inject.jar [new file with mode: 0644]

index 1810f9e..aff2228 100644 (file)
@@ -2,12 +2,18 @@ package controllers
 import play.api._
 import play.api.mvc._
 import models.services._
+import models.services.impl._
+import com.google.inject._
+import modules._
 
 object Autocomplete extends Controller{
+  val inject = Guice.createInjector(new ServiceModules)
+  val projectManager = inject.getInstance(classOf[ProjectManager])
+
 
   def projectList() = Action {
     request => {
-      Ok(ProjectManager().getProjectList(request))
+      Ok(projectManager.getProjectList(request))
        }
   }
   
index 900ce83..439039e 100644 (file)
@@ -10,18 +10,22 @@ import org.squeryl._
 import org.squeryl.PrimitiveTypeMode._
 import models._
 import models.services._
+import models.services.impl._
 import beans._
 import forms._
 import controllers.services._
 import models.services._
 import scala.collection.immutable.Map
 import scala.collection.immutable.Seq
+import com.google.inject._
+import modules._
 
 object PartsListController extends Controller{
-  
-   val Home = Redirect(routes.PartsListController.index(0,0,"",""))
-   val Home2 = Redirect(routes.PartsListController.relationRegistration(""))
-   val relationForm = Form(
+  val inject = Guice.createInjector(new ServiceModules)
+  val projectManager = inject.getInstance(classOf[ProjectManager])
+  val Home = Redirect(routes.PartsListController.index(0,0,"",""))
+  val Home2 = Redirect(routes.PartsListController.relationRegistration(""))
+  val relationForm = Form(
        mapping(
            "parent" -> nonEmptyText,
            "child" -> nonEmptyText,
@@ -58,7 +62,7 @@ object PartsListController extends Controller{
          var matrixPartsListBeans = Map[Part, Seq[beans.MultiPartsListBean]]()
          inTransaction {
            if(project != "") {
-             val models = ProjectManager().getByName(project).parts
+             val models = projectManager.getByName(project).parts
                //  各モデルに対し、部品表抽出処理を実施。
              for(model <- models) {
                  // 部品表の1レベル展開。
index c7e9136..15a3142 100644 (file)
@@ -9,10 +9,16 @@ import play.api.data.Forms._
 import forms._
 import models._
 import models.services._
+import models.services.impl._
 import org.squeryl._
 import org.squeryl.PrimitiveTypeMode._
+import com.google.inject._
+import modules._
+
 object ProjectController extends Controller{
   val Home = Redirect(routes.ProjectController.list(0,""))
+  val inject = Guice.createInjector(new ServiceModules)
+  val projectManager = inject.getInstance(classOf[ProjectManager])
   val projectRegistForm = Form(
       mapping(
           "name" -> nonEmptyText,
@@ -43,7 +49,7 @@ object ProjectController extends Controller{
              project => {
                inTransaction {
                  val user = UserManager().getByName(project.users.name)
-                 val newProject = ProjectManager().insert(project)
+                 val newProject = projectManager.insert(project)
                  newProject.users.associate(user)
                   Home.flashing("success" -> "Project %s has been created".format(project.name))
                }
@@ -57,7 +63,7 @@ object ProjectController extends Controller{
          Ok(views.html.errors.errorNotAuthentication())
            } else {
              inTransaction {
-               val project = ProjectManager().getById(id)
+               val project = projectManager.getById(id)
                val projectForm = ProjectForm(project.name, null)
                Ok(views.html.updateProjectForm(projectRegistForm.fill(projectForm), id, project))
                }
@@ -70,7 +76,7 @@ object ProjectController extends Controller{
              formWithErrors => BadRequest(views.html.updateProjectForm(formWithErrors, id, null)),
              project => {
                inTransaction {
-                 ProjectManager().update(project, id)
+                 projectManager.update(project, id)
                  Home.flashing("success" -> "Project %s has been update".format(project.name))
                }
              }
@@ -83,7 +89,7 @@ object ProjectController extends Controller{
          Ok(views.html.errors.errorNotAuthentication())
            } else {  
              inTransaction {
-               ProjectManager().deleteMember(projectId, memberId)
+               projectManager.deleteMember(projectId, memberId)
                Home.flashing("success" -> "Project %s has been update".format("ID=" +memberId))
               }
             }
@@ -97,7 +103,7 @@ object ProjectController extends Controller{
            } else {
              inTransaction {
                val row = Integer.decode(Messages("list.row"))
-               val buff = ProjectManager().list(key)
+               val buff = projectManager.list(key)
                Ok(views.html.projectlist(buff.page(page*row, row), buff.size, key, page))
              }
            }
index 823f801..4d8a156 100644 (file)
@@ -1,20 +1,26 @@
 package models.services
 import models._
+import models.services.impl._
 import forms._
 import models.services._
 import org.squeryl._
 import org.squeryl.PrimitiveTypeMode._
+import com.google.inject._
+import modules._
 
 case class PartManager() extends AbstractManager{
+  val inject = Guice.createInjector(new ServiceModules)
+  val projectManager = inject.getInstance(classOf[ProjectManager])
+
   
   def insert(part: PartForm):Part = {
-    val project = ProjectManager().getByName(part.projectName)
+    val project = projectManager.getByName(part.projectName)
     val newPart = project.parts.associate(Part(part.name, part.atach, part.price))
     return newPart
   }
   
   def update(part: PartForm, id: Long):Part = {
-    val project =ProjectManager().getByName(part.projectName)
+    val project = projectManager.getByName(part.projectName)
     val updPart = getById(id)
     updPart.name = part.name
     updPart.projectId = project.id
index 218a7d7..274e75a 100644 (file)
@@ -1,52 +1,20 @@
 package models.services
 import models._
 import forms._
-import org.squeryl._
-import org.squeryl.PrimitiveTypeMode._
-
-case class ProjectManager() {
+trait ProjectManager {
   
-  def insert(project: ProjectForm):Project = {
-    PartsListDb.projects.insert(Project(project.name))
-  }
+  def insert(project: ProjectForm):Project 
   
-  def update(project: ProjectForm, id: Long) = {
-    val updProject = getById(id)
-    updProject.name = project.name
-    if(!project.users.name.isEmpty()) {
-      val user =UserManager().getByName(project.users.name)
-      updProject.users.associate(user)
-     }
-  }
+  def update(project: ProjectForm, id: Long):Unit
   
-  def deleteMember(projectId: Long, memberId: Long) = {
-    val project = getById(projectId)
-    val member = UserManager().getById(memberId)
-    project.users.dissociate(member)
-  }
+  def deleteMember(projectId: Long, memberId: Long):Unit
   
-  def list(key: String): org.squeryl.Query[Project] = {
-    PartsListDb.projects.where(pr => pr.name like key + "%")
-  }
+  def list(key: String): org.squeryl.Query[Project] 
   
-  def getByName(name: String):Project = {
-    PartsListDb.projects.where(p => p.name === name).head
-  }
+  def getByName(name: String):Project
   
-  def getById(id: Long) = {
-    PartsListDb.projects.where(pr => pr.id === id).head
-  }
+  def getById(id: Long):Project
   
-  def getProjectList(request: play.api.mvc.Request[play.api.mvc.AnyContent]): String = {
-       var projectList:String=""
-      inTransaction {
-           val projects =PartsListDb.projects.where(p => p.name like request.getQueryString("q").get + "%")
-           for(project <- projects) {
-             projectList = projectList.concat(project.name)
-             projectList = projectList.concat("\n")
-           }
-         }
-    return projectList
-  }
+  def getProjectList(request: play.api.mvc.Request[play.api.mvc.AnyContent]): String
 
 }
\ No newline at end of file
diff --git a/PartsList/PartsList/app/models/services/impl/ProjectManagerImpl.scala b/PartsList/PartsList/app/models/services/impl/ProjectManagerImpl.scala
new file mode 100644 (file)
index 0000000..d29be98
--- /dev/null
@@ -0,0 +1,53 @@
+package models.services.impl
+import models._
+import models.services._
+import forms._
+import org.squeryl._
+import org.squeryl.PrimitiveTypeMode._
+
+case class ProjectManagerImpl() extends ProjectManager{
+  
+  def insert(project: ProjectForm):Project = {
+    PartsListDb.projects.insert(Project(project.name))
+  }
+  
+  def update(project: ProjectForm, id: Long) = {
+    val updProject = getById(id)
+    updProject.name = project.name
+    if(!project.users.name.isEmpty()) {
+      val user = UserManager().getByName(project.users.name)
+      updProject.users.associate(user)
+     }
+  }
+  
+  def deleteMember(projectId: Long, memberId: Long) = {
+    val project = getById(projectId)
+    val member = UserManager().getById(memberId)
+    project.users.dissociate(member)
+  }
+  
+  def list(key: String): org.squeryl.Query[Project] = {
+    PartsListDb.projects.where(pr => pr.name like key + "%")
+  }
+  
+  def getByName(name: String):Project = {
+    PartsListDb.projects.where(p => p.name === name).head
+  }
+  
+  def getById(id: Long) = {
+    PartsListDb.projects.where(pr => pr.id === id).head
+  }
+  
+  def getProjectList(request: play.api.mvc.Request[play.api.mvc.AnyContent]): String = {
+       var projectList:String=""
+      inTransaction {
+           val projects =PartsListDb.projects.where(p => p.name like request.getQueryString("q").get + "%")
+           for(project <- projects) {
+             projectList = projectList.concat(project.name)
+             projectList = projectList.concat("\n")
+           }
+         }
+    return projectList
+  }
+
+}
\ No newline at end of file
diff --git a/PartsList/PartsList/app/modules/ServiceModules.scala b/PartsList/PartsList/app/modules/ServiceModules.scala
new file mode 100644 (file)
index 0000000..bec5e22
--- /dev/null
@@ -0,0 +1,11 @@
+package modules
+import com.google.inject._
+import models.services._
+import models.services.impl._
+class ServiceModules extends com.google.inject.AbstractModule{
+  @Override
+  protected def configure() {
+    bind(classOf[ProjectManager]).to(classOf[ProjectManagerImpl])
+  }
+
+}
\ No newline at end of file
index c211272..d8f86da 100644 (file)
@@ -2,5 +2,5 @@
 @main("Error") {
        <h1>@Messages("auth.error")</h1>
        <br />
-       <a href="http://127.0.0.1/partslist">@Messages("list.link25")</a>
+       <a href="http://localhost:82/partslist">@Messages("list.link25")</a>
 }
\ No newline at end of file
index 6cb84c5..8a36945 100644 (file)
@@ -7,7 +7,7 @@
      <void property="text">
       <string>id:Long
 name:String
-</string>
+parts:Part[0..N]</string>
      </void>
     </void>
     <void property="name">
@@ -21,19 +21,19 @@ name:String
      <string>x</string>
      <void method="set">
       <object idref="Point2D$Double0"/>
-      <double>264.0</double>
+      <double>90.0</double>
      </void>
     </void>
     <void class="java.awt.geom.Point2D$Double" method="getField">
      <string>y</string>
      <void method="set">
       <object idref="Point2D$Double0"/>
-      <double>87.0</double>
+      <double>93.0</double>
      </void>
     </void>
     <void method="setLocation">
-     <double>264.0</double>
-     <double>87.0</double>
+     <double>90.0</double>
+     <double>93.0</double>
     </void>
    </object>
   </void>
@@ -59,19 +59,19 @@ grpName:String
      <string>x</string>
      <void method="set">
       <object idref="Point2D$Double1"/>
-      <double>547.0</double>
+      <double>373.0</double>
      </void>
     </void>
     <void class="java.awt.geom.Point2D$Double" method="getField">
      <string>y</string>
      <void method="set">
       <object idref="Point2D$Double1"/>
-      <double>75.0</double>
+      <double>81.0</double>
      </void>
     </void>
     <void method="setLocation">
-     <double>547.0</double>
-     <double>75.0</double>
+     <double>373.0</double>
+     <double>81.0</double>
     </void>
    </object>
   </void>
@@ -95,19 +95,19 @@ state:Int</string>
      <string>x</string>
      <void method="set">
       <object idref="Point2D$Double2"/>
-      <double>550.0</double>
+      <double>376.0</double>
      </void>
     </void>
     <void class="java.awt.geom.Point2D$Double" method="getField">
      <string>y</string>
      <void method="set">
       <object idref="Point2D$Double2"/>
-      <double>220.0</double>
+      <double>226.0</double>
      </void>
     </void>
     <void method="setLocation">
-     <double>550.0</double>
-     <double>220.0</double>
+     <double>376.0</double>
+     <double>226.0</double>
     </void>
    </object>
   </void>
@@ -130,19 +130,19 @@ name:String</string>
      <string>x</string>
      <void method="set">
       <object idref="Point2D$Double3"/>
-      <double>262.0</double>
+      <double>88.0</double>
      </void>
     </void>
     <void class="java.awt.geom.Point2D$Double" method="getField">
      <string>y</string>
      <void method="set">
       <object idref="Point2D$Double3"/>
-      <double>401.0</double>
+      <double>407.0</double>
      </void>
     </void>
     <void method="setLocation">
-     <double>262.0</double>
-     <double>401.0</double>
+     <double>88.0</double>
+     <double>407.0</double>
     </void>
    </object>
   </void>
@@ -166,19 +166,19 @@ childRelies:Reply[0..N]</string>
      <string>x</string>
      <void method="set">
       <object idref="Point2D$Double4"/>
-      <double>731.0</double>
+      <double>557.0</double>
      </void>
     </void>
     <void class="java.awt.geom.Point2D$Double" method="getField">
      <string>y</string>
      <void method="set">
       <object idref="Point2D$Double4"/>
-      <double>220.0</double>
+      <double>226.0</double>
      </void>
     </void>
     <void method="setLocation">
-     <double>731.0</double>
-     <double>220.0</double>
+     <double>557.0</double>
+     <double>226.0</double>
     </void>
    </object>
   </void>
@@ -202,91 +202,19 @@ email:String</string>
      <string>x</string>
      <void method="set">
       <object idref="Point2D$Double5"/>
-      <double>555.0</double>
+      <double>381.0</double>
      </void>
     </void>
     <void class="java.awt.geom.Point2D$Double" method="getField">
      <string>y</string>
      <void method="set">
       <object idref="Point2D$Double5"/>
-      <double>407.0</double>
-     </void>
-    </void>
-    <void method="setLocation">
-     <double>555.0</double>
-     <double>407.0</double>
-    </void>
-   </object>
-  </void>
-  <void method="addNode">
-   <object class="com.horstmann.violet.ClassNode" id="ClassNode6">
-    <void property="attributes">
-     <void property="text">
-      <string>quantity: Long
-dcSeq: Long</string>
-     </void>
-    </void>
-    <void property="name">
-     <void property="text">
-      <string>PartRelation</string>
-     </void>
-    </void>
-   </object>
-   <object class="java.awt.geom.Point2D$Double" id="Point2D$Double6">
-    <void class="java.awt.geom.Point2D$Double" method="getField">
-     <string>x</string>
-     <void method="set">
-      <object idref="Point2D$Double6"/>
-      <double>47.0</double>
-     </void>
-    </void>
-    <void class="java.awt.geom.Point2D$Double" method="getField">
-     <string>y</string>
-     <void method="set">
-      <object idref="Point2D$Double6"/>
-      <double>87.0</double>
-     </void>
-    </void>
-    <void method="setLocation">
-     <double>47.0</double>
-     <double>87.0</double>
-    </void>
-   </object>
-  </void>
-  <void method="addNode">
-   <object class="com.horstmann.violet.ClassNode" id="ClassNode7">
-    <void property="attributes">
-     <void property="text">
-      <string>id: Long
-dcNo: String
-dcDescription: String
-dcSeq: Long</string>
-     </void>
-    </void>
-    <void property="name">
-     <void property="text">
-      <string>DesignChange</string>
-     </void>
-    </void>
-   </object>
-   <object class="java.awt.geom.Point2D$Double" id="Point2D$Double7">
-    <void class="java.awt.geom.Point2D$Double" method="getField">
-     <string>x</string>
-     <void method="set">
-      <object idref="Point2D$Double7"/>
-      <double>42.0</double>
-     </void>
-    </void>
-    <void class="java.awt.geom.Point2D$Double" method="getField">
-     <string>y</string>
-     <void method="set">
-      <object idref="Point2D$Double7"/>
-      <double>289.0</double>
+      <double>413.0</double>
      </void>
     </void>
     <void method="setLocation">
-     <double>42.0</double>
-     <double>289.0</double>
+     <double>381.0</double>
+     <double>413.0</double>
     </void>
    </object>
   </void>
@@ -385,24 +313,6 @@ dcSeq: Long</string>
     <void property="bentStyle">
      <object class="com.horstmann.violet.BentStyle" field="HVH"/>
     </void>
-    <void property="endLabel">
-     <string>N</string>
-    </void>
-    <void property="startArrowHead">
-     <object class="com.horstmann.violet.ArrowHead" field="V"/>
-    </void>
-    <void property="startLabel">
-     <string>1</string>
-    </void>
-   </object>
-   <object idref="ClassNode5"/>
-   <object idref="ClassNode2"/>
-  </void>
-  <void method="connect">
-   <object class="com.horstmann.violet.ClassRelationshipEdge">
-    <void property="bentStyle">
-     <object class="com.horstmann.violet.BentStyle" field="HVH"/>
-    </void>
     <void property="endArrowHead">
      <object class="com.horstmann.violet.ArrowHead" field="V"/>
     </void>
@@ -414,25 +324,7 @@ dcSeq: Long</string>
     </void>
    </object>
    <object idref="ClassNode5"/>
-   <object idref="ClassNode4"/>
-  </void>
-  <void method="connect">
-   <object class="com.horstmann.violet.ClassRelationshipEdge">
-    <void property="bentStyle">
-     <object class="com.horstmann.violet.BentStyle" field="HVH"/>
-    </void>
-    <void property="endArrowHead">
-     <object class="com.horstmann.violet.ArrowHead" field="V"/>
-    </void>
-    <void property="endLabel">
-     <string>N</string>
-    </void>
-    <void property="startLabel">
-     <string>1</string>
-    </void>
-   </object>
-   <object idref="ClassNode0"/>
-   <object idref="ClassNode6"/>
+   <object idref="ClassNode2"/>
   </void>
   <void method="connect">
    <object class="com.horstmann.violet.ClassRelationshipEdge">
@@ -449,23 +341,8 @@ dcSeq: Long</string>
      <string>1</string>
     </void>
    </object>
-   <object idref="ClassNode7"/>
-   <object idref="ClassNode6"/>
-  </void>
-  <void method="connect">
-   <object class="com.horstmann.violet.ClassRelationshipEdge">
-    <void property="bentStyle">
-     <object class="com.horstmann.violet.BentStyle" field="HV"/>
-    </void>
-    <void property="endArrowHead">
-     <object class="com.horstmann.violet.ArrowHead" field="V"/>
-    </void>
-    <void property="startLabel">
-     <string>0..1</string>
-    </void>
-   </object>
-   <object idref="ClassNode7"/>
-   <object idref="ClassNode2"/>
+   <object idref="ClassNode5"/>
+   <object idref="ClassNode4"/>
   </void>
  </object>
 </java>
index 274e2ef..8ca3d42 100644 (file)
Binary files a/PartsList/PartsList/document/class.png and b/PartsList/PartsList/document/class.png differ
index 935e55b..dc28ca5 100644 (file)
@@ -1,4 +1,4 @@
-<html>
+ <html>
 <head>
 <title>PDM by play 2.1</title>
 </head>
@@ -11,4 +11,3 @@
 </iframe>
 </body>
 </html>
-
index 0897817..014bd19 100644 (file)
 
-#user  nobody;
-worker_processes  1;
-
-#error_log  logs/error.log;
-#error_log  logs/error.log  notice;
-#error_log  logs/error.log  info;
-
-#pid        logs/nginx.pid;
-
-
+#user nobody;
+worker_processes 1;
+#error_log logs/error.log;
+#error_log logs/error.log notice;
+#error_log logs/error.log info;
+#pid logs/nginx.pid;
 events {
-    worker_connections  1024;
+worker_connections 1024;
 }
-
-
 http {
-    include       mime.types;
-    default_type  application/octet-stream;
-
-#    auth_ldap_url ldap://localhost/ou=People,dc=nodomain?uid?sub;
-#    auth_ldap_binffn cn=admin,dc=nodomain;
-#    auth_ldap_binddn_passwd 'uyaji';
-    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
-    #                  '$status $body_bytes_sent "$http_referer" '
-    #                  '"$http_user_agent" "$http_x_forwarded_for"';
-
-    #access_log  logs/access.log  main;
-
-    sendfile        on;
-    #tcp_nopush     on;
-
-    #keepalive_timeout  0;
-    keepalive_timeout  65;
-
-    #gzip  on;
-
-    server {
-        listen       80;
-        server_name  localhost;
-
-        #charset koi8-r;
-
-        #access_log  logs/host.access.log  main;
-
-        location / {
-            root   /var/www/docs;
-            index  index.html index.htm;
-        }
-
-        #error_page  404              /404.html;
-
-        # redirect server error pages to the static page /50x.html
-        #
-        error_page   500 502 503 504  /50x.html;
-        location = /50x.html {
-            root   html;
-        }
-    }
-
-    server {
-        listen       80;
-        server_name  127.0.0.1;
-        location / {
-               proxy_pass http://127.0.0.1:9000;
-               allow all;
-#              auth_ldap 'Authentication Required';
-#              auth_ldap_require valid_user;
-#              auth_ldap_satisfy any;
-       }
-    }
-        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
-        #
-        #location ~ \.php$ {
-        #    proxy_pass   http://127.0.0.1;
-        #}
-
-        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
-        #
-        #location ~ \.php$ {
-        #    root           html;
-        #    fastcgi_pass   127.0.0.1:9000;
-        #    fastcgi_index  index.php;
-        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
-        #    include        fastcgi_params;
-        #}
-
-        # deny access to .htaccess files, if Apache's document root
-        # concurs with nginx's one
-        #
-        #location ~ /\.ht {
-        #    deny  all;
-        #}
-
-
-    # another virtual host using mix of IP-, name-, and port-based configuration
-    #
-    #server {
-    #    listen       8000;
-    #    listen       somename:8080;
-    #    server_name  somename  alias  another.alias;
-
-    #    location / {
-    #        root   html;
-    #        index  index.html index.htm;
-    #    }
-    #}
-
-
-    # HTTPS server
-    #
-    #server {
-    #    listen       443;
-    #    server_name  localhost;
-
-    #    ssl                  on;
-    #    ssl_certificate      cert.pem;
-    #    ssl_certificate_key  cert.key;
-
-    #    ssl_session_timeout  5m;
-
-    #    ssl_protocols  SSLv2 SSLv3 TLSv1;
-    #    ssl_ciphers  HIGH:!aNULL:!MD5;
-    #    ssl_prefer_server_ciphers   on;
-
-    #    location / {
-    #        root   html;
-    #        index  index.html index.htm;
-    #    }
-    #}
-
+include mime.types;
+default_type application/octet-stream;
+# auth_ldap_url ldap://localhost/ou=People,dc=nodomain?uid?sub;
+# auth_ldap_binffn cn=admin,dc=nodomain;
+# auth_ldap_binddn_passwd 'uyaji';
+#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+# '$status $body_bytes_sent "$http_referer" '
+# '"$http_user_agent" "$http_x_forwarded_for"';
+#access_log logs/access.log main;
+sendfile on;
+#tcp_nopush on;
+#keepalive_timeout 0;
+keepalive_timeout 65;
+#gzip on;
+server {
+listen 80;
+server_name localhost;
+#charset koi8-r;
+#access_log logs/host.access.log main;
+location / {
+root /var/www/docs;
+index index.html index.htm;
+}
+#error_page 404 /404.html;
+# redirect server error pages to the static page /50x.html
+#
+error_page 500 502 503 504 /50x.html;
+location = /50x.html {
+root html;
+}
+}
+server {
+listen 80;
+server_name 127.0.0.1;
+location / {
+proxy_pass http://127.0.0.1:9000;
+allow all;
+# auth_ldap 'Authentication Required';
+# auth_ldap_require valid_user;
+# auth_ldap_satisfy any;
+}
+}
+# proxy the PHP scripts to Apache listening on 127.0.0.1:80
+#
+#location ~ \.php$ {
+# proxy_pass http://127.0.0.1;
+#}
+# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
+#
+#location ~ \.php$ {
+# root html;
+# fastcgi_pass 127.0.0.1:9000;
+# fastcgi_index index.php;
+# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
+# include fastcgi_params;
+#}
+# deny access to .htaccess files, if Apache's document root
+# concurs with nginx's one
+#
+#location ~ /\.ht {
+# deny all;
+#}
+# another virtual host using mix of IP-, name-, and port-based configuration
+#
+#server {
+# listen 8000;
+# listen somename:8080;
+# server_name somename alias another.alias;
+# location / {
+# root html;
+# index index.html index.htm;
+# }
+#}
+# HTTPS server
+#
+#server {
+# listen 443;
+# server_name localhost;
+# ssl on;
+# ssl_certificate cert.pem;
+# ssl_certificate_key cert.key;
+# ssl_session_timeout 5m;
+# ssl_protocols SSLv2 SSLv3 TLSv1;
+# ssl_ciphers HIGH:!aNULL:!MD5;
+# ssl_prefer_server_ciphers on;
+# location / {
+# root html;
+# index index.html index.htm;
+# }
+#}
 }
diff --git a/PartsList/PartsList/lib/aopalliance.jar b/PartsList/PartsList/lib/aopalliance.jar
new file mode 100644 (file)
index 0000000..578b1a0
Binary files /dev/null and b/PartsList/PartsList/lib/aopalliance.jar differ
diff --git a/PartsList/PartsList/lib/guice-3.0.jar b/PartsList/PartsList/lib/guice-3.0.jar
new file mode 100644 (file)
index 0000000..76be5e0
Binary files /dev/null and b/PartsList/PartsList/lib/guice-3.0.jar differ
diff --git a/PartsList/PartsList/lib/guice-assistedinject-3.0.jar b/PartsList/PartsList/lib/guice-assistedinject-3.0.jar
new file mode 100644 (file)
index 0000000..6f61ff4
Binary files /dev/null and b/PartsList/PartsList/lib/guice-assistedinject-3.0.jar differ
diff --git a/PartsList/PartsList/lib/guice-grapher-3.0.jar b/PartsList/PartsList/lib/guice-grapher-3.0.jar
new file mode 100644 (file)
index 0000000..bf87ce0
Binary files /dev/null and b/PartsList/PartsList/lib/guice-grapher-3.0.jar differ
diff --git a/PartsList/PartsList/lib/guice-jmx-3.0.jar b/PartsList/PartsList/lib/guice-jmx-3.0.jar
new file mode 100644 (file)
index 0000000..99df925
Binary files /dev/null and b/PartsList/PartsList/lib/guice-jmx-3.0.jar differ
diff --git a/PartsList/PartsList/lib/guice-jndi-3.0.jar b/PartsList/PartsList/lib/guice-jndi-3.0.jar
new file mode 100644 (file)
index 0000000..a629145
Binary files /dev/null and b/PartsList/PartsList/lib/guice-jndi-3.0.jar differ
diff --git a/PartsList/PartsList/lib/guice-multibindings-3.0.jar b/PartsList/PartsList/lib/guice-multibindings-3.0.jar
new file mode 100644 (file)
index 0000000..f2ec19a
Binary files /dev/null and b/PartsList/PartsList/lib/guice-multibindings-3.0.jar differ
diff --git a/PartsList/PartsList/lib/guice-persist-3.0.jar b/PartsList/PartsList/lib/guice-persist-3.0.jar
new file mode 100644 (file)
index 0000000..9299e9b
Binary files /dev/null and b/PartsList/PartsList/lib/guice-persist-3.0.jar differ
diff --git a/PartsList/PartsList/lib/guice-servlet-3.0.jar b/PartsList/PartsList/lib/guice-servlet-3.0.jar
new file mode 100644 (file)
index 0000000..0277db9
Binary files /dev/null and b/PartsList/PartsList/lib/guice-servlet-3.0.jar differ
diff --git a/PartsList/PartsList/lib/guice-spring-3.0.jar b/PartsList/PartsList/lib/guice-spring-3.0.jar
new file mode 100644 (file)
index 0000000..a3eb482
Binary files /dev/null and b/PartsList/PartsList/lib/guice-spring-3.0.jar differ
diff --git a/PartsList/PartsList/lib/guice-struts2-plugin-3.0.jar b/PartsList/PartsList/lib/guice-struts2-plugin-3.0.jar
new file mode 100644 (file)
index 0000000..5bc61fd
Binary files /dev/null and b/PartsList/PartsList/lib/guice-struts2-plugin-3.0.jar differ
diff --git a/PartsList/PartsList/lib/guice-throwingproviders-3.0.jar b/PartsList/PartsList/lib/guice-throwingproviders-3.0.jar
new file mode 100644 (file)
index 0000000..4e382bc
Binary files /dev/null and b/PartsList/PartsList/lib/guice-throwingproviders-3.0.jar differ
diff --git a/PartsList/PartsList/lib/javax.inject.jar b/PartsList/PartsList/lib/javax.inject.jar
new file mode 100644 (file)
index 0000000..a9dfb86
Binary files /dev/null and b/PartsList/PartsList/lib/javax.inject.jar differ