Package org.apache.juddi.datatype.publisher

Examples of org.apache.juddi.datatype.publisher.Publisher


    try
    {
      dataStore.beginTrans();

      // validate authentication parameters
      Publisher publisher = getPublisher(authInfo,dataStore);
      String publisherID = publisher.getPublisherID();

      // validate request parameters
      for (int i=0; i<publisherVector.size(); i++)
      {
        // move the Publisher into a form we can work with easily
        Publisher pub = (Publisher)publisherVector.elementAt(i);
        String pubID = pub.getPublisherID();

        // Make sure a PublisherID was specified.
        if ((pubID == null) || (pubID.length() == 0))
          throw new RegistryException("A valid Publisher ID was " +
            "not specified: "+pubID);
      }

      for (int i=0; i<publisherVector.size(); i++)
      {
        // move the Publisher into a form we can work with easily
        Publisher pub = (Publisher)publisherVector.elementAt(i);
        String pubID = pub.getPublisherID();

        // if the publisher account arleady exists then delete it.
        dataStore.deletePublisher(pubID);

        // Everything checks out so let's save it.
View Full Code Here


  {
    // return 'null' if a null publisherID is specified.
    if (publisherID == null)
      return null;

    Publisher publisher = null;
    PreparedStatement statement = null;
    ResultSet resultSet = null;

    try
    {
      statement = connection.prepareStatement(selectSQL);
      statement.setString(1,publisherID);

      log.debug("select from PUBLISHER table:\n\n\t" + selectSQL +
        "\n\t PUBLISHER_ID=" + publisherID + "\n");

      resultSet = statement.executeQuery();
      if (resultSet.next())
      {
        publisher = new Publisher();
        publisher.setPublisherID(publisherID);
        publisher.setName(resultSet.getString(1));//("PUBLISHER_NAME"));
        publisher.setLastName(resultSet.getString(2));//("LAST_NAME"));
        publisher.setFirstName(resultSet.getString(3));//("FIRST_NAME"));
        publisher.setMiddleInit(resultSet.getString(4));//("MIDDLE_INIT"));
        publisher.setWorkPhone(resultSet.getString(5));//("WORK_PHONE"));
        publisher.setMobilePhone(resultSet.getString(6));//("MOBILE_PHONE"));
        publisher.setPager(resultSet.getString(7));//("PAGER"));
        publisher.setEmailAddress(resultSet.getString(8));//("EMAIL_ADDRESS"));
        publisher.setAdminValue(resultSet.getString(9));//("ADMIN"));
        publisher.setEnabledValue(resultSet.getString(10));//("ENABLED"));
      }

      return publisher;
    }
    catch(SQLException sqlex)
View Full Code Here

      {
        // begin a new transaction
        txn.begin(connection);

        // insert a few new publishers
        Publisher publisher = new Publisher();
        publisher.setPublisherID("bcrosby");
        publisher.setName("Bing Crosby");
        publisher.setLastName("Crosby");
        publisher.setFirstName("Bing");
        publisher.setWorkPhone("978.123-4567");
        publisher.setMobilePhone("617-765-9876");
        publisher.setPager("800-123-4655 ID: 501");
        publisher.setEmailAddress("bcrosby@juddi.org");
        publisher.setAdmin(false);
        publisher.setEnabled(false);
        PublisherTable.insert(publisher,connection);

        // select each inserted publisher
        System.out.println(PublisherTable.select("bcrosby",connection));

        publisher.setFirstName("Bart");
        publisher.setName("Barthalomue Crosby");
        publisher.setEnabled(true);
        PublisherTable.update(publisher,connection);

        // select each inserted publisher
        System.out.println(PublisherTable.select("bcrosby",connection));
View Full Code Here

    try
    {
      dataStore.beginTrans();

      // validate authentication parameters
      Publisher publisher = getPublisher(authInfo,dataStore);
      String publisherID = publisher.getPublisherID();

      // validate request parameters
      for (int i=0; i<businessKeyVector.size(); i++)
      {
        // grab the next key from the vector
View Full Code Here

    try
    {
      dataStore.beginTrans();

      // validate authentication parameters
      Publisher publisher = getPublisher(authInfo,dataStore);
      String publisherID = publisher.getPublisherID();

      // validate request parameters
      for (int i=0; i<tModelKeyVector.size(); i++)
      {
        // grab the next key from the vector
View Full Code Here

    try
    {
      dataStore.beginTrans();

      // validate authentication parameters
      Publisher publisher = getPublisher(authInfo,dataStore);
      String publisherID = publisher.getPublisherID();

      // validate request parameters & execute
      // nothing that requires validation has been identified

      // get the PublisherAssertions
View Full Code Here

    try
    {
      dataStore.beginTrans();

      // validates authentication parameters
      Publisher publisher = getPublisher(authInfo,dataStore);
      String publisherID = publisher.getPublisherID();

      // validate request parameters & execute
      // nothing to validate

      // get the AssertionStatusReport
View Full Code Here

   * Verify the authentication parameters.
   */
  protected Publisher getPublisher(AuthInfo authInfo,DataStore dataStore)
    throws RegistryException
  {
    Publisher publisher = null;

    if ((authInfo == null) || (authInfo.getValue() == null))
      throw new AuthTokenRequiredException("authToken: null");

    String authToken = authInfo.getValue();
View Full Code Here

    AbstractHandler handler = maker.lookup(PublisherDetailHandler.TAG_NAME);

    Element parent = XMLUtils.newRootElement();
    Element child = null;

    Publisher publisher = new Publisher();
    publisher.setPublisherID("bcrosby");
    publisher.setName("Bing Crosby");
    publisher.setLastName("Crosby");
    publisher.setFirstName("Bing");
    publisher.setWorkPhone("978.123-4567");
    publisher.setMobilePhone("617-765-9876");
    publisher.setPager("800-123-4655 ID: 501");
    publisher.setEmailAddress("bcrosby@juddi.org");
    publisher.setAdmin(true);

    PublisherDetail detail = new PublisherDetail();
    detail.setGeneric("1.0");
    detail.setOperator("jUDDI.org");
    detail.setTruncated(false);
View Full Code Here

  {
    // a publisherID must be specified.
    if (publisherID == null)
      return null;

    Publisher publisher = null;

    try {
      publisher = PublisherTable.select(publisherID,connection);
    }
    catch(java.sql.SQLException sqlex) {
View Full Code Here

TOP

Related Classes of org.apache.juddi.datatype.publisher.Publisher

Copyright © 2018 www.massapicom. 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.