C# Class CkanDotNet.Web.Models.Helpers.SettingsHelper

Show file Open project: opencolorado/.NET-Wrapper-for-CKAN-API

Public Methods

Method Description
FilterTitle ( Package package ) : void

Filter the package title with the package title prefix.

FilterTitles ( List packages ) : void

Filter the package titles with the package title prefix.

GetAddThisCustomWidgetEnabled ( ) : bool

Is an AddThis customer widget enabled

GetAddThisEnabled ( ) : bool

Are AddThis buttons enabled

GetAddThisProfileId ( ) : string

Get the AddThis profile id

GetAllLicensesCacheBackgroundUpdate ( ) : bool

Automatically update the all licenses cache in the background

GetAllLicensesCacheDuration ( ) : System.TimeSpan

Get the duration to cache information about all licenses.

GetAllPackagesCacheBackgroundUpdate ( ) : bool

Automatically update the all packages cache in the background

GetAllPackagesCacheDuration ( ) : System.TimeSpan

Get the duration to cache the full package list.

GetBreadcrumbsEnabled ( ) : bool

Gets the enabled status of the breadcrumbs

GetBreadcrumbsHomeEnabled ( ) : bool

Gets the enabled status of the breadcrumbs on the home page

GetCacheAdminToken ( ) : string

Gets the key required for administering the cache

GetCatalogBreadcrumbsBaseLabel ( ) : string

Gets the label to use for the base breadcrumb

GetCatalogGroup ( ) : string

Get the list of groups that have been configured in the settings.

GetCatalogHiddenTags ( ) : List

Get the list of hidden tags that have been configured in the settings

GetCatalogPackageTitlePrefix ( ) : string

Get the prefix for package titles. The prefix is removed from package names as the prefix is not necessary in a filtered catalog.

GetCatalogTheme ( ) : string

Gets the current theme name

GetDatasetTitleLength ( ) : int

Get the maximum length of a dataset title.

GetDisqusDeveloperModeEnabled ( ) : bool

Is Disqus developer mode enabled

GetDisqusForumShortName ( ) : string

Get the Disqus forum short name

GetDisqusPackageEnabled ( ) : bool

Are Disqus forums enabled on packages

GetDownloadProxyEnabled ( ) : bool

Is the download proxy enabled

GetDownloadProxyLocation ( string root, bool &rootLocationFound ) : Uri

Get the download proxy location

GetDownloadProxyRoute ( ) : string

Get the download proxy route

GetFeaturedPackagesCacheDuration ( ) : System.TimeSpan

Get the duration to cache featured packages.

GetGoogleAnalyticsDomainName ( ) : string

Gets the Google Analytics Domain Name

GetGoogleAnalyticsEnabled ( ) : bool

Is Google Analytics enabled

GetGoogleAnalyticsLinkerAllowed ( ) : bool

Is Google Analytics linker allowed

GetGoogleAnalyticsProfile ( ) : string

Gets the Google Analytics profile

GetHomeBrowseAllPackagesEnabled ( ) : bool

Should browsing of all packages be displayed on the home page

GetHomeFeaturedPackageLimit ( ) : int

Get the maximum number of featured packages to display on the home page

GetHomeFeaturedPackagesEnabled ( ) : bool

Should featured packages be displayed on the home page

GetHomeFeaturedPackagesTag ( ) : string

Gets the tag to use for featured packages

GetHomePageTitle ( ) : string

Gets the page title for the home page

GetHomePopularTagsEnabled ( ) : bool

Should popular tags be displayed on the home page

GetHomePopularTagsLimit ( ) : int

Get the maximum number of popular tags to display on the home page

GetHomeRecentlyUpdatedPackagesEnabled ( ) : bool

Should recently updated packages be displayed on the home page

GetIframeDocumentDomain ( ) : string

Get the document domain for the iframe.

GetIframeEnabled ( ) : bool

Gets the enabled status of enhanced iframe support

GetIframeId ( ) : string

Get the id of the iframe on the parent page.

GetIframeSrc ( ) : string

Get the source of the iframe on the parent page.

GetJQuerySource ( ) : string

Get the jQuery source

GetOfflineEnabled ( ) : bool

Is the data catalog currently offline

GetOfflineMessage ( ) : string

Get the offline message

GetOfflineTitle ( ) : string

Get the offline title

GetPackageCacheDuration ( ) : System.TimeSpan

Get the duration to cache package details.

GetPackageCountCacheBackgroundUpdate ( ) : bool

Automatically update the package count cache in the background

GetPackageCountCacheDuration ( ) : System.TimeSpan

Get the duration to cache the pacakge count

GetPackageExtraFieldLabel ( string field ) : string

Get the label for a package 'extra' field.

GetPackagePageTitle ( ) : string

Gets the page title for the package page

