EKM Client API

- Main Page
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Public Attributes | Properties
com::ansys::ingress::connector::model::ModelObject Class Reference

ModelObject represents a real object in an EKM repository. More...

List of all members.

## Public Member Functions

| ModelObject ()
| Creates a new instance of ModelObject.
void | AddChild (ModelObject child)
| Adds a child to this object.
void | AddChildren (IEnumerable< ModelObject > children)
| Adds children to this object.
void | AddProperty (string category, string propertyName, Variant value)
| Adds a property to this object.
void | SetContainer (bool container)
| Sets the flag indicating if this object is a container or not.
void | SetFile (bool file)
| Sets the flag indicating if this object is a file or not.
CheckinStatus | GetCheckinStatus ()
| Retrieves the CheckinStatus of this object.
ModelObject | GetChild (string name)
| Retrieves a child of this object.
Dictionary< string, ModelObject >.KeyCollection | GetChildNames ()
| Retrieves the names of this object's children.
DateTime | GetCreationTime ()
| Retrieves the time when this object was created.
string | GetCreator ()
| Retrieves the name of the user that created this object.
ModelObject | GetDescendent (string path)
| Gets descendents of this object.
string | GetDisplayName ()
| Gets the name of the object as it should appear in a user interface.
string | GetViewPath ()
| Gets the path of the object as it should be displayed to a user. For example, the /Repository object should be displayed as /Data/Shared Data.
DateTime | GetExpirationDate ()
| Retrieves the date that this object will expire.
ModelObject | GetLifecycleHistory ()
| Retrieves this object's lifecycle history object if it exists.
string | GetLifecycleStageName ()
| Retrieves the lifecycle stage name for this object or null if it is not part of a lifecycle.
DateTime | GetModificationTime ()
| Retrieves the last time this object was modified.
string | GetModifiedBy ()
| Retrieves the name of the user that last modified this object.
IEnumerable< ModelObject > | GetPermissions (string action)
| Retrieves the current user's permissions for the given action.
Variant | GetProperty (string name)
| Retireves a property value or null if the property does not exist.
PropertySpec | GetPropertySpec (string name)
| Retrieves the property spec for the given property.
List< string > | GetReportFormats ()
| Retrieves a list of report formats for this object.
List< string > | GetStatusFlags ()
| Retrieves the status flags for this object.
string | GetTypeName ()
| Retrieves the type name for this object.
bool | HasChild (string name)
| Determines if this object has a child with the given name.
bool | HasLifecycle ()
| Determines if this object has an associated lifecycle.
bool | HasPermission (string action)
| Determines if the user has permission to perform the specified action.
bool | IsArchived ()
| Determinse if this object is archived or not.
bool | IsCheckedOut (string username)
| Determines if this object is checked out to the specified user.
bool | IsContainer ()
| Determines if the object is a container or not.
bool | IsExpired ()
| Determines if this object is expired or not.
bool | IsFile ()
| Determines if this object is a file or not.
bool | IsInternal ()
| Determines if this is an internal object or not.
bool | IsLocked (string username)
| Determines if this object is locked by the given user or not.
bool | IsModified ()
| Determines if this object has been modified.
bool | IsPerishable ()
| Determines if this object is perishable and can be deleted if it expires.
bool | IsUnderVersionControl ()
| Determines if this object is under version control or not.
bool | IsUpdateExpirationOnMod ()
| Determines if this object's expiration date is updated when the object is modified.
ModelObject | RemoveChild (string name)
| Removes a child from this object.
void | RemoveChildren ()
| Removes all children from this object.
void | RemoveProperty (string name)
| Removes a property from this object.
new string | Serialize ()
| Serializes this object to XML.
void | SetPermissions (string action, IEnumerable< ModelObject > permissions)
| Sets permissions on this object for a given action.
void | SetPermissions (string action, IEnumerable< ModelObject > permissions, bool recursive)
| Sets permissions on this object for a given action.
void | SetRetentionPolicy (bool perishable, bool updateExpirationOnMod, DateTime expirationDate)
| Sets the retention policy of this object.
void | SetStatusFlags (string statusFlag, bool on)
| Sets a status flag on this object on or off.
void | SetUserProperties (Dictionary< string, Variant > props)
| Sets this object's user properties.
void | SetVersioningProperties (Dictionary< string, Variant > props)
| Sets this object's versioning properties.
void | SetUserProperty (string name, Variant value)
| Sets a user property.

