C# Class TSF.UmlToolingFramework.Wrappers.EA.Model

Inheritance: TSF.UmlToolingFramework.UML.UMLModel
Afficher le fichier Open project: GeertBellekens/Enterprise-Architect-Add-in-Framework Class Usage Examples

Méthodes publiques

Méthode Description
Model ( ) : System
Model ( global eaRepository ) : System
SQLQuery ( string sqlQuery ) : XmlDocument
addTab ( string title, string fullControlName ) : UserControl
addTaggedValueType ( string tagName, string tagDescription, string tagDetail ) : void
addWindow ( string title, string fullControlName ) : UserControl
adviseChange ( TSF.UmlToolingFramework.UML element ) : void
escapeSQLString ( string sqlString ) : string

escapes a literal string so it can be inserted using sql

executeSQL ( string SQLString ) : void
formatXPath ( string xpath ) : string

formats an xpath accordign to the type of database. For Oracle and Firebird it should be ALL CAPS

getAttributeByID ( int attributID ) : Attribute

gets the Attribute with the given ID

getAttributeTagByGUID ( string GUID ) : AttributeTag
getAttributeTagsWithValue ( string value ) : List
getAttributeWrapperByGUID ( string GUID ) : AttributeWrapper

gets the Attribute with the given GUID

getAttributesByQuery ( string SQLQuery ) : List
getCurrentRootPackage ( ) : TSF.UmlToolingFramework.UML.Classes.Kernel.Package
getDiagramByGUID ( string diagramGUID ) : Diagram
getDiagramByID ( int diagramID ) : Diagram
getDiagramsByQuery ( string sqlGetDiagrams ) : List
getElementByGUID ( string GUIDstring ) : TSF.UmlToolingFramework.UML.Classes.Kernel.Element
getElementTagByGUID ( string GUID ) : ElementTag
getElementTagsWithValue ( string value ) : HashSet
getElementWrapperByGUID ( string GUID ) : ElementWrapper

Finds the EA.Element with the given GUID and returns an EAElementwrapper wrapping this element.

getElementWrapperByID ( int id ) : ElementWrapper
getElementWrapperByPackageID ( int packageID ) : ElementWrapper
getElementWrappersByQuery ( string sqlQuery ) : List

returns the elementwrappers that are identified by the Object_ID's returned by the given query

getItemFromFQN ( string FQN ) : TSF.UmlToolingFramework.UML.Extended.UMLItem
getItemFromGUID ( string guidString ) : TSF.UmlToolingFramework.UML.Extended.UMLItem

finds the item with the given guid

getOperationByGUID ( string guid ) : Operation
getOperationByID ( int operationID ) : Operation
getOperationTagByGUID ( string GUID ) : OperationTag
getOperationTagsWithValue ( string value ) : List
getOperationsByQuery ( string SQLQuery ) : List
getParameterByGUID ( string GUID ) : ParameterWrapper

gets the parameter by its GUID. This is a tricky one since EA doesn't provide a getParameterByGUID operation we have to first get the operation, then loop the pamarameters to find the one with the GUID

getParameterTagByGUID ( string GUID ) : ParameterTag
getParameterTagsWithValue ( string value ) : List
getParametersByQuery ( string SQLQuery ) : List
getQuickSearchResults ( string searchText, int maxResults, bool elements, bool operations, bool attributes, bool diagrams ) : List

returns the first [maxresults] items who's name starts with the given searchText

getRelationByGUID ( string relationGUID ) : ConnectorWrapper
getRelationByID ( int relationID ) : ConnectorWrapper
getRelationTagByGUID ( string GUID ) : RelationTag
getRelationTagsWithValue ( string value ) : List
getRelationsByQuery ( string SQLQuery ) : List
getRepositoryType ( ) : RepositoryType

Gets the Repository type for this model

getRoootPackage ( TSF.UmlToolingFramework.UML item ) : RootPackage
getTaggedValuesWithValue ( string value ) : HashSet
getUserSelectedElement ( List allowedTypes ) : TSF.UmlToolingFramework.UML.Classes.Kernel.Element

Lets the user select an element from the model and return that

