Package helma.framework.repository

# Interface Repository

All Known Implementing Classes:
  `AbstractRepository`, `FileRepository`, `MultiFileRepository`, `SingleFileRepository`, `ZipRepository`

public interface Repository
Repository represents an abstract container of resources (e.g. code, skins, ...). In addition to resources, repositories may contain other repositories, building a hierarchical structure.

## Method Summary

Modifier and Type
Method
Description
`void`
`create()`
Creates the repository if does not exist yet
`boolean`
`exists()`
Checks wether the repository actually (or still) exists
`List`
`getAllResources()`
Returns all direct and indirect resources
`long`
`getChecksum()`
Checksum of the repository and all its content.
`String`
`getName()`
Returns the name of the repository; this is a full name including all parent repositories.
`Repository`
`getParentRepository()`
Returns this repository's parent repository.
`Repository[]`
`getRepositories()`
Returns this repository's direct child repositories
`Resource`
`getResource(String resourceName)`
Returns a specific direct resource of the repository
`Iterator`
`getResources()`
Returns all direct resources
`Repository`
`getRootRepository()`
Get this repository's logical script root repository.
`String`
`getShortName()`
Returns the name of the repository.
`boolean`
`isScriptRoot()`
Checks wether the repository is to be considered a top-level repository from a scripting point of view.
`long`
`lastModified()`
Returns the date the repository was last modified.

## Method Details

### getChecksum

long getChecksum() throws IOException
Checksum of the repository and all its content. Implementations should make sure

Returns:
  checksum
Throws:
  `IOException`

### lastModified

long lastModified() throws IOException
Returns the date the repository was last modified.

Returns:
  last modified date
Throws:
  `IOException`

### getResource

Resource getResource(String resourceName)
Returns a specific direct resource of the repository

Parameters:
  `resourceName` - name of the child resource to return
Returns:
  specified child resource

### getResources

Iterator getResources() throws IOException
Returns all direct resources

Returns:
  direct resources
Throws:
  `IOException`

### getAllResources

List getAllResources() throws IOException
Returns all direct and indirect resources

Returns:
  resources recursive
Throws:
  `IOException`

### getRepositories

Repository[] getRepositories() throws IOException
Returns this repository's direct child repositories

Returns:
  direct repositories
Throws:
  `IOException`

### exists

boolean exists() throws IOException
Checks wether the repository actually (or still) exists

Returns:
  true if the repository exists
Throws:
  `IOException`

### create

void create() throws IOException
Creates the repository if does not exist yet

Throws:
  `IOException`

### isScriptRoot

boolean isScriptRoot()
Checks wether the repository is to be considered a top-level repository from a scripting point of view. For example, a zip file within a file repository is not a root repository from a physical point of view, but from the scripting point of view it is.

Returns:
  true if the repository is to be considered a top-level script repository

### getParentRepository

Repository getParentRepository()
Returns this repository's parent repository. Returns null if this repository already is the top-level repository

Returns:
  the parent repository

### getRootRepository

Repository getRootRepository()
Get this repository's logical script root repository.

Returns:
  top-level repository

### getName

String getName()
Returns the name of the repository; this is a full name including all parent repositories.

Returns:
  full name of the repository

### getShortName

String getShortName()
Returns the name of the repository.

Returns:
  name of the repository