Class FileInstaller
The FileInstaller installs File Components to a DotNetNuke site.
Inheritance
Inherited Members
Namespace: DotNetNuke.Services.Installer.Installers
Assembly: DotNetNuke.dll
Syntax
public class FileInstaller : ComponentInstallerBase
Properties
| Improve this Doc View SourceBasePath
Gets or sets the BasePath for the files.
Declaration
protected string BasePath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
The Base Path is relative to the WebRoot.
CollectionNodeName
Gets the name of the Collection Node (files
).
Declaration
protected virtual string CollectionNodeName { get; }
Property Value
Type | Description |
---|---|
System.String |
DefaultPath
Gets the default Path for the file - if not present in the manifest.
Declaration
protected virtual string DefaultPath { get; }
Property Value
Type | Description |
---|---|
System.String |
DeleteFiles
Gets or sets a value indicating whether the Packages files are deleted when uninstalling the package.
Declaration
public bool DeleteFiles { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Files
Gets a Dictionary of Files that are included in this component.
Declaration
protected List<InstallFile> Files { get; }
Property Value
Type | Description |
---|---|
List<InstallFile> |
ItemNodeName
Gets the name of the Item Node (file
).
Declaration
protected virtual string ItemNodeName { get; }
Property Value
Type | Description |
---|---|
System.String |
PhysicalBasePath
Gets the PhysicalBasePath for the files.
Declaration
protected virtual string PhysicalBasePath { get; }
Property Value
Type | Description |
---|---|
System.String |
SupportsManifestOnlyInstall
Gets a value indicating whether the Installer supports Manifest only installs.
Declaration
public override bool SupportsManifestOnlyInstall { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Methods
| Improve this Doc View SourceCommit()
The Commit method finalizes the Install and commits any pending changes.
Declaration
public override void Commit()
Overrides
Remarks
In the case of Files this is not necessary.
CommitFile(InstallFile)
The CommitFile method commits a single file.
Declaration
protected virtual void CommitFile(InstallFile insFile)
Parameters
Type | Name | Description |
---|---|---|
InstallFile | insFile | The InstallFile to commit. |
DeleteFile(InstallFile)
The DeleteFile method deletes a single file.
Declaration
protected virtual void DeleteFile(InstallFile insFile)
Parameters
Type | Name | Description |
---|---|---|
InstallFile | insFile | The InstallFile to delete. |
Install()
The Install method installs the file component.
Declaration
public override void Install()
Overrides
| Improve this Doc View SourceInstallFile(InstallFile)
The InstallFile method installs a single file.
Declaration
protected virtual bool InstallFile(InstallFile insFile)
Parameters
Type | Name | Description |
---|---|---|
InstallFile | insFile | The InstallFile to install. |
Returns
Type | Description |
---|---|
System.Boolean | true if the installation was successful, otherwise false. |
IsCorrectType(InstallFileType)
Gets a flag that determines what type of file this installer supports.
Declaration
protected virtual bool IsCorrectType(InstallFileType type)
Parameters
Type | Name | Description |
---|---|---|
InstallFileType | type | The type of file being processed. |
Returns
Type | Description |
---|---|
System.Boolean | true if this is the correct |
ProcessFile(InstallFile, XPathNavigator)
The ProcessFile method determines what to do with parsed "file" node.
Declaration
protected virtual void ProcessFile(InstallFile file, XPathNavigator nav)
Parameters
Type | Name | Description |
---|---|---|
InstallFile | file | The file represented by the node. |
XPathNavigator | nav | The XPathNavigator representing the node. |
ReadCustomManifest(XPathNavigator)
The ReadCustomManifest method reads the custom manifest items (that subclasses of FileInstaller may need).
Declaration
protected virtual void ReadCustomManifest(XPathNavigator nav)
Parameters
Type | Name | Description |
---|---|---|
XPathNavigator | nav | The XPathNavigator representing the node. |
ReadManifest(XPathNavigator)
The ReadManifest method reads the manifest file for the file component.
Declaration
public override void ReadManifest(XPathNavigator manifestNav)
Parameters
Type | Name | Description |
---|---|---|
XPathNavigator | manifestNav |
Overrides
| Improve this Doc View SourceReadManifestItem(XPathNavigator, Boolean)
The ReadManifestItem method reads a single node.
Declaration
protected virtual InstallFile ReadManifestItem(XPathNavigator nav, bool checkFileExists)
Parameters
Type | Name | Description |
---|---|---|
XPathNavigator | nav | The XPathNavigator representing the node. |
System.Boolean | checkFileExists | Flag that determines whether a check should be made. |
Returns
Type | Description |
---|---|
InstallFile | A new InstallFile instance. |
Rollback()
The Rollback method undoes the installation of the file component in the event that one of the other components fails.
Declaration
public override void Rollback()
Overrides
| Improve this Doc View SourceRollbackFile(InstallFile)
The RollbackFile method rolls back the install of a single file.
Declaration
protected virtual void RollbackFile(InstallFile installFile)
Parameters
Type | Name | Description |
---|---|---|
InstallFile | installFile | The InstallFile to commit. |
Remarks
For new installs this removes the added file. For upgrades it restores the backup file created during install.
UnInstall()
The UnInstall method uninstalls the file component.
Declaration
public override void UnInstall()
Overrides
| Improve this Doc View SourceUnInstallFile(InstallFile)
The UnInstallFile method unInstalls a single file.
Declaration
protected virtual void UnInstallFile(InstallFile unInstallFile)
Parameters
Type | Name | Description |
---|---|---|
InstallFile | unInstallFile | The InstallFile to unInstall. |