## Static Public Member Functions

static new ModelObject | Deserialize (string xml)
| Deserializes XML into a ModelObject instance.
static ModelObject | CreateModelObject (ModelObjectData serializable)
| Creates a ModelObject instance from a ModelObject.
static Dictionary< string, ModelObject > | CreateChildren (ReferenceDataMapEntry[] references)
| Creates the Reference objects for this object's children.
static Dictionary< string, string > | CreateDynamicPropertiesMap (MapDataEntry[] items)
| Creates a dictionary of dynamic properties.
static ModelSpec | CreateSpec (ModelSpecData serializableModel)
| Creates a ModelSpec from a serializable spec.
static Dictionary< string, Variant > | CreatePropertiesMap (VariantDataMapEntry[] sprops)
| Creates a dictionary of properties for an object.
static CheckinStatus | GetCheckinStatus (ModelObject obj, string policy, string owner)
| Retrieves the CheckinStatus of the given object.
static bool | HasPermission (ModelObject obj, string action)
| Determines if the current user has permission to perform the specified action on the given object.
static ModelObjectData | CreateSerializable (ModelObject modelObject)
| Creates a ModelObject from a ModelObject.
static VariantDataMapEntry[] | SerializeProperties (Dictionary< string, Variant > dictionary)
| Serializes a dictionary of properties.
static MapDataEntry[] | SerializeDynamicProperties (Dictionary< string, string > dictionary)
| Serializes a dictionary of dynamic properties.
static ReferenceDataMapEntry[] | SerializeChildren (Dictionary< string, ModelObject >.ValueCollection valueCollection)
| Serializes a collection of model objects into references.

## Public Attributes

const string | SYSTEM_PATH = "/System"
| The path to the EKM "System" folder.
const string | VERSIONS_NAME = "Versions"
| The version control folder.
const string | VERSIONS_PATH = "/" + VERSIONS_NAME
| The path to the version control folder.

## Properties

Dictionary< string, ModelObject > | Children`[get, set]`
| The children of this object.
Dictionary< string, string > | DynamicProperties`[get, set]`
| The user defined properties of this object.
Dictionary< string, Variant > | Properties`[get, set]`
| The property values for this object.
ModelSpec | Spec`[get, set]`
| The object's specification.
string | Typename`[get, set]`
| The object's type name.
Connection | connection`[get, set]`
| The connection object associated with this object.
ModelObjectData | Data`[get, set]`
| Backing data for this object.

## Detailed Description

ModelObject represents a real object in an EKM repository.

## Constructor & Destructor Documentation

com::ansys::ingress::connector::model::ModelObject::ModelObject | ( |  | ) | `[inline]`

Creates a new instance of ModelObject.

## Member Function Documentation

void com::ansys::ingress::connector::model::ModelObject::AddChild | ( | ModelObject | child | ) | `[inline]`

Adds a child to this object.

Parameters:

  child | The child to add

void com::ansys::ingress::connector::model::ModelObject::AddChildren | ( | IEnumerable< ModelObject > | children | ) | `[inline]`

Adds children to this object.

Parameters:

  children | The children to add.

void com::ansys::ingress::connector::model::ModelObject::AddProperty | ( | string | category,
|  | string | propertyName,
|  | Variant | value
| ) |  | `[inline]`

Adds a property to this object.

Parameters:

  category | The property's category
  propertyName | The property's name
  value | The property's value

