com.toremote.gateway.connection
Class SymLink

java.lang.Object
  extended by com.toremote.gateway.connection.SymLink

public class SymLink
extends java.lang.Object

symlink is a reference to resource, like server etc.


Field Summary
protected  java.lang.String id
           
protected  java.lang.String password
           
protected  java.lang.String resourceId
           
protected  java.util.Date validFrom
           
protected  java.lang.String validTime
           
protected  java.util.Date validTo
           
 
Constructor Summary
SymLink()
           
 
Method Summary
 void assign(SymLink other)
          Copy values from another symlink
 Connection getConnectoin()
           
 java.lang.String getId()
           
 java.lang.String getPassword()
           
 java.lang.String getResourceId()
           
 java.util.Date getValidFrom()
           
 java.lang.String getValidTime()
           
 java.util.Date getValidTo()
           
 boolean isExpired()
           
 boolean isValid()
           
 void setId(java.lang.String id)
          set id for this symlink
 void setPassword(java.lang.String password)
          set up password for this symlink
 void setResourceId(java.lang.String resourceId)
          set up which resource (server) was referred to,
 void setValidFrom(java.util.Date validFrom)
          set up valid date
 void setValidTime(java.lang.String validTime)
          set up valid period, can be 2y,2M,2d,2h,2m, 2s --> 2 years, 2 months
 void setValidTo(java.util.Date validTo)
          set up expire date
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.String id

resourceId

protected java.lang.String resourceId

password

protected java.lang.String password

validFrom

protected java.util.Date validFrom

validTime

protected java.lang.String validTime

validTo

protected java.util.Date validTo
Constructor Detail

SymLink

public SymLink()
Method Detail

getId

public java.lang.String getId()
Returns:
id of this symlink

setId

public void setId(java.lang.String id)
set id for this symlink

Parameters:
id -

getResourceId

public java.lang.String getResourceId()
Returns:
id of the resource which the symlink refer to

setResourceId

public void setResourceId(java.lang.String resourceId)
set up which resource (server) was referred to,

Parameters:
resourceId -

getValidFrom

public java.util.Date getValidFrom()
Returns:
valid date

setValidFrom

public void setValidFrom(java.util.Date validFrom)
set up valid date

Parameters:
validFrom -

getValidTime

public java.lang.String getValidTime()
Returns:
valid period, can be 2y,2M,2d,2h,2m, 2s --> 2 years, 2 months

setValidTime

public void setValidTime(java.lang.String validTime)
set up valid period, can be 2y,2M,2d,2h,2m, 2s --> 2 years, 2 months

Parameters:
validTime -

getValidTo

public java.util.Date getValidTo()
Returns:
expire date

setValidTo

public void setValidTo(java.util.Date validTo)
set up expire date

Parameters:
validTo -

getPassword

public java.lang.String getPassword()
Returns:
password

setPassword

public void setPassword(java.lang.String password)
set up password for this symlink

Parameters:
password -

isValid

public boolean isValid()
Returns:
true if the symlink is still valid

isExpired

public boolean isExpired()
Returns:
true if the symlink expired

getConnectoin

public Connection getConnectoin()
Returns:
the connection (resource) which the symlink refer to.

assign

public void assign(SymLink other)
Copy values from another symlink

Parameters:
other -