C# Class SobekCM.Library.SobekCM_Assistant

Class is a helper class that pulls much of the data needed for the processing of requests. Tries to retrieve from the cache, and if the data is not there, it will then build the object and try to store on the cache
ファイルを表示 Open project: MarkVSullivan/SobekCM-Web-Application Class Usage Examples

Public Methods

Method Description
Get_All_Browse_Static_HTML ( Navigation_Object Current_Mode, Custom_Tracer Tracer ) : string

Pulls the static html url for a static html browse of all items in an aggregation, used for search engine robot requests

Get_Browse_Info ( Navigation_Object Current_Mode, Item_Aggregation Aggregation_Object, string Base_Directory, Custom_Tracer Tracer, SobekCM.Core.Aggregations.Item_Aggregation_Child_Page &Browse_Object, SobekCM.Core.Results.Search_Results_Statistics &Complete_Result_Set_Info, List &Paged_Results, HTML_Based_Content &Browse_Info_Display_Text ) : bool

Gets the browse or info object and any other needed data for display ( resultset or text to display)

This attempts to pull the objects from the cache. If unsuccessful, it builds the objects from the database and hands off to the CachedDataManager to store in the cache

Get_HTML_Skin ( Navigation_Object Current_Mode, SobekCM.Core.Skins.Web_Skin_Collection Skin_Collection, bool Cache_On_Build, Custom_Tracer Tracer ) : Web_Skin_Object

Gets the HTML skin indicated in the current navigation mode

Get_HTML_Skin ( string Web_Skin_Code, Navigation_Object Current_Mode, SobekCM.Core.Skins.Web_Skin_Collection Skin_Collection, bool Cache_On_Build, Custom_Tracer Tracer ) : Web_Skin_Object

Gets the HTML skin indicated in the current navigation mode

Get_Item ( Navigation_Object Current_Mode, SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object All_Items_Lookup, string Base_URL, Wordmark_Icon>.Dictionary Icon_Table, User_Object Current_User, Custom_Tracer Tracer, SobekCM_Item &Current_Item, SobekCM.Resource_Object.Divisions.Page_TreeNode &Current_Page, SobekCM.Core.Items.SobekCM_Items_In_Title &Items_In_Title ) : bool

Get a digital resource for display or for editing

This attempts to pull the objects from the cache. If unsuccessful, it builds the objects from the database and hands off to the CachedDataManager to store in the cache. If the item must be built from scratch, the SobekCM_Item_Factory class is utilized.

Get_Item ( string Collection_Code, Navigation_Object Current_Mode, SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object All_Items_Lookup, string Base_URL, Wordmark_Icon>.Dictionary Icon_Table, Custom_Tracer Tracer, User_Object Current_User, SobekCM_Item &Current_Item, SobekCM.Resource_Object.Divisions.Page_TreeNode &Current_Page, SobekCM.Core.Items.SobekCM_Items_In_Title &Items_In_Title ) : bool

Get a digital resource for display or for editing

This attempts to pull the objects from the cache. If unsuccessful, it builds the objects from the database and hands off to the CachedDataManager to store in the cache. If the item must be built from scratch, the SobekCM_Item_Factory class is utilized.

Get_Item_Static_HTML ( Navigation_Object Current_Mode, SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object All_Items_Lookup, Custom_Tracer Tracer ) : string

Find the static html file to display for an item view request, when requested by a search engine robot for indexing

Get_Public_User_Folder ( int UserFolderID, int ResultsPage, Custom_Tracer Tracer, SobekCM.Core.Users.Public_User_Folder &Folder_Info, SobekCM.Core.Results.Search_Results_Statistics &Complete_Result_Set_Info, List &Paged_Results ) : bool

Retrieve the public user folder information and browse by user folder id

This attempts to pull the objects from the cache. If unsuccessful, it builds the objects from the database and hands off to the CachedDataManager to store in the cache

Get_Search_Results ( Navigation_Object Current_Mode, SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object All_Items_Lookup, Item_Aggregation Aggregation_Object, List Search_Stop_Words, Custom_Tracer Tracer, SobekCM.Core.Results.Search_Results_Statistics &Complete_Result_Set_Info, List &Paged_Results ) : void

Performs a search ( or retrieves the search results from the cache ) and outputs the results and search url used

Get_Simple_Web_Content_Text ( Navigation_Object Current_Mode, string Base_Directory, Custom_Tracer Tracer, HTML_Based_Content &Simple_Web_Content, SobekCM.Core.SiteMap.SobekCM_SiteMap &Site_Map ) : bool

Gets the simple CMS/info object and text to display