static Dictionary<string, ModelObject> com::ansys::ingress::connector::model::ModelObject::CreateChildren | ( | ReferenceDataMapEntry[] | references | ) | `[inline, static]`

Creates the Reference objects for this object's children.

Parameters:

  references | The references

Returns:
  Returns the dictionary of children.

static Dictionary<string, string> com::ansys::ingress::connector::model::ModelObject::CreateDynamicPropertiesMap | ( | MapDataEntry[] | items | ) | `[inline, static]`

Creates a dictionary of dynamic properties.

Parameters:

  items | The items used to create the dictionary

Returns:
  Returns the dictionary.

static ModelObject com::ansys::ingress::connector::model::ModelObject::CreateModelObject | ( | ModelObjectData | serializable | ) | `[inline, static]`

Creates a ModelObject instance from a ModelObject.

Parameters:

  serializable | The serializable object

Returns:
  Returns the ModelObject.

static Dictionary<string, Variant> com::ansys::ingress::connector::model::ModelObject::CreatePropertiesMap | ( | VariantDataMapEntry[] | sprops | ) | `[inline, static]`

Creates a dictionary of properties for an object.

Parameters:

  sprops | The serialized properties.

Returns:
  Returns the dictionary.

static ModelObjectData com::ansys::ingress::connector::model::ModelObject::CreateSerializable | ( | ModelObject | modelObject | ) | `[inline, static]`

Creates a ModelObject from a ModelObject.

Parameters:

  modelObject | The data source

Returns:
  Returns the serializable object.

static ModelSpec com::ansys::ingress::connector::model::ModelObject::CreateSpec | ( | ModelSpecData | serializableModel | ) | `[inline, static]`

Creates a ModelSpec from a serializable spec.

Parameters:

  serializableModel | The serializable spec

Returns:
  Returns the ModelSpec.

static new ModelObject com::ansys::ingress::connector::model::ModelObject::Deserialize | ( | string | xml | ) | `[inline, static]`

Deserializes XML into a ModelObject instance.

Parameters:

  xml | The XML to deserialize

Returns:
  Returns the ModelObject intance.

CheckinStatus com::ansys::ingress::connector::model::ModelObject::GetCheckinStatus | ( |  | ) | `[inline]`

Retrieves the CheckinStatus of this object.

Returns:
  Returns the status.

static CheckinStatus com::ansys::ingress::connector::model::ModelObject::GetCheckinStatus | ( | ModelObject | obj,
|  | string | policy,
|  | string | owner
| ) |  | `[inline, static]`

Retrieves the CheckinStatus of the given object.

Parameters:

  obj | The object to check
  policy | The version control policy
  owner | The object's owner

Returns:
  Returns the status.

ModelObject com::ansys::ingress::connector::model::ModelObject::GetChild | ( | string | name | ) | `[inline]`

Retrieves a child of this object.

Parameters:

  name | The name of the child to get

Returns:
  Returns the child or null if it doesn't exist.

Dictionary<string, ModelObject>.KeyCollection com::ansys::ingress::connector::model::ModelObject::GetChildNames | ( |  | ) | `[inline]`

Retrieves the names of this object's children.

Returns:
  Returns the collection of names.

DateTime com::ansys::ingress::connector::model::ModelObject::GetCreationTime | ( |  | ) | `[inline]`

Retrieves the time when this object was created.

Returns:
  Returns the time.

string com::ansys::ingress::connector::model::ModelObject::GetCreator | ( |  | ) | `[inline]`

Retrieves the name of the user that created this object.

Returns:
  Returns the name.

ModelObject com::ansys::ingress::connector::model::ModelObject::GetDescendent | ( | string | path | ) | `[inline]`

Gets descendents of this object.

Parameters:

  path | The path to search

Returns:
  Returns the descendent object.

string com::ansys::ingress::connector::model::ModelObject::GetDisplayName | ( |  | ) | `[inline]`

