Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

sync4j.framework.core
Class Credential  view Credential download Credential.java

java.lang.Object
  extended bysync4j.framework.core.Credential
All Implemented Interfaces:
java.io.Serializable

public final class Credential
extends java.lang.Object
implements java.io.Serializable

corresponds to <Cred> element in SyncML represent DTD

Version:
$Id: Credential.java,v 1.7 2003/01/23 22:33:39 stefano_fornari Exp $

Field Summary
private  Authentication auth
           
 
Constructor Summary
  Credential(Authentication auth)
           
(package private) Credential(sync4j.framework.core.xml.Element eCred)
           
(package private) Credential(sync4j.framework.core.xml.Element eMeta, Data d)
           
 
Method Summary
static Authentication createAuthentication(java.lang.String data, java.lang.String type)
          Create and return the Authentication object corresponding to the given type and data.
 java.lang.String getData()
           
 java.lang.String getFormat()
           
static Credential getGuestCredential()
          Creates and returns a "guest" credential.
 java.lang.String getType()
           
 java.lang.String getUsername()
          Return the username stored in this credential
(package private)  java.lang.String toXML()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

auth

private Authentication auth
Constructor Detail

Credential

public Credential(Authentication auth)

Credential

Credential(sync4j.framework.core.xml.Element eCred)
     throws RepresentationException

Credential

Credential(sync4j.framework.core.xml.Element eMeta,
           Data d)
     throws RepresentationException
Method Detail

getType

public java.lang.String getType()

getFormat

public java.lang.String getFormat()

getData

public java.lang.String getData()

getUsername

public java.lang.String getUsername()
Return the username stored in this credential


toXML

java.lang.String toXML()

getGuestCredential

public static Credential getGuestCredential()
Creates and returns a "guest" credential. TO DO: MD5 authentication support


createAuthentication

public static Authentication createAuthentication(java.lang.String data,
                                                  java.lang.String type)
Create and return the Authentication object corresponding to the given type and data.