This always pulls the data directly from disk; this text is not cached.

Get_User_Folder ( string Folder_Name, int User_ID, int Results_Per_Page, int ResultsPage, Custom_Tracer Tracer, SobekCM.Core.Results.Search_Results_Statistics &Complete_Result_Set_Info, List &Paged_Results ) : bool

Retrieve the (assummed private) user folder browse by user and folder name

This attempts to pull the objects from the cache. If unsuccessful, it builds the objects from the database and hands off to the CachedDataManager to store in the cache

Split_Clean_Search_Terms_Fields ( string Search_String, string Search_Fields, Search_Type_Enum Search_Type, List Output_Terms, List Output_Fields, List Search_Stop_Words, Search_Precision_Type_Enum Search_Precision, char Delimiter_Character ) : void

Takes the search string and search fields from the URL and parses them, according to the search type, into a collection of terms and a collection of fields. Stop words are also suppressed here

Private Methods

Method Description
Metadata_Field_Number ( string FieldCode ) : short
Perform_Database_Search ( Custom_Tracer Tracer, List Terms, List Web_Fields, long Date1, long Date2, int ActualCount, Navigation_Object Current_Mode, int Current_Sort, Item_Aggregation Aggregation_Object, SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object All_Items_Lookup, int Results_Per_Page, bool Potentially_Include_Facets, SobekCM.Core.Results.Search_Results_Statistics &Complete_Result_Set_Info, List &Paged_Results, bool Need_Search_Statistics ) : void
Perform_Solr_Search ( Custom_Tracer Tracer, List Terms, List Web_Fields, int ActualCount, string Current_Aggregation, int Current_Page, int Current_Sort, int Results_Per_Page, SobekCM.Core.Results.Search_Results_Statistics &Complete_Result_Set_Info, List &Paged_Results ) : void

Method Details

Get_All_Browse_Static_HTML() public method

Pulls the static html url for a static html browse of all items in an aggregation, used for search engine robot requests
public Get_All_Browse_Static_HTML ( Navigation_Object Current_Mode, Custom_Tracer Tracer ) : string
Current_Mode SobekCM.Core.Navigation.Navigation_Object Mode / navigation information for the current request
Tracer Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
return string

Get_Browse_Info() public method

Gets the browse or info object and any other needed data for display ( resultset or text to display)
This attempts to pull the objects from the cache. If unsuccessful, it builds the objects from the database and hands off to the CachedDataManager to store in the cache
public Get_Browse_Info ( Navigation_Object Current_Mode, Item_Aggregation Aggregation_Object, string Base_Directory, Custom_Tracer Tracer, SobekCM.Core.Aggregations.Item_Aggregation_Child_Page &Browse_Object, SobekCM.Core.Results.Search_Results_Statistics &Complete_Result_Set_Info, List &Paged_Results, HTML_Based_Content &Browse_Info_Display_Text ) : bool
Current_Mode SobekCM.Core.Navigation.Navigation_Object Mode / navigation information for the current request
Aggregation_Object SobekCM.Core.Aggregations.Item_Aggregation Item Aggregation object
Base_Directory string Base directory location under which the the CMS/info source file will be found
Tracer Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
Browse_Object SobekCM.Core.Aggregations.Item_Aggregation_Child_Page [OUT] Stores all the information about this browse or info
Complete_Result_Set_Info SobekCM.Core.Results.Search_Results_Statistics [OUT] Information about the entire set of results
Paged_Results List [OUT] List of search results for the requested page of results
Browse_Info_Display_Text SobekCM.Core.WebContent.HTML_Based_Content [OUT] Static HTML-based content to be displayed if this is browing a staticly created html source file
return bool

Get_HTML_Skin() public method

Gets the HTML skin indicated in the current navigation mode
public Get_HTML_Skin ( Navigation_Object Current_Mode, SobekCM.Core.Skins.Web_Skin_Collection Skin_Collection, bool Cache_On_Build, Custom_Tracer Tracer ) : Web_Skin_Object
Current_Mode SobekCM.Core.Navigation.Navigation_Object Mode / navigation information for the current request
Skin_Collection SobekCM.Core.Skins.Web_Skin_Collection Collection of the most common skins and source information for all the skins made on the fly
Cache_On_Build bool Flag indicates if this should be added to the ASP.net (or caching server) cache
Tracer Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
return SobekCM.Core.Skins.Web_Skin_Object

Get_HTML_Skin() public method

