com.ibm.broker.rest

Interface Model



  • public interface Model
    An interface that describes a model in an API. A model has a name, and a schema describing that model.
    Since:
    IBM Integration Bus v10
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void addListener(java.beans.PropertyChangeListener listener)
      Add an event listener.
      java.lang.String getName()
      Get the name of this model, for example "Customer".
      com.ibm.broker.rest.schema.Schema getSchema()
      Get the Schema for this model.
      java.lang.String getSchemaAsString(com.ibm.broker.rest.schema.SchemaType schemaType)
      Get the schema for this model as a string.
      void removeListener(java.beans.PropertyChangeListener listener)
      Remove an event listener.
      Model setName(java.lang.String name)
      Set the name of this model, for example "Customer".
      Model setSchema(com.ibm.broker.rest.schema.Schema schema)
      Set the Schema for this model.
      Model setSchema(com.ibm.broker.rest.schema.SchemaType schemaType, java.lang.String schema)
      Set the schema for this model.
    • Method Detail

      • getName

        java.lang.String getName()
        Get the name of this model, for example "Customer".
        Returns:
        the name of this model.
      • setName

        Model setName(java.lang.String name)
               throws ApiException
        Set the name of this model, for example "Customer".
        Parameters:
        name - the new name of this model.
        Returns:
        this model.
        Throws:
        ApiException - if the name could not be changed.
      • getSchemaAsString

        java.lang.String getSchemaAsString(com.ibm.broker.rest.schema.SchemaType schemaType)
        Get the schema for this model as a string.
        Parameters:
        schemaType - the type of the schema to retrieve, for example JSON Schema.
        Returns:
        the schema for this model as a string, or null if no schema is available.
      • getSchema

        com.ibm.broker.rest.schema.Schema getSchema()
                                             throws ApiException
        Get the Schema for this model.
        Returns:
        the Schema.
        Throws:
        ApiException
      • setSchema

        Model setSchema(com.ibm.broker.rest.schema.Schema schema)
                 throws ApiException
        Set the Schema for this model.
        Parameters:
        schema - the desired Schema.
        Returns:
        the Model object.
        Throws:
        ApiException
      • setSchema

        Model setSchema(com.ibm.broker.rest.schema.SchemaType schemaType,
                        java.lang.String schema)
                 throws ApiException
        Set the schema for this model.
        Parameters:
        schemaType - the type of the schema to set, for example JSON Schema.
        schema - the schema as a string.
        Returns:
        this model.
        Throws:
        ApiException - if the schema could not be changed.
      • addListener

        void addListener(java.beans.PropertyChangeListener listener)
        Add an event listener.
        Parameters:
        listener -
      • removeListener

        void removeListener(java.beans.PropertyChangeListener listener)
        Remove an event listener.
        Parameters:
        listener -