org.eclipse.datatools.connectivity.oda.design.util
Class DesignUtil

java.lang.Object
  extended byorg.eclipse.datatools.connectivity.oda.design.util.DesignUtil

public class DesignUtil
extends java.lang.Object

[Provisional] 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 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

validateObject

public static void validateObject(EObject eObject)
                           throws java.lang.IllegalStateException
Validates the given EMF object is valid and has all required elements.

Parameters:
eObject - an EMF object
Throws:
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 object

diagnoseObject

public static Diagnostic diagnoseObject(EObject eObject)
Diagnoses the given EMF object, and returns the diagnostic result found.

Parameters:
eObject - an EMF object
Returns:
the diagnostic result, or null if no diagnostic result found

convertDataSourceProperties

public 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.

Parameters:
dataSourceDesign -
Returns:

convertDesignProperties

public 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.

Parameters:
designProps - the ODA design properties to convert from
Returns:
converted properties in a java.util.Properties collection

convertToDesignProperties

public 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.

Parameters:
utilProps - the java.util.Properties collection to convert from
Returns:
converted properties in a design properties collection

validateRequestSession

public static java.lang.String validateRequestSession(DesignSessionRequest requestSession)
                                               throws java.lang.IllegalStateException
Validates the specified design session request. If valid, returns the request's ODA data source element id.

Parameters:
requestSession -
Returns:
Throws:
java.lang.IllegalStateException - if specified session request is invalid

validateDataSourceDesign

public static void validateDataSourceDesign(DataSourceDesign dataSourceDesign)
                                     throws java.lang.IllegalStateException
Validates the specified data source design instance.

Parameters:
dataSourceDesign -
Throws:
java.lang.IllegalStateException - if specified design is invalid

convertPathToFile

public 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.

Parameters:
filePath - the string representation of a file
Returns:
the abstract representation of a file pathname, or null if the specified argument is null, invalid or the file does not exist
Since:
3.0.4
See Also:
convertFileToPath(File)

convertFileToPath

public 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.

Parameters:
aFile - the abstract representation of a file pathname
Returns:
the string representation of the specified file, or null if the specified argument is null
Since:
3.0.4
See Also:
convertPathToFile(String)


Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.