Gets the name of the object as it should appear in a user interface.

Returns:
  Returns the name of the object as it should appear in a user interface or the actual name if the display name is not set.

DateTime com::ansys::ingress::connector::model::ModelObject::GetExpirationDate | ( |  | ) | `[inline]`

Retrieves the date that this object will expire.

Returns:
  Returns the date.

ModelObject com::ansys::ingress::connector::model::ModelObject::GetLifecycleHistory | ( |  | ) | `[inline]`

Retrieves this object's lifecycle history object if it exists.

Returns:
  Returns the object or null.

string com::ansys::ingress::connector::model::ModelObject::GetLifecycleStageName | ( |  | ) | `[inline]`

Retrieves the lifecycle stage name for this object or null if it is not part of a lifecycle.

Returns:
  Returns the stage name or null.

DateTime com::ansys::ingress::connector::model::ModelObject::GetModificationTime | ( |  | ) | `[inline]`

Retrieves the last time this object was modified.

Returns:
  Returns the time.

string com::ansys::ingress::connector::model::ModelObject::GetModifiedBy | ( |  | ) | `[inline]`

Retrieves the name of the user that last modified this object.

Returns:
  Returns the user's name.

IEnumerable<ModelObject> com::ansys::ingress::connector::model::ModelObject::GetPermissions | ( | string | action | ) | `[inline]`

Retrieves the current user's permissions for the given action.

Parameters:

  action | The action

Returns:
  Returns the permissions.

Variant com::ansys::ingress::connector::model::ModelObject::GetProperty | ( | string | name | ) | `[inline]`

Retireves a property value or null if the property does not exist.

Parameters:

  name | The name of the property

Returns:
  Returns the value or null.

PropertySpec com::ansys::ingress::connector::model::ModelObject::GetPropertySpec | ( | string | name | ) | `[inline]`

Retrieves the property spec for the given property.

Parameters:

  name | The name of the property.

Returns:
  Returns the spec or null if the property does not exist.

List<string> com::ansys::ingress::connector::model::ModelObject::GetReportFormats | ( |  | ) | `[inline]`

Retrieves a list of report formats for this object.

Returns:
  Returns the list of formats.

List<string> com::ansys::ingress::connector::model::ModelObject::GetStatusFlags | ( |  | ) | `[inline]`

Retrieves the status flags for this object.

Returns:
  Returns the flags.

string com::ansys::ingress::connector::model::ModelObject::GetTypeName | ( |  | ) | `[inline]`

Retrieves the type name for this object.

Returns:
  Returns the name.

string com::ansys::ingress::connector::model::ModelObject::GetViewPath | ( |  | ) | `[inline]`

Gets the path of the object as it should be displayed to a user. For example, the /Repository object should be displayed as /Data/Shared Data.

Returns:
  Returns the view path or the actual path if the view path is not set.

bool com::ansys::ingress::connector::model::ModelObject::HasChild | ( | string | name | ) | `[inline]`

Determines if this object has a child with the given name.

Parameters:

  name | The name to check

Returns:
  Returns true if the child exists.

bool com::ansys::ingress::connector::model::ModelObject::HasLifecycle | ( |  | ) | `[inline]`

Determines if this object has an associated lifecycle.

Returns:
  Returns true if a lifecycle exists.

bool com::ansys::ingress::connector::model::ModelObject::HasPermission | ( | string | action | ) | `[inline]`

Determines if the user has permission to perform the specified action.

Parameters:

  action | The action to check

Returns:
  Returns true if the user has permission.

static bool com::ansys::ingress::connector::model::ModelObject::HasPermission | ( | ModelObject | obj,
|  | string | action
| ) |  | `[inline, static]`

Determines if the current user has permission to perform the specified action on the given object.

Parameters:

  obj | The object
  action | The action

Returns:
  Returns true if the user has permission.

