Beispiel #1
0
        public void Archive(ISession session, Tag tag, TagDiff diff, EntryEditEvent reason)
        {
            var agentLoginData = SessionHelper.CreateAgentLoginData(session, PermissionContext);
            var archived       = tag.CreateArchivedVersion(diff, agentLoginData, reason);

            session.Save(archived);
        }
Beispiel #2
0
        protected void AddEntryEditedEntry(ISession session, Song entry, EntryEditEvent editEvent, ArchivedSongVersion archivedVersion)
        {
            var user          = GetLoggedUser(session);
            var activityEntry = new SongActivityEntry(entry, editEvent, user, archivedVersion);

            AddActivityfeedEntry(session, activityEntry);
        }
Beispiel #3
0
        public void Archive(IRepositoryContext <Tag> ctx, Tag tag, TagDiff diff, EntryEditEvent reason)
        {
            var agentLoginData = ctx.CreateAgentLoginData(PermissionContext);
            var archived       = tag.CreateArchivedVersion(diff, agentLoginData, reason);

            ctx.OfType <ArchivedTagVersion>().Save(archived);
        }
Beispiel #4
0
		public void Archive(ISession session, Tag tag, TagDiff diff, EntryEditEvent reason) {

			var agentLoginData = SessionHelper.CreateAgentLoginData(session, PermissionContext);
			var archived = tag.CreateArchivedVersion(diff, agentLoginData, reason);
			session.Save(archived);

		}
Beispiel #5
0
        protected void AddEntryEditedEntry(ISession session, Album entry, EntryEditEvent editEvent)
        {
            var user          = GetLoggedUser(session);
            var activityEntry = new AlbumActivityEntry(entry, editEvent, user);

            AddActivityfeedEntry(session, activityEntry);
        }
Beispiel #6
0
        public void AddEntryEditedEntry(Tag entry, EntryEditEvent editEvent, ArchivedTagVersion archivedVersion)
        {
            var user          = _ctx.OfType <User>().GetLoggedUser(_permissionContext);
            var activityEntry = new TagActivityEntry(entry, editEvent, user, archivedVersion);

            AddActivityfeedEntry(activityEntry);
        }
Beispiel #7
0
        protected GenericActivityEntry(TEntry entry, EntryEditEvent editEvent, User author, TArchivedVersion archivedVersion)
            : base(author, editEvent)
        {
            ParamIs.NotNull(() => entry);

            Entry           = entry;
            EditEvent       = editEvent;
            ArchivedVersion = archivedVersion;
        }
Beispiel #8
0
        public ArchivedVenueVersion(Venue venue, XDocument data, VenueDiff diff, AgentLoginData author,
                                    EntryEditEvent commonEditEvent, string notes)
            : base(data, author, venue.Version, venue.Status, notes)
        {
            ParamIs.NotNull(() => diff);

            Entry           = venue;
            Diff            = diff;
            CommonEditEvent = commonEditEvent;
        }
Beispiel #9
0
        public ArchivedTagVersion(Tag tag, XDocument data, TagDiff diff, AgentLoginData author,
                                  EntryEditEvent commonEditEvent, string notes)
            : base(data, author, tag.Version, tag.Status, notes)
        {
            ParamIs.NotNull(() => diff);

            Tag             = tag;
            Diff            = diff;
            CommonEditEvent = commonEditEvent;
        }
Beispiel #10
0
        public ArchivedReleaseEventVersion(ReleaseEvent releaseEvent, XDocument data, ReleaseEventDiff diff, AgentLoginData author,
                                           EntryEditEvent commonEditEvent, string notes)
            : base(data, author, releaseEvent.Version, releaseEvent.Status, notes)
        {
            ParamIs.NotNull(() => diff);

            ReleaseEvent    = releaseEvent;
            Diff            = diff;
            CommonEditEvent = commonEditEvent;
        }
