com.sun.grid.ca

## Class GridCAX500Name

- java.lang.Object
- - com.sun.grid.ca.GridCAX500Name

-     public class GridCAX500Name
      extends java.lang.Object

  Helper class for parsing X500 names. Daemon certificates have the form

         ....,UID=sdm_daemon_<username>,CN=<daemon name>,...

  User certificates have the form

         ....,UID=<username>,...

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `SDM_DAEMON_PREFIX`
    `static java.lang.String` | `TYPE_SDM_DAEMON`
    `static java.lang.String` | `TYPE_SGE_DAEMON`
    `static java.lang.String` | `TYPE_USER`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getDaemonName()` Get the name of the daemon
    `java.lang.String` | `getUsername()` Get the username from the x500 name
    `boolean` | `isDaemon()` Determine of the x500 name describes a daemon
    `static GridCAX500Name` | `parse(java.lang.String name)` Parse a x500 name

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

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

- - ### Field Detail

    - #### TYPE_SGE_DAEMON

          public static final java.lang.String TYPE_SGE_DAEMON

      See Also:
        Constant Field Values

    - #### TYPE_SDM_DAEMON

          public static final java.lang.String TYPE_SDM_DAEMON

      See Also:
        Constant Field Values

    - #### TYPE_USER

          public static final java.lang.String TYPE_USER

      See Also:
        Constant Field Values

    - #### SDM_DAEMON_PREFIX

          public static final java.lang.String SDM_DAEMON_PREFIX

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### parse

          public static GridCAX500Name parse(java.lang.String name)
                                      throws GridCAException

      Parse a x500 name
      Parameters:
        `name` - the x500 name
      Returns:
        the grid ca x500 name
      Throws:
        `GridCAException` - if `name` is not a valid grid ca x500 name

    - #### isDaemon

          public boolean isDaemon()

      Determine of the x500 name describes a daemon
      Returns:
        `true` if the x500 name describes a daemon

    - #### getUsername

          public java.lang.String getUsername()

      Get the username from the x500 name
      Returns:
        the name of the user

    - #### getDaemonName

          public java.lang.String getDaemonName()

      Get the name of the daemon
      Returns:
        the name of the damon or `null` of the name does not describe a daemon