Gets the HTML skin indicated in the current navigation mode
public Get_HTML_Skin ( string Web_Skin_Code, Navigation_Object Current_Mode, SobekCM.Core.Skins.Web_Skin_Collection Skin_Collection, bool Cache_On_Build, Custom_Tracer Tracer ) : Web_Skin_Object
Web_Skin_Code string Web skin code
Current_Mode SobekCM.Core.Navigation.Navigation_Object Mode / navigation information for the current request
Skin_Collection SobekCM.Core.Skins.Web_Skin_Collection Collection of the most common skins and source information for all the skins made on the fly
Cache_On_Build bool Flag indicates if this should be added to the ASP.net (or caching server) cache
Tracer Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
return SobekCM.Core.Skins.Web_Skin_Object

Get_Item() public method

Get a digital resource for display or for editing
This attempts to pull the objects from the cache. If unsuccessful, it builds the objects from the database and hands off to the CachedDataManager to store in the cache. If the item must be built from scratch, the SobekCM_Item_Factory class is utilized.
public Get_Item ( Navigation_Object Current_Mode, SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object All_Items_Lookup, string Base_URL, Wordmark_Icon>.Dictionary Icon_Table, User_Object Current_User, Custom_Tracer Tracer, SobekCM_Item &Current_Item, SobekCM.Resource_Object.Divisions.Page_TreeNode &Current_Page, SobekCM.Core.Items.SobekCM_Items_In_Title &Items_In_Title ) : bool
Current_Mode SobekCM.Core.Navigation.Navigation_Object Mode / navigation information for the current request
All_Items_Lookup SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object Lookup object used to pull basic information about any item loaded into this library
Base_URL string Base URL for all the digital resource files for items to display
Icon_Table Wordmark_Icon>.Dictionary Dictionary of all the wordmark/icons which can be tagged to the items
Current_User SobekCM.Core.Users.User_Object Currently logged on user information (used when editing an item)
Tracer Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
Current_Item SobekCM.Resource_Object.SobekCM_Item [OUT] Built single digital resource ready for displaying or editing
Current_Page SobekCM.Resource_Object.Divisions.Page_TreeNode [OUT] Build current page for display
Items_In_Title SobekCM.Core.Items.SobekCM_Items_In_Title [OUT] List of all the items in this title
return bool

Get_Item() public method

Get a digital resource for display or for editing
This attempts to pull the objects from the cache. If unsuccessful, it builds the objects from the database and hands off to the CachedDataManager to store in the cache. If the item must be built from scratch, the SobekCM_Item_Factory class is utilized.
public Get_Item ( string Collection_Code, Navigation_Object Current_Mode, SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object All_Items_Lookup, string Base_URL, Wordmark_Icon>.Dictionary Icon_Table, Custom_Tracer Tracer, User_Object Current_User, SobekCM_Item &Current_Item, SobekCM.Resource_Object.Divisions.Page_TreeNode &Current_Page, SobekCM.Core.Items.SobekCM_Items_In_Title &Items_In_Title ) : bool
Collection_Code string Collection code to which this item must belong
Current_Mode SobekCM.Core.Navigation.Navigation_Object Mode / navigation information for the current request
All_Items_Lookup SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object Lookup object used to pull basic information about any item loaded into this library
Base_URL string Base URL for all the digital resource files for items to display
Icon_Table Wordmark_Icon>.Dictionary Dictionary of all the wordmark/icons which can be tagged to the items
Tracer Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
Current_User SobekCM.Core.Users.User_Object Currently logged on user information (used when editing an item)
Current_Item SobekCM.Resource_Object.SobekCM_Item [OUT] Built single digital resource ready for displaying or editing
Current_Page SobekCM.Resource_Object.Divisions.Page_TreeNode [OUT] Build current page for display
Items_In_Title SobekCM.Core.Items.SobekCM_Items_In_Title [OUT] List of all the items in this title
return bool

Get_Item_Static_HTML() public method

Find the static html file to display for an item view request, when requested by a search engine robot for indexing
public Get_Item_Static_HTML ( Navigation_Object Current_Mode, SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object All_Items_Lookup, Custom_Tracer Tracer ) : string
Current_Mode SobekCM.Core.Navigation.Navigation_Object Mode / navigation information for the current request
All_Items_Lookup SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object Lookup object used to pull basic information about any item loaded into this library
Tracer Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
return string

Get_Public_User_Folder() public method

