## 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
`void` `create()` Creates the repository if does not exist yet
`boolean` `exists()` Checks wether the repository actually (or still) exists
`java.util.List` `getAllResources()` Returns all direct and indirect resources
`long` `getChecksum()` Checksum of the repository and all its content.
`java.lang.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(java.lang.String resourceName)` Returns a specific direct resource of the repository
`java.util.Iterator` `getResources()` Returns all direct resources
`Repository` `getRootRepository()` Get this repository's logical script root repository.
`java.lang.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 Detail

### getChecksum

    long getChecksum()
                     throws java.io.IOException

  Checksum of the repository and all its content. Implementations should make sure

  Returns:
    checksum
  Throws:
    `java.io.IOException`

### lastModified

    long lastModified()
                      throws java.io.IOException

  Returns the date the repository was last modified.

  Returns:
    last modified date
  Throws:
    `java.io.IOException`

### getResource

    Resource getResource(java.lang.String resourceName)

  Returns a specific direct resource of the repository

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

### getResources

    java.util.Iterator getResources()
                                    throws java.io.IOException

  Returns all direct resources

  Returns:
    direct resources
  Throws:
    `java.io.IOException`

### getAllResources

    java.util.List getAllResources()
                                   throws java.io.IOException

  Returns all direct and indirect resources

  Returns:
    resources recursive
  Throws:
    `java.io.IOException`

### getRepositories

    Repository[] getRepositories()
                                 throws java.io.IOException

  Returns this repository's direct child repositories

  Returns:
    direct repositories
  Throws:
    `java.io.IOException`

### exists

    boolean exists()
                   throws java.io.IOException

  Checks wether the repository actually (or still) exists

  Returns:
    true if the repository exists
  Throws:
    `java.io.IOException`

### create

    void create()
                throws java.io.IOException

  Creates the repository if does not exist yet

  Throws:
    `java.io.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
  See Also:
    `{isScriptRoot()}`

### getName

    java.lang.String getName()

  Returns the name of the repository; this is a full name including all parent repositories.

  Returns:
    full name of the repository

### getShortName

    java.lang.String getShortName()

  Returns the name of the repository.

  Returns:
    name of the repository

Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.