Class PromoterAPI

  • java.lang.Object
  • All Implemented Interfaces:, PromoterConstants

    public class PromoterAPI
    extends java.lang.Object
    implements PromoterConstants
    API functions for exporting, importing, promoting, finding and deleting UDDI entities.

    Export is the process of getting UDDI entities from a source registry, specified by a list of keys, and persisting them to a UDDI entity definition file, or EDF, which is in XML format.

    Import is the process of reading an EDF and transforming UDDI entities represented in XML format to UDDI4J objects and loading these in a target registry, with the entity keys as specified in the EDF. Note the target registry must be a UDDI V3 IBM WebSpher UDDI Registry.

    Promote is the single step process which combines the export and import steps, which can, but does not require, the writing of the EDF.

    Find is the process of performing inquiry operation or operations on the source registry, and using the matching results to generate a list of UDDI entity keys. The list of keys can be used as input to the export, promote and delte functions.

    Delete is the process of deleting UDDI entities from the target registry, as specified by a list of UDDI entity keys.

    Usage of this class to perform these functions is typically to:

    1. Create a Configuration and populate it from a Properties object or from a configuration properties file
    2. Create a PromoterAPI passing the Configuration in the constructor
    3. For keys based functions (export, delete and promote), set the keys by supplying a UddiEntityKeys, the location of a keys file, or, for one entity, by specifying an entity type and a key value
    4. Invoke the corresponding method for the function required: exportEntities, promoteEntities(boolean), importEntities, deleteEntities or extractKeysFromInquiry(FindTModel, FindBusiness, FindService, FindBinding, FindRelatedBusinesses)

    • Constructor Detail

      • PromoterAPI

        public PromoterAPI( config)
        Constructor taking a Configuration.

        config -
    • Method Detail

      • setUddiEntities

        public void setUddiEntities(UddiEntityKeys entityKeys)
        Sets the list of UDDI entity keys to be exported, promoted or deleted.

        entityKeys -
      • setUddiEntities

        public void setUddiEntities(java.lang.String keysFilePath)
        Reads the list of UDDI entity keys from the specified file.

        keysFilePath -
      • setUddiEntity

        public void setUddiEntity(java.lang.String entityType,
                         java.lang.String entityKey)
        Specifys a single UDDI entity to be exported, promoted or deleted.

        entityType - Can be one of 'tModel', 'business', 'service' or 'binding'.
        entityKey -
      • getConfiguration

        public getConfiguration()
        Returns the configuration.

      • setConfiguration

        public void setConfiguration( configuration)
        Sets the configuration.

        configuration -
      • exportEntities

        public void exportEntities()
        Drives the export of UDDI entities from the source registry.

        The UDDI entities are persisted to an XML file, the entity definition file (EDF), which can be later used to import into a target UDDI registry.

        The EDF is generated according to the UDDI Utility Tools schema, promoter.xsd.

      • extractKeysFromInquiry

        public void extractKeysFromInquiry(org.uddi4j.request.FindTModel findTModel,
                                  org.uddi4j.request.FindBusiness findBusiness,
                                  org.uddi4j.request.FindService findService,
                                  org.uddi4j.request.FindBinding findBinding,
                                  org.uddi4j.request.FindRelatedBusinesses findRelatedBusiness)
        Performs inquiry requests on the source registry and uses the results to set the UddiEntityKeys in PromoterAPI that can be used by the exportEntities, promoteEntities and deleteEntities methods.

        The five possible arguments are all UDDI4J find objects and are optional. To omit a find object just set the argument to null. For example, to invoke this method specifying only business and tModel search criteria, the invocation would be similar to:

        promoterAPI.extractKeysFromInquiry(findTModel, findBusiness, null, null, null);

        findTModel -
        findBusiness -
        findService -
        findBinding -
        findRelatedBusiness -
      • importEntities

        public void importEntities()
        Drives the import of UDDI entities to target registry, where the source of UDDI entities is an entity definition file in XML format, according to the UDDI Utility Tools schema, promoter.xsd.

      • promoteEntities

        public void promoteEntities(boolean writeXML)
        Drives the single step process of extracting UDDI entities from the source registry and importing them to the target registry.

        In this case, although an intermediate XML file may be written, it is not used for the import step.

        writeXML - true will generate an intermediate EDF.
      • deleteEntities

        public void deleteEntities()
        Drives deletion of entities from the target registry.

IBM WebSphere Application ServerTM
Release 9.0