Commit Graph

479 Commits

Author SHA1 Message Date
Morten Christensen
2956bdcc06 Refactoring FileService to use the new and clean uow/repo approach. 2012-12-14 12:59:47 -01:00
Morten Christensen
431e346622 Refactoring DataTypeService to use the new and clean uow/repo approach. 2012-12-14 12:43:05 -01:00
Morten Christensen
c711ed8542 Updating ContentTypeService to new uow/repo approach.
Removing ServiceFactory as it won't be used.
Correcting constructors on ContentService for consistency.
2012-12-14 12:33:14 -01:00
Morten Christensen
f9cffdd910 Merge with 6.0.0 2012-12-14 11:51:03 -01:00
Shannon Deminick
547dab0761 Fixes: #U4-1274, U4-1304 2012-12-14 10:40:11 +05:00
Shannon Deminick
81b28bd0ce Changed over remaining services to accept the RepositoryFactory as a ctor argument. 2012-12-14 08:22:42 +05:00
Shannon Deminick
1a5285dfa0 Merge with 6.0.0 2012-12-14 08:07:39 +05:00
Shannon Deminick
a37abbe622 Merge 2012-12-14 08:06:45 +05:00
Shannon Deminick
a9cb337a96 Changes ApplicationContext to expect arguments of DatabaseContext and ServiceContext for it to be
constructed. Changes DatabaseContext to not be a singleton. Changes ServiceContext not to be a singleton.
Removed ServicesFactory. Updated unit tests to support new changes.
2012-12-14 08:06:32 +05:00
Sebastiaan Janssen
e2eee711d8 Fixes U4-483 - Replace illegal characters in media with a dash, not underscore
Also removing multiple repeating dashes, leaving only one in place.
2012-12-13 09:26:34 -01:00
Morten Christensen
029824c8bc Reverting internal methods to public methods in RepositoryFactory 2012-12-12 17:37:13 -01:00
Shannon Deminick
e5ddcc756c Changed boot managers to public 2012-12-12 20:10:50 +05:00
Morten Christensen
877c38b8bc Moving RepositoryFactory to constructor to avoid hard dependency on the RepositoryResolver in the services. 2012-12-12 10:47:14 -01:00
Sebastiaan Janssen
849a9892c5 #U4-1246 Increase the version number in ClientDependency.config after install 2012-12-12 09:07:06 -01:00
Morten Christensen
e71a5fd5eb Fixing an issue with the MediaService.
Making the two UOW Providers public, so they can be used for newing up services.
Adding a few constructor options to the PP UOW Provider to avoid config lookup.
2012-12-12 09:00:00 -01:00
Shannon Deminick
41403c13a9 Fixes a ContentService 'using' of the repo. Updated the MediaService to use the correct logic for UOWs. 2012-12-12 06:40:38 +05:00
Shannon Deminick
1e41db6d69 Removed any manual instantiation of PetaPocoUnitOfWork as this should generally always
be done by the PetaPocoUnitOfWorkProvider to ensure that for a UOW it always uses a new database
instance, not a shared one.
2012-12-12 06:08:03 +05:00
Shannon Deminick
a3938edde2 Changed the PetaPocoUnitOfWorkProvider to ensure that a new Database object is used for each new
unit of work (transaction). When the UOW is diposed, the database instance will also be disposed.
2012-12-12 05:57:52 +05:00
Shannon Deminick
1132547c24 Changed required Database references to UmbracoDatabase 2012-12-12 05:48:18 +05:00
Shannon Deminick
a0e4492a35 New implementation of IDatabaseFactory, allows setting the DatabaseContext.Current at runtime
with a custom IDatabaseFactory (mostly for testing).
Changes AuditTrail to internal so the public way is just with the 'Audit' class.
Fixed ThreadSafetyServiceTests which was failing with the new AuditTrail stuff because of the
Database instances, this is not solved with the new PerThreadDatabaseFactory for the unit test.
Created new 'UmbracoDatabase' object which inherits from the PetaPoco one so that we can future proof
the implementation as we might want some custom logic on there. Now the IDatabaseFactory returns
an UmbracoDatabase instead of just Database.
2012-12-12 03:47:04 +05:00
Shannon Deminick
6ac2db9497 removed database factory, changed audit trail stuff to internal, not sure it needs to be public. 2012-12-12 00:17:59 +05:00
Shannon Deminick
aa574ac32f Merged with 6.0 and fixed a couple merge issues 2012-12-11 23:19:07 +05:00
Shannon Deminick
cfa8fc2bba Removed the uow ctor from the SaveEventArgs for testing as the test will still prove that
multi-threading works with the services without proving access to a single uow, the db will error first anyways.
2012-12-11 22:56:34 +05:00
Sebastiaan Janssen
73d541ad80 Preserve existing whitespace in web.config file to make upgrades a LITTLE easier 2012-12-11 16:23:15 -01:00
Shannon Deminick
feff68ada8 Refactor new Services for thread safety, plus unit tests. Not all services are updated to be correct, only the
ContentService, the rest need to be updated as well.
2012-12-11 12:03:36 +05:00
Morten Christensen
4f5c5cfc7c Making minor correct to ServiceContext as per Shannons recommendation.
Adding resolver reset to publishing test tear down.
2012-12-10 08:44:17 -01:00
Morten Christensen
fbe1ec1035 Merge with 6.0.0-Repository-Resolvers-refactor 2012-12-10 07:49:56 -01:00
Shannon Deminick
1e19c4b65b Converted much of the old logging to use the new logging. All calls for log types: Login, Logout,
LoginFailure, Debug. There's still a bunch to convert though. #U4-7
2012-12-10 04:22:29 +05:00
Shannon Deminick
e6f50c2fa4 removed comments 2012-12-10 03:15:12 +05:00
Shannon Deminick
c9f40a74de Changed all data services to create one repository type in the constructor instead of resolving
them in each method since they are only supposed to be using their single unit of work anyways (resolving
will return the same repository anyways, but in some cases it might have been with a different UOW)
Removed SetUnitOfWork method on IRepository as this is not needed.
Removed the old implementation of RepositoryResolver and replaces it with the RepositoryInstanceResolver (but
maintained the name of RepositoryResolver)
2012-12-10 02:58:23 +05:00
Shannon Deminick
f55d639514 Simplifies the ResolveByType so that it only requires the one interface, this is done by adding a new non-generic
IRepository interface.
2012-12-09 09:21:26 +05:00
Shannon Deminick
c3c62f916c Added SetRepositoryInstanceFactory method so that in the future devs could set their own RepositoryInstanceFactory on startup. 2012-12-09 09:07:50 +05:00
Shannon Deminick
e0a7be7237 Created RepositoryInstanceResolver/Factory to replace the configuration based instantiation of Repo's.
Added unit tests to support resoling each instance, fixed CodeFirstTests to ensure that the base.TearDown() method is
called. Changed the BaseMapper's to internal.
2012-12-09 09:01:00 +05:00
Shannon Deminick
0c29704d09 Fixes TypeFinder to not scan for types when the assembly IsDynamic (created using reflection Emit).
This fixes the RenderRouteHandlerTests which were failing due to a sequence of events when the new PetaPoco classes
were created using Reflection and then the TypeFinder tries to enumerate on them.
2012-12-09 04:13:09 +05:00
Shannon Deminick
44ccfc0262 Adds 'Url', 'ItemType' and the Indexed property alias to IPublishedContent.
Changes Properties to ICollection instead of Collection for IPublishedContent.
Creates PublishedContentBase object which handles the Url and Indexed property on IPublishedContent automatically so implementors should use this base
class instead. Moves GetPropertyValue extensions to the Umbraco.Web project instead of the
Umbraco.Core project because this method needs to parse internal links if the value is a string. We require the UmbracoContext
to do this so they must exist in the Web project.
2012-12-09 03:22:11 +05:00
Shannon Deminick
2e5618b778 Merge 2012-12-09 00:51:09 +05:00
Morten Christensen
9111f811be Implementing the new DefinitionFactory, which makes use of the newer database model definitions. This is done to streamline the usage of the database model definitions between db creation and migration. 2012-12-07 14:52:54 -01:00
Shannon Deminick
73414f4504 Merge with default 2012-12-07 19:56:40 +05:00
Morten Christensen
736fbc6659 Moving database definition models, so they are shared and can be used in the sql syntax provider. 2012-12-07 13:48:38 -01:00
Morten Christensen
f9403f2bc6 Implementing fluent Delete, Rename and Update syntax for migrations. 2012-12-07 13:46:11 -01:00
Morten Christensen
9935abd1a2 Implementing Insert-builder with fluent syntax 2012-12-07 12:23:03 -01:00
Morten Christensen
97509316ba Was missing initial wire up of the Create builder's fluent syntax 2012-12-07 12:02:56 -01:00
Morten Christensen
e9d1747504 Adding Fluent Create-builders for Column, Table, Index and ForeignKey. 2012-12-07 11:55:41 -01:00
Shannon Deminick
2a90e93a6f Updated partial view macro engine to support storing the files in the App_Plugins/[packagename]/Views/MacroPartials
so they can be stored with a package and not pollute the main file system.
2012-12-07 07:04:11 +05:00
Sebastiaan Janssen
323af078ca Upgrade to MVC4 2012-12-06 10:31:54 -01:00
Morten Christensen
01baef6bc2 Removing unused files 2012-12-11 08:00:23 -01:00
Morten Christensen
614ef15f8a Removing infrastructure setting, as its not needed any more 2012-12-11 08:00:06 -01:00
Morten Christensen
f114b06531 Adding events to MacroService 2012-12-10 14:59:33 -01:00
Morten Christensen
0613a422fb Adding events and audit trail for LocalizationService 2012-12-10 14:53:36 -01:00
Morten Christensen
190cdaacb5 Adding events and audit trail to MediaService 2012-12-10 14:28:46 -01:00