org.alfresco.webservice.util
Class AuthenticationDetails

java.lang.Object
  extended by org.alfresco.webservice.util.AuthenticationDetails

public class AuthenticationDetails
extends java.lang.Object

Helper class to contain web service authentication credentials


Constructor Summary
AuthenticationDetails(java.lang.String userName, java.lang.String ticket, java.lang.String sessionId)
          Constructor with deafault timeoutInterval = -1 (Tiket is never expired)
AuthenticationDetails(java.lang.String userName, java.lang.String ticket, java.lang.String sessionId, long timeoutInterval)
          Constructor
 
Method Summary
 java.lang.String getSessionId()
          Gets the session id
 java.lang.String getTicket()
          Gets the ticket
 long getTimeoutInterval()
           
 java.lang.String getUserName()
          Gets the user name
 boolean isTimedOut()
           
 void resetTimeoutInterval()
           
 void setTimeoutInterval(long timeoutInterval)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticationDetails

public AuthenticationDetails(java.lang.String userName,
                             java.lang.String ticket,
                             java.lang.String sessionId)
Constructor with deafault timeoutInterval = -1 (Tiket is never expired)

Parameters:
userName - the user name
ticket - the ticket
sessionId - the session id

AuthenticationDetails

public AuthenticationDetails(java.lang.String userName,
                             java.lang.String ticket,
                             java.lang.String sessionId,
                             long timeoutInterval)
Constructor

Parameters:
userName - the user name
ticket - the ticket
sessionId - the session id
timeoutInterval - timeout interval
Method Detail

getUserName

public java.lang.String getUserName()
Gets the user name

Returns:
the user name

getTicket

public java.lang.String getTicket()
Gets the ticket

Returns:
the ticket

getSessionId

public java.lang.String getSessionId()
Gets the session id

Returns:
the sessio id, may return null if no session id is set

getTimeoutInterval

public long getTimeoutInterval()

setTimeoutInterval

public void setTimeoutInterval(long timeoutInterval)

isTimedOut

public final boolean isTimedOut()
Returns:
if timeoutInterval is not set return false. If current time > (wsLastTimeUsed.getTime() + timeoutInterval) return true

resetTimeoutInterval

public void resetTimeoutInterval()


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.