Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source.
   * Copyright 2006, Red Hat Middleware LLC, and individual contributors
   * as indicated by the @author tags. See the copyright.txt file in the
   * distribution for a full listing of individual contributors.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 package org.jboss.resource.metadata;
 
 import java.net.URL;
Connector meta data

Author(s):
Adrian Brock
Version:
$Revision: 76091 $
 
 {
    private static final long serialVersionUID = 7047130842894140222L;

   
The url TODO move to RARDeploymentMetaData
 
    private URL url;
   
   
The version
 
    private String version = "1.0";

   
The vendor name
 
    private String vendorName;

   
The eis type
 
    private String eisType;

   
The resource adapter version
 
    private String raVersion;

   
The resource adapter class
 
    private String raClass;

   
Reauthentication support
 
    private boolean reauthenticationSupport;

   
The license
 
    private LicenseMetaData lmd = new LicenseMetaData();

   
The descriptions
 
    private ConcurrentHashMap descriptions = new ConcurrentHashMap();

   
The connection definitions
 
    private HashSet connectionDefinitions = new HashSet();

   
The transaction support meta data
 
The authentication mechanism meta data
 
The message listeners
 
    private HashSet listeners = new HashSet();

   
The admin objects
 
    private HashSet adminObjects = new HashSet();

   
The security permissions
 
    private HashSet securityPermissions = new HashSet();
 
    public ConnectorMetaData()
    {
       .put(dmd.getLanguage(), dmd);
    }

   
Get the url.

Returns:
the url.
 
    public URL getURL()
    {
       return ;
   }

   
Set the url.

Parameters:
url the url.
   public void setURL(URL url)
   {
      this. = url;
   }

   
Get the connector version

Returns:
the connector version
   public String getVersion()
   {
      return ;
   }

   
Set the connector version

Parameters:
version the connector version
   public void setVersion(String version)
   {
      this. = version;
   }

   
Get the vendor name

Returns:
the vendor name
   public String getVendorName()
   {
      return ;
   }

   
Set the vendor name

Parameters:
vendorName the vendor name
   public void setVendorName(String vendorName)
   {
      this. = vendorName;
   }

   
Get the eis type

Returns:
the eis type
   public String getEISType()
   {
      return ;
   }

   
Set the eis Type

Parameters:
eisType the eis type
   public void setEISType(String eisType)
   {
      this. = eisType;
   }

   
Get the resource adapter version

Returns:
the resource adapter version
   public String getRAVersion()
   {
      return ;
   }

   
Set the resource adapter version

Parameters:
version the resource adapter version
   public void setRAVersion(String version)
   {
      this. = version;
   }

   
Get the resource adapter class

Returns:
the resource adapter class
   public String getRAClass()
   {
      return ;
   }

   
Set the resource adapter class

Parameters:
raClass the resource adapter class
   public void setRAClass(String raClass)
   {
      this. = raClass;
   }

   
Get the reauthentication support

Returns:
the reauthentication support
   public boolean getReauthenticationSupport()
   {
      return ;
   }

   
Set the reauthentication support

Parameters:
reauthenticationSupport true for support, false otherwise
   public void setReauthenticationSupport(boolean reauthenticationSupport)
   {
      this. = reauthenticationSupport;
   }

   
Get the license

Returns:
the license
   {
      return ;
   }

   
Get the description for the default language

Returns:
the description for the default langugage
   {
      // No description using the default locale, just use the first
      if (dgmd == null)
      {
         for (Iterator i = .values().iterator(); i.hasNext();)
         {
            dgmd = (DescriptionGroupMetaDatai.next();
            break;
         }
      }
      return dgmd;
   }
   
   
Get the description for the give language

Parameters:
lang the language
Returns:
the description
   {
      return (DescriptionGroupMetaData.get(lang);
   }
   
   
Add a description

Parameters:
dmd the description
   {
      .put(dmd.getLanguage(), dmd);
   }

   
Get the transaction support

Returns:
the transaction support
   {
      return ;
   }

   
Set the transaction support

Parameters:
tsmd the transaction support
   {
      this. = tsmd;
   }
   
Get the authentication mechanism

Returns:
the authentication mechanism
   {
      return ;
   }

   
Set the authentication mechansim

Parameters:
ammd the authentication mechansim
   {
      this. = ammd;
   }
   
   
Add a connection definition

Parameters:
cdmd the connection definition
   {
      .add(cdmd);
   }
   
   
Get the connection definition

Parameters:
connectionDefinition the idenitifying factory
Returns:
the metadata or null if there isn't one
   public ConnectionDefinitionMetaData getConnectionDefinition(String connectionDefinition)
   {
      for (Iterator i = .iterator(); i.hasNext();)
      {
         if (cdmd.getConnectionFactoryInterfaceClass().equals(connectionDefinition))
            return cdmd;
      }
      return null;
   }
   
   
Add a message listener

Parameters:
mlmd the message listener
   {
      .add(mlmd);
   }
   
   
Get the message listener

Parameters:
messagingType the identifying listener interface
Returns:
the metadata or null if there isn't one
   {
      for (Iterator i = .iterator(); i.hasNext();)
      {
         MessageListenerMetaData mlmd = (MessageListenerMetaDatai.next();
         if (mlmd.getType().equals(messagingType))
            return mlmd;
      }
      return null;
   }
   
   
Add an administered object

Parameters:
aomd the administered object
   public void addAdminObject(AdminObjectMetaData aomd)
   {
      .add(aomd);
   }
   
   
Get the admin object

Parameters:
interfaceName the identifying admin object interface
Returns:
the metadata or null if there isn't one
   public AdminObjectMetaData getAdminObject(String interfaceName)
   {
      for (Iterator i = .iterator(); i.hasNext();)
      {
         AdminObjectMetaData aomd = (AdminObjectMetaDatai.next();
         if (aomd.getAdminObjectInterfaceClass().equals(interfaceName))
            return aomd;
      }
      return null;
   }
   
   {
      return ;
   }
   
   
Add a security permission

Parameters:
spmd the security permission
   {
      .add(spmd);
   }
   
   public String toString()
   {
      StringBuffer buffer = new StringBuffer();
      buffer.append("ConnectorMetaData").append('@');
      buffer.append(Integer.toHexString(System.identityHashCode(this)));
      buffer.append("[version=").append();
      buffer.append(" vendorName=").append();
      buffer.append(" eisType=").append();
      buffer.append(" resourceAdapterVersion=").append();
      buffer.append(" resourceAdapterClass=").append();
      buffer.append(" license=").append();
      buffer.append(" properties=").append(getProperties());
      buffer.append(" descriptions=").append(.values());
      buffer.append(" connectionDefinitions=").append();
      buffer.append(" transactionSupport=").append();
      buffer.append(" authenticationMechanism=").append();
      buffer.append(" reauthenticationSupport=").append();
      buffer.append(" messageListeners=").append();
      buffer.append(" adminobjects=").append();
      buffer.append(" securityPermissions=").append();
      buffer.append(']');
      return buffer.toString();
   }
New to GrepCode? Check out our FAQ X