|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.optrak.tools.repository.server.LocalRepository
public class LocalRepository
Manage a repository of JNLP resources.
| Field Summary |
|---|
| Fields inherited from interface com.optrak.tools.repository.Repository |
|---|
NAME_BASE_VERSION, NAME_UNCHANGED, NAME_VERSIONED, PACK_200, PACK_GZ, SIGN_JARS, VERSION_AS_GIVEN |
| Constructor Summary | |
|---|---|
LocalRepository(java.io.File root)
|
|
| Method Summary | |
|---|---|
com.optrak.tools.repository.server.LocalNewEntry |
addEntry(UserIdentity id,
ResourceEntry entry)
Offer new resource with default options. |
com.optrak.tools.repository.server.LocalNewEntry |
addEntry(UserIdentity id,
ResourceEntry entry,
int options)
Offer a new resource to the repository. |
void |
flush()
Ensure repository changes are flushed to disk. |
java.lang.String |
getDigestAlgorithm()
get Digest algorithm used for all resources. |
ResourceEntry[] |
getEntries(java.lang.String path)
Enumerate entries with specified path. |
ResourceEntry |
getEntry(Digest digest)
Find entry with specified digest. |
ResourceEntry |
getEntry(java.lang.String path,
Digest digest)
Lookup entry with specified path and digest |
java.io.File |
getRoot()
|
JarSignAndPack |
getSigner()
|
java.net.URI |
getURI()
Location of the repository |
java.lang.String[] |
listChildren(java.lang.String path)
List child directories. |
java.lang.String[] |
listNames(java.lang.String path)
List names of entries. |
UserIdentity |
newIdentity(java.lang.String user,
java.lang.String machine)
create an identity object. |
void |
setSigner(JarSignAndPack signer)
|
void |
setURI(java.net.URI uri)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalRepository(java.io.File root)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public UserIdentity newIdentity(java.lang.String user,
java.lang.String machine)
Repository
newIdentity in interface Repositoryuser - name of the usermachine - name of the machine
public JarSignAndPack getSigner()
public void setSigner(JarSignAndPack signer)
public java.io.File getRoot()
public java.net.URI getURI()
Repository
getURI in interface Repositorypublic void setURI(java.net.URI uri)
public java.lang.String getDigestAlgorithm()
Repository
getDigestAlgorithm in interface Repository
public ResourceEntry getEntry(Digest digest)
throws java.io.IOException
Repository
getEntry in interface Repositorydigest - Digest of required entry.
java.io.IOException
public ResourceEntry getEntry(java.lang.String path,
Digest digest)
throws java.io.IOException
Repository
getEntry in interface Repositorypath - entry must match this pathdigest - entry must have this digest
java.io.IOException
public ResourceEntry[] getEntries(java.lang.String path)
throws java.io.IOException
Repository
getEntries in interface Repositorypath - path of entries
java.io.IOException
public com.optrak.tools.repository.server.LocalNewEntry addEntry(UserIdentity id,
ResourceEntry entry,
int options)
throws java.io.IOException
Repositoryoptions parameter should probably be replaced by two parameters; an enum for the name
handling choice, and an EnumSet for the other options.
addEntry in interface Repositoryid - identity of user submitting resourceentry - Details of the resource to be submitted. The path, version and digest attributes must be set.options - At most one of NAME_*, plus any combination of the other options.
java.io.IOException
public com.optrak.tools.repository.server.LocalNewEntry addEntry(UserIdentity id,
ResourceEntry entry)
throws java.io.IOException
Repository
addEntry in interface Repositoryid - identity of user submitting resourceentry - Details of the resource to be submitted. The path, version and digest attributes must be set.
java.io.IOException
public void flush()
throws java.io.IOException
Repository
flush in interface Repositoryflush in interface java.io.Flushablejava.io.IOException - if there are errors writing to disk
public java.lang.String[] listNames(java.lang.String path)
throws java.io.IOException
Repository
listNames in interface Repositorypath - directory to list, null or "" to list the root of the repository
java.io.IOException - if the path does not exist
public java.lang.String[] listChildren(java.lang.String path)
throws java.io.IOException
Repository
listChildren in interface Repositorypath - directory for which to list subdirectories, null or "" to list the root of the repository
java.io.IOException - if the path does not exist
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||