Examples of BusinessEntity


Examples of org.apache.juddi.datatype.business.BusinessEntity

    BusinessServices services = new BusinessServices();
    services.addBusinessService(service);
    services.addBusinessService(service);

    BusinessEntity business = new BusinessEntity();
    business.setBusinessKey("6c0ac186-d36b-4b81-bd27-066a5fe0fc1f");
    business.setAuthorizedName("Steve Viens");
    business.setOperator("jUDDI");
    business.addName(new Name("businessNm"));
    business.addName(new Name("businessNm2","en"));
    business.addDescription(new Description("business whatever"));
    business.addDescription(new Description("business whatever too","fr"));
    business.setDiscoveryURLs(discURLs);
    business.setCategoryBag(catBag);
    business.setIdentifierBag(idBag);
    business.setContacts(contacts);
    business.setBusinessServices(services);

    BusinessEntityExt businessExt = new BusinessEntityExt();
    businessExt.setBusinessEntity(business);

    System.out.println();
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

      // generate a BusinessServices
      BusinessServices services = new BusinessServices();
      services.addBusinessService(service);

      // generate a BusinessEntity
      BusinessEntity businessEntity = new BusinessEntity();
      businessEntity.setBusinessKey(null);
      businessEntity.setNameVector(nameVector);
      businessEntity.setBusinessServices(services);

      // generate a BusinessEntity Vector
      Vector businessEntityVector = new Vector();
      businessEntityVector.add(businessEntity);
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

    BusinessServices services = new BusinessServices();
    services.addBusinessService(service);
    services.addBusinessService(service);

    BusinessEntity business = new BusinessEntity();
    business.setBusinessKey("6c0ac186-d36b-4b81-bd27-066a5fe0fc1f");
    business.setAuthorizedName("Steve Viens");
    business.setOperator("jUDDI");
    business.addName(new Name("businessNm"));
    business.addName(new Name("businessNm2","en"));
    business.addDescription(new Description("business whatever"));
    business.addDescription(new Description("business whatever too","fr"));
    business.setDiscoveryURLs(discURLs);
    business.setCategoryBag(catBag);
    business.setIdentifierBag(idBag);
    business.setContacts(contacts);
    business.setBusinessServices(services);

    SaveBusiness request = new SaveBusiness();
    request.setAuthInfo(authInfo);
    request.addBusinessEntity(business);
    request.addBusinessEntity(business);
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

   *
   */
  public BusinessEntity fetchBusiness(String businessKey)
    throws org.apache.juddi.error.RegistryException
  {
    BusinessEntity business = null;

    try
    {
      if ((businessKey != null) && (connection != null))
      {
        business = BusinessEntityTable.select(businessKey,connection);
        business.setNameVector(BusinessNameTable.select(businessKey,connection));
        business.setDescriptionVector(BusinessDescTable.select(businessKey,connection));

        Vector idVector = BusinessIdentifierTable.select(businessKey,connection);
        if (idVector.size() > 0)
        {
          IdentifierBag identifierBag = new IdentifierBag();
          identifierBag.setKeyedReferenceVector(idVector);
          business.setIdentifierBag(identifierBag);
        }

        Vector catVector = BusinessCategoryTable.select(businessKey,connection);
        if (catVector.size() > 0)
        {
          CategoryBag categoryBag = new CategoryBag();
          categoryBag.setKeyedReferenceVector(catVector);
          business.setCategoryBag(categoryBag);
        }

        DiscoveryURLs discoveryURLs = new DiscoveryURLs();
        discoveryURLs.setDiscoveryURLVector(DiscoveryURLTable.select(businessKey,connection));
        business.setDiscoveryURLs(discoveryURLs);

        // 'select' the BusinessEntity's Contact objects
        Vector contactList = ContactTable.select(businessKey,connection);
        for (int contactID=0; contactID<contactList.size(); contactID++)
        {
          Contact contact = (Contact)contactList.elementAt(contactID);
          contact.setPhoneVector(PhoneTable.select(businessKey,contactID,connection));
          contact.setEmailVector(EmailTable.select(businessKey,contactID,connection));

          Vector addressList = AddressTable.select(businessKey,contactID,connection);
          for (int addressID=0; addressID<addressList.size(); addressID++)
          {
            Address address = (Address)addressList.elementAt(addressID);
            address.setAddressLineVector(AddressLineTable.select(businessKey,contactID,addressID,connection));
          }
          contact.setAddressVector(addressList);
        }

        Contacts contacts = new Contacts();
        contacts.setContactVector(contactList);
        business.setContacts(contacts);

        // 'fetch' the BusinessEntity's BusinessService objects
        Vector serviceVector = fetchServiceByBusinessKey(businessKey);
        BusinessServices services = new BusinessServices();
        services.setBusinessServiceVector(serviceVector);
        business.setBusinessServices(services);
      }
    }
    catch(java.sql.SQLException sqlex)
    {
      throw new RegistryException(sqlex);
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

   *
   */
  public BusinessEntity fetchBusiness(String businessKey)
    throws org.apache.juddi.error.RegistryException
  {
    BusinessEntity business = null;

    try
    {
      if ((businessKey != null) && (connection != null))
      {
        business = BusinessEntityTable.select(businessKey,connection);
        business.setNameVector(BusinessNameTable.select(businessKey,connection));
        business.setDescriptionVector(BusinessDescTable.select(businessKey,connection));

        IdentifierBag identifierBag = new IdentifierBag();
        identifierBag.setKeyedReferenceVector(BusinessIdentifierTable.select(businessKey,connection));
        business.setIdentifierBag(identifierBag);

        CategoryBag categoryBag = new CategoryBag();
        categoryBag.setKeyedReferenceVector(BusinessCategoryTable.select(businessKey,connection));
        business.setCategoryBag(categoryBag);

        DiscoveryURLs discoveryURLs = new DiscoveryURLs();
        discoveryURLs.setDiscoveryURLVector(DiscoveryURLTable.select(businessKey,connection));
        business.setDiscoveryURLs(discoveryURLs);

        // 'select' the BusinessEntity's Contact objects
        Vector contactList = ContactTable.select(businessKey,connection);
        for (int contactID=0; contactID<contactList.size(); contactID++)
        {
          Contact contact = (Contact)contactList.elementAt(contactID);
          contact.setPhoneVector(PhoneTable.select(businessKey,contactID,connection));
          contact.setEmailVector(EmailTable.select(businessKey,contactID,connection));

          Vector addressList = AddressTable.select(businessKey,contactID,connection);
          for (int addressID=0; addressID<addressList.size(); addressID++)
          {
            Address address = (Address)addressList.elementAt(addressID);
            address.setAddressLineVector(AddressLineTable.select(businessKey,contactID,addressID,connection));
          }
          contact.setAddressVector(addressList);
        }

        Contacts contacts = new Contacts();
        contacts.setContactVector(contactList);
        business.setContacts(contacts);

        // 'fetch' the BusinessEntity's BusinessService objects
        Vector serviceVector = fetchServiceByBusinessKey(businessKey);
        BusinessServices services = new BusinessServices();
        services.setBusinessServiceVector(serviceVector);
        business.setBusinessServices(services);
      }
    }
    catch(java.sql.SQLException sqlex)
    {
      throw new RegistryException(sqlex);
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

  {
    BusinessEntityExt businessExt = (BusinessEntityExt)object;
    Element element = parent.getOwnerDocument().createElementNS(null,TAG_NAME);
    AbstractHandler handler = null;

    BusinessEntity business = businessExt.getBusinessEntity();
    if (business != null)
    {
      handler = maker.lookup(BusinessEntityHandler.TAG_NAME);
      handler.marshal(business,element);
    }
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

    BusinessServices services = new BusinessServices();
    services.addBusinessService(service);
    services.addBusinessService(service);

    BusinessEntity business = new BusinessEntity();
    business.setBusinessKey("6c0ac186-d36b-4b81-bd27-066a5fe0fc1f");
    business.setAuthorizedName("Steve Viens");
    business.setOperator("jUDDI");
    business.addName(new Name("businessNm"));
    business.addName(new Name("businessNm2","en"));
    business.addDescription(new Description("business whatever"));
    business.addDescription(new Description("business whatever too","fr"));
    business.setDiscoveryURLs(discURLs);
    business.setCategoryBag(catBag);
    business.setIdentifierBag(idBag);
    business.setContacts(contacts);
    business.setBusinessServices(services);

    BusinessEntityExt businessExt = new BusinessEntityExt();
    businessExt.setBusinessEntity(business);

    System.out.println();
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

    if (businessVector == null)
      return null;
   
    for (int i=0; i<businessVector.size(); i++)
    {
      BusinessEntity business = (BusinessEntity)businessVector.elementAt(i);
     
      CategoryBag catBag = business.getCategoryBag();
      if (catBag != null)
      {
        Vector refs = catBag.getKeyedReferenceVector();
        if ((refs != null) && (refs.size() > 0))
          validate(refs);
      }
   
      IdentifierBag idBag = business.getIdentifierBag();
      if (idBag != null)
      {
        Vector refs = idBag.getKeyedReferenceVector();
        if ((refs != null) && (refs.size() > 0))
          validate(refs);
      }
     
      BusinessServices services = business.getBusinessServices();
      if (services != null)
      {
        Vector serviceVector = services.getBusinessServiceVector();
        if (serviceVector != null)
          validateServiceVector(serviceVector);
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

    BusinessServices services = new BusinessServices();
    services.addBusinessService(service);
    services.addBusinessService(service);

    BusinessEntity object = new BusinessEntity();
    object.setBusinessKey("6c0ac186-d36b-4b81-bd27-066a5fe0fc1f");
    object.setAuthorizedName("Guest");
    object.setOperator("jUDDI");
    object.addName(new Name("businessNm"));
    object.addName(new Name("businessNm2","en"));
    object.addDescription(new Description("business whatever"));
    object.addDescription(new Description("business whatever too","fr"));
    object.setDiscoveryURLs(discURLs);
    object.setCategoryBag(catBag);
    object.setIdentifierBag(idBag);
    object.setContacts(contacts);
    object.setBusinessServices(services);

    return object;

  }
View Full Code Here

Examples of org.apache.juddi.datatype.business.BusinessEntity

    UUIDGen uuidgen = UUIDGenFactory.getUUIDGen();

    try
    {
      String businessKey = uuidgen.uuidgen();
      BusinessEntity business = new BusinessEntity();
      business.setBusinessKey(businessKey);
      business.setAuthorizedName("Steve Viens");
      business.setOperator("www.jUDDI.org");

      String publisherID = "sviens";

      // begin a new transaction
      txn.begin(connection);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.