Beispiel #11
0
        public ArchivedReleaseEventSeriesVersion(ReleaseEventSeries series, XDocument data, ReleaseEventSeriesDiff diff, AgentLoginData author,
                                                 EntryEditEvent commonEditEvent, string notes)
            : base(data, author, series.Version, EntryStatus.Finished, notes)
        {
            ParamIs.NotNull(() => diff);

            Entry           = series;
            Diff            = diff;
            CommonEditEvent = commonEditEvent;
        }
        public ArchivedSongListVersion(SongList songList, SongListDiff diff, AgentLoginData author,
                                       EntryStatus status,
                                       EntryEditEvent commonEditEvent, string notes)
            : base(null, author, songList.Version, status, notes)
        {
            ParamIs.NotNull(() => diff);

            SongList        = songList;
            Diff            = diff;
            CommonEditEvent = commonEditEvent;
        }
        public ArchivedSongListVersion(SongList songList, SongListDiff diff, AgentLoginData author,
                                       EntryEditEvent commonEditEvent)
            : base(null, author, 0, EntryStatus.Finished, string.Empty)
        {
            ParamIs.NotNull(() => diff);

            SongList        = songList;
            Diff            = diff;
            CommonEditEvent = commonEditEvent;

            Status = EntryStatus.Finished;
        }
Beispiel #14
0
        public ArchivedTagVersion(Tag tag, TagDiff diff, AgentLoginData author,
                                  EntryEditEvent commonEditEvent)
            : base(null, author, 0, EntryStatus.Finished, string.Empty)
        {
            ParamIs.NotNull(() => diff);

            Tag             = tag;
            Diff            = diff;
            CommonEditEvent = commonEditEvent;
            CategoryName    = tag.CategoryName;
            Description     = tag.Description;
            Status          = EntryStatus.Finished;
        }
        public ArchivedReleaseEventVersion(ReleaseEvent releaseEvent, ReleaseEventDiff diff, AgentLoginData author,
                                           EntryEditEvent commonEditEvent)
            : base(null, author, 0, EntryStatus.Finished, string.Empty)
        {
            ParamIs.NotNull(() => diff);

            ReleaseEvent    = releaseEvent;
            Diff            = diff;
            CommonEditEvent = commonEditEvent;
            Date            = releaseEvent.Date;
            Description     = releaseEvent.Description;
            Name            = releaseEvent.Name;
            SeriesNumber    = releaseEvent.SeriesNumber;
            Status          = EntryStatus.Finished;
        }
Beispiel #16
0
 public TagActivityEntry(Tag tag, EntryEditEvent editEvent, User author, ArchivedTagVersion archivedVersion)
     : base(tag, editEvent, author, archivedVersion)
 {
 }
Beispiel #17
0
 public SongListActivityEntry(SongList songlist, EntryEditEvent editEvent, User author, ArchivedSongListVersion archivedVersion)
     : base(songlist, editEvent, author, archivedVersion)
 {
 }
Beispiel #18
0
        private ArchivedReleaseEventSeriesVersion Archive(IDatabaseContext <ReleaseEvent> ctx, ReleaseEventSeries releaseEvent, ReleaseEventSeriesDiff diff, EntryEditEvent reason, string notes)
        {
            var agentLoginData = ctx.OfType <User>().CreateAgentLoginData(permissionContext);
            var archived       = ArchivedReleaseEventSeriesVersion.Create(releaseEvent, diff, agentLoginData, reason, notes);

            ctx.Save(archived);
            return(archived);
        }
Beispiel #19
0
        public ArchivedTagVersion Archive(IDatabaseContext <Tag> ctx, Tag tag, TagDiff diff, EntryEditEvent reason, string notes = "")
        {
            var agentLoginData = ctx.CreateAgentLoginData(PermissionContext);
            var archived       = ArchivedTagVersion.Create(tag, diff, agentLoginData, reason, notes);

            ctx.OfType <ArchivedTagVersion>().Save(archived);
            return(archived);
        }
Beispiel #20
0
 protected void AddEntryEditedEntry(IDatabaseContext <ActivityEntry> ctx, Tag entry, EntryEditEvent editEvent, ArchivedTagVersion archivedVersion)
 {
     new Queries.ActivityEntryQueries(ctx, PermissionContext).AddEntryEditedEntry(entry, editEvent, archivedVersion);
 }
Beispiel #21
0
 public ReleaseEventActivityEntry(ReleaseEvent releaseEvent, EntryEditEvent editEvent, User author, ArchivedReleaseEventVersion archivedVersion)
     : base(releaseEvent, editEvent, author, archivedVersion)
 {
 }
