C# Class FLS.SharePoint.BdcModel.Features.Feature1.ImportModelReceiver

This class Imports the Model file, model resource file and assemblies in the BDC store. It uses the SharePoint feature receiver infrastructure to do it.
Inheritance: SPFeatureReceiver
Mostra file Open project: ivankozyrev/fls-internal-portal

Public Methods

Method Description
FeatureActivated ( SPFeatureReceiverProperties properties ) : void

Activates the feature. It imports the model file, resource model file and the assemblies.

FeatureDeactivating ( SPFeatureReceiverProperties properties ) : void

Deactivate the feature. It deletes the model from the Business Data Catalog.

Private Methods

Method Description
CreateAdministrationMetadataCatalog ( SPFeatureProperty siteUrlProperty ) : void

Returns the AdministrationMetadataCatalog from the Url of the Site or WebApplication.

DeleteModel ( Model model, bool deleteNoCascade ) : void

Deletes the specified Model.

ExportAndDeleteModel ( string modelName, string targetDirectory, bool incrementalUpdate ) : void

Exports model and deletes model if the Model exists.

ExportLobSystem ( Model model ) : LobSystemAssemblies>.Dictionary

Export the lobSystems of the model.

ExportModel ( string modelContents, string targetDirectory ) : void

Exports the model to a file. File will be located at the directory specified by targetDirectory and the name of the file will be the modelName followed by a current date time stamp.

GetAssemblyBytes ( string assemblyPath ) : byte[]

Converts the assembly to byte array.

GetDefaultWebAppUrl ( ) : string

Gets the default webapp when siteURL property is not set. - Get all webapps (that are not admin) that are on port 80. Use the one with least number of dots (segments). When there are multiple with same number of dots, use the one starting with www. Otherwise fail. - If there are no webapps on port 80, do same as above for 443.

GetFeatureFolder ( SPFeatureDefinition featureDefinition ) : string

Returns the full path of the Feature folder.

GetIncrementalUpdate ( SPFeatureProperty incrementalUpdateProperty ) : bool

Get the value of the IncrementalUpdate flag. If the IncrementalUpdate is not present then it will return false.

GetLobSystemAssemblies ( SPFeaturePropertyCollection featurePropertyCollection, string featureFolder ) : LobSystemAssemblies>.Dictionary

Returns the assembly information for the LobSystems.

GetModel ( string modelName ) : Model

Finds the model by name.

GetModelFilePath ( SPFeatureProperty featureProperty, string featureFolder ) : string

Returns the full path of the Model file.

GetModelName ( ) : string

Returns the Name of the Model from the specified model file.

GetResourceModelFilesPaths ( SPFeatureProperty featureProperty, string featureFolder ) : string[]

Returns the full paths of all the resource files.

GetSite ( SPFeatureProperty siteUrlProperty ) : SPSite

Get the SPSite from the siteUrl property of the feature xml. If value is not present, use localhost as default.

ImportBdcArtifacts ( string featureFolder, string modelFilePath, string resourceFilesPaths, LobSystemAssemblies>.Dictionary lobSystemAssemblies, bool incrementalUpdate ) : void

Imports the Bdc artifacts into the Bdc Store.

ImportModel ( string fileContents, PackageContents packageContents, bool incrementalUpdate ) : Model

Imports the model contents in the Bdc store.

ImportModelFromFile ( string filePath, PackageContents packageContents, bool incrementalUpdate ) : Model

Imports the model file in the Bdc store.

ImportTheSavedModel ( string modelContents, LobSystemAssemblies>.Dictionary lobSystemsAssemblies, bool incrementalUpdate ) : void

Imports the saved model.

ParseSemicolonDelimitedNames ( string value ) : string[]

Parses a semicolon delimited string. If the string is null or empty then empty string array is returned.

SaveExistingModelAndDelete ( string modelName, string featureFolder, LobSystemAssemblies>.Dictionary &exportedLobSystems ) : string

Saves information about the existing model.

Method Details

FeatureActivated() public method

Activates the feature. It imports the model file, resource model file and the assemblies.
public FeatureActivated ( SPFeatureReceiverProperties properties ) : void
properties SPFeatureReceiverProperties Feature properties.
return void

FeatureDeactivating() public method

Deactivate the feature. It deletes the model from the Business Data Catalog.
public FeatureDeactivating ( SPFeatureReceiverProperties properties ) : void
properties SPFeatureReceiverProperties Feature properties.
return void