com.novell.service.security
Class XplatIdentity

java.lang.Object
  |
  +--com.novell.java.security.Identity
        |
        +--com.novell.service.security.XplatIdentity

public abstract class XplatIdentity
extends Identity

Represents an authenticatable entity in Xplat, such as a user, an administrator, and so forth. This class is not intended to be instantiated as is, but rather extended by NDS and Bindery identities. This class contains the common functionality of session management for these classes.

 IdentityScope administrativeDomain  = new XplatIdentityScope();
 IdentityScope tree                  = new XplatIdentityScope("KARAH_CORP",administrativeDomain);
 IdentityScope context               = new XplatIdentityScope("Engineering",tree);
 IdentityScope subcontext            = new XplatIdentityScope("Java",context);
 Identity      user                  = new XplatIdentity("Karah",subcontext);
 

See Also:
XplatIdentityScope, BinderyIdentity, NdsIdentity

Constructor Summary
XplatIdentity(Identity identity)
          Construct an identity from an identity.
XplatIdentity(java.lang.String name)
          Construct an identity with the specified user name and no scope.
XplatIdentity(java.lang.String name, IdentityScope scope)
          Construct an identity with the specified user name as a String and scope as an IdentityScope.
 
Method Summary
abstract  java.lang.String getAdministrativeDomain()
          Get the administrative domain string.
 Session getSession()
          Get the session manager for the identity.
 SessionManager getSessionManager()
          Get the session manager for the identity.
abstract  java.lang.String getUserDomain()
          Returns the user domain as a String.
abstract  java.lang.String getUsername()
          Return the user name.
 void setSession(Session session)
          Set the session for the identity.
 void setSessionManager(SessionManager sessionManager)
          Set the session manager for the identity.
 
Methods inherited from class com.novell.java.security.Identity
addCertificate, equals, getCertificates, getInfo, getName, getPublicKey, getScope, hashCode, removeCertificate, setInfo, setPublicKey, toString, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XplatIdentity

public XplatIdentity(java.lang.String name)
Construct an identity with the specified user name and no scope.
Parameters:
name - The user name of the identity.

XplatIdentity

public XplatIdentity(java.lang.String name,
                     IdentityScope scope)
              throws KeyManagementException
Construct an identity with the specified user name as a String and scope as an IdentityScope.
Parameters:
name - The user name of the identity.
scope - The scope of the identity (the domain).
Throws:
KeyManagementException - When an error occurs.

XplatIdentity

public XplatIdentity(Identity identity)
              throws KeyManagementException
Construct an identity from an identity.

The name and parent scope are copied from the existing identity. If the identity is an XplatIdentity, the session and session manager are also copied.

Parameters:
identity - The identity to copy.
Throws:
KeyManagementException - When an error occurs.
Method Detail

setSessionManager

public void setSessionManager(SessionManager sessionManager)
Set the session manager for the identity.
Parameters:
sessionManager - The SessionManager to use for this identity.

getSessionManager

public SessionManager getSessionManager()
Get the session manager for the identity.
Returns:
context handle for the identity

setSession

public void setSession(Session session)
Set the session for the identity.
Parameters:
context - context handle for the identity

getSession

public Session getSession()
Get the session manager for the identity.
Returns:
context handle for the identity

getAdministrativeDomain

public abstract java.lang.String getAdministrativeDomain()
Get the administrative domain string.
Returns:
The administrative domain identifier.

getUsername

public abstract java.lang.String getUsername()
Return the user name.
Returns:
The String name of the user domain.

getUserDomain

public abstract java.lang.String getUserDomain()
Returns the user domain as a String.
Returns:
The String containing the user domain.