public class ConnectorFactoryUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static ConnectorModel |
parseModelXml(java.io.InputStream in)
Parses the connector model XML and returns the equivalent
ConnectorModel object. |
static byte[] |
readIcon(java.lang.Class<?> callingClass,
java.lang.String relativePath)
Reads the connector icon, which is expected to be packaged in the same connector JAR.
|
static ConnectorModel |
readModelXmlAndIcon(java.lang.Class<?> callingClass,
java.lang.String xmlRelativePath,
java.lang.String iconRelativePath)
Parses the connector model XML and also reads the connector icon, then returns a
ConnectorModel object
containing both the model data and the icon bytes. |
public static byte[] readIcon(java.lang.Class<?> callingClass, java.lang.String relativePath)
callingClass
- The class trying to load the icon (e.g. connector factory class)relativePath
- Path of the icon file relative to the calling classpublic static ConnectorModel parseModelXml(java.io.InputStream in) throws java.io.IOException
ConnectorModel
object.in
- XML input streamConnectorModel
objectjava.io.IOException
public static ConnectorModel readModelXmlAndIcon(java.lang.Class<?> callingClass, java.lang.String xmlRelativePath, java.lang.String iconRelativePath)
ConnectorModel
object
containing both the model data and the icon bytes.callingClass
- The class trying to load the icon (e.g. connector factory class)xmlRelativePath
- Path of the model XML file relative to the calling classiconRelativePath
- Path of the icon file relative to the calling classConnectorModel
object