Commit Graph

32 Commits

Author SHA1 Message Date
Stephan
be32448426 U4-6147 - cleanup persistence units of work (in progress) 2016-05-02 12:12:21 +02:00
Stephan
8ab61039ed U4-6147 - refactor RepositoryFactory and all IUnitOfWork (in progress) 2016-04-29 09:10:00 +02:00
Shannon
f6f54fd057 Merge branch 'master-v7' into dev-v8
Conflicts:
	build/UmbracoVersion.txt
	src/Umbraco.Core/Configuration/UmbracoVersion.cs
	src/Umbraco.Core/CoreBootManager.cs
	src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/UpdateRelatedLinksData.cs
	src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs
	src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs
	src/Umbraco.Core/Persistence/Repositories/ContentTypeRepository.cs
	src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs
	src/Umbraco.Core/Persistence/Repositories/DictionaryRepository.cs
	src/Umbraco.Core/Persistence/Repositories/DomainRepository.cs
	src/Umbraco.Core/Persistence/Repositories/EntityContainerRepository.cs
	src/Umbraco.Core/Persistence/Repositories/LanguageRepository.cs
	src/Umbraco.Core/Persistence/Repositories/MediaTypeRepository.cs
	src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs
	src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs
	src/Umbraco.Core/Persistence/Repositories/PublicAccessRepository.cs
	src/Umbraco.Core/Persistence/Repositories/RepositoryBase.cs
	src/Umbraco.Core/Persistence/Repositories/TemplateRepository.cs
	src/Umbraco.Core/Persistence/RepositoryFactory.cs
	src/Umbraco.Core/PropertyEditors/PropertyEditorValueConvertersResolver.cs
	src/Umbraco.Core/Services/ContentTypeService.cs
	src/Umbraco.Core/Services/FileService.cs
	src/Umbraco.Core/Services/LocalizationService.cs
	src/Umbraco.Core/Services/MemberTypeService.cs
	src/Umbraco.Core/Services/PackagingService.cs
	src/Umbraco.Core/Services/ServiceContext.cs
	src/Umbraco.Tests/Persistence/Querying/ContentTypeSqlMappingTests.cs
	src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs
	src/Umbraco.Tests/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs
	src/Umbraco.Tests/Persistence/Repositories/DictionaryRepositoryTest.cs
	src/Umbraco.Tests/Persistence/Repositories/MediaTypeRepositoryTest.cs
	src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs
	src/Umbraco.Tests/Umbraco.Tests.csproj
	src/Umbraco.Tests/Web/Mvc/UmbracoViewPageTests.cs
	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
	src/Umbraco.Web.UI/config/ClientDependency.config
	src/Umbraco.Web.UI/packages.config
	src/Umbraco.Web.UI/web.Template.config
	src/Umbraco.Web/Models/Mapping/ContentModelMapper.cs
	src/Umbraco.Web/Models/Mapping/ContentTypeModelMapper.cs
	src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs
	src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs
	src/Umbraco.Web/Services/ApplicationTreeService.cs
	src/Umbraco.Web/Services/SectionService.cs
	src/Umbraco.Web/Trees/MemberTreeController.cs
	src/Umbraco.Web/UI/Pages/ClientTools.cs
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/WebBootManager.cs
	src/Umbraco.Web/umbraco.presentation/macro.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadNodeTypes.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/channels/api.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasksBase.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/exportDocumenttype.aspx.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/templateControls/ItemRenderer.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/MediaExtensions.cs
	src/umbraco.businesslogic/BasePages/ClientTools.cs
	src/umbraco.businesslogic/UmbracoSettings.cs
	src/umbraco.cms/businesslogic/CMSNode.cs
	src/umbraco.cms/businesslogic/Content.cs
	src/umbraco.cms/businesslogic/cache/Cache.cs
	src/umbraco.cms/businesslogic/datatype/DataTypeDefinition.cs
	src/umbraco.cms/businesslogic/propertytype/propertytype.cs
	src/umbraco.cms/businesslogic/web/Document.cs
	src/umbraco.cms/helpers/DeepLink.cs
	src/umbraco.editorControls/tinyMCE3/TinyMCE.cs
