[tarantino] r154 committed - - Replaced reference to IPersistentObjectRepository in Deployer UI...

0 views
Skip to first unread message

codesite...@google.com

unread,
Dec 29, 2009, 3:46:23 PM12/29/09
to tarantino...@googlegroups.com
Revision: 154
Author: kwhurwitz
Date: Tue Dec 29 12:45:23 2009
Log: - Replaced reference to IPersistentObjectRepository in Deployer UI
- Fixed NHibernate deployer configuration
http://code.google.com/p/tarantino/source/detail?r=154

Modified:
/trunk/src/Tarantino.Deployer/DeployPackage.cs
/trunk/src/Tarantino.Deployer/deployer.hibernate.cfg.xml
/trunk/src/Tarantino.Deployer.Core/Services/IDeploymentRepository.cs

/trunk/src/Tarantino.Deployer.Infrastructure/DataAccess/Repositories/DeploymentRepository.cs

=======================================
--- /trunk/src/Tarantino.Deployer/DeployPackage.cs Tue Dec 29 12:09:43 2009
+++ /trunk/src/Tarantino.Deployer/DeployPackage.cs Tue Dec 29 12:45:23 2009
@@ -100,11 +100,10 @@

if (selectedRows.Count == 1)
{
- var deploymentId = new
Guid(grdDeployments.Rows[0].Cells[6].FormattedValue.ToString());
- var repository =
ObjectFactory.GetInstance<IPersistentObjectRepository>();
- repository.ConfigurationFile = "deployer.hibernate.cfg.xml";
-
- var deployment =
repository.GetByIdWithoutClosingSession<Deployment>(deploymentId);
+ var repository = ObjectFactory.GetInstance<IDeploymentRepository>();
+
+ var deploymentId = new
Guid(selectedRows[0].Cells[6].FormattedValue.ToString());
+ var deployment = repository.GetById(deploymentId);
var outputText = deployment.Output.Output;
var outputWindow = new DeploymentOutput { Output = outputText};
outputWindow.ShowDialog();
=======================================
--- /trunk/src/Tarantino.Deployer/deployer.hibernate.cfg.xml Tue Jan 6
15:05:52 2009
+++ /trunk/src/Tarantino.Deployer/deployer.hibernate.cfg.xml Tue Dec 29
12:45:23 2009
@@ -6,6 +6,6 @@
<property name="show_sql">false</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>

- <mapping assembly="Tarantino.Infrastructure" />
+ <mapping assembly="Tarantino.Deployer.Infrastructure" />
</session-factory>
</hibernate-configuration>
=======================================
--- /trunk/src/Tarantino.Deployer.Core/Services/IDeploymentRepository.cs
Tue Dec 29 12:09:43 2009
+++ /trunk/src/Tarantino.Deployer.Core/Services/IDeploymentRepository.cs
Tue Dec 29 12:45:23 2009
@@ -1,3 +1,4 @@
+using System;
using System.Collections.Generic;
using Tarantino.Deployer.Core.Model;

@@ -10,5 +11,6 @@
IEnumerable<Deployment> FindSuccessfulUncertified(string application,
string environment);
IEnumerable<Deployment> FindCertified(string application, string
environment);
void Save(Deployment deployment);
+ Deployment GetById(Guid id);
}
}
=======================================
---
/trunk/src/Tarantino.Deployer.Infrastructure/DataAccess/Repositories/DeploymentRepository.cs
Tue Dec 29 12:09:43 2009
+++
/trunk/src/Tarantino.Deployer.Infrastructure/DataAccess/Repositories/DeploymentRepository.cs
Tue Dec 29 12:45:23 2009
@@ -1,3 +1,4 @@
+using System;
using System.Collections.Generic;
using Tarantino.Core.Commons.Model.Enumerations;
using Tarantino.Core.Commons.Services.Repositories;
@@ -15,6 +16,12 @@
_repository = repository;
_repository.ConfigurationFile = "deployer.hibernate.cfg.xml";
}
+
+ public Deployment GetById(Guid id)
+ {
+ var item = _repository.GetByIdWithoutClosingSession<Deployment>(id);
+ return item;
+ }

public IEnumerable<Deployment> Find(string application, string
environment)
{

Reply all
Reply to author
Forward
0 new messages