Beispiel #22
0
 public AlbumActivityEntry(Album album, EntryEditEvent editEvent, User author, ArchivedAlbumVersion archivedVersion)
     : base(album, editEvent, author, archivedVersion)
 {
 }
Beispiel #23
0
 public EntryEditedEntry(User author, bool sticky, EntryRef entryRef, EntryEditEvent editEvent)
     : base(author, sticky)
 {
     EntryRef = entryRef;
     EditEvent = editEvent;
 }
Beispiel #24
0
        public void Archive(IRepositoryContext <SongList> ctx, SongList songList, SongListDiff diff, EntryEditEvent reason)
        {
            var agentLoginData = ctx.CreateAgentLoginData(PermissionContext);
            var archived       = songList.CreateArchivedVersion(diff, agentLoginData, reason);

            ctx.OfType <ArchivedSongListVersion>().Save(archived);
        }
Beispiel #25
0
        public static ArchivedReleaseEventSeriesVersion Create(ReleaseEventSeries series, ReleaseEventSeriesDiff diff, AgentLoginData author, EntryEditEvent commonEditEvent, string notes)
        {
            var contract = new ArchivedEventSeriesContract(series, diff);
            var data     = XmlHelper.SerializeToXml(contract);

            return(series.CreateArchivedVersion(data, diff, author, commonEditEvent, notes));
        }
Beispiel #26
0
		public virtual ArchivedReleaseEventVersion CreateArchivedVersion(ReleaseEventDiff diff, AgentLoginData author, EntryEditEvent reason) {

			var archived = new ArchivedReleaseEventVersion(this, diff, author, reason);
			ArchivedVersionsManager.Add(archived);

			return archived;

		}
Beispiel #27
0
        private ArchivedVenueVersion Archive(IDatabaseContext <Venue> ctx, Venue venue, VenueDiff diff, EntryEditEvent reason, string notes)
        {
            var agentLoginData = ctx.OfType <User>().CreateAgentLoginData(_permissionContext);
            var archived       = ArchivedVenueVersion.Create(venue, diff, agentLoginData, reason, notes);

            ctx.Save(archived);
            return(archived);
        }
Beispiel #28
0
 public VenueActivityEntry(Venue venue, EntryEditEvent editEvent, User author, ArchivedVenueVersion archivedVersion)
     : base(venue, editEvent, author, archivedVersion)
 {
 }
Beispiel #29
0
 protected ActivityEntry(User author, EntryEditEvent editEvent)
     : this()
 {
     Author = author;
     EditEvent = editEvent;
 }
Beispiel #30
0
        public virtual ArchivedTagVersion CreateArchivedVersion(TagDiff diff, AgentLoginData author, EntryEditEvent reason)
        {
            var archived = new ArchivedTagVersion(this, diff, author, reason);

            ArchivedVersionsManager.Add(archived);

            return(archived);
        }
Beispiel #31
0
 public ArtistActivityEntry(Artist artist, EntryEditEvent editEvent, User author, ArchivedArtistVersion archivedVersion)
     : base(artist, editEvent, author, archivedVersion)
 {
 }
Beispiel #32
0
        public ArchivedSongListVersion Archive(IDatabaseContext <SongList> ctx, SongList songList, SongListDiff diff, EntryEditEvent reason, string notes = "")
        {
            var agentLoginData = ctx.CreateAgentLoginData(PermissionContext);
            var archived       = songList.CreateArchivedVersion(diff, agentLoginData, reason, notes);

            ctx.OfType <ArchivedSongListVersion>().Save(archived);
            return(archived);
        }
Beispiel #33
0
 public SongActivityEntry(Song song, EntryEditEvent editEvent, User author, ArchivedSongVersion archivedVersion)
     : base(song, editEvent, author, archivedVersion)
 {
 }
Beispiel #34
0
        public static ArchivedVenueVersion Create(Venue venue, VenueDiff diff, AgentLoginData author, EntryEditEvent commonEditEvent, string notes)
        {
            var contract = new ArchivedVenueContract(venue, diff);
            var data     = XmlHelper.SerializeToXml(contract);

            return(venue.CreateArchivedVersion(data, diff, author, commonEditEvent, notes));
        }