Class XmlModelHelper

Inheritance
System.Object
XmlModelHelper
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: Mediachase.BusinessFoundation.XmlObjectModel
Assembly: Mediachase.BusinessFoundation.dll
Version: 10.8.0
Syntax
public class XmlModelHelper

Constructors

XmlModelHelper()

Declaration
public XmlModelHelper()

Methods

GetBafGrid(String, String)

Gets the baf grid.

Declaration
public static BafGrid GetBafGrid(string viewId, string placeName)
Parameters
Type Name Description
System.String viewId

The view id.

System.String placeName

Name of the place.

Returns
Type Description
BafGrid

GetButtonSet(String, String, String)

Gets the button set.

Declaration
public static ButtonSet GetButtonSet(string viewId, string className, string placeName)
Parameters
Type Name Description
System.String viewId

The view id.

System.String className

Name of the class.

System.String placeName

Name of the place.

Returns
Type Description
ButtonSet

GetFiles(XPathNavigator)

Declaration
public static string[] GetFiles(XPathNavigator nav)
Parameters
Type Name Description
System.Xml.XPath.XPathNavigator nav
Returns
Type Description
System.String[]

GetForm(String, String)

Gets the form.

Declaration
public static Form GetForm(string viewId, string placeName)
Parameters
Type Name Description
System.String viewId

The view id.

System.String placeName

Name of the place.

Returns
Type Description
Form

GetFormDocumentXml(String, String)

Gets the form document.

Declaration
public static string GetFormDocumentXml(string viewId, string className)
Parameters
Type Name Description
System.String viewId

The view id.

System.String className

Name of the class.

Returns
Type Description
System.String

GetGrid(String, String)

Gets the grid.

Declaration
public static Grid GetGrid(string viewId, string placeName)
Parameters
Type Name Description
System.String viewId

The view id.

System.String placeName

Name of the place.

Returns
Type Description
Grid

GetGrid(String, String, String)

Declaration
public static Grid GetGrid(string viewId, string placeName, string className)
Parameters
Type Name Description
System.String viewId
System.String placeName
System.String className
Returns
Type Description
Grid

GetListViewUI(String, String)

Gets the list view UI.

Declaration
public static ListViewUI GetListViewUI(string viewId, string placeName)
Parameters
Type Name Description
System.String viewId

The view id.

System.String placeName

Name of the place.

Returns
Type Description
ListViewUI

GetNavigation(String, String)

Gets the navigation.

Declaration
public static Navigation GetNavigation(string viewId, string placeName)
Parameters
Type Name Description
System.String viewId

The view id.

System.String placeName

Name of the place.

Returns
Type Description
Navigation

GetNavigation(String, String, Boolean)

Gets the navigation items.

Declaration
public static Navigation GetNavigation(string viewId, string placeName, bool customize)
Parameters
Type Name Description
System.String viewId

The view Id.

System.String placeName

Name of the place.

System.Boolean customize

Flag indicating whether the navigation should have customization processing applied

Returns
Type Description
Navigation

an XPathNavigator.

Remarks

This method duplicates the original one and added the customize argument. It is called from the LeftMenuItems.ascx.cs to return the navigation customized based on whether the navigation items have been added by publishing objects to the left menu.

GetToolbar(String, String, String)

Gets a toolbar configuration from configuration providers.

Declaration
public static Toolbar GetToolbar(string viewName, string placeName, string className)
Parameters
Type Name Description
System.String viewName

The view name.

System.String placeName

The place name.

System.String className

The class name.

Returns
Type Description
Toolbar

A toolbar configuration, or null.

Remarks

The original call from MetaToolbar could not load generic configurations. The presence of a non-empty class name meant it tried to get a configuration hard-wired to that class; and all classes have names, regardless of their configuration. Upon failing, it quit and returned nothing.

The original two-argument call without a class name passed in a viewId as a selector, even when the viewId was null. This prevented the placeName from matching (e.g., { "", "Reference1N" } failed to match Reference1N.xml.

This implementation will attempt to load both class-specific configs and configs based only on viewId and/or placeName, and scan either one for a toolbar with items.

This implementation may still be fundamentally wrong. If configs exist for both the class-specific selector and the generic selector, they should probably be combined according to the xml operations. However, the FileProvider implementation cannot match the separate selectors to the same file group, so there isn't a good way aroudn this; and from a practical standpoint, current configs may depend on the files not being combined.

GetViewConfig(String, String)

Gets the view config.

Declaration
public static ViewConfig GetViewConfig(string viewId, string placeName)
Parameters
Type Name Description
System.String viewId

The view id.

System.String placeName

Name of the place.

Returns
Type Description
ViewConfig

GetViewConfigFromXPathNavigator(XPathNavigator)

Gets the view config from X path navigator.

Declaration
public static ViewConfig GetViewConfigFromXPathNavigator(XPathNavigator nav)
Parameters
Type Name Description
System.Xml.XPath.XPathNavigator nav

The nav.

Returns
Type Description
ViewConfig

GetXmlBySelector(String[])

Gets the XML by a selector.

Declaration
public static XPathNavigator GetXmlBySelector(params string[] selector)
Parameters
Type Name Description
System.String[] selector

Strings to build into a selector.

Returns
Type Description
System.Xml.XPath.XPathNavigator

The IXPathNavigable for the set of configs matching the selector.

Remarks

The GetXmlBy*() methods below aren't being called from client code with the arguments they advertise... they are just used to get xml with N strings in the selector. They dont even always get that right. GetXmlBySelector does exactly what it says it does, and pushes the ugly hacks up a little closer to the places that need them.

GetXmlByViewId(String)

Gets the XML by view id.

Declaration
public static XPathNavigator GetXmlByViewId(string viewId)
Parameters
Type Name Description
System.String viewId

The view id.

Returns
Type Description
System.Xml.XPath.XPathNavigator

GetXmlByViewId(String, Boolean)

Gets the XML by view id.

Declaration
public static XPathNavigator GetXmlByViewId(string viewId, bool customize)
Parameters
Type Name Description
System.String viewId

The view Id.

System.Boolean customize

Flag indicating whether the XML should be customization processing applied

Returns
Type Description
System.Xml.XPath.XPathNavigator

An XPath navigator.

Remarks

This method duplicates the orginail one and added the customize argument. It is called to return the navigation XML customized based on whether the navigation items have been added by publishing objects to the left menu.

GetXmlByViewIdClassName(String, String)

Gets the name of the XML by view id class.

Declaration
public static XPathNavigator GetXmlByViewIdClassName(string viewId, string className)
Parameters
Type Name Description
System.String viewId

The view id.

System.String className

Name of the class.

Returns
Type Description
System.Xml.XPath.XPathNavigator