Show / Hide Table of Contents

Interface IApplicationApi

Provides methods to interact with the Colectica desktop applications.

Namespace: Algenta.Colectica.ViewModel
Assembly: Algenta.Colectica.ViewModel.dll
Syntax
public interface IApplicationApi

Properties

Events

Gets the ApplicationEvents object, which can be used to subscribe to application-wide events.

Declaration
ApplicationEvents Events { get; }
Property Value
Type Description
ApplicationEvents

RootNavigationItems

Gets a list of top-level items to be displayed in the Navigator.

Declaration
ObservableCollection<Node> RootNavigationItems { get; }
Property Value
Type Description
ObservableCollection<Node>

Methods

AddTask(ReportingTask)

Adds a ReportingTask to the list of long-running activities, which are displayed in the Progress view.

Declaration
void AddTask(ReportingTask task)
Parameters
Type Name Description
ReportingTask task

CloseItem()

Closes the currently displayed item.

Declaration
void CloseItem()

Import(Collection<IVersionable>, Boolean)

Saves the specified items in the local database.

Declaration
void Import(Collection<IVersionable> items, bool provisional)
Parameters
Type Name Description
Collection<IVersionable> items

Items to save locally

System.Boolean provisional

Set the item as locally modified

ImportFromRemote(IdentifierTriple, RepositoryClientBase)

Copies the set of items defined by the setRoot from a remote repository into the local database.

Declaration
void ImportFromRemote(IdentifierTriple setRoot, RepositoryClientBase remoteClient)
Parameters
Type Name Description
IdentifierTriple setRoot

The identifier of an item, which defines a set consisting of all its child and other descendant items.

RepositoryClientBase remoteClient

A RepositoryClientBase that will be used to retrieve the items to be stored in the local database.

OpenItem(IVersionable, Node)

Opens the specified item in the main item view.

Declaration
void OpenItem(IVersionable item, Node contextNode)
Parameters
Type Name Description
IVersionable item

The item to be opened.

Node contextNode

A Node providing navigation context for the item to be opened.

OpenTab(System.ComponentModel.INotifyPropertyChanged)

Opens a view for the specified object in the secondary display area.

Declaration
void OpenTab(System.ComponentModel.INotifyPropertyChanged doc)
Parameters
Type Name Description
System.ComponentModel.INotifyPropertyChanged doc

The object to be displayed

Remarks

The object to be displayed must have a corresponding DataTemplate loaded.

RefreshItemStates(IEnumerable<IStatefulItem>)

Retrieves version information from remote repositories about the provided list of items. This information is used by the Navigator to indicate whether an items is up-to-date, has remote updates available, or has unpublished changes.

Declaration
void RefreshItemStates(IEnumerable<IStatefulItem> items)
Parameters
Type Name Description
IEnumerable<IStatefulItem> items

The list of nodes for which version information will be retreived

RefreshNavigation(Action)

Forces the contents of the Navigator, including the version states, to be refreshed.

Declaration
void RefreshNavigation(Action afterRefresh = null)
Parameters
Type Name Description
Action afterRefresh

Save(IVersionable, Node)

Saves the specified item. If the specified node has a parent Checkout, version increases propagate from each changed item to all items within the checkout that references the item.

Declaration
int Save(IVersionable item, Node node)
Parameters
Type Name Description
IVersionable item

The item to be saved.

Node node

A Node that provides navigation context.

Returns
Type Description
System.Int32

Save(Collection<IVersionable>, Node)

Saves the specified list of items. If the specified node has a parent Checkout, version increases propagate from each changed item to all items within the checkout that reference the item.

Declaration
int Save(Collection<IVersionable> items, Node node)
Parameters
Type Name Description
Collection<IVersionable> items

The items to be saved.

Node node

A Node that provides navigation context.

Returns
Type Description
System.Int32

SetBusy(String)

Causes a modal progress indicator to be displayed, and shows the specified message.

Declaration
void SetBusy(string reason = null)
Parameters
Type Name Description
System.String reason

The message to be displayed in the progress indicator.

SetNotBusy()

Causes the progress indicator to be removed.

Declaration
void SetNotBusy()

ShowMessage(String, String, String)

Displays a modal dialog box with the specified information.

Declaration
void ShowMessage(string title, string message, string messageDetails = null)
Parameters
Type Name Description
System.String title

The window title of the diaog box.

System.String message

The message displayed at the top of the dialog box.

System.String messageDetails

Extended information, displayed in a scrollable textbox.

Extension Methods

Extensions.Yield<T>(T)
Back to top Copyright © 2009-2018 Colectica