Class ObjectDefinition
- java.lang.Object
-
- com.boomi.connector.api.ObjectDefinition
-
- All Implemented Interfaces:
Serializable
public class ObjectDefinition extends Object implements Serializable
The actual specification of the structure of an object type within the context of a Connector operation and object role.Java class for ObjectDefinition complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="ObjectDefinition"> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <any processContents='lax'/> <element name="cookie" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="extraSchema" type="{}ExtraSchema" maxOccurs="unbounded" minOccurs="0"/> <element name="extraSchemas" type="{}ExtraSchemas" minOccurs="0"/> <element name="jsonSchema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <sequence> <element name="fieldSpecFields" type="{}FieldSpecField" maxOccurs="unbounded" minOccurs="0"/> </sequence> </sequence> <attribute name="elementName" type="{http://www.w3.org/2001/XMLSchema}normalizedString" /> <attribute name="respectMinOccurs" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> <attribute name="inputType" type="{}ContentType" default="xml" /> <attribute name="outputType" type="{}ContentType" default="xml" /> </restriction> </complexContent> </complexType>- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringcookieprotected StringelementNamestatic ObjectDefinitionEMPTY_INSTANCEprotected List<ExtraSchema>extraSchemaListprotected ExtraSchemasextraSchemasprotected List<FieldSpecField>fieldSpecFieldsprotected ContentTypeinputTypeprotected StringjsonSchemaprotected ContentTypeoutputTypeprotected BooleanrespectMinOccursprotected Elementschema
-
Constructor Summary
Constructors Constructor Description ObjectDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectDefinitioncopy()Deep copies the fields of the this model into a new instance of this class and returns it.ObjectDefinitioncopy(boolean isDeep)Copies the fields of the this model (optionally deeply) into a new instance of this class and returns it.protected ObjectDefinitioncopy(ObjectDefinition nobj, boolean isDeep)Copies the fields of the this model (optionally deeply) into the given instance and returns it.booleanequals(Object o)StringgetCookie()Optional object definition specific information which will be passed into subsequent operations using this definition viaOperationContext.getObjectDefinitionCookie(com.boomi.connector.api.ObjectDefinitionRole).StringgetElementName()Optional name identifying the top-level element within the given schema document which is the actual object definition.List<ExtraSchema>getExtraSchemaList()A list of ExtraSchema instances.ExtraSchemasgetExtraSchemas()Gets the value of the extraSchemas property.List<FieldSpecField>getFieldSpecFields()Lists any additional field(s) that can be used as a field selection or query sort/filter field but will not be included in the profile.ContentTypegetInputType()The type of input data that this object type expects.StringgetJsonSchema()Primary JSON Schema document which describes the object type.ContentTypegetOutputType()The type of output data that this object type returns.ElementgetSchema()Primary XML Schema document which describes the object typeinthashCode()booleanisRespectMinOccurs()When specified as true, this attribute will generate profiles that respect the minOccurs attribute of the schema, generating empty elements when no data is present.ExtraSchemassafeGetExtraSchemas()Returns the current extraSchemas property value if non-null, otherwiseExtraSchemas.EMPTY_INSTANCE.voidsetCookie(String value)Sets the value of the cookie property.voidsetElementName(String value)Sets the value of the elementName property.voidsetExtraSchemas(ExtraSchemas value)Sets the value of the extraSchemas property.voidsetInputType(ContentType value)Sets the value of the inputType property.voidsetJsonSchema(String value)Sets the value of the jsonSchema property.voidsetOutputType(ContentType value)Sets the value of the outputType property.voidsetRespectMinOccurs(Boolean value)Sets the value of the respectMinOccurs property.voidsetSchema(Element value)Sets the value of the schema property.StringtoString()ObjectDefinitionwithCookie(String newValue)Sets the cookie property to the given newValue and returns this instance.ObjectDefinitionwithElementName(String newValue)Sets the elementName property to the given newValue and returns this instance.ObjectDefinitionwithExtraSchemaList(ExtraSchema... newValues)Adds the given newValues to the current extraSchemaList property List and returns this instance.ObjectDefinitionwithExtraSchemaList(Collection<? extends ExtraSchema> newValues)Adds the given newValues to the current extraSchemaList property List and returns this instance.ObjectDefinitionwithExtraSchemas(ExtraSchemas newValue)Sets the extraSchemas property to the given newValue and returns this instance.ObjectDefinitionwithFieldSpecFields(FieldSpecField... newValues)Adds the given newValues to the current fieldSpecFields property List and returns this instance.ObjectDefinitionwithFieldSpecFields(Collection<? extends FieldSpecField> newValues)Adds the given newValues to the current fieldSpecFields property List and returns this instance.ObjectDefinitionwithInputType(ContentType newValue)Sets the inputType property to the given newValue and returns this instance.ObjectDefinitionwithJsonSchema(String newValue)Sets the jsonSchema property to the given newValue and returns this instance.ObjectDefinitionwithOutputType(ContentType newValue)Sets the outputType property to the given newValue and returns this instance.ObjectDefinitionwithRespectMinOccurs(Boolean newValue)Sets the respectMinOccurs property to the given newValue and returns this instance.ObjectDefinitionwithSchema(Element newValue)Sets the schema property to the given newValue and returns this instance.
-
-
-
Field Detail
-
schema
protected Element schema
-
cookie
protected String cookie
-
extraSchemaList
protected List<ExtraSchema> extraSchemaList
-
extraSchemas
protected ExtraSchemas extraSchemas
-
jsonSchema
protected String jsonSchema
-
fieldSpecFields
protected List<FieldSpecField> fieldSpecFields
-
elementName
protected String elementName
-
respectMinOccurs
protected Boolean respectMinOccurs
-
inputType
protected ContentType inputType
-
outputType
protected ContentType outputType
-
EMPTY_INSTANCE
public static final ObjectDefinition EMPTY_INSTANCE
-
-
Method Detail
-
getSchema
public Element getSchema()
Primary XML Schema document which describes the object type- Returns:
- possible object is
Element
-
setSchema
public void setSchema(Element value)
Sets the value of the schema property.- Parameters:
value- allowed object isElement
-
getCookie
public String getCookie()
Optional object definition specific information which will be passed into subsequent operations using this definition viaOperationContext.getObjectDefinitionCookie(com.boomi.connector.api.ObjectDefinitionRole). This may contain any additional information necessary for the connector operation. The length of this string is restricted byAtomConfig.getMaxObjectTypeCookieLength().- Returns:
- possible object is
String
-
setCookie
public void setCookie(String value)
Sets the value of the cookie property.- Parameters:
value- allowed object isString
-
getExtraSchemaList
public List<ExtraSchema> getExtraSchemaList()
A list of ExtraSchema instances.Gets the value of the extraSchemaList property.
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a
setmethod for the extraSchemaList property.For example, to add a new item, do as follows:
getExtraSchemaList().add(newItem);Objects of the following type(s) are allowed in the list
ExtraSchema
-
getExtraSchemas
public ExtraSchemas getExtraSchemas()
Gets the value of the extraSchemas property.- Returns:
- possible object is
ExtraSchemas
-
setExtraSchemas
public void setExtraSchemas(ExtraSchemas value)
Sets the value of the extraSchemas property.- Parameters:
value- allowed object isExtraSchemas
-
getJsonSchema
public String getJsonSchema()
Primary JSON Schema document which describes the object type. The Connector SDK supports V4 of the JSON Scheam specification ("http://json-schema.org/draft-04/schema#")- Returns:
- possible object is
String
-
setJsonSchema
public void setJsonSchema(String value)
Sets the value of the jsonSchema property.- Parameters:
value- allowed object isString
-
getFieldSpecFields
public List<FieldSpecField> getFieldSpecFields()
Lists any additional field(s) that can be used as a field selection or query sort/filter field but will not be included in the profile. Any fields defined here will take precedence over fields defined in a schema.Gets the value of the fieldSpecFields property.
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a
setmethod for the fieldSpecFields property.For example, to add a new item, do as follows:
getFieldSpecFields().add(newItem);Objects of the following type(s) are allowed in the list
FieldSpecField
-
getElementName
public String getElementName()
Optional name identifying the top-level element within the given schema document which is the actual object definition. This allows one common schema document to be reused for multiple object definitions. If this is not provided, the first top-level element found in the document will be used.- Returns:
- possible object is
String
-
setElementName
public void setElementName(String value)
Sets the value of the elementName property.- Parameters:
value- allowed object isString
-
isRespectMinOccurs
public boolean isRespectMinOccurs()
When specified as true, this attribute will generate profiles that respect the minOccurs attribute of the schema, generating empty elements when no data is present.- Returns:
- possible object is
Boolean
-
setRespectMinOccurs
public void setRespectMinOccurs(Boolean value)
Sets the value of the respectMinOccurs property.- Parameters:
value- allowed object isBoolean
-
getInputType
public ContentType getInputType()
The type of input data that this object type expects.- Returns:
- possible object is
ContentType
-
setInputType
public void setInputType(ContentType value)
Sets the value of the inputType property.- Parameters:
value- allowed object isContentType
-
getOutputType
public ContentType getOutputType()
The type of output data that this object type returns.- Returns:
- possible object is
ContentType
-
setOutputType
public void setOutputType(ContentType value)
Sets the value of the outputType property.- Parameters:
value- allowed object isContentType
-
copy
public ObjectDefinition copy()
Deep copies the fields of the this model into a new instance of this class and returns it.
-
copy
public ObjectDefinition copy(boolean isDeep)
Copies the fields of the this model (optionally deeply) into a new instance of this class and returns it.
-
copy
protected ObjectDefinition copy(ObjectDefinition nobj, boolean isDeep)
Copies the fields of the this model (optionally deeply) into the given instance and returns it.
-
withSchema
public ObjectDefinition withSchema(Element newValue)
Sets the schema property to the given newValue and returns this instance.
-
withCookie
public ObjectDefinition withCookie(String newValue)
Sets the cookie property to the given newValue and returns this instance.
-
withExtraSchemaList
public ObjectDefinition withExtraSchemaList(ExtraSchema... newValues)
Adds the given newValues to the current extraSchemaList property List and returns this instance.
-
withExtraSchemaList
public ObjectDefinition withExtraSchemaList(Collection<? extends ExtraSchema> newValues)
Adds the given newValues to the current extraSchemaList property List and returns this instance.
-
withExtraSchemas
public ObjectDefinition withExtraSchemas(ExtraSchemas newValue)
Sets the extraSchemas property to the given newValue and returns this instance.
-
safeGetExtraSchemas
public ExtraSchemas safeGetExtraSchemas()
Returns the current extraSchemas property value if non-null, otherwiseExtraSchemas.EMPTY_INSTANCE.
-
withJsonSchema
public ObjectDefinition withJsonSchema(String newValue)
Sets the jsonSchema property to the given newValue and returns this instance.
-
withFieldSpecFields
public ObjectDefinition withFieldSpecFields(FieldSpecField... newValues)
Adds the given newValues to the current fieldSpecFields property List and returns this instance.
-
withFieldSpecFields
public ObjectDefinition withFieldSpecFields(Collection<? extends FieldSpecField> newValues)
Adds the given newValues to the current fieldSpecFields property List and returns this instance.
-
withElementName
public ObjectDefinition withElementName(String newValue)
Sets the elementName property to the given newValue and returns this instance.
-
withRespectMinOccurs
public ObjectDefinition withRespectMinOccurs(Boolean newValue)
Sets the respectMinOccurs property to the given newValue and returns this instance.
-
withInputType
public ObjectDefinition withInputType(ContentType newValue)
Sets the inputType property to the given newValue and returns this instance.
-
withOutputType
public ObjectDefinition withOutputType(ContentType newValue)
Sets the outputType property to the given newValue and returns this instance.
-
-