Class wwDbResourceDataManager

This class provides the Data Access to the database for the wwDbResourceManager, Provider and design time services. This class acts as a Business layer and uses the wwSqlDataAccess DAL for its data access.

Dependencies: wwDbResourceConfiguration (holds and reads config data) wwSqlDataAccess (provides a data access (DAL))

System.Object
  Westwind.Globalization.wwDbResourceDataManager

public class wwDbResourceDataManager : object

Class Members

MemberDescription
Constructor Default constructore. Instantiates with the default connection string which is loaded from the configuration section.
TableCreationSql
AddResource Adds a resource to the Localization Table
public int AddResource( string ResourceId,
object Value,
string CultureName,
string ResourceSet );

public int AddResource( string ResourceId,
object Value,
string CultureName,
string ResourceSet,
bool ValueIsFileName );

CreateLocalizationTable Creates the Localization table on the current connection string for the provider.
public bool CreateLocalizationTable( string TableName );
DeleteResource Deletes a specific resource ID based on ResourceId, ResourceSet and Culture. If an empty culture is passed the entire group is removed (ie. all locales).
public bool DeleteResource( string ResourceId,
string CultureName,
string ResourceSet );
DeleteResourceSet Deletes an entire resource set from the database. Careful with this function!
public bool DeleteResourceSet( string ResourceSet );
GenerateResources Persists resources to the database - first wipes out all resources, then writes them back in from the ResourceSet
public bool GenerateResources( IDictionary ResourceList,
string CultureName,
string BaseName,
bool DeleteAllResourceFirst );
GetAllLocaleIds Gets all the locales for a specific resource set.
public DataTable GetAllLocaleIds( string ResourceSet );
GetAllResourceIds Returns all available resource ids for a given resource set in all languages.
public DataTable GetAllResourceIds( string ResourceSet );
GetAllResourceSets Returns all available resource sets
public DataTable GetAllResourceSets( ResourceListingTypes Type );
GetAllResourcesForCulture Gets all the Resourecs and ResourceIds for a given resource set and Locale
public DataTable GetAllResourcesForCulture( string ResourceSet,
string CultureName );
GetAllResourcesForResourceSet Returns a data table of all the resources for all locales. The result is in a table called TResources that contains all fields of the table. The table is ordered by LocaleId.
public DataTable GetAllResourcesForResourceSet( bool LocalResources );
GetResourceObject Returns an object from the Resources. Use this for any non-string types. While this method can be used with strings GetREsourceString is much more efficient.
public object GetResourceObject( string ResourceId,
string ResourceSet,
string CultureName );
GetResourceSet Returns a specific set of resources for a given culture and 'resource set' which in this case is just the virtual directory and culture.
public IDictionary GetResourceSet( string CultureName,
string ResourceSet );
GetResourceString Returns an individual Resource String from the database
public string GetResourceString( string ResourceId,
string ResourceSet,
string CultureName );
GetResourceStrings Returns all the resource strings for all cultures.
public Dictionary<String,String> GetResourceStrings( string ResourceId,
string ResourceSet );
IsLocalizationTable Checks to see if the LocalizationTable exists
public bool IsLocalizationTable( string TableName );
RenameResourceSet Renames a resource set. Useful if you need to move a local page resource set to a new page. ResourceSet naming for local resources is application relative page path:
public bool RenameResourceSet( string OldResourceSet,
string NewResourceSet );
ResourceExists Checks to see if a resource exists in the resource store
public bool ResourceExists( string ResourceId,
string CultureName,
string ResourceSet );
UpdateOrAdd Updates a resource if it exists, if it doesn't one is created
public int UpdateOrAdd( string ResourceId,
object Value,
string CultureName,
string ResourceSet );

public int UpdateOrAdd( string ResourceId,
object Value,
string CultureName,
string ResourceSet,
bool ValueIsFileName );

UpdateResource
public int UpdateResource( string ResourceId,
object Value,
string CultureName,
string ResourceSet );

public int UpdateResource( string ResourceId,
object Value,
string CultureName,
string ResourceSet,
bool ValueIsFileName );

ErrorMessage Error message that can be checked after a method complets and returns a failure result.

Requirements

Namespace: Westwind.Globalization
Assembly: westwind.globalization.dll


  Last Updated: 7/31/2007 | © West Wind Technologies, 2008