Show / Hide Table of Contents

Class NavigatorHelper

Contains methods useful for implementing the Navigator. These generally wrap calls to a repository client, and create Nodes that can easily be added to the Navigator.

Inheritance
System.Object
NavigatorHelper
Namespace: Algenta.Colectica.ViewModel.Navigator
Assembly: Algenta.Colectica.ViewModel.dll
Syntax
public class NavigatorHelper : object

Constructors

NavigatorHelper(RepositoryClientBase)

Initializes a new instance of the NavigatorHelper class.

Declaration
public NavigatorHelper(RepositoryClientBase client)
Parameters
Type Name Description
RepositoryClientBase client

The repository client.

Methods

FindItems(IdentifierTriple, Guid, Node, Boolean)

Finds items of the specified type related to the specified item using the repository client's relationship search methods, and returns nodes to represent the found items.

Declaration
public Collection<Node> FindItems(IdentifierTriple rootId, Guid targetType, Node parentItem, bool addPlaceholders)
Parameters
Type Name Description
IdentifierTriple rootId

The identifier of the item for which related items will be searched.

Guid targetType

The type of items to find.

Node parentItem

The parent item to associate with the newly created nodes.

System.Boolean addPlaceholders

if set to true a placeholder node is added as a child to each newly created node.

Returns
Type Description
Collection<Node>

A list containing a node for each found item.

FindItems(IdentifierTriple, Guid[], Node, Boolean)

Finds items of the specified types related to the specified item using the repository client's relationship search methods, and returns nodes to represent the found items.

Declaration
public Collection<Node> FindItems(IdentifierTriple rootId, Guid[] targetTypes, Node parentItem, bool addPlaceholders)
Parameters
Type Name Description
IdentifierTriple rootId

The identifier of the item for which related items will be searched.

Guid[] targetTypes

The types of items to find.

Node parentItem

The parent item to associate with the newly created nodes.

System.Boolean addPlaceholders

if set to true a placeholder node is added as a child to each newly created node.

Returns
Type Description
Collection<Node>

A list containing a node for each found item.

FindItems(Guid, Node, Boolean)

Finds items of the specified type using the repository client's Search method, and returns nodes to represent the found items.

Declaration
public Collection<Node> FindItems(Guid targetType, Node parentItem, bool addPlaceholders)
Parameters
Type Name Description
Guid targetType

The type of items to find.

Node parentItem

The parent item to associate with the newly created nodes.

System.Boolean addPlaceholders

if set to true a placeholder node is added as a child to each newly created node.

Returns
Type Description
Collection<Node>

A list containing a node for each found item.

FindItems(Guid[], Node, Boolean)

Finds items of the specified types using the repository client's Search method, and returns nodes to represent the found items.

Declaration
public Collection<Node> FindItems(Guid[] targetTypes, Node parentItem, bool addPlaceholders)
Parameters
Type Name Description
Guid[] targetTypes

The types of items to find.

Node parentItem

The parent item to associate with the newly created nodes.

System.Boolean addPlaceholders

if set to true a placeholder node is added as a child to each newly created node.

Returns
Type Description
Collection<Node>

A list containing a node for each found item.

GetHistory(Guid, String)

Gets a list of all versions of the specified item.

Declaration
public Collection<IVersionableProvider> GetHistory(Guid identifier, string agency)
Parameters
Type Name Description
Guid identifier

The identifier of the item.

System.String agency

The agency ID of the item.

Returns
Type Description
Collection<IVersionableProvider>

A list of versions for the specified item

GetItem(IdentifierTriple)

Gets the item with the specified identifier.

Declaration
public IVersionable GetItem(IdentifierTriple id)
Parameters
Type Name Description
IdentifierTriple id

The identifier of the item to retrieve.

Returns
Type Description
IVersionable

The item.

GetItems(SearchFacet)

Performs a search and instantiates an IVersionable item for each result.

Declaration
public Collection<IVersionable> GetItems(SearchFacet facet)
Parameters
Type Name Description
SearchFacet facet

The facet containing the search parameters.

Returns
Type Description
Collection<IVersionable>

A list of items.

GetItems(Guid)

Gets all items of the specified type, using the repository client's Search method..

Declaration
public Collection<IVersionable> GetItems(Guid type)
Parameters
Type Name Description
Guid type

The type.

Returns
Type Description
Collection<IVersionable>

GetNodesForDirectChildren(IdentifierTriple, Node, Boolean)

Declaration
public Collection<Node> GetNodesForDirectChildren(IdentifierTriple rootId, Node parentItem, bool addPlaceholders)
Parameters
Type Name Description
IdentifierTriple rootId
Node parentItem
System.Boolean addPlaceholders
Returns
Type Description
Collection<Node>

GetReferencingItems(IdentifierTriple, List<Guid>)

Gets items in the same set as the specified item, using the repository client's SearchTypedSet method.

Declaration
public Collection<IVersionableProvider> GetReferencingItems(IdentifierTriple targetId, List<Guid> targetTypes = null)
Parameters
Type Name Description
IdentifierTriple targetId

The target identifier, which defines the set of items to search.

List<Guid> targetTypes

The types of items to find.

Returns
Type Description
Collection<IVersionableProvider>

A list of items of the specified type that exist in the set defined by the targetId.

GetRelationshipMatrix(IdentifierTriple)

Gets a matrix describing the relationships of all items in a set, using the repository client's GetTypedRelationships method.

Declaration
public TypedAdjacencyMatrix GetRelationshipMatrix(IdentifierTriple targetId)
Parameters
Type Name Description
IdentifierTriple targetId

The identifier of the item that defines the set of items.

Returns
Type Description
TypedAdjacencyMatrix

A matrix describing the relationshipos of all items in a set.

Search(SearchFacet, out SearchResponse)

Searches the repository using the specified search facet.

Declaration
public Collection<Node> Search(SearchFacet facet, out SearchResponse searchResponse)
Parameters
Type Name Description
SearchFacet facet

The facet containing the search parameters.

SearchResponse searchResponse

The search response.

Returns
Type Description
Collection<Node>

A list containing a node for each search result.

Extension Methods

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