Search Results for

    Show / Hide Table of Contents

    Class InstallationManager

    Handles installation issues on a given database client

    Inheritance
    System.Object
    InstallationManager
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: TimeCockpit.Data.Database
    Assembly: TimeCockpit.Data.dll
    Syntax
    public class InstallationManager

    Methods

    ActivateAndInstallFeatures(IEnumerable<Feature>)

    Activates and installs a given features.

    Declaration
    public void ActivateAndInstallFeatures(IEnumerable<Feature> features)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<Feature> features

    Features to install

    Remarks

    The method orders the features by prerequisites and installs them in order.

    Create(DbClient, Model, String)

    Creates a new installation manager that fits to the specified client

    Declaration
    public static InstallationManager Create(DbClient client, Model writableModel = null, string dataModelLanguage = null)
    Parameters
    Type Name Description
    DbClient client

    Database client that the installation manager has to work with

    Model writableModel

    Optional, preprovided writable model.

    System.String dataModelLanguage

    The language of the datamodel that is to be upgraded.

    Returns
    Type Description
    InstallationManager

    New instance of the InstallationManager class

    Create(DataContext, Model, String)

    Creates a new installation manager that fits to the specified client

    Declaration
    public static InstallationManager Create(DataContext context, Model writableModel = null, string dataModelLanguage = null)
    Parameters
    Type Name Description
    DataContext context

    Context that the installation manager has to work with

    Model writableModel

    Optional, preprovided writable model.

    System.String dataModelLanguage

    The language of the datamodel that is to be upgraded.

    Returns
    Type Description
    InstallationManager

    New instance of the InstallationManager class

    GetFeatureStatus(Guid)

    Returns the status of a given feature

    Declaration
    public FeatureStatus GetFeatureStatus(Guid featureGuid)
    Parameters
    Type Name Description
    System.Guid featureGuid

    Guid of the feature to check

    Returns
    Type Description
    FeatureStatus

    Status of a given feature

    GetFeatureStatus(Guid, IEnumerable<Guid>)

    Returns the status of a given feature

    Declaration
    public static FeatureStatus GetFeatureStatus(Guid featureGuid, IEnumerable<Guid> installedFeatures)
    Parameters
    Type Name Description
    System.Guid featureGuid

    Guid of the feature to check

    System.Collections.Generic.IEnumerable<System.Guid> installedFeatures

    Installed feature uuids.

    Returns
    Type Description
    FeatureStatus

    Status of a given feature

    GetFeatureStatus(Feature)

    Returns the status of a given feature

    Declaration
    public FeatureStatus GetFeatureStatus(Feature feature)
    Parameters
    Type Name Description
    Feature feature

    Feature to check

    Returns
    Type Description
    FeatureStatus

    Status of a given feature

    GetInstallationComponentStatus(IEnumerable<InstallationComponent>, Func<InstalledBatchInformation, Boolean>)

    Gets the installation status for a specified collection of installation components

    Declaration
    public InstallationComponentStatus GetInstallationComponentStatus(IEnumerable<InstallationComponent> installBatch, Func<InstalledBatchInformation, bool> installedBatchFilter)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<InstallationComponent> installBatch

    Installation components to check

    System.Func<InstalledBatchInformation, System.Boolean> installedBatchFilter

    Optional filter function for installed components stored in the database (see remarks for details)

    Returns
    Type Description
    InstallationComponentStatus

    Installation status for a specified collection of installation components

    Remarks

    installedBatchFilter can be null if all installed components stored in the database should be taken into account.

    GetMissingComponents(IEnumerable<InstallationComponent>, Nullable<Guid>)

    Gets a list of missing installation components.

    Declaration
    public IEnumerable<InstallationComponent> GetMissingComponents(IEnumerable<InstallationComponent> installBatch, Guid? guidOfLastBatchToBeChecked)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<InstallationComponent> installBatch

    List of installation components for which to check if they have already been installed on the client db.

    System.Nullable<System.Guid> guidOfLastBatchToBeChecked

    Guid of the last batch that should be returned. See remarks for details.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<InstallationComponent>

    Those components from installBatch that have not already been installed on the client db.

    Remarks

    If guidOfLastBatchToBeChecked is null all batches in installBatch are returned.

    GetMissingComponents(Feature)

    Gets a list of missing installation components for a given feature.

    Declaration
    public IEnumerable<InstallationComponent> GetMissingComponents(Feature feature)
    Parameters
    Type Name Description
    Feature feature

    Feature to check

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<InstallationComponent>

    Those installation components from the feature that have not already been installed on the client db.

    HasNecessaryPrerequisites(Feature)

    Gets a value indicating whether the underlying database has all necessary prerequisites for a given feature

    Declaration
    public bool HasNecessaryPrerequisites(Feature feature)
    Parameters
    Type Name Description
    Feature feature

    Feature to check

    Returns
    Type Description
    System.Boolean

    value indicating whether the underlying database has all necessary prerequisites for a given feature

    InstallMissingUpdateBatches(IEnumerable<InstallationComponent>, Nullable<Guid>)

    Installes missing installation components.

    Declaration
    public void InstallMissingUpdateBatches(IEnumerable<InstallationComponent> installBatch, Guid? guidOfLastBatchToBeExecuted)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<InstallationComponent> installBatch

    List of installation components for which to check if they have already been installed on the client db. Those that have not been installed yet will be installed.

    System.Nullable<System.Guid> guidOfLastBatchToBeExecuted

    Guid of the last batch that should be installed. See remarks for details.

    Remarks

    Note that this function adds the installed components to TcSys_InstalledBatches even if the corresponding batch has not been executed because of not meeting the match criteria.

    If guidOfLastBatchToBeExecuted is null all batches in installBatch are installed.

    OrderByDependencies(IEnumerable<Feature>, Boolean)

    Orders features by its dependencies. To get an uninstall order, reverse the returned collection.

    Declaration
    public IEnumerable<Feature> OrderByDependencies(IEnumerable<Feature> features, bool uninstall)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<Feature> features

    features to install.

    System.Boolean uninstall

    true if ordered for uninstall (does not check if prerequisites are in the features.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Feature>

    returns the enumeration of features, sorted by dependencies.

    RemoveFeatures(IEnumerable<Feature>, Boolean)

    Removes and installs a set of features

    Declaration
    public void RemoveFeatures(IEnumerable<Feature> features, bool ignoreNotInstalled = false)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<Feature> features

    Features to uninstall

    System.Boolean ignoreNotInstalled

    Allows features to no be in installed state.

    Remarks

    Orders the features by prerequisites and uninstalls them in reversed order.

    In This Article
    Back to top Copyright © 2020 software architects gmbh