bool com::ansys::ingress::connector::model::ModelObject::IsArchived | ( |  | ) | `[inline]`

Determinse if this object is archived or not.

Returns:
  Returns true if the object is archived.

bool com::ansys::ingress::connector::model::ModelObject::IsCheckedOut | ( | string | username | ) | `[inline]`

Determines if this object is checked out to the specified user.

Parameters:

  username | The user

Returns:
  Returns true if the object is checked out

bool com::ansys::ingress::connector::model::ModelObject::IsContainer | ( |  | ) | `[inline]`

Determines if the object is a container or not.

Returns:
  Returns true if the object is a container.

bool com::ansys::ingress::connector::model::ModelObject::IsExpired | ( |  | ) | `[inline]`

Determines if this object is expired or not.

Returns:
  Returns true if the object is expired.

bool com::ansys::ingress::connector::model::ModelObject::IsFile | ( |  | ) | `[inline]`

Determines if this object is a file or not.

Returns:
  Returns true if the object is a file.

bool com::ansys::ingress::connector::model::ModelObject::IsInternal | ( |  | ) | `[inline]`

Determines if this is an internal object or not.

Returns:
  Returns true if the object is internal.

bool com::ansys::ingress::connector::model::ModelObject::IsLocked | ( | string | username | ) | `[inline]`

Determines if this object is locked by the given user or not.

Parameters:

  username | The user

Returns:
  Returns true if the object is locked.

bool com::ansys::ingress::connector::model::ModelObject::IsModified | ( |  | ) | `[inline]`

Determines if this object has been modified.

Returns:
  Returns true if the object is modified.

bool com::ansys::ingress::connector::model::ModelObject::IsPerishable | ( |  | ) | `[inline]`

Determines if this object is perishable and can be deleted if it expires.

Returns:
  Returns true if the object is perishable.

bool com::ansys::ingress::connector::model::ModelObject::IsUnderVersionControl | ( |  | ) | `[inline]`

Determines if this object is under version control or not.

Returns:
  Returns true if the object is under version control.

bool com::ansys::ingress::connector::model::ModelObject::IsUpdateExpirationOnMod | ( |  | ) | `[inline]`

Determines if this object's expiration date is updated when the object is modified.

Returns:
  Returns true if the object's expiration date is updated on modification.

ModelObject com::ansys::ingress::connector::model::ModelObject::RemoveChild | ( | string | name | ) | `[inline]`

Removes a child from this object.

Parameters:

  name | The name of the child to remove

Returns:
  Returns the child that was removed or null if the child does not exist.

void com::ansys::ingress::connector::model::ModelObject::RemoveChildren | ( |  | ) | `[inline]`

Removes all children from this object.

void com::ansys::ingress::connector::model::ModelObject::RemoveProperty | ( | string | name | ) | `[inline]`

Removes a property from this object.

Parameters:

  name | The name of the property to remove

new string com::ansys::ingress::connector::model::ModelObject::Serialize | ( |  | ) | `[inline]`

Serializes this object to XML.

Returns:
  Returns the XML.

static ReferenceDataMapEntry [] com::ansys::ingress::connector::model::ModelObject::SerializeChildren | ( | Dictionary< string, ModelObject >.ValueCollection | valueCollection | ) | `[inline, static]`

Serializes a collection of model objects into references.

Parameters:

  valueCollection | The children to serialize

Returns:
  Returns an array of references.

static MapDataEntry [] com::ansys::ingress::connector::model::ModelObject::SerializeDynamicProperties | ( | Dictionary< string, string > | dictionary | ) | `[inline, static]`

Serializes a dictionary of dynamic properties.

Parameters:

  dictionary | The dictionary to serialize

Returns:
  Returns the serialized properties.

static VariantDataMapEntry [] com::ansys::ingress::connector::model::ModelObject::SerializeProperties | ( | Dictionary< string, Variant > | dictionary | ) | `[inline, static]`