getUserSelectedPackage ( ) : TSF.UmlToolingFramework.UML.Classes.Kernel.Package

Show a dialog to the user that allows him to select a package from the model

initialize ( global eaRepository ) : void

(re)initialises this model with the given ea repository object

openProperties ( TSF.UmlToolingFramework.UML item ) : void

opens the properties dialog for this item

refreshDiagram ( Diagram diagram ) : void
reloadDiagrams ( ) : void

reload the open diagrams

saveDiagram ( TSF.UmlToolingFramework.UML diagram ) : void
saveElement ( TSF.UmlToolingFramework.UML element ) : void
saveOpenedDiagram ( TSF.UmlToolingFramework.UML diagram ) : void

saves unsaved changes to an opened diagram

selectDiagram ( Diagram diagram ) : void
showTab ( string title ) : void
showWindow ( string title ) : void
taggedValueTypeExists ( string tagName ) : bool

checks if a tagged value type with the given name exists in the current model

toArrayList ( IEnumerable collection ) : ArrayList
toObject ( object someObject ) : Object

Private Methods

Méthode Description
convertFromEANotes ( string EANotes, string newFormat ) : string
convertToEANotes ( string externalNotes, string externalFormat ) : string
formatSQL ( string sqlQuery ) : string

sets the correct wildcards depending on the database type. changes '%' into '*' if on ms access and _ into ? on msAccess

formatSQLFunctions ( string sqlQuery ) : string

Operation to translate SQL functions in there equivalents in different sql syntaxes supported functions: - lcase -> lower in T-SQL (SQLSVR and ASA)

formatSQLTop ( string sqlQuery ) : string

limiting the number of results in an sql query is different on different platforms. "SELECT TOP N" is used on SQLSVR ADOJET ASA OPENEDGE ACCESS2007 "WHERE rowcount <= N" is used on ORACLE "LIMIT N" is used on MYSQL POSTGRES This operation will replace the SELECT TOP N by the appropriate sql syntax depending on the repositorytype

replaceSQLWildCards ( string sqlQuery ) : string

replace the wildcards in the given sql query string to match either MSAccess or ANSI syntax

Method Details

Model() public méthode

public Model ( ) : System
Résultat System

Model() public méthode

public Model ( global eaRepository ) : System
eaRepository global
Résultat System

SQLQuery() public méthode

public SQLQuery ( string sqlQuery ) : XmlDocument
sqlQuery string
Résultat System.Xml.XmlDocument

addTab() public méthode

public addTab ( string title, string fullControlName ) : UserControl
title string
fullControlName string
Résultat System.Windows.Forms.UserControl

addTaggedValueType() public méthode

public addTaggedValueType ( string tagName, string tagDescription, string tagDetail ) : void
tagName string
tagDescription string
tagDetail string
Résultat void

addWindow() public méthode

public addWindow ( string title, string fullControlName ) : UserControl
title string
fullControlName string
Résultat System.Windows.Forms.UserControl

adviseChange() public méthode

public adviseChange ( TSF.UmlToolingFramework.UML element ) : void
element TSF.UmlToolingFramework.UML
Résultat void

escapeSQLString() public méthode

escapes a literal string so it can be inserted using sql
public escapeSQLString ( string sqlString ) : string
sqlString string the string to be escaped
Résultat string

executeSQL() public méthode

public executeSQL ( string SQLString ) : void
SQLString string
Résultat void

formatXPath() public méthode

formats an xpath accordign to the type of database. For Oracle and Firebird it should be ALL CAPS
public formatXPath ( string xpath ) : string
xpath string the xpath to format
Résultat string

getAttributeByID() public méthode

gets the Attribute with the given ID
public getAttributeByID ( int attributID ) : Attribute
attributID int the attribute's ID
Résultat Attribute

getAttributeTagByGUID() public méthode

public getAttributeTagByGUID ( string GUID ) : AttributeTag
GUID string
Résultat AttributeTag

getAttributeTagsWithValue() public méthode

public getAttributeTagsWithValue ( string value ) : List
value string
Résultat List

getAttributeWrapperByGUID() public méthode

gets the Attribute with the given GUID
public getAttributeWrapperByGUID ( string GUID ) : AttributeWrapper
GUID string the attribute's GUID
Résultat AttributeWrapper

