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
      // nothing that requires validation has been identified

      // declare some 'work' variables
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

    if ((publisherID == null) || (publisherID.length() == 0))
      throw new UnknownUserException("publisherID = "+publisherID);

    try
    {
      Publisher publisher = PublisherTable.select(publisherID,connection);
      if (publisher == null)
        throw new UnknownUserException("publisherID = "+publisherID);
      else
        return publisher.isAdmin();
    }
    catch(java.sql.SQLException sqlex)
    {
      log.error(sqlex.getMessage());
      throw new RegistryException(sqlex);
View Full Code Here

  {

    AuthInfo authInfo = new AuthInfo();
    authInfo.setValue("6f157513-844e-4a95-a856-d257e6ba9726");

    Publisher publisher = new Publisher();
    publisher.setPublisherID("bcrosby");
    publisher.setName("Bing Crosby");
    publisher.setEmailAddress("bcrosby@juddi.org");
    publisher.setAdmin(true);

    SavePublisher object = new SavePublisher();
    object.setAuthInfo(authInfo);
    object.addPublisher(publisher);
    object.addPublisher(publisher);
View Full Code Here

    if ((publisherID == null) || (publisherID.length() == 0))
      throw new UnknownUserException("publisherID = "+publisherID);

    try
    {
      Publisher publisher = PublisherTable.select(publisherID,connection);
      if (publisher == null)
        throw new UnknownUserException("publisherID = "+publisherID);
      else
        return publisher.isEnabled();
    }
    catch(java.sql.SQLException sqlex)
    {
      log.error(sqlex.getMessage());
      throw new RegistryException(sqlex);
View Full Code Here

   *
   */
  public Publisher getAuthTokenPublisher(String token)
    throws org.apache.juddi.error.RegistryException
  {
    Publisher publisher = null;

    if (token != null)
    {
      try {
        publisher = AuthTokenTable.selectPublisher(token,connection);
View Full Code Here

    if ((publisherID != null) && (connection != null))
    {
      try
      {
        Publisher publisher = PublisherTable.select(publisherID,connection);
        info = new PublisherInfo();
        info.setPublisherID(publisherID);
        info.setNameValue(publisher.getName());
      }
      catch(java.sql.SQLException sqlex)
      {
        throw new RegistryException(sqlex);
      }
View Full Code Here

    this.maker = maker;
  }

  public RegistryObject unmarshal(Element element)
  {
    Publisher obj = new Publisher();
    Vector nodeList = null;
    AbstractHandler handler = null;

    // Attributes (required)
    obj.setPublisherID(element.getAttribute("publisherID"));
    obj.setName(element.getAttribute("publisherName"));

    String admin = element.getAttribute("admin");
    if ((admin != null) && (admin.length() > 0))
      obj.setAdminValue(admin);
    else
      obj.setAdmin(false);

    String enabled = element.getAttribute("enabled");
    if ((enabled != null) && (enabled.length() > 0))
      obj.setEnabledValue(enabled);
    else
      obj.setAdmin(false);

    String emailAddress = element.getAttribute("emailAddress");
    if ((emailAddress != null) && (emailAddress.length() > 0))
      obj.setEmailAddress(emailAddress);

    // Text Node Value
    // {none}

    // Child Elements
View Full Code Here

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    Publisher publisher = (Publisher)object;
    Element element = parent.getOwnerDocument().createElementNS(null,TAG_NAME);
    AbstractHandler handler = null;

    // Attributes (required)
    String publisherID = publisher.getPublisherID();
    if ((publisherID != null) && (publisherID.length() > 0))
      element.setAttribute("publisherID",publisherID);
    else
      element.setAttribute("publisherID","");

    String publisherName = publisher.getName();
    if ((publisherName != null) && (publisherName.length() > 0))
      element.setAttribute("publisherName",publisherName);
    else
      element.setAttribute("publisherName","");

    element.setAttribute("admin",String.valueOf(publisher.isAdmin()));
    element.setAttribute("enabled",String.valueOf(publisher.isEnabled()));

    String emailAddress = publisher.getEmailAddress();
    if ((emailAddress != null) && (emailAddress.length() > 0))
      element.setAttribute("emailAddress",emailAddress);

    // Text Node Value
    // {none}
View Full Code Here

    HandlerMaker maker = HandlerMaker.getInstance();
    AbstractHandler handler = maker.lookup(PublisherHandler.TAG_NAME);
    Element parent = XMLUtils.newRootElement();
    Element child = null;

    Publisher publisher = new Publisher();
    publisher.setPublisherID("bcrosby");
    publisher.setName("Bing Crosby");
    publisher.setEmailAddress("bcrosby@juddi.org");
    publisher.setAdmin(true);
    publisher.setEnabled(true);

    System.out.println();

    RegistryObject regObject = publisher;
    handler.marshal(regObject,parent);
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.