public class LinkCache extends Object implements Serializable
Constructor and Description |
---|
LinkCache(BindingSession session)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected String |
extractStreamId(String link)
Tries to extract a streamId from an alternate link.
|
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.
|
public LinkCache(BindingSession session)
public void addLink(String repositoryId, String id, String rel, String type, String link)
protected String extractStreamId(String link)
public int checkLink(String repositoryId, String id, String rel, String type)
public void lockLinks()
public void unlockLinks()
public void addTypeLink(String repositoryId, String id, String rel, String type, String link)
public void removeTypeLinks(String repositoryId, String id)
public String getTypeLink(String repositoryId, String id, String rel, String type)
public void lockTypeLinks()
public void unlockTypeLinks()
public void addCollection(String repositoryId, String collection, String link)
public String getCollection(String repositoryId, String collection)
public void addTemplate(String repositoryId, String type, String link)
public String getTemplateLink(String repositoryId, String type, Map<String,Object> parameters)
public void addRepositoryLink(String repositoryId, String rel, String link)
public String getRepositoryLink(String repositoryId, String rel)
public void clearRepository(String repositoryId)
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.