org.apache.chemistry.opencmis.client.bindings.spi.atompub
Class LinkCache

java.lang.Object
  extended by org.apache.chemistry.opencmis.client.bindings.spi.atompub.LinkCache
All Implemented Interfaces:
Serializable

public class LinkCache
extends Object
implements Serializable

Link cache.

See Also:
Serialized Form

Constructor Summary
LinkCache(BindingSession session)
          Constructor.
 
Method Summary
 void addCollection(String repositoryId, String collection, String link)
          Adds a collection.
 void addLink(String repositoryId, String id, String rel, String type, String link)
          Adds a link.
 void addRepositoryLink(String repositoryId, String rel, String link)
          Adds a collection.
 void addTemplate(String repositoryId, String type, String link)
          Adds an URI template.
 void addTypeLink(String repositoryId, String id, String rel, String type, String link)
          Adds a type link.
 int checkLink(String repositoryId, String id, String rel, String type)
          Checks a link.
 void clearRepository(String repositoryId)
          Removes all entries of the given repository from the caches.
 String getCollection(String repositoryId, String collection)
          Gets a collection.
 String getLink(String repositoryId, String id, String rel)
          Gets a link.
 String getLink(String repositoryId, String id, String rel, String type)
          Gets a link.
 String getRepositoryLink(String repositoryId, String rel)
          Gets a collection.
 String getTemplateLink(String repositoryId, String type, Map<String,Object> parameters)
          Gets an URI template and replaces place holders with the given parameters.
 String getTypeLink(String repositoryId, String id, String rel, String type)
          Gets a type link.
 void lockLinks()
          Locks the link cache.
 void lockTypeLinks()
          Locks the type link cache.
 void removeLinks(String repositoryId, String id)
          Removes all links of an object.
 void removeTypeLinks(String repositoryId, String id)
          Removes all links of a type.
 String toString()
           
 void unlockLinks()
          Unlocks the link cache.
 void unlockTypeLinks()
          Unlocks the type link cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinkCache

public LinkCache(BindingSession session)
Constructor.

Method Detail

addLink

public void addLink(String repositoryId,
                    String id,
                    String rel,
                    String type,
                    String link)
Adds a link.


removeLinks

public void removeLinks(String repositoryId,
                        String id)
Removes all links of an object.


getLink

public String getLink(String repositoryId,
                      String id,
                      String rel,
                      String type)
Gets a link.


getLink

public String getLink(String repositoryId,
                      String id,
                      String rel)
Gets a link.


checkLink

public int checkLink(String repositoryId,
                     String id,
                     String rel,
                     String type)
Checks a link.


lockLinks

public void lockLinks()
Locks the link cache.


unlockLinks

public void unlockLinks()
Unlocks the link cache.


addTypeLink

public void addTypeLink(String repositoryId,
                        String id,
                        String rel,
                        String type,
                        String link)
Adds a type link.


removeTypeLinks

public void removeTypeLinks(String repositoryId,
                            String id)
Removes all links of a type.


getTypeLink

public String getTypeLink(String repositoryId,
                          String id,
                          String rel,
                          String type)
Gets a type link.


lockTypeLinks

public void lockTypeLinks()
Locks the type link cache.


unlockTypeLinks

public void unlockTypeLinks()
Unlocks the type link cache.


addCollection

public void addCollection(String repositoryId,
                          String collection,
                          String link)
Adds a collection.


getCollection

public String getCollection(String repositoryId,
                            String collection)
Gets a collection.


addTemplate

public void addTemplate(String repositoryId,
                        String type,
                        String link)
Adds an URI template.


getTemplateLink

public String getTemplateLink(String repositoryId,
                              String type,
                              Map<String,Object> parameters)
Gets an URI template and replaces place holders with the given parameters.


addRepositoryLink

public void addRepositoryLink(String repositoryId,
                              String rel,
                              String link)
Adds a collection.


getRepositoryLink

public String getRepositoryLink(String repositoryId,
                                String rel)
Gets a collection.


clearRepository

public void clearRepository(String repositoryId)
Removes all entries of the given repository from the caches.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.