public class ResourceRepository
extends java.lang.Object
Constructor and Description |
---|
ResourceRepository() |
Modifier and Type | Method and Description |
---|---|
void |
commit(java.util.Map<Versionable,VersionInfo> newVersions)
Commit the staged changes to the repository, tagging any specified ResourceSets or URIMaps with their
respective VersionInfo.
|
Payload |
get(VersionInfo v) |
java.util.Map<java.lang.String,Payload> |
getAllResources() |
java.util.Collection<java.net.URI> |
getAllTrackedResources() |
Payload.Type |
getPrimaryType(ResourceSet rs) |
Payload |
getResource(URIMap map) |
java.util.Collection<URIMap> |
getResources(VersionInfo v) |
ResourceSet |
getResourceSet(java.lang.String id) |
java.util.List<VersionInfo> |
getRevisions(java.lang.String uri) |
java.util.List<VersionInfo> |
getRootRevisions(java.lang.String uri) |
java.util.Collection<java.net.URI> |
getSchemaRefs(org.w3c.dom.Document doc) |
java.util.Collection<Versionable> |
getStagedResources()
Get a collection of all the as-yet uncommitted resources.
|
java.util.List<VersionInfo> |
getTags(Versionable v) |
java.net.URI |
getTrackedRootResource(java.lang.String resourceSetID) |
java.util.Collection<java.net.URI> |
getTrackedRootResources() |
java.net.URI |
getURIForID(java.lang.String id) |
URIMap |
getURIMapForID(java.lang.String id) |
void |
init(IResourceDAO rdao) |
boolean |
isLocked(ResourceSet rs) |
boolean |
renounce(java.lang.String url)
Stop tracking the specified URL, removing all ResourceSets associated with it, all URLMaps that aren't part
of other ResourceSets and those URLMaps' associated Blobs.
|
void |
reset()
Use with caution - removes all resources and versioning info in the underlying store.
|
void |
rollback()
Drain any staged changes without persisting them in the repository.
|
void |
setContentRetriever(IContentRetriever icr) |
void |
setResourceSetLock(ResourceSet rs,
boolean lock) |
void |
setURILock(java.lang.String rootURI,
boolean lock) |
ResourceResult |
syncResource(java.lang.String loc) |
ResourceResult |
syncResource(java.lang.String loc,
java.lang.String username,
java.lang.String password)
Retrieve all resources starting at the specified location.
|
static org.w3c.dom.Document |
toDocument(byte[] bytes,
java.lang.String encoding)
Create a Document from the bytes.
|
static java.net.URI |
toURI(java.lang.String loc) |
public void init(IResourceDAO rdao)
public void setContentRetriever(IContentRetriever icr)
public static final java.net.URI toURI(java.lang.String loc)
public ResourceResult syncResource(java.lang.String loc)
public ResourceResult syncResource(java.lang.String loc, java.lang.String username, java.lang.String password)
loc
- The location of the root resource to track, e.g. a WSDL or Schema document URLusername
- Optional - if the resource is behind a basic authn checkpassword
- Optional - if the resource is behind a basic authn checkpublic java.util.Collection<Versionable> getStagedResources()
public void commit(java.util.Map<Versionable,VersionInfo> newVersions)
public void rollback()
public java.util.Collection<java.net.URI> getSchemaRefs(org.w3c.dom.Document doc)
public static org.w3c.dom.Document toDocument(byte[] bytes, java.lang.String encoding)
bytes
- The bytes to convert to a Document.encoding
- The encoding used to unencode the Document from the specified bytes. May be null.public java.util.Collection<java.net.URI> getAllTrackedResources()
public java.util.Collection<java.net.URI> getTrackedRootResources()
public Payload.Type getPrimaryType(ResourceSet rs)
public java.net.URI getURIForID(java.lang.String id)
public java.net.URI getTrackedRootResource(java.lang.String resourceSetID)
public URIMap getURIMapForID(java.lang.String id)
public java.util.List<VersionInfo> getRootRevisions(java.lang.String uri)
public java.util.List<VersionInfo> getRevisions(java.lang.String uri)
public void setURILock(java.lang.String rootURI, boolean lock)
public void setResourceSetLock(ResourceSet rs, boolean lock)
public boolean isLocked(ResourceSet rs)
public Payload get(VersionInfo v)
public java.util.Collection<URIMap> getResources(VersionInfo v)
public java.util.Map<java.lang.String,Payload> getAllResources()
public ResourceSet getResourceSet(java.lang.String id)
public java.util.List<VersionInfo> getTags(Versionable v)
public void reset()
public boolean renounce(java.lang.String url)
url
-
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel