com.toremote.gateway.connection
Class AbstractSymLinkList

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

public abstract class AbstractSymLinkList
extends java.lang.Object


Field Summary
protected static java.lang.String DATE_FORMAT
           
protected  java.util.List<SymLink> symlinks
           
 
Constructor Summary
AbstractSymLinkList()
           
 
Method Summary
 boolean add(SymLink link)
          add symlink, call persistent to save
protected  void cleanExpiredRefs()
           
 boolean delete(java.lang.String id)
          delete symlink, call persistent to save
 SymLink getSymLink(java.lang.String id)
           
abstract  boolean persistent()
          save changes to disk
 java.lang.String toJsonTable()
           
 boolean update(SymLink link)
          update symlink, call persistent to save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE_FORMAT

protected static final java.lang.String DATE_FORMAT
See Also:
Constant Field Values

symlinks

protected java.util.List<SymLink> symlinks
Constructor Detail

AbstractSymLinkList

public AbstractSymLinkList()
Method Detail

persistent

public abstract boolean persistent()
                            throws java.io.IOException
save changes to disk

Returns:
Throws:
java.io.IOException

cleanExpiredRefs

protected void cleanExpiredRefs()

getSymLink

public SymLink getSymLink(java.lang.String id)
Parameters:
id -
Returns:
symlink

toJsonTable

public java.lang.String toJsonTable()

add

public boolean add(SymLink link)
            throws java.io.IOException
add symlink, call persistent to save

Parameters:
link -
Returns:
true if succeeded
Throws:
java.io.IOException

update

public boolean update(SymLink link)
               throws java.io.IOException
update symlink, call persistent to save

Parameters:
link -
Returns:
true if succeeded
Throws:
java.io.IOException

delete

public boolean delete(java.lang.String id)
               throws java.io.IOException
delete symlink, call persistent to save

Parameters:
id -
Returns:
true if succeeded
Throws:
java.io.IOException