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 TypeMethodDescriptionvoid
create()
Creates the repository if does not exist yetboolean
exists()
Checks wether the repository actually (or still) existsReturns all direct and indirect resourceslong
Checksum of the repository and all its content.getName()
Returns the name of the repository; this is a full name including all parent repositories.Returns this repository's parent repository.Returns this repository's direct child repositoriesgetResource
(String resourceName) Returns a specific direct resource of the repositoryReturns all direct resourcesGet this repository's logical script root repository.Returns the name of the repository.boolean
Checks wether the repository is to be considered a top-level repository from a scripting point of view.long
Returns the date the repository was last modified.
-
Method Details
-
getChecksum
Checksum of the repository and all its content. Implementations should make sure- Returns:
- checksum
- Throws:
IOException
-
lastModified
Returns the date the repository was last modified.- Returns:
- last modified date
- Throws:
IOException
-
getResource
Returns a specific direct resource of the repository- Parameters:
resourceName
- name of the child resource to return- Returns:
- specified child resource
-
getResources
Returns all direct resources- Returns:
- direct resources
- Throws:
IOException
-
getAllResources
Returns all direct and indirect resources- Returns:
- resources recursive
- Throws:
IOException
-
getRepositories
Returns this repository's direct child repositories- Returns:
- direct repositories
- Throws:
IOException
-
exists
Checks wether the repository actually (or still) exists- Returns:
- true if the repository exists
- Throws:
IOException
-
create
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
-