/// <summary> Gets the list of items (VIDs) under a single title (BibID) </summary> /// <param name="BibID"> Bibliographic identifier (BibID) for the digital resources </param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> /// <returns> Fully built list of all the items under that bibid </returns> public List <Item_Hierarchy_Details> Get_Multiple_Volumes(string BibID, Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Multiple_Volumes", "Get list of items under a single BibID"); // Look in the cache if (Config.UseCache) { List <Item_Hierarchy_Details> fromCache = CachedDataManager.Items.Retrieve_Item_List(BibID, Tracer); if (fromCache != null) { Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Multiple_Volumes", "Found list of items on the local cache"); return(fromCache); } } // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Items.GetMultipleVolumes", Tracer); // Format the URL string url = String.Format(endpoint.URL, BibID); // Call out to the endpoint and deserialize the object List <Item_Hierarchy_Details> returnValue = Deserialize <List <Item_Hierarchy_Details> >(url, endpoint.Protocol, Tracer); // Add to the local cache if ((Config.UseCache) && (returnValue != null)) { Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Multiple_Volumes", "Store list of items on the local cache"); CachedDataManager.Items.Store_Item_List(BibID, returnValue, Tracer); } // Return the object return(returnValue); }
/// <summary> Gets the special EAD information related to a digital resource object, by BibID_VID </summary> /// <param name="BibID"> Bibliographic identifier (BibID) for the digital resource to retrieve </param> /// <param name="VID"> Volume identifier (VID) for the digital resource to retrieve </param> /// <param name="UseCache"> Flag indicates if the cache should be used to check for a built copy or store the final product </param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> /// <returns> Fully built EAD information, or NULL </returns> public EAD_Transfer_Object Get_Item_EAD(string BibID, string VID, bool UseCache, Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_EAD", "Get EAD information by bibid/vid"); // Look in the cache if ((Config.UseCache) && (UseCache)) { EAD_Transfer_Object fromCache = CachedDataManager.Items.Retrieve_EAD_Info(BibID, VID, Tracer); if (fromCache != null) { Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_EAD", "Found EAD informationin the local cache"); return(fromCache); } } // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Items.GetItemEAD", Tracer); // Format the URL string url = String.Format(endpoint.URL, BibID, VID); // Call out to the endpoint and deserialize the object EAD_Transfer_Object returnValue = Deserialize <EAD_Transfer_Object>(url, endpoint.Protocol, Tracer); // Add to the local cache if ((Config.UseCache) && (UseCache) && (returnValue != null)) { Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_EAD", "Store EAD information in the local cache"); CachedDataManager.Items.Store_EAD_Info(BibID, VID, returnValue, Tracer); } // Return the object return(returnValue); }
/// <summary> Gets the work history for a single digital resource item </summary> /// <param name="BibID"> Bibliographic identifier (BibID) for the digital resource </param> /// <param name="VID"> Volume identifier (VID) for the digital resource </param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> /// <returns> Fully built month-by-month usage for the item </returns> public Item_Tracking_Details Get_Item_Tracking_Work_History(string BibID, string VID, Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_Tracking_Work_History", "Get work history for an item by bibid/vid"); // Look in the cache if (Config.UseCache) { Item_Tracking_Details fromCache = CachedDataManager.Items.Retrieve_Item_Tracking(BibID, VID, Tracer); if (fromCache != null) { Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_Tracking_Work_History", "Found work history on the local cache"); return(fromCache); } } // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Items.GetItemTrackingWorkHistory", Tracer); // Format the URL string url = String.Format(endpoint.URL, BibID, VID); // Call out to the endpoint and deserialize the object Item_Tracking_Details returnValue = Deserialize <Item_Tracking_Details>(url, endpoint.Protocol, Tracer); // Add to the local cache if ((Config.UseCache) && (returnValue != null)) { Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_Tracking_Work_History", "Store work history on the local cache"); CachedDataManager.Items.Store_Item_Tracking(BibID, VID, returnValue, Tracer); } // Return the object return(returnValue); }
/// <summary> Gets the month-by-month usage for an item </summary> /// <param name="BibID"> Bibliographic identifier (BibID) for the digital resource </param> /// <param name="VID"> Volume identifier (VID) for the digital resource </param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> /// <returns> Fully built month-by-month usage for the item </returns> public List <Item_Monthly_Usage> Get_Item_Statistics_History(string BibID, string VID, Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_Statistics_History", "Get monthly usage for an item by bibid/vid"); // Look in the cache if (Config.UseCache) { List <Item_Monthly_Usage> fromCache = CachedDataManager.Items.Retrieve_Item_Usage(BibID, VID, Tracer); if (fromCache != null) { Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_Statistics_History", "Found monthly usage on the local cache"); return(fromCache); } } // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Items.GetItemStatisticsHistory", Tracer); // Format the URL string url = String.Format(endpoint.URL, BibID, VID); // Call out to the endpoint and deserialize the object List <Item_Monthly_Usage> returnValue = Deserialize <List <Item_Monthly_Usage> >(url, endpoint.Protocol, Tracer); // Add to the local cache if ((Config.UseCache) && (returnValue != null)) { Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_Statistics_History", "Store monthly usage on the local cache"); CachedDataManager.Items.Store_Item_Usage(BibID, VID, returnValue, Tracer); } // Return the object return(returnValue); }
/// <summary> Gets the digital resource, mapped to a MARC record object, by BibID_VID </summary> /// <param name="BibID"> Bibliographic identifier (BibID) for the digital resource to retrieve </param> /// <param name="VID"> Volume identifier (VID) for the digital resource to retrieve </param> /// <param name="UseCache"> Flag indicates if the cache should be used to check for a built copy or store the final product </param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> /// <returns> Fully built MARC record, or NULL </returns> public MARC_Transfer_Record Get_Item_MARC_Record(string BibID, string VID, bool UseCache, Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_MARC_Record", "Get MARC record object by bibid/vid"); // Look in the cache if ((Config.UseCache) && (UseCache)) { MARC_Transfer_Record fromCache = CachedDataManager.Items.Retrieve_MARC_Record(BibID, VID, Tracer); if (fromCache != null) { Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_MARC_Record", "Found MARC record the local cache"); return(fromCache); } } // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Items.GetItemMarcRecord", Tracer); // Format the URL string url = String.Format(endpoint.URL, BibID, VID); // Call out to the endpoint and deserialize the object MARC_Transfer_Record returnValue = Deserialize <MARC_Transfer_Record>(url, endpoint.Protocol, Tracer); // Add to the local cache if ((Config.UseCache) && (UseCache) && (returnValue != null)) { Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_MARC_Record", "Store MARC record in the local cache"); CachedDataManager.Items.Store_MARC_Record(BibID, VID, returnValue, Tracer); } // Return the object return(returnValue); }
/// <summary> Gets the authentication configuration information, read from the configuration files </summary> /// <param name="Tracer"></param> /// <returns> Fully built authentication configuration object </returns> public Authentication_Configuration Get_Authentication_Configuration(Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_AdminServices.Get_Authentication_Configuration"); // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Configuration.Authentication", Tracer); // Call out to the endpoint and return the deserialized object return(Deserialize <Authentication_Configuration>(endpoint.URL, endpoint.Protocol, Tracer)); }
/// <summary> Gets the administrative setting values, which includes display information /// along with the current value and key </summary> /// <param name="Tracer"></param> /// <returns> Fully built builder-specific settings, including incoming folders and builder module sets </returns> public Admin_Setting_Collection Get_Admin_Settings(Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_AdminServices.Get_Admin_Settings"); // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Admin.Get_Admin_Settings", Tracer); // Call out to the endpoint and return the deserialized object return(Deserialize <Admin_Setting_Collection>(endpoint.URL, endpoint.Protocol, Tracer)); }
/// <summary> Gets the viewers (UI) configuration information, read from the configuration files </summary> /// <param name="Tracer"></param> /// <returns> Fully built viewers (UI) configuration object </returns> public WriterViewerConfig Get_UI_Viewers_Configuration(Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_AdminServices.Get_UI_Viewers_Configuration"); // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Configuration.UI.Viewers", Tracer); // Call out to the endpoint and return the deserialized object return(Deserialize <WriterViewerConfig>(endpoint.URL, endpoint.Protocol, Tracer)); }
/// <summary> Gets the configuration reading log which lists which config files were read, etc.. </summary> /// <param name="Tracer"></param> /// <returns> Reading log object </returns> public List <string> Get_Configuration_Reading_Log(Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_AdminServices.Get_Configuration_Reading_Log"); // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Configuration.Reading_Log", Tracer); // Call out to the endpoint and return the deserialized object return(Deserialize <List <string> >(endpoint.URL, endpoint.Protocol, Tracer)); }
/// <summary> Dsable an existing plug-in/extension </summary> /// <param name="Code"> Code for the plug-in to disable </param> /// <param name="Tracer"></param> /// <returns> Message indicating success or failure </returns> public EnableExtensionMessage Plugin_Disable(string Code, Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_AdminServices.Plugin_Disable"); // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Admin.Disable_Plugin", Tracer); // Determine the URL string url = String.Format(endpoint.URL, Code); // Call out to the endpoint and return the deserialized object return(Deserialize <EnableExtensionMessage>(url, endpoint.Protocol, Tracer)); }
/// <summary> Clears the engine cache of all items related to a particular title, or all volumes within a single BibID </summary> /// <param name="BibID"> Bibliographic identifier (BibID) for the digital resources </param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> public void Clear_Item_Group_Cache(string BibID, Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Clear_Item_Cache", "Clear all items cache for " + BibID); // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Items.ClearCache", Tracer); // Format the URL string url = String.Format(endpoint.URL, BibID, "00000"); // Call out to the endpoint and deserialize the object string returnValue = Deserialize <string>(url, endpoint.Protocol, Tracer); // Add the message to the trace Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Clear_Item_Cache", "Response: " + returnValue); }
/// <summary> Gets the latest update on the builder status, including the relevant builder /// setting values and updates on the scheduled tasks </summary> /// <param name="Tracer"></param> /// <returns> Fully built builder-specific status, including latest settings and builder module sets </returns> public Builder_Status Get_Builder_Status(Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_BuilderServices.Get_Builder_Status"); // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Builder.Get_Builder_Status", Tracer); // If the endpoint was null, show an error if (endpoint == null) { Tracer.Add_Trace("SobekEngineClient_BuilderServices.Get_Builder_Status", "Unable to find the endpoint configuration for Builder.Get_Builder_Status"); return(null); } // Call out to the endpoint and return the deserialized object return(Deserialize <Builder_Status>(endpoint.URL, endpoint.Protocol, Tracer)); }
/// <summary> Gets the metadata configuration information, read from the configuration files </summary> /// <param name="Tracer"></param> /// <returns> Fully built metadata configuration object </returns> public Metadata_Configuration Get_Metadata_Configuration(Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_AdminServices.Get_Metadata_Configuration"); // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Configuration.Metadata", Tracer); // Call out to the endpoint and return the deserialized object Metadata_Configuration returnValue = Deserialize <Metadata_Configuration>(endpoint.URL, endpoint.Protocol, Tracer); // If not null if (returnValue != null) { returnValue.PostUnSerialization(); } return(returnValue); }
/// <summary> Gets the information about a single builder incoming folder </summary> /// <param name="FolderID"> Primary key for the incoming builder folder </param> /// <param name="Tracer"></param> /// <returns> Fully built incoming folder for the builder</returns> public Builder_Source_Folder Get_Builder_Folder(int FolderID, Custom_Tracer Tracer) { // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_BuilderServices.Get_Builder_Folder"); // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Builder.Get_Builder_Folder", Tracer); // If the endpoint was null, show an error if (endpoint == null) { Tracer.Add_Trace("SobekEngineClient_BuilderServices.Get_Builder_Folder", "Unable to find the endpoint configuration for Builder.Get_Builder_Folder"); return(null); } // Format the URL string url = String.Format(endpoint.URL, FolderID); // Call out to the endpoint and return the deserialized object return(Deserialize <Builder_Source_Folder>(url, endpoint.Protocol, Tracer)); }
/// <summary> Gets the brief digital resource object, by BibID_VID </summary> /// <param name="BibID"> Bibliographic identifier (BibID) for the digital resource to retrieve </param> /// <param name="VID"> Volume identifier (VID) for the digital resource to retrieve </param> /// <param name="UseCache"> Flag indicates if the cache should be used to check for a built copy or store the final product </param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> /// <param name="StatusCode"> [OUT] Status code from this request ( 200 = success, 404 = not a valid item, 500 = server error, etc. ) </param> /// <returns> Fully built brief digital item object </returns> public BriefItemInfo Get_Item_Brief(string BibID, string VID, bool UseCache, Custom_Tracer Tracer, out int StatusCode) { StatusCode = 200; // Add a beginning trace Tracer.Add_Trace("SobekEngineClient_ItemEndpoints.Get_Item_Brief", "Get brief item information by bibid/vid"); // Look in the cache if ((Config.UseCache) && (UseCache)) { BriefItemInfo fromCache = CachedDataManager.Items.Retrieve_Brief_Digital_Resource_Object(BibID, VID, Tracer); if (fromCache != null) { Tracer.Add_Trace("SobekEngineClient_WebContentServices.Get_Item_Brief", "Found brief item in the local cache"); return(fromCache); } } // Get the endpoint MicroservicesClient_Endpoint endpoint = GetEndpointConfig("Items.GetItemBrief", Tracer); // Format the URL string url = String.Format(endpoint.URL, BibID, VID); // Call out to the endpoint and deserialize the object BriefItemInfo returnValue = Deserialize <BriefItemInfo>(url, endpoint.Protocol, Tracer); // Add to the local cache if ((Config.UseCache) && (UseCache) && (returnValue != null)) { Tracer.Add_Trace("SobekEngineClient_WebContentServices.Get_Item_Brief", "Store brief item in the local cache"); CachedDataManager.Items.Store_Brief_Digital_Resource_Object(BibID, VID, returnValue, Tracer); } // Return the object return(returnValue); }