getAttributesByQuery() public méthode

public getAttributesByQuery ( string SQLQuery ) : List
SQLQuery string
Résultat List

getCurrentRootPackage() public méthode

public getCurrentRootPackage ( ) : TSF.UmlToolingFramework.UML.Classes.Kernel.Package
Résultat TSF.UmlToolingFramework.UML.Classes.Kernel.Package

getDiagramByGUID() public méthode

public getDiagramByGUID ( string diagramGUID ) : Diagram
diagramGUID string
Résultat Diagram

getDiagramByID() public méthode

public getDiagramByID ( int diagramID ) : Diagram
diagramID int
Résultat Diagram

getDiagramsByQuery() public méthode

public getDiagramsByQuery ( string sqlGetDiagrams ) : List
sqlGetDiagrams string
Résultat List

getElementByGUID() public méthode

public getElementByGUID ( string GUIDstring ) : TSF.UmlToolingFramework.UML.Classes.Kernel.Element
GUIDstring string
Résultat TSF.UmlToolingFramework.UML.Classes.Kernel.Element

getElementTagByGUID() public méthode

public getElementTagByGUID ( string GUID ) : ElementTag
GUID string
Résultat ElementTag

getElementTagsWithValue() public méthode

public getElementTagsWithValue ( string value ) : HashSet
value string
Résultat HashSet

getElementWrapperByGUID() public méthode

Finds the EA.Element with the given GUID and returns an EAElementwrapper wrapping this element.
public getElementWrapperByGUID ( string GUID ) : ElementWrapper
GUID string the GUID of the element
Résultat ElementWrapper

getElementWrapperByID() public méthode

public getElementWrapperByID ( int id ) : ElementWrapper
id int
Résultat ElementWrapper

getElementWrapperByPackageID() public méthode

public getElementWrapperByPackageID ( int packageID ) : ElementWrapper
packageID int
Résultat ElementWrapper

getElementWrappersByQuery() public méthode

returns the elementwrappers that are identified by the Object_ID's returned by the given query
public getElementWrappersByQuery ( string sqlQuery ) : List
sqlQuery string query returning the Object_ID's
Résultat List

getItemFromFQN() public méthode

public getItemFromFQN ( string FQN ) : TSF.UmlToolingFramework.UML.Extended.UMLItem
FQN string
Résultat TSF.UmlToolingFramework.UML.Extended.UMLItem

getItemFromGUID() public méthode

finds the item with the given guid
public getItemFromGUID ( string guidString ) : TSF.UmlToolingFramework.UML.Extended.UMLItem
guidString string the string with the guid
Résultat TSF.UmlToolingFramework.UML.Extended.UMLItem

getOperationByGUID() public méthode

public getOperationByGUID ( string guid ) : Operation
guid string
Résultat Operation

getOperationByID() public méthode

public getOperationByID ( int operationID ) : Operation
operationID int
Résultat Operation

getOperationTagByGUID() public méthode

public getOperationTagByGUID ( string GUID ) : OperationTag
GUID string
Résultat OperationTag

getOperationTagsWithValue() public méthode

public getOperationTagsWithValue ( string value ) : List
value string
Résultat List

getOperationsByQuery() public méthode

public getOperationsByQuery ( string SQLQuery ) : List
SQLQuery string
Résultat List

getParameterByGUID() public méthode

gets the parameter by its GUID. This is a tricky one since EA doesn't provide a getParameterByGUID operation we have to first get the operation, then loop the pamarameters to find the one with the GUID
public getParameterByGUID ( string GUID ) : ParameterWrapper
GUID string the parameter's GUID
Résultat ParameterWrapper

getParameterTagByGUID() public méthode

public getParameterTagByGUID ( string GUID ) : ParameterTag
GUID string
Résultat ParameterTag

getParameterTagsWithValue() public méthode

public getParameterTagsWithValue ( string value ) : List
value string
Résultat List

getParametersByQuery() public méthode

public getParametersByQuery ( string SQLQuery ) : List
SQLQuery string
Résultat List

getQuickSearchResults() public méthode

