Commit Graph

67 Commits

Author SHA1 Message Date
Morten Christensen
f6e354314b Minor optimization to SaveAndPublish method in ContentService. 2013-01-24 14:47:44 -01:00
Morten Christensen
25f91cc0da Fixes U4-1534 so documents containing the tag datatype is properly copied.
Copying a document with a Tags datatype on it would only work if a new TagRelationship is created.
2013-01-24 13:49:41 -01:00
Morten Christensen
a95c129116 Refactoring a few methods in the ContentService, so the omitCacheRefresh parameter isn't exposed in the new api, as its only relevant to the old api.
Correcting the calls from Document to the internal methods in the ContentService, which ensures that the cache isn't refreshed as its handled elsewhere.
Correcting broken unit test after having changed the GetDescendents method.
2013-01-22 11:23:33 -01:00
Morten Christensen
4bf9cf270d Fixes Move when parent is unpublished. 2013-01-21 14:50:58 -01:00
Morten Christensen
9ef07ed2eb Fixes U4-1214 and U4-1484 for both Content and Media 2013-01-18 10:56:14 -01:00
Morten Christensen
ef9b0b6433 Fixes U4-1429 - A name is now required for creating Content and Media. 2013-01-15 10:12:23 -01:00
Morten Christensen
bc23495632 Adds updating of SortOrder upon moving a document.
Related to U4-1461
2013-01-14 14:04:40 -01:00
Morten Christensen
b562dc787b Merge 2013-01-10 14:07:23 -01:00
Morten Christensen
ca2942fdd9 Refactoring ChangePublishedState to use an enum instead of a boolean. 2013-01-10 14:07:07 -01:00
Sebastiaan Janssen
6187af76c0 Revert my c1722c82aa28 changes to published version checking (which were wrong!) 2013-01-10 13:55:42 -01:00
Morten Christensen
7e060d665b Renamed a few properties on the PropertyType object, as the original naming was confusing. 2013-01-08 07:38:54 -01:00
Morten Christensen
5dbcfa57a8 Implements the new publish and unpublish events in the PublishingStrategy.
Making the PublishStrategy public, so that its possible to subscribe to the events.
Removing the old PublishingEventArgs, which is no longer used.
Correcting a few comments.
2012-12-28 14:47:09 -01:00
Morten Christensen
8338102944 Reverting use of DateTime.UtcNow to DateTime.Now in the new api. 2012-12-28 10:43:34 -01:00
Sebastiaan Janssen
c97085f9bb Fix errors and wrong display of subnodes under and unpublished node showing as
published. Also fixes error message where it says on the subnode:
This document is published but is not visible because the parent '???' is unpublished
2012-12-27 17:29:54 -01:00
Sebastiaan Janssen
e10cb56502 Previous fix didn't work if you don't Save() the document +don't publish copies. 2012-12-27 16:08:24 -01:00
Sebastiaan Janssen
140c1db66a Fixing umbEnsureUniqueName not being ran for a document copy 2012-12-27 15:39:37 -01:00
Morten Christensen
39e2314102 Correcting merge issues.
Fixing reset of published state in ContentRepository.
Correcting Querying tests after spacing has changed a bit.
2012-12-21 09:45:34 -01:00
Morten Christensen
d816ac1125 Merge with 6.0.0 2012-12-21 08:38:43 -01:00
Shannon Deminick
446ff0591b Adds Deleting/Deleted events to the EmptyRecycleBin methods of Content/Media services. 2012-12-21 07:42:37 +05:00
Shannon Deminick
9f9afe2ee6 Converted over SendToPublishEventArgs to new events. 2012-12-21 07:20:39 +05:00
Shannon Deminick
d0769cef0f Removed SavedCollection/SavingCollection events and just changed the SaveEventArgs and DeleteEventArgs to have enumerables.
Changed the base CancellableObjectEventArgs to have a protected property so inheritors can just expose the 'T' object as their own
better name.
2012-12-21 07:17:27 +05:00
Shannon Deminick
9cf86d7677 Manually fixed merge with MediaService. 2012-12-21 06:59:30 +05:00
Shannon Deminick
91a8fd7369 Manually fixed merge with ContentService and new events. 2012-12-21 04:59:51 +05:00
Shannon Deminick
18814d8dc6 Merge with 6.0.0 2012-12-21 04:42:22 +05:00
Morten Christensen
9f2d41286c Fixing MasterContentType for DocumentTypes.
Adding ParentId "listener" to the repositories that uses ParentId, so we can ensure that the path is updated correctly.
Fixing how AllowedTemplates are saved upon creation of a new DocumentType.
Ensuring DocumentType.Save is called when creting a new DocumentType.
Fixing Publish/RePublish of Content with previously published children.
Removing UpdateDocumentCache in the save event of editContent.aspx.cs as its now handled in the new api.
Rewiring template methods on DocumentType class to use the new api.
2012-12-20 14:29:08 -01:00
Morten Christensen
1b465ca709 Merge with 6.0.0 2012-12-19 12:15:34 -01:00
Morten Christensen
bae4352e77 Refactoring the saving of properties, so that its consistent for Content, Media and Member that all use the ContentControl.
Adding a clear cache call in the MediaType and DocumentType Save method to ensure the correct loading of properties/propertytypes.
Adding IsPublishable method to ContentService, so we have a way to check if a content can be published depending on the state of the ancestors.
2012-12-18 11:46:05 -01:00
Morten Christensen
4d5d556e64 Refactoring ContentRepository and MediaRepository to have a common base for getting and deleting versions.
Adding VersionableRepositoryBase implementation.
2012-12-17 13:37:36 -01:00
Morten Christensen
32ea6e0bc0 Correcting wrong placement of uow.commit in SaveAndPublish method. 2012-12-19 07:19:04 -01:00
Shannon Deminick
5749e4cab3 Converted RollbackEventArgs to use new event system. 2012-12-16 07:46:19 +05: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
89be8c3f41 Changed over CopyEventArgs to support new event structure and all services that use it, also added
another propery to the args 'Copy' so users can have access to the copied and original entity when consuming
the event.
NOTE: Noticed that the MediaService doesn't support copy?
2012-12-16 06:44:46 +05:00
Shannon Deminick
af5a01caed Fixes MediaService to have the correct RecycleBin id = -21 (not -20 like Content). Converted
MoveEventArgs and all services that use it to use the new event structure.
2012-12-16 06:37:27 +05:00
Shannon Deminick
dad5326281 re-added parameter check to ensure parent id is not 0. If adding hierarichal data, then use the
other overload accepting an entity. Converts over the Created/Creating events to the new structure for
ContentService and MediaService
2012-12-16 06:28:43 +05:00
Shannon Deminick
5e941a1c3a Changed CollectionSaved event naming to be consistent so is renamed SavedCollection (etc).
Now we have no more IEnumerable<Lazy<T>> collections, we can easily strongly type the event args instead of
just IEnumerable, they are now IEnumerable<T>.
2012-12-16 04:10:39 +05:00
Shannon Deminick
b765dffea7 Removed the need for the services to have IEnumerable<Lazy<T>> parameters for bulk inserting, instead we enable the ability
to pass in an entity reference as a parent to the object if we want to lazily create heirarchy. This has been changed for the
ContentService and ContentTypeService as well as the entities for Media, Content, ContentType, MediaType and more unit tests written for it.
2012-12-16 04:02:29 +05:00
Shannon Deminick
5fadb715c1 Changed all bulk operations to use one transaction unless it is a Lazy collection (this was mostly the case before)
Fixed EventExtensions handling cancellations.
2012-12-15 21:27:15 +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
Morten Christensen
fabe5f83a7 Rearranging using statements in MediaService to ensure events are fired before after using, and that the AuditTrail writes after the uow has been disposed.
Adding GetById overload in MediaService to allow lookup by UniqueId guid.
2012-12-15 11:17:32 -01:00
Morten Christensen
fcda8cc7ca Reordering using statements in ContentService to ensure that Events and Audit Trails exists outside the using. 2012-12-15 11:04:03 -01: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
f5bfb90b64 Manually merging a few changes to the ContentService, ContentFactory, ContentRepository and ContentExtensions to avoid a merge hell when pushing latest to the legacy refactor branch.
Current checkin has a few new failing tests due to recent changes, but a few should be resolved by adding a DataTypesResolver setup in the ContentServiceTests fixture.
2012-12-14 15:19:54 -01: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
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
Shannon Deminick
81b28bd0ce Changed over remaining services to accept the RepositoryFactory as a ctor argument. 2012-12-14 08:22:42 +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
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
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