|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.datatools.connectivity.oda.design.util.DesignUtil
public class DesignUtil
An utility class to handle the ODA Design API objects.
Method Summary | |
---|---|
static java.util.Properties |
convertDataSourceProperties(DataSourceDesign dataSourceDesign)
Converts the public and private properties defined in an ODA data source design definition, and returns in a combined java.util.Properties collection. |
static java.util.Properties |
convertDesignProperties(Properties designProps)
Converts the given design properties defined in an ODA data source or data set design definition, to a java.util.Properties collection. |
static java.lang.String |
convertFileToPath(java.io.File aFile)
Converts the specified file to a string representation that can be persisted in an oda design model. |
static java.io.File |
convertPathToFile(java.lang.String filePath)
Converts the specified string representation of a file pathname, persisted in an oda design model, to its abstract representation. |
static Properties |
convertToDesignProperties(java.util.Properties utilProps)
Converts the given java.util.Properties collection to ODA design properties that can be applied in an ODA data source or data set design definition. |
static Diagnostic |
diagnoseObject(EObject eObject)
Diagnoses the given EMF object, and returns the diagnostic result found. |
static OdaDesignSession |
loadOdaDesignSession(java.io.File resourceFile)
An utility method to load the specified resource file, and returns the OdaDesignSession instance found in the file. |
static void |
saveOdaDesignSession(OdaDesignSession odaDesignSession,
java.io.File outputFile)
An utility method to save the specified OdaDesignSession instance in the specified output file. |
static void |
validateDataSourceDesign(DataSourceDesign dataSourceDesign)
Validates the specified data source design instance. |
static void |
validateObject(EObject eObject)
Validates the given EMF object is valid and has all required elements. |
static java.lang.String |
validateRequestSession(DesignSessionRequest requestSession)
Validates the specified design session request. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void validateObject(EObject eObject) throws java.lang.IllegalStateException
eObject
- an EMF object
java.lang.IllegalStateException
- if the given object is not valid
and have error diagnostics;
the exception thrown includes all error and warning
diagnostic messages found in given objectpublic static Diagnostic diagnoseObject(EObject eObject)
eObject
- an EMF object
public static java.util.Properties convertDataSourceProperties(DataSourceDesign dataSourceDesign)
dataSourceDesign
-
public static java.util.Properties convertDesignProperties(Properties designProps)
designProps
- the ODA design properties to convert from
public static Properties convertToDesignProperties(java.util.Properties utilProps)
utilProps
- the java.util.Properties collection to convert from
public static java.lang.String validateRequestSession(DesignSessionRequest requestSession) throws java.lang.IllegalStateException
requestSession
-
java.lang.IllegalStateException
- if specified session request is invalidpublic static void validateDataSourceDesign(DataSourceDesign dataSourceDesign) throws java.lang.IllegalStateException
dataSourceDesign
-
java.lang.IllegalStateException
- if specified design is invalidpublic static java.io.File convertPathToFile(java.lang.String filePath)
filePath
- the string representation of a file
convertFileToPath(File)
public static java.lang.String convertFileToPath(java.io.File aFile)
aFile
- the abstract representation of a file pathname
convertPathToFile(String)
public static void saveOdaDesignSession(OdaDesignSession odaDesignSession, java.io.File outputFile) throws java.io.IOException, java.lang.IllegalArgumentException
outputFile
- an output file; any existing content would get overwrittenodaDesignSession
- the design session instance to save
java.io.IOException
java.lang.IllegalArgumentException
public static OdaDesignSession loadOdaDesignSession(java.io.File resourceFile) throws java.io.IOException, java.lang.IllegalArgumentException
resourceFile
- a resource file to load from
java.io.IOException
java.lang.IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |