FileDocCategorySizeDatePackage
EnvironmentRefGroup.javaAPI DocJBoss 4.2.17470Fri Jul 13 20:54:00 BST 2007org.jboss.metamodel.descriptor

EnvironmentRefGroup

public abstract class EnvironmentRefGroup extends Object
author
William DeCoste
version
$Revision: 61248 $

Fields Summary
private static final Logger
log
protected HashMap
ejbLocalRefs
protected HashMap
ejbRefs
protected HashMap
envEntries
protected HashMap
resourceEnvRefs
protected HashMap
resourceRefs
protected HashMap
messageDestinationRefs
protected HashMap
messageDestinationRefsByLink
An index of MessageDestinationRef keyed by message-destination-link values
protected HashMap
serviceRefs
protected HashMap
jndiRefs
protected List
persistenceContextRefs
protected List
persistenceUnitRefs
Constructors Summary
Methods Summary
public voidaddEjbLocalRef(EjbLocalRef ref)

      ejbLocalRefs.put(ref.getEjbRefName(), ref);
   
public voidaddEjbRef(EjbRef ref)

      ejbRefs.put(ref.getEjbRefName(), ref);
   
public voidaddEnvEntry(EnvEntry entry)

      envEntries.put(entry.getEnvEntryName(), entry);
   
public voidaddJndiRef(JndiRef ref)

      jndiRefs.put(ref.getJndiRefName(), ref);
   
public voidaddMessageDestinationRef(MessageDestinationRef ref)

      log.debug("addMessageDestinationRef, "+ref);
      messageDestinationRefs.put(ref.getMessageDestinationRefName(), ref);
      String link = ref.getMessageDestinationLink();
      if( link != null )
      {
         messageDestinationRefsByLink.put(link, ref);
      }
   
public voidaddPersistenceContextRef(PersistenceContextRef ref)

      persistenceContextRefs.add(ref);
   
public voidaddPersistenceUnitRef(PersistenceUnitRef ref)

      persistenceUnitRefs.add(ref);
   
public voidaddResourceEnvRef(ResourceEnvRef envRef)

      resourceEnvRefs.put(envRef.getResRefName(), envRef);
   
public voidaddResourceRef(ResourceRef ref)

      resourceRefs.put(ref.getResRefName(), ref);
   
public voidaddServiceRef(org.jboss.ws.integration.ServiceRefMetaData ref)

      serviceRefs.put(ref.getServiceRefName(), ref);
   
public java.util.CollectiongetEjbLocalRefs()

      return ejbLocalRefs.values();
   
public java.util.CollectiongetEjbRefs()

      return ejbRefs.values();
   
public java.util.CollectiongetEnvEntries()

      return envEntries.values();
   
public java.util.CollectiongetJndiRefs()

      return jndiRefs.values();
   
public MessageDestinationRefgetMessageDestinationRefForLink(java.lang.String link)

      MessageDestinationRef ref = messageDestinationRefsByLink.get(link);
      return ref;
   
public java.util.CollectiongetMessageDestinationRefs()


     
   
      return messageDestinationRefs.values();
   
public java.util.ListgetPersistenceContextRefs()

      return persistenceContextRefs;
   
public java.util.ListgetPersistenceUnitRefs()

      return persistenceUnitRefs;
   
public java.util.CollectiongetResourceEnvRefs()

      return resourceEnvRefs.values();
   
public java.util.CollectiongetResourceRefs()

      return resourceRefs.values();
   
public java.util.CollectiongetServiceRefs()

      return serviceRefs.values();
   
public java.lang.StringtoString()

      StringBuffer sb = new StringBuffer(100);
      return sb.toString();
   
public voidupdateEjbLocalRef(EjbLocalRef updatedRef)

      EjbLocalRef ref = (EjbLocalRef)ejbLocalRefs.get(updatedRef.getEjbRefName());
      if (ref != null)
      {
         ref.setMappedName(updatedRef.getMappedName());
         ref.setIgnoreDependency(updatedRef.isIgnoreDependency());
      }
      else
      {
         ejbLocalRefs.put(updatedRef.getEjbRefName(), updatedRef);
      }
   
public voidupdateEjbRef(EjbRef updatedRef)

      EjbRef ref = (EjbRef)ejbRefs.get(updatedRef.getEjbRefName());
      if (ref != null)
      {
         ref.setMappedName(updatedRef.getMappedName());
         ref.setIgnoreDependency(updatedRef.isIgnoreDependency());
      }
      else
      {
         ejbRefs.put(updatedRef.getEjbRefName(), updatedRef);
      }
   
public voidupdateMessageDestinationRef(MessageDestinationRef updatedRef)

      log.debug("updateMessageDestinationRef, "+updatedRef);
      MessageDestinationRef ref = (MessageDestinationRef)messageDestinationRefs.get(updatedRef.getMessageDestinationRefName());
      if (ref != null)
      {
         ref.setMappedName(updatedRef.getMappedName());
      }
      else
      {
         messageDestinationRefs.put(updatedRef.getMessageDestinationRefName(), updatedRef);
         ref = updatedRef;
      }
   
public voidupdateResourceEnvRef(ResourceEnvRef updatedRef)

      ResourceEnvRef ref = (ResourceEnvRef)resourceEnvRefs.get(updatedRef.getResRefName());
      if (ref != null)
      {
         ref.setMappedName(updatedRef.getMappedName());
      }
      else
      {
         resourceEnvRefs.put(updatedRef.getResRefName(), updatedRef);
      }
   
public voidupdateResourceRef(ResourceRef updatedRef)

      ResourceRef ref = (ResourceRef)resourceRefs.get(updatedRef.getResRefName());
      if (ref != null)
      {
         ref.setMappedName(updatedRef.getMappedName());
         ref.setResUrl(updatedRef.getResUrl());
         ref.setResourceName(updatedRef.getResourceName());
      }
      else
      {
         resourceRefs.put(updatedRef.getResRefName(), updatedRef);
      }