org.jboss.jca.core.mdr

## Class SimpleMetadataRepository

- java.lang.Object
- - org.jboss.jca.core.mdr.SimpleMetadataRepository

- All Implemented Interfaces:
    org.jboss.jca.core.spi.mdr.MetadataRepository

      public class SimpleMetadataRepository
      extends java.lang.Object
      implements org.jboss.jca.core.spi.mdr.MetadataRepository

  A simple implementation of the metadata repository
  Author:
    Jesper Pedersen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleMetadataRepository()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.jboss.jca.common.api.metadata.resourceadapter.Activation` | `getActivation(java.lang.String uniqueId)` Get the Activation metadata for a resource adapter deployment
    `java.util.Map<java.lang.String,java.util.List<java.lang.String>>` | `getJndiMappings(java.lang.String uniqueId)` Get the JNDI mappings for a unique id
    `org.jboss.jca.common.api.metadata.spec.Connector` | `getResourceAdapter(java.lang.String uniqueId)` Get the metadata for a resource adapter
    `java.util.Set<java.lang.String>` | `getResourceAdapters()` Get the resource adapters unique ids registered
    `java.io.File` | `getRoot(java.lang.String uniqueId)` Get the root for a resource adapter deployment
    `boolean` | `hasJndiMappings(java.lang.String uniqueId)` Check if there exists JNDI mappings for a unique id
    `boolean` | `hasResourceAdapter(java.lang.String uniqueId)` Check if there exists a resource adapter for a unique id
    `void` | `registerJndiMapping(java.lang.String uniqueId, java.lang.String clz, java.lang.String jndi)` Register a JNDI mapping for a unique id
    `void` | `registerResourceAdapter(java.lang.String uniqueId, java.io.File root, org.jboss.jca.common.api.metadata.spec.Connector md, org.jboss.jca.common.api.metadata.resourceadapter.Activation a)` Register a resource adapter template
    `java.lang.String` | `toString()` String representation
    `void` | `unregisterJndiMapping(java.lang.String uniqueId, java.lang.String clz, java.lang.String jndi)` Unregister a JNDI mapping for a unique id
    `void` | `unregisterResourceAdapter(java.lang.String uniqueId)` Unregister a resource adapter template

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleMetadataRepository

          public SimpleMetadataRepository()

      Constructor

  - ### Method Detail

    - #### registerResourceAdapter

          public void registerResourceAdapter(java.lang.String uniqueId,
                                              java.io.File root,
                                              org.jboss.jca.common.api.metadata.spec.Connector md,
                                              org.jboss.jca.common.api.metadata.resourceadapter.Activation a)
                                       throws org.jboss.jca.core.spi.mdr.AlreadyExistsException

      Register a resource adapter template
      Specified by:
        `registerResourceAdapter` in interface `org.jboss.jca.core.spi.mdr.MetadataRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
        `root` - The deployment root
        `md` - The connector metadata
        `a` - The Activation metadata
      Throws:
        `org.jboss.jca.core.spi.mdr.AlreadyExistsException` - Thrown if the unique id is already registered

    - #### unregisterResourceAdapter

          public void unregisterResourceAdapter(java.lang.String uniqueId)
                                         throws org.jboss.jca.core.spi.mdr.NotFoundException

      Unregister a resource adapter template
      Specified by:
        `unregisterResourceAdapter` in interface `org.jboss.jca.core.spi.mdr.MetadataRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
      Throws:
        `org.jboss.jca.core.spi.mdr.NotFoundException` - Thrown if the unique id isn't registered

    - #### hasResourceAdapter

          public boolean hasResourceAdapter(java.lang.String uniqueId)

      Check if there exists a resource adapter for a unique id
      Specified by:
        `hasResourceAdapter` in interface `org.jboss.jca.core.spi.mdr.MetadataRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
      Returns:
        True if there is a resource adapter; otherwise false

    - #### getResourceAdapter

          public org.jboss.jca.common.api.metadata.spec.Connector getResourceAdapter(java.lang.String uniqueId)
                                                                              throws org.jboss.jca.core.spi.mdr.NotFoundException

      Get the metadata for a resource adapter
      Specified by:
        `getResourceAdapter` in interface `org.jboss.jca.core.spi.mdr.MetadataRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
      Returns:
        The metadata
      Throws:
        `org.jboss.jca.core.spi.mdr.NotFoundException` - Thrown if the unique id isn't registered

    - #### getResourceAdapters

          public java.util.Set<java.lang.String> getResourceAdapters()

      Get the resource adapters unique ids registered
      Specified by:
        `getResourceAdapters` in interface `org.jboss.jca.core.spi.mdr.MetadataRepository`
      Returns:
        The unique ids

    - #### getRoot

          public java.io.File getRoot(java.lang.String uniqueId)
                               throws org.jboss.jca.core.spi.mdr.NotFoundException

      Get the root for a resource adapter deployment
      Specified by:
        `getRoot` in interface `org.jboss.jca.core.spi.mdr.MetadataRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
      Returns:
        The root
      Throws:
        `org.jboss.jca.core.spi.mdr.NotFoundException` - Thrown if the unique id isn't registered

    - #### getActivation

          public org.jboss.jca.common.api.metadata.resourceadapter.Activation getActivation(java.lang.String uniqueId)
                                                                                     throws org.jboss.jca.core.spi.mdr.NotFoundException

      Get the Activation metadata for a resource adapter deployment
      Specified by:
        `getActivation` in interface `org.jboss.jca.core.spi.mdr.MetadataRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
      Returns:
        The metadata
      Throws:
        `org.jboss.jca.core.spi.mdr.NotFoundException` - Thrown if the unique id isn't registered

    - #### registerJndiMapping

          public void registerJndiMapping(java.lang.String uniqueId,
                                          java.lang.String clz,
                                          java.lang.String jndi)

      Register a JNDI mapping for a unique id
      Specified by:
        `registerJndiMapping` in interface `org.jboss.jca.core.spi.mdr.MetadataRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
        `clz` - The fully qualified class name
        `jndi` - The JNDI name

    - #### unregisterJndiMapping

          public void unregisterJndiMapping(java.lang.String uniqueId,
                                            java.lang.String clz,
                                            java.lang.String jndi)
                                     throws org.jboss.jca.core.spi.mdr.NotFoundException

      Unregister a JNDI mapping for a unique id
      Specified by:
        `unregisterJndiMapping` in interface `org.jboss.jca.core.spi.mdr.MetadataRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
        `clz` - The fully qualified class name
        `jndi` - The JNDI name
      Throws:
        `org.jboss.jca.core.spi.mdr.NotFoundException` - Thrown if the unique id isn't registered

    - #### hasJndiMappings

          public boolean hasJndiMappings(java.lang.String uniqueId)

      Check if there exists JNDI mappings for a unique id
      Specified by:
        `hasJndiMappings` in interface `org.jboss.jca.core.spi.mdr.MetadataRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
      Returns:
        True if there are mappings; otherwise false

    - #### getJndiMappings

          public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getJndiMappings(java.lang.String uniqueId)
                                                                                           throws org.jboss.jca.core.spi.mdr.NotFoundException

      Get the JNDI mappings for a unique id
      Specified by:
        `getJndiMappings` in interface `org.jboss.jca.core.spi.mdr.MetadataRepository`
      Parameters:
        `uniqueId` - An unique id that represents the deployment
      Returns:
        The mappings
      Throws:
        `org.jboss.jca.core.spi.mdr.NotFoundException` - Thrown if the unique id isn't registered

    - #### toString

          public java.lang.String toString()

      String representation
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        The string

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)