Package helma.framework.repository
Class AbstractRepository
java.lang.Object
helma.framework.repository.AbstractRepository
- All Implemented Interfaces:
Repository
- Direct Known Subclasses:
FileRepository
,ZipRepository
Provides common methods and fields for the default implementations of the
repository interface
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Resource
createResource
(String name) Called to create a child resource for this repositoryGet a deep list of this repository's resources, including all resources contained in sub-reposotories.getName()
Get the full name that identifies this repository globallyGet this repository's parent repository.Get an iterator over the sub-repositories contained in this repository.getResource
(String name) Get a resource contained in this repository identified by the given local name.Get an iterator over the resources contained in this repository.Get this repository's logical script root repository.Get the local name that identifies this repository locally within its parent repositorytoString()
Returns the repositories full name as string representation.abstract void
update()
Called to check the repository's content.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface helma.framework.repository.Repository
create, exists, getChecksum, isScriptRoot, lastModified
-
Constructor Details
-
AbstractRepository
public AbstractRepository()
-
-
Method Details
-
update
public abstract void update()Called to check the repository's content. -
createResource
Called to create a child resource for this repository -
getName
Get the full name that identifies this repository globally- Specified by:
getName
in interfaceRepository
- Returns:
- full name of the repository
-
getShortName
Get the local name that identifies this repository locally within its parent repository- Specified by:
getShortName
in interfaceRepository
- Returns:
- name of the repository
-
getRootRepository
Get this repository's logical script root repository.- Specified by:
getRootRepository
in interfaceRepository
- Returns:
- top-level repository
-
getResource
Get a resource contained in this repository identified by the given local name. If the name can't be resolved to a resource, a resource object is returned for whichexists()
returnsfalse
.
- Specified by:
getResource
in interfaceRepository
- Parameters:
name
- name of the child resource to return- Returns:
- specified child resource
-
getResources
Get an iterator over the resources contained in this repository.- Specified by:
getResources
in interfaceRepository
- Returns:
- direct resources
-
getRepositories
Get an iterator over the sub-repositories contained in this repository.- Specified by:
getRepositories
in interfaceRepository
- Returns:
- direct repositories
-
getParentRepository
Get this repository's parent repository.- Specified by:
getParentRepository
in interfaceRepository
- Returns:
- the parent repository
-
getAllResources
Get a deep list of this repository's resources, including all resources contained in sub-reposotories.- Specified by:
getAllResources
in interfaceRepository
- Returns:
- resources recursive
- Throws:
IOException
-
toString
Returns the repositories full name as string representation.
-