2016-03-10 19:20:15 +01:00
Shannon
fb5faa3db7 Fixes tests, adds LanguageId to the interface 2016-01-07 18:59:59 +01:00
Shannon
d7a142e724 Refactors DictionaryItem and DictionaryTranslation so that the attached ILanguage entity is not cached nor cloned. This will save on lots of memory and cloning cycles especially if there are quire a few dictioanry items. Unfortunatley to achieve this requires a not so pretty hack where we need to assign an internal callback to the model so it knows how to retrieve the language when it needs it. In v8, the ILanguage entity will not be attached at all. This also fixes a cache refresher issue for when a language is deleted -> all dictionary cache must be removed. This commit also changes a method name: ClearAllIsolatedCacheByRepositoryEntityType 2016-01-07 18:44:04 +01:00
Shannon
827f7a7bc8 Updates DictionaryRepository(s) to have custom GetAll caching options - to basically disable it since there could be tons of these and currently an IDictionaryItem is a massive entity (need to fix that) 2016-01-06 18:34:07 +01:00
Shannon
f09f3c4129 ok, now Core proj is building 2015-12-18 14:45:28 +01:00
Shannon
6f43230a9b Core is more or less building (i think) 2015-12-18 14:24:17 +01:00
Shannon
5c5a5d12cc WIP working on getting Core project to build 2015-12-18 13:29:12 +01:00
Shannon
a6a2b02cd8 working on U4-5927 - this extends the base event class to have EventMessages which event consumers can add to, the trick is that there is a factory for these EventMessages, in a web context, the factory is a request based factory so that during a request all instances of the EventMessages are the same instance. All services then accept an instance of IEventMessagesFactory which they can then use when raising events. We'll then use this to send messages to the UI. Not sure if i should make this a resolver yet or not. Still a WIP!! 2015-07-23 20:04:40 +02:00
Shannon
201512d5f2 Fixes :U4-6858 add localizationService.GetDictionaryItemDescendants, also obsoletes FlattenList since if used incorrectly could cause a flood of SQL calls, adds some tests to verify the output of SelectRecursive is in the same order and updates anything using FlattenList to SelectRecursive. Updates the Language repository to use GetAll wherever possible so all languages are simply cached, this means there less overall cache and less lookups. Updates the Dictionary repository to have less N+1 lookups when building the entity from the DTO by just looking up all languages instead of one at a time. Adds tests for getting descendants for dictionary items. 2015-07-22 12:10:21 +02:00
Shannon
f68cdf43e1 Fixes: U4-6099 cmsLanguageText.languageId needs to be a foreign key to the umbracoLanguage table 2015-07-02 17:19:42 +02:00
Shannon
d4b718d615 Creates common base class for services, this streamlines all ctors and exposes correct services. Gets the TaskRepository working with a test, now to get it fully implemented. 2015-01-19 18:37:48 +11:00
Shannon
280826f3e8 Fixes: U4-6110 Cleanup the Audit trail code - this should be a service, remove all internal statics 2015-01-19 15:12:34 +11:00
Shannon
e3acdbe85b Fixes up dictionary and language repositories to have underlying simple get repositories since they support getting by id, unique id and string variations but we want to have native repository enabled caching for these items so these get methods now use private repositories based on these keys. Adds more tests, removes N+1 queries for languages and dictionary items. Removes RuntimeCacheProvider, we only want one type of cache, this simplifies things a lot. 2015-01-13 13:25:36 +11:00
Shannon
fb3b99a49a Fixes up a left join with dictionary -> language items, adds another couple of unit tests adds another method to the ILocalizationService 2015-01-12 19:39:30 +11:00
Shannon
ffd4e9507b WIP Gets legacy dictionary, language classes to wrap the Core services implementation properly. Obsoletes a bunch of stuff, creates a few more tests, need to test UI now. 2015-01-12 18:52:30 +11:00
Shannon
7212015127 obsoletes all of the service ctor's that don't specify all required dependencies, none of these are used in the core. 2015-01-09 18:53:08 +11:00
Morten Christensen
b33a265ea4 Moving events out of the repository scope.
Adding Get Language by Iso Code method
2014-01-10 15:39:15 +01:00
Morten Christensen
309f337461 Fixes U4-1549 2013-01-25 08:58:21 -01:00
Shannon Deminick
30f3704a1b Changed over DeletedEventArgs to support new event system and all Services that use it. Created new
DeleteRevisionsEventArgs for when content removes revisions.
2012-12-16 07:43:03 +05:00
Shannon Deminick
a925b092e7 Created new event structure (currently only implemented for Saving/Saved) and new events CollectionSaving, CollectionSaved.
Created new way to raise events and handle their cancellations. Everything is strongly typed so should make
working with events much nicer for end users. Also ensures that the Sender is the object raising the event.
2012-12-15 21:04:17 +05:00
Shannon Deminick
2035f2d77f Moved Event Args, etc... for persistence/services to Umbraco.Core.Events namespace 2012-12-15 10:43:03 +05:00
Morten Christensen
4c256986da Adding a few constructor options to the services to ease use when newing the services instead of using the ServiceContext. 2012-12-14 13:27:10 -01:00
Morten Christensen
0bf061751e Refactoring LocalizationService to use the new and clean uow/repo approach. 2012-12-14 13:06:58 -01: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
aa574ac32f Merged with 6.0 and fixed a couple merge issues 2012-12-11 23:19:07 +05: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
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
Morten Christensen
0613a422fb Adding events and audit trail for LocalizationService 2012-12-10 14:53:36 -01:00
Morten Christensen
a4d4411cca Moving services from Web proj to Core proj. 2012-11-12 07:40:11 -01:00