Retrieve the public user folder information and browse by user folder id
This attempts to pull the objects from the cache. If unsuccessful, it builds the objects from the database and hands off to the CachedDataManager to store in the cache
public Get_Public_User_Folder ( int UserFolderID, int ResultsPage, Custom_Tracer Tracer, SobekCM.Core.Users.Public_User_Folder &Folder_Info, SobekCM.Core.Results.Search_Results_Statistics &Complete_Result_Set_Info, List &Paged_Results ) : bool
UserFolderID int Primary key for the public user folder to retrieve
ResultsPage int Which page of results to return ( one-based, so the first page is page number of one )
Tracer Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
Folder_Info SobekCM.Core.Users.Public_User_Folder [OUT] Information about this public user folder including name and owner
Complete_Result_Set_Info SobekCM.Core.Results.Search_Results_Statistics [OUT] Information about the entire set of results
Paged_Results List [OUT] List of search results for the requested page of results
return bool

Get_Search_Results() public method

Performs a search ( or retrieves the search results from the cache ) and outputs the results and search url used
public Get_Search_Results ( Navigation_Object Current_Mode, SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object All_Items_Lookup, Item_Aggregation Aggregation_Object, List Search_Stop_Words, Custom_Tracer Tracer, SobekCM.Core.Results.Search_Results_Statistics &Complete_Result_Set_Info, List &Paged_Results ) : void
Current_Mode SobekCM.Core.Navigation.Navigation_Object Mode / navigation information for the current request
All_Items_Lookup SobekCM.Engine_Library.ApplicationState.Item_Lookup_Object Lookup object used to pull basic information about any item loaded into this library
Aggregation_Object SobekCM.Core.Aggregations.Item_Aggregation Object for the current aggregation object, against which this search is performed
Search_Stop_Words List List of search stop workds
Tracer Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
Complete_Result_Set_Info SobekCM.Core.Results.Search_Results_Statistics [OUT] Information about the entire set of results
Paged_Results List [OUT] List of search results for the requested page of results
return void

Get_Simple_Web_Content_Text() public method

Gets the simple CMS/info object and text to display
This always pulls the data directly from disk; this text is not cached.
public Get_Simple_Web_Content_Text ( Navigation_Object Current_Mode, string Base_Directory, Custom_Tracer Tracer, HTML_Based_Content &Simple_Web_Content, SobekCM.Core.SiteMap.SobekCM_SiteMap &Site_Map ) : bool
Current_Mode SobekCM.Core.Navigation.Navigation_Object Mode / navigation information for the current request
Base_Directory string Base directory location under which the the CMS/info source file will be found
Tracer Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
Simple_Web_Content SobekCM.Core.WebContent.HTML_Based_Content [OUT] Built browse object which contains information like title, banner, etc.. and the entire text to be displayed
Site_Map SobekCM.Core.SiteMap.SobekCM_SiteMap [OUT] Optional navigational site map object related to this page
return bool

Get_User_Folder() public method

Retrieve the (assummed private) user folder browse by user and folder name
This attempts to pull the objects from the cache. If unsuccessful, it builds the objects from the database and hands off to the CachedDataManager to store in the cache
public Get_User_Folder ( string Folder_Name, int User_ID, int Results_Per_Page, int ResultsPage, Custom_Tracer Tracer, SobekCM.Core.Results.Search_Results_Statistics &Complete_Result_Set_Info, List &Paged_Results ) : bool
Folder_Name string Name of the folder to retieve the browse for
User_ID int ID for the user
Results_Per_Page int Number of results to display in this page (set higher if EXPORT is chosen)
ResultsPage int Which page of results to return ( one-based, so the first page is page number of one )
Tracer Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
Complete_Result_Set_Info SobekCM.Core.Results.Search_Results_Statistics [OUT] Information about the entire set of results
Paged_Results List [OUT] List of search results for the requested page of results
return bool

Split_Clean_Search_Terms_Fields() public static method

Takes the search string and search fields from the URL and parses them, according to the search type, into a collection of terms and a collection of fields. Stop words are also suppressed here
public static Split_Clean_Search_Terms_Fields ( string Search_String, string Search_Fields, Search_Type_Enum Search_Type, List Output_Terms, List Output_Fields, List Search_Stop_Words, Search_Precision_Type_Enum Search_Precision, char Delimiter_Character ) : void
Search_String string Search string from the SobekCM search results URL
Search_Fields string Search fields from the SobekCM search results URL
Search_Type Search_Type_Enum Type of search currently being performed (sets how it is parsed and default index)
Output_Terms List List takes the results of the parsing of the actual search terms
Output_Fields List List takes the results of the parsing of the actual (and implied) search fields
Search_Stop_Words List List of all stop words ignored during metadata searching (such as 'The', 'A', etc..)
Search_Precision Search_Precision_Type_Enum Search precision for this search ( i.e., exact, contains, stemmed, thesaurus lookup )
Delimiter_Character char Character used as delimiter between different components of an advanced search
return void