forked from Sitecore/Media-Framework-Brightcove-Edition
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add a custom computed index field for the video labels field to support full text search * Content updates * Mock a response for the GetLabels method until support for labels is actually enabled * Add a pull pipeline for labels * Content Updates * Update the video pull/push pipelines to support labels * Content updates * Add pipeline processor for resolving labels * Add support for updating labels (renaming) labels * Add support for deleting labels and some bug fixes/tweaks * Content changes * Enable full text search for the new brightcove folder field * Content updates * Create pull pipeline for folders * Content updates * Create push pipeline for folders * Content updates * Add support for syncing the folder field on video items * Content updates * Add a computed index field for the video folder field * Content updates * Content updates * Add 10.1.3 package manifest to solution Co-authored-by: Cody Rodgers <[email protected]>
- Loading branch information
1 parent
27ab888
commit a857765
Showing
275 changed files
with
6,281 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
namespace Brightcove.Core.Models | ||
{ | ||
public class Folder | ||
{ | ||
[JsonProperty("account_id", NullValueHandling = NullValueHandling.Ignore)] | ||
public string AccountId { get; set; } | ||
|
||
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] | ||
public string Id { get; set; } | ||
|
||
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] | ||
public string Name { get; set; } | ||
|
||
[JsonProperty("video_count", NullValueHandling = NullValueHandling.Ignore)] | ||
public int? VideoCount { get; set; } | ||
|
||
[JsonProperty("created_at", NullValueHandling = NullValueHandling.Ignore)] | ||
public DateTime? CreationDate { get; set; } | ||
|
||
[JsonProperty("updated_at", NullValueHandling = NullValueHandling.Ignore)] | ||
public DateTime? UpdatedDate { get; set; } | ||
|
||
[JsonIgnore()] | ||
public DateTime LastSyncTime { get; set; } | ||
|
||
public Folder ShallowCopy() | ||
{ | ||
return (Folder)this.MemberwiseClone(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using System.Linq; | ||
|
||
namespace Brightcove.Core.Models | ||
{ | ||
public class Label | ||
{ | ||
[JsonProperty("path", NullValueHandling = NullValueHandling.Ignore)] | ||
public string Path { get; set; } | ||
|
||
[JsonProperty("new_label", NullValueHandling = NullValueHandling.Ignore)] | ||
public string NewLabel { get; set; } | ||
|
||
[JsonIgnore()] | ||
public string SitecoreName { get; set; } | ||
|
||
[JsonIgnore()] | ||
public DateTime LastSyncTime { get; set; } | ||
|
||
public Label() | ||
{ | ||
|
||
} | ||
|
||
public Label(string path) | ||
{ | ||
Path = AddTrailingSlash(path); | ||
SitecoreName = Path.Replace("/", "_"); | ||
} | ||
|
||
public Label ShallowCopy() | ||
{ | ||
return (Label)this.MemberwiseClone(); | ||
} | ||
|
||
public static bool TryParse(string path, out Label label) | ||
{ | ||
if(path.Length <= 1) | ||
{ | ||
label = null; | ||
return false; | ||
} | ||
|
||
if (path[0] != '/') | ||
{ | ||
label = null; | ||
return false; | ||
} | ||
|
||
label = new Label(path); | ||
return true; | ||
} | ||
|
||
public string GetLeafLabel() | ||
{ | ||
return Path.Split('/').Last(); | ||
} | ||
|
||
private string AddTrailingSlash(string path) | ||
{ | ||
if (path[path.Length - 1] != '/') | ||
{ | ||
return path + '/'; | ||
} | ||
|
||
return path; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
namespace Brightcove.Core.Models | ||
{ | ||
public class Labels | ||
{ | ||
[JsonProperty("account_id", NullValueHandling = NullValueHandling.Ignore)] | ||
public string AccountId { get; set; } | ||
|
||
[JsonProperty("labels", NullValueHandling = NullValueHandling.Ignore)] | ||
public List<string> Paths { get; set; } | ||
|
||
[JsonProperty("version", NullValueHandling = NullValueHandling.Ignore)] | ||
public int Version { get; set; } | ||
|
||
public Labels ShallowCopy() | ||
{ | ||
return (Labels)this.MemberwiseClone(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.