Serializes a dictionary of properties.

Parameters:

  dictionary | The properties

Returns:
  Returns the serialized properties.

void com::ansys::ingress::connector::model::ModelObject::SetContainer | ( | bool | container | ) | `[inline]`

Sets the flag indicating if this object is a container or not.

Parameters:

  container | The value for the flag

void com::ansys::ingress::connector::model::ModelObject::SetFile | ( | bool | file | ) | `[inline]`

Sets the flag indicating if this object is a file or not.

Parameters:

  file | The value for the flag

void com::ansys::ingress::connector::model::ModelObject::SetPermissions | ( | string | action,
|  | IEnumerable< ModelObject > | permissions,
|  | bool | recursive
| ) |  | `[inline]`

Sets permissions on this object for a given action.

Parameters:

  action | The action
  permissions | The permissions
  recursive | If the permssions are recursive for the object's children.

void com::ansys::ingress::connector::model::ModelObject::SetPermissions | ( | string | action,
|  | IEnumerable< ModelObject > | permissions
| ) |  | `[inline]`

Sets permissions on this object for a given action.

Parameters:

  action | The action
  permissions | The permissions

void com::ansys::ingress::connector::model::ModelObject::SetRetentionPolicy | ( | bool | perishable,
|  | bool | updateExpirationOnMod,
|  | DateTime | expirationDate
| ) |  | `[inline]`

Sets the retention policy of this object.

Parameters:

  perishable | If the object is perishable
  updateExpirationOnMod | If the expiration date is updated on modification
  expirationDate | The object's expiration date

void com::ansys::ingress::connector::model::ModelObject::SetStatusFlags | ( | string | statusFlag,
|  | bool | on
| ) |  | `[inline]`

Sets a status flag on this object on or off.

Parameters:

  statusFlag | The flag
  on | The value

void com::ansys::ingress::connector::model::ModelObject::SetUserProperties | ( | Dictionary< string, Variant > | props | ) | `[inline]`

Sets this object's user properties.

Parameters:

  props | The properties

void com::ansys::ingress::connector::model::ModelObject::SetUserProperty | ( | string | name,
|  | Variant | value
| ) |  | `[inline]`

Sets a user property.

Parameters:

  name | The name of the property
  value | The value

void com::ansys::ingress::connector::model::ModelObject::SetVersioningProperties | ( | Dictionary< string, Variant > | props | ) | `[inline]`

Sets this object's versioning properties.

Parameters:

  props | The properties

## Member Data Documentation

const string com::ansys::ingress::connector::model::ModelObject::SYSTEM_PATH = "/System"

The path to the EKM "System" folder.

const string com::ansys::ingress::connector::model::ModelObject::VERSIONS_NAME = "Versions"

The version control folder.

const string com::ansys::ingress::connector::model::ModelObject::VERSIONS_PATH = "/" + VERSIONS_NAME

The path to the version control folder.

## Property Documentation

Dictionary<string, ModelObject> com::ansys::ingress::connector::model::ModelObject::Children`[get, set]`

The children of this object.

Connection com::ansys::ingress::connector::model::ModelObject::connection`[get, set]`

The connection object associated with this object.

ModelObjectData com::ansys::ingress::connector::model::ModelObject::Data`[get, set, protected]`

Backing data for this object.

Dictionary<string, string> com::ansys::ingress::connector::model::ModelObject::DynamicProperties`[get, set]`

The user defined properties of this object.

Dictionary<string, Variant> com::ansys::ingress::connector::model::ModelObject::Properties`[get, set]`

The property values for this object.

ModelSpec com::ansys::ingress::connector::model::ModelObject::Spec`[get, set]`

The object's specification.

string com::ansys::ingress::connector::model::ModelObject::Typename`[get, set]`

The object's type name.

The documentation for this class was generated from the following file:

- ModelObject.cs

All Classes Namespaces Functions Variables Enumerations Properties