The ODK API identifies the valid content types that an ODA can support with the ContentType class. This class contains static member variables for each of the supported content types, as Table 31 shows.
Table 31. How content types are represented
Content type | ContentType member variable |
---|---|
Business object definitions | BusinessObject |
Binary files | BinaryFile |
The ContentType class simulates an enumerated list of the supported ODA content types. For example, a content-type object that represents business object definitions would use only the BusinessObject member variable, as follows:
ContentType.BusinessObject
To provide support for generation of a particular content type, an ODA must implement the appropriate content-generation interface, as listed in Table 17. Every ODA must support generation of business object definitions. It can optionally also support generation of binary files as its content. The content-generation interfaces contain the kinds of methods listed in Table 32. As part of the implementation of the content-generation interface, you must implement these methods.
Methods in a content-generation interfaceTo determine which content-generation interface's method to call, Business Object Wizard checks the ODA's metadata. One of the components of this metadata is the supportedContent member variable, which is initialized by the AgentMetaData() constructor, called within the ODA's getMetaData() method. For more information, see Initializing ODA metadata.
Table 33 shows the information that this chapter provides on how to implement methods in a content-generation interface.
Table 33. How to develop a content-generation interface
Content-generation interface | For more information |
---|---|
IGeneratesBoDefs | Generating business object definitions as content |
IGeneratesBinFiles | Generating binary files as content |