org.jboss.jca.core.security

## Class DefaultCallback

- java.lang.Object
- - org.jboss.jca.core.security.AbstractCallback
  - - org.jboss.jca.core.security.DefaultCallback

- All Implemented Interfaces:
    java.io.Serializable, org.jboss.jca.core.spi.security.Callback

      public class DefaultCallback
      extends AbstractCallback
      implements org.jboss.jca.core.spi.security.Callback

  A default implementation of the callback security SPI.
  Author:
    Jesper Pedersen
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultCallback()` Constructor
    `DefaultCallback(java.lang.String file)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addGroupMapping(java.lang.String from, java.lang.String to)` Add a group mapping
    `void` | `addPrincipalMapping(java.lang.String from, java.lang.String to)` Add a principal mapping
    `java.lang.String[]` | `getDefaultGroups()` Get the default groups
    `java.security.Principal` | `getDefaultPrincipal()` Get the default principal
    `java.lang.String` | `getDomain()` Get the domain
    `boolean` | `isMappingRequired()` Is an user mapping required
    `java.lang.String` | `mapGroup(java.lang.String name)` Map a group
    `java.security.Principal` | `mapPrincipal(java.lang.String name)` Map a principal
    `void` | `setDefaultGroups(java.lang.String[] value)` Set the default groups
    `void` | `setDefaultPrincipal(java.security.Principal value)` Set the default principal
    `void` | `setDomain(java.lang.String v)` Set the domain
    `void` | `setFile(java.lang.String value)` Set the file name
    `void` | `setMappingRequired(boolean value)` Set the user mapping required
    `void` | `start()` Start
    `void` | `stop()` Stop
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.jboss.jca.core.security.AbstractCallback

      `mapCallbacks`

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

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

    - ### Methods inherited from interface org.jboss.jca.core.spi.security.Callback

      `mapCallbacks`

- - ### Constructor Detail

    - #### DefaultCallback

          public DefaultCallback()

      Constructor

    - #### DefaultCallback

          public DefaultCallback(java.lang.String file)

      Constructor
      Parameters:
        `file` - The file

  - ### Method Detail

    - #### getDomain

          public java.lang.String getDomain()

      Get the domain
      Specified by:
        `getDomain` in interface `org.jboss.jca.core.spi.security.Callback`
      Returns:
        The domain

    - #### setDomain

          public void setDomain(java.lang.String v)

      Set the domain
      Parameters:
        `v` - The value

    - #### isMappingRequired

          public boolean isMappingRequired()

      Is an user mapping required
      Specified by:
        `isMappingRequired` in interface `org.jboss.jca.core.spi.security.Callback`
      Returns:
        The value

    - #### setMappingRequired

          public void setMappingRequired(boolean value)

      Set the user mapping required
      Parameters:
        `value` - The value

    - #### getDefaultPrincipal

          public java.security.Principal getDefaultPrincipal()

      Get the default principal
      Specified by:
        `getDefaultPrincipal` in interface `org.jboss.jca.core.spi.security.Callback`
      Returns:
        The value; `null` if no default principal

    - #### setDefaultPrincipal

          public void setDefaultPrincipal(java.security.Principal value)

      Set the default principal
      Parameters:
        `value` - The value

    - #### getDefaultGroups

          public java.lang.String[] getDefaultGroups()

      Get the default groups
      Specified by:
        `getDefaultGroups` in interface `org.jboss.jca.core.spi.security.Callback`
      Returns:
        The value; `null` if no default groups

    - #### setDefaultGroups

          public void setDefaultGroups(java.lang.String[] value)

      Set the default groups
      Parameters:
        `value` - The value

    - #### mapPrincipal

          public java.security.Principal mapPrincipal(java.lang.String name)

      Map a principal
      Specified by:
        `mapPrincipal` in interface `org.jboss.jca.core.spi.security.Callback`
      Parameters:
        `name` - The principal name
      Returns:
        The value; `null` if no mapping could be found

    - #### addPrincipalMapping

          public void addPrincipalMapping(java.lang.String from,
                                          java.lang.String to)

      Add a principal mapping
      Parameters:
        `from` - The from name
        `to` - The to name

    - #### mapGroup

          public java.lang.String mapGroup(java.lang.String name)

      Map a group
      Specified by:
        `mapGroup` in interface `org.jboss.jca.core.spi.security.Callback`
      Parameters:
        `name` - The group name
      Returns:
        The value; `null` if no mapping could be found

    - #### addGroupMapping

          public void addGroupMapping(java.lang.String from,
                                      java.lang.String to)

      Add a group mapping
      Parameters:
        `from` - The from name
        `to` - The to name

    - #### setFile

          public void setFile(java.lang.String value)

      Set the file name
      Parameters:
        `value` - The value

    - #### start

          public void start()
                     throws java.lang.Throwable

      Start
      Specified by:
        `start` in interface `org.jboss.jca.core.spi.security.Callback`
      Throws:
        `java.lang.Throwable` - Thrown if an error occurs

    - #### stop

          public void stop()
                    throws java.lang.Throwable

      Stop
      Specified by:
        `stop` in interface `org.jboss.jca.core.spi.security.Callback`
      Throws:
        `java.lang.Throwable` - Thrown if an error occurs

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

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