GetPackageRelatedItemsEnabled ( ) : bool

Is the package related items section enabled

GetPackageRssFeedDays ( ) : int

Get the list of groups that have been configured in the settings.

GetPackageRssFeedEnabled ( ) : bool

Is the package RSS feed link enabled

GetPackageUseThemeLicenseTemplate ( ) : bool

Use the license block from the theme license page (_License). Uses the standard CKAN license information by default.

GetRepositoryHost ( ) : string

Get the list of groups that have been configured in the settings.

GetRepositoryRequestTimeout ( ) : int

Get the respository request timeout in milliseconds.

GetResourceSettings ( ) : ResourceSettings

Get the resource settings (custom actions for CKAN resource types)

GetSearchPageTitle ( ) : string

Gets the page title for the search page

GetSearchResultsCacheDuration ( ) : System.TimeSpan

Get the duration to cache search results.

GetSearchResultsMaxPagesToShowInPager ( ) : int

Get the max number of pages to show in the pager. A moving window around the current page will be used.

GetSearchResultsPerPage ( ) : int

Get the maximum number of search results to show per page.

GetSearchResultsShowRating ( ) : bool

Is the rating shown in the search results

GetSearchResultsShowTags ( ) : bool

Are the tags shown in the search results

GetSeoCommonPackageKeywords ( ) : List

Gets common package keywords to display in the meta keywords for every package page

GetSeoHomeDescription ( ) : string

The meta tag description for the home page

GetSeoHomeKeywords ( ) : List

The meta tag keywords for the home page

GetSeoPackageDescriptionLength ( ) : int

Get the maximum number of characters to use in the package description meta tag.

GetSeoSiteMapBaseUrl ( ) : string

The base map to use for the URLs in the sitemap. This setting is used if the adminstrator wants to override the default url (for example, if using a reverse proxy).

GetSuggestionsDelay ( ) : int

Set the delay time for queueing keystokes before requesting suggestions.

GetSuggestionsEnabled ( ) : bool

Are suggestions enabled

GetTagCloudMaxScale ( ) : int

The maximum scale for the tag cloud

GetTagCloudMinScale ( ) : int

The minimum scale for the tag cloud (percent)

GetTagCloudShowCount ( ) : bool

Should the count be displayed beside the tag

GetUserVoiceEnabled ( ) : bool

Are UserVoice suggestions enabled

GetUserVoiceKey ( ) : string

Get the UserVoice widget key

Private Methods

Method Description
GetKeywordsFromSetting ( string setting ) : List

Get comma-delimited keywords from a setting.

GetList ( string key ) : List

Get a list of comma delimited items from the a key in the settings

Method Details

FilterTitle() public static method

Filter the package title with the package title prefix.
public static FilterTitle ( Package package ) : void
package CkanDotNet.Api.Model.Package
return void

FilterTitles() public static method

Filter the package titles with the package title prefix.
public static FilterTitles ( List packages ) : void
packages List
return void

GetAddThisCustomWidgetEnabled() public static method

Is an AddThis customer widget enabled
public static GetAddThisCustomWidgetEnabled ( ) : bool
return bool

GetAddThisEnabled() public static method

Are AddThis buttons enabled
public static GetAddThisEnabled ( ) : bool
return bool

GetAddThisProfileId() public static method

Get the AddThis profile id
public static GetAddThisProfileId ( ) : string
return string

GetAllLicensesCacheBackgroundUpdate() public static method

Automatically update the all licenses cache in the background
public static GetAllLicensesCacheBackgroundUpdate ( ) : bool
return bool

GetAllLicensesCacheDuration() public static method

Get the duration to cache information about all licenses.
public static GetAllLicensesCacheDuration ( ) : System.TimeSpan
return System.TimeSpan

GetAllPackagesCacheBackgroundUpdate() public static method

Automatically update the all packages cache in the background
public static GetAllPackagesCacheBackgroundUpdate ( ) : bool
return bool

GetAllPackagesCacheDuration() public static method

Get the duration to cache the full package list.
public static GetAllPackagesCacheDuration ( ) : System.TimeSpan
return System.TimeSpan

GetBreadcrumbsEnabled() public static method

Gets the enabled status of the breadcrumbs
public static GetBreadcrumbsEnabled ( ) : bool
return bool

GetBreadcrumbsHomeEnabled() public static method

Gets the enabled status of the breadcrumbs on the home page
public static GetBreadcrumbsHomeEnabled ( ) : bool
return bool

GetCacheAdminToken() public static method

Gets the key required for administering the cache
public static GetCacheAdminToken ( ) : string
return string

GetCatalogBreadcrumbsBaseLabel() public static method

Gets the label to use for the base breadcrumb
public static GetCatalogBreadcrumbsBaseLabel ( ) : string
return string

