Package com.boomi.connector.testutil
Class SimpleProfileSchema
- java.lang.Object
-
- com.boomi.connector.testutil.SimpleProfileSchema
-
- All Implemented Interfaces:
ProfileSchema,Closeable,AutoCloseable
public class SimpleProfileSchema extends Object implements ProfileSchema
-
-
Constructor Summary
Constructors Constructor Description SimpleProfileSchema(InputStream schema, ContentType contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()InputStreamgetSchema()Retrieves the schema content as an input stream.ContentTypegetType()Gets the content type of the schema profile associated with the operation.
-
-
-
Constructor Detail
-
SimpleProfileSchema
public SimpleProfileSchema(InputStream schema, ContentType contentType)
-
-
Method Detail
-
getSchema
public InputStream getSchema()
Description copied from interface:ProfileSchemaRetrieves the schema content as an input stream. The returned stream contains the actual schema definition (e.g., XSD, JSON Schema) that describes the structure of data for the associated connector profile. Callers of this method are responsible for properly closing the returned InputStream to prevent resource leaks. Use try-with-resources or ensure close() is called in a finally block.- Specified by:
getSchemain interfaceProfileSchema- Returns:
- an InputStream containing the schema content, or null if data associated with the schema could not be retrieved.
-
getType
public ContentType getType()
Description copied from interface:ProfileSchemaGets the content type of the schema profile associated with the operation. The content type indicates the format and structure of the schema, which helps the platform determine how to process and validate data according to this schema. ReturnsContentType.NONEif the type is not xml or json- Specified by:
getTypein interfaceProfileSchema- Returns:
- the
ContentTypeof the profile associated with this schema
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-