returns the first [maxresults] items who's name starts with the given searchText
public getQuickSearchResults ( string searchText, int maxResults, bool elements, bool operations, bool attributes, bool diagrams ) : List
searchText string the first part of the name to match
maxResults int the number of results required
elements bool indicates whether elements should be selected
operations bool indicates whether operations should be selected
attributes bool indicates whether attributes should be selected
diagrams bool indicates whether diagrams should be selected
Résultat List

getRelationByGUID() public méthode

public getRelationByGUID ( string relationGUID ) : ConnectorWrapper
relationGUID string
Résultat ConnectorWrapper

getRelationByID() public méthode

public getRelationByID ( int relationID ) : ConnectorWrapper
relationID int
Résultat ConnectorWrapper

getRelationTagByGUID() public méthode

public getRelationTagByGUID ( string GUID ) : RelationTag
GUID string
Résultat RelationTag

getRelationTagsWithValue() public méthode

public getRelationTagsWithValue ( string value ) : List
value string
Résultat List

getRelationsByQuery() public méthode

public getRelationsByQuery ( string SQLQuery ) : List
SQLQuery string
Résultat List

getRepositoryType() public méthode

Gets the Repository type for this model
public getRepositoryType ( ) : RepositoryType
Résultat RepositoryType

getRoootPackage() public méthode

public getRoootPackage ( TSF.UmlToolingFramework.UML item ) : RootPackage
item TSF.UmlToolingFramework.UML
Résultat RootPackage

getTaggedValuesWithValue() public méthode

public getTaggedValuesWithValue ( string value ) : HashSet
value string
Résultat HashSet

getUserSelectedElement() public méthode

Lets the user select an element from the model and return that
public getUserSelectedElement ( List allowedTypes ) : TSF.UmlToolingFramework.UML.Classes.Kernel.Element
allowedTypes List the subtypes of UML.Classes.Kernel.Element that should be used as a filter
Résultat TSF.UmlToolingFramework.UML.Classes.Kernel.Element

getUserSelectedPackage() public méthode

Show a dialog to the user that allows him to select a package from the model
public getUserSelectedPackage ( ) : TSF.UmlToolingFramework.UML.Classes.Kernel.Package
Résultat TSF.UmlToolingFramework.UML.Classes.Kernel.Package

initialize() public méthode

(re)initialises this model with the given ea repository object
public initialize ( global eaRepository ) : void
eaRepository global the ea repository object
Résultat void

openProperties() public méthode

opens the properties dialog for this item
public openProperties ( TSF.UmlToolingFramework.UML item ) : void
item TSF.UmlToolingFramework.UML the item to open the properties dialog for
Résultat void

refreshDiagram() public méthode

public refreshDiagram ( Diagram diagram ) : void
diagram Diagram
Résultat void

reloadDiagrams() public méthode

reload the open diagrams
public reloadDiagrams ( ) : void
Résultat void

saveDiagram() public méthode

public saveDiagram ( TSF.UmlToolingFramework.UML diagram ) : void
diagram TSF.UmlToolingFramework.UML
Résultat void

saveElement() public méthode

public saveElement ( TSF.UmlToolingFramework.UML element ) : void
element TSF.UmlToolingFramework.UML
Résultat void

saveOpenedDiagram() public méthode

saves unsaved changes to an opened diagram
public saveOpenedDiagram ( TSF.UmlToolingFramework.UML diagram ) : void
diagram TSF.UmlToolingFramework.UML the diagram that is currently opened
Résultat void

selectDiagram() public méthode

public selectDiagram ( Diagram diagram ) : void
diagram Diagram
Résultat void

showTab() public méthode

public showTab ( string title ) : void
title string
Résultat void

showWindow() public méthode

public showWindow ( string title ) : void
title string
Résultat void

taggedValueTypeExists() public méthode

checks if a tagged value type with the given name exists in the current model
public taggedValueTypeExists ( string tagName ) : bool
tagName string the name of the tagged value type
Résultat bool

toArrayList() public méthode

public toArrayList ( IEnumerable collection ) : ArrayList
collection IEnumerable
Résultat ArrayList

toObject() public méthode

public toObject ( object someObject ) : Object
someObject object
Résultat Object