GetCatalogGroup() public static method

Get the list of groups that have been configured in the settings.
public static GetCatalogGroup ( ) : string
return string

GetCatalogHiddenTags() public static method

Get the list of hidden tags that have been configured in the settings
public static GetCatalogHiddenTags ( ) : List
return List

GetCatalogPackageTitlePrefix() public static method

Get the prefix for package titles. The prefix is removed from package names as the prefix is not necessary in a filtered catalog.
public static GetCatalogPackageTitlePrefix ( ) : string
return string

GetCatalogTheme() public static method

Gets the current theme name
public static GetCatalogTheme ( ) : string
return string

GetDatasetTitleLength() public static method

Get the maximum length of a dataset title.
public static GetDatasetTitleLength ( ) : int
return int

GetDisqusDeveloperModeEnabled() public static method

Is Disqus developer mode enabled
public static GetDisqusDeveloperModeEnabled ( ) : bool
return bool

GetDisqusForumShortName() public static method

Get the Disqus forum short name
public static GetDisqusForumShortName ( ) : string
return string

GetDisqusPackageEnabled() public static method

Are Disqus forums enabled on packages
public static GetDisqusPackageEnabled ( ) : bool
return bool

GetDownloadProxyEnabled() public static method

Is the download proxy enabled
public static GetDownloadProxyEnabled ( ) : bool
return bool

GetDownloadProxyLocation() public static method

Get the download proxy location
public static GetDownloadProxyLocation ( string root, bool &rootLocationFound ) : Uri
root string
rootLocationFound bool
return System.Uri

GetDownloadProxyRoute() public static method

Get the download proxy route
public static GetDownloadProxyRoute ( ) : string
return string

GetFeaturedPackagesCacheDuration() public static method

Get the duration to cache featured packages.
public static GetFeaturedPackagesCacheDuration ( ) : System.TimeSpan
return System.TimeSpan

GetGoogleAnalyticsDomainName() public static method

Gets the Google Analytics Domain Name
public static GetGoogleAnalyticsDomainName ( ) : string
return string

GetGoogleAnalyticsEnabled() public static method

Is Google Analytics enabled
public static GetGoogleAnalyticsEnabled ( ) : bool
return bool

GetGoogleAnalyticsLinkerAllowed() public static method

Is Google Analytics linker allowed
public static GetGoogleAnalyticsLinkerAllowed ( ) : bool
return bool

GetGoogleAnalyticsProfile() public static method

Gets the Google Analytics profile
public static GetGoogleAnalyticsProfile ( ) : string
return string

GetHomeBrowseAllPackagesEnabled() public static method

Should browsing of all packages be displayed on the home page
public static GetHomeBrowseAllPackagesEnabled ( ) : bool
return bool

GetHomeFeaturedPackageLimit() public static method

Get the maximum number of featured packages to display on the home page
public static GetHomeFeaturedPackageLimit ( ) : int
return int

GetHomeFeaturedPackagesEnabled() public static method

Should featured packages be displayed on the home page
public static GetHomeFeaturedPackagesEnabled ( ) : bool
return bool

GetHomeFeaturedPackagesTag() public static method

Gets the tag to use for featured packages
public static GetHomeFeaturedPackagesTag ( ) : string
return string

GetHomePageTitle() public static method

Gets the page title for the home page
public static GetHomePageTitle ( ) : string
return string

GetHomePopularTagsEnabled() public static method

Should popular tags be displayed on the home page
public static GetHomePopularTagsEnabled ( ) : bool
return bool

GetHomePopularTagsLimit() public static method

Get the maximum number of popular tags to display on the home page
public static GetHomePopularTagsLimit ( ) : int
return int

GetHomeRecentlyUpdatedPackagesEnabled() public static method

Should recently updated packages be displayed on the home page
public static GetHomeRecentlyUpdatedPackagesEnabled ( ) : bool
return bool

GetIframeDocumentDomain() public static method

Get the document domain for the iframe.
public static GetIframeDocumentDomain ( ) : string
return string

GetIframeEnabled() public static method

Gets the enabled status of enhanced iframe support
public static GetIframeEnabled ( ) : bool
return bool

GetIframeId() public static method

Get the id of the iframe on the parent page.
public static GetIframeId ( ) : string
return string

GetIframeSrc() public static method

Get the source of the iframe on the parent page.
public static GetIframeSrc ( ) : string
return string

GetJQuerySource() public static method

Get the jQuery source
public static GetJQuerySource ( ) : string
return string

GetOfflineEnabled() public static method

Is the data catalog currently offline
public static GetOfflineEnabled ( ) : bool
return bool

GetOfflineMessage() public static method

Get the offline message
public static GetOfflineMessage ( ) : string
return string

GetOfflineTitle() public static method

Get the offline title
public static GetOfflineTitle ( ) : string
return string

GetPackageCacheDuration() public static method

Get the duration to cache package details.
public static GetPackageCacheDuration ( ) : System.TimeSpan
return System.TimeSpan

GetPackageCountCacheBackgroundUpdate() public static method

Automatically update the package count cache in the background
public static GetPackageCountCacheBackgroundUpdate ( ) : bool
return bool

GetPackageCountCacheDuration() public static method

Get the duration to cache the pacakge count
public static GetPackageCountCacheDuration ( ) : System.TimeSpan
return System.TimeSpan

GetPackageExtraFieldLabel() public static method

Get the label for a package 'extra' field.
public static GetPackageExtraFieldLabel ( string field ) : string
field string
return string

GetPackagePageTitle() public static method

Gets the page title for the package page
public static GetPackagePageTitle ( ) : string
return string

GetPackageRelatedItemsEnabled() public static method

Is the package related items section enabled
public static GetPackageRelatedItemsEnabled ( ) : bool
return bool

GetPackageRssFeedDays() public static method

Get the list of groups that have been configured in the settings.
public static GetPackageRssFeedDays ( ) : int
return int

GetPackageRssFeedEnabled() public static method

Is the package RSS feed link enabled
public static GetPackageRssFeedEnabled ( ) : bool
return bool

GetPackageUseThemeLicenseTemplate() public static method

Use the license block from the theme license page (_License). Uses the standard CKAN license information by default.
public static GetPackageUseThemeLicenseTemplate ( ) : bool
return bool

GetRepositoryHost() public static method

Get the list of groups that have been configured in the settings.
public static GetRepositoryHost ( ) : string
return string

GetRepositoryRequestTimeout() public static method

Get the respository request timeout in milliseconds.
public static GetRepositoryRequestTimeout ( ) : int
return int

GetResourceSettings() public static method

Get the resource settings (custom actions for CKAN resource types)
public static GetResourceSettings ( ) : ResourceSettings
return CkanDotNet.Web.Models.Settings.ResourceSettings

GetSearchPageTitle() public static method

Gets the page title for the search page
public static GetSearchPageTitle ( ) : string
return string

GetSearchResultsCacheDuration() public static method

Get the duration to cache search results.
public static GetSearchResultsCacheDuration ( ) : System.TimeSpan
return System.TimeSpan

GetSearchResultsMaxPagesToShowInPager() public static method

Get the max number of pages to show in the pager. A moving window around the current page will be used.
public static GetSearchResultsMaxPagesToShowInPager ( ) : int
return int

GetSearchResultsPerPage() public static method

Get the maximum number of search results to show per page.
public static GetSearchResultsPerPage ( ) : int
return int

GetSearchResultsShowRating() public static method

Is the rating shown in the search results
public static GetSearchResultsShowRating ( ) : bool
return bool

GetSearchResultsShowTags() public static method

Are the tags shown in the search results
public static GetSearchResultsShowTags ( ) : bool
return bool

GetSeoCommonPackageKeywords() public static method

Gets common package keywords to display in the meta keywords for every package page
public static GetSeoCommonPackageKeywords ( ) : List
return List

GetSeoHomeDescription() public static method

The meta tag description for the home page
public static GetSeoHomeDescription ( ) : string
return string

GetSeoHomeKeywords() public static method

The meta tag keywords for the home page
public static GetSeoHomeKeywords ( ) : List
return List

GetSeoPackageDescriptionLength() public static method

Get the maximum number of characters to use in the package description meta tag.
public static GetSeoPackageDescriptionLength ( ) : int
return int

GetSeoSiteMapBaseUrl() public static method

The base map to use for the URLs in the sitemap. This setting is used if the adminstrator wants to override the default url (for example, if using a reverse proxy).
public static GetSeoSiteMapBaseUrl ( ) : string
return string

GetSuggestionsDelay() public static method

Set the delay time for queueing keystokes before requesting suggestions.
public static GetSuggestionsDelay ( ) : int
return int

GetSuggestionsEnabled() public static method

Are suggestions enabled
public static GetSuggestionsEnabled ( ) : bool
return bool

GetTagCloudMaxScale() public static method

The maximum scale for the tag cloud
public static GetTagCloudMaxScale ( ) : int
return int

GetTagCloudMinScale() public static method

The minimum scale for the tag cloud (percent)
public static GetTagCloudMinScale ( ) : int
return int

GetTagCloudShowCount() public static method

Should the count be displayed beside the tag
public static GetTagCloudShowCount ( ) : bool
return bool

GetUserVoiceEnabled() public static method

Are UserVoice suggestions enabled
public static GetUserVoiceEnabled ( ) : bool
return bool

GetUserVoiceKey() public static method

Get the UserVoice widget key
public static GetUserVoiceKey ( ) : string
return string