|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.petals.system.repository.RepositoryServiceImpl
public class RepositoryServiceImpl
Platform Component Repository service implementation.
| Nested Class Summary | |
|---|---|
static class |
RepositoryServiceImpl.EntityType
Entity types (components, shared libs or service assemblies) |
| Field Summary | |
|---|---|
protected org.ow2.petals.util.LoggingUtil |
log
logger wrapper |
| Fields inherited from interface org.ow2.petals.system.repository.RepositoryService |
|---|
DEFAULT_REPOSITORY_PATH |
| Constructor Summary | |
|---|---|
RepositoryServiceImpl()
|
|
| Method Summary | |
|---|---|
java.io.File |
addComponent(java.lang.String componentId,
java.io.File tempFile)
Install a component package into the local Petals repository. |
java.io.File |
addServiceAssembly(java.lang.String serviceAssemblyId,
java.io.File tempFile)
Copy a service assembly package into petals repository |
java.io.File |
addSharedLibrary(java.lang.String sharedLibraryId,
java.lang.String version,
java.io.File tempFile)
Copy a shared library package into petals repository |
java.io.File |
explodeSUIntoSAInstallDirectory(java.lang.String serviceUnitId,
java.net.URL suZipLocation,
java.lang.String serviceAssemblyId)
Explode a given service unit archive into a SU install root created into the SA install root |
java.io.File |
getComponentDirectory(java.lang.String componentId)
Returns the root directory of this component |
java.io.File |
getComponentInstallDirectory(java.lang.String componentId)
Returns the install directory of the component |
java.io.File |
getComponentsDirectory()
Retrieve the components directory absolute path from the Petals repository. |
java.io.File |
getComponentWorkDirectory(java.lang.String componentId)
Returns the work directory of the component |
java.io.File |
getLostPlusFoundDirectory()
Retrieve the "lost+found" directory absolute path from the Petals repository. |
java.io.File |
getRepositoryDirectory()
Return petals repository folder. |
java.io.File |
getServiceAssembliesDirectory()
Retrieve the ServiceAssemblies directory absolute path from the Petals repository. |
java.io.File |
getServiceAssemblyDirectory(java.lang.String serviceAssemblyId)
Returns the root directory of the service assembly |
java.io.File |
getServiceAssemblyInstallDirectory(java.lang.String serviceAssemblyId)
Returns the install directory of the service assembly |
java.io.File |
getServiceAssemblyWorkDirectory(java.lang.String serviceAssemblyId)
Returns the work directory of the service assembly |
java.io.File |
getSharedLibrariesDirectory()
Retrieve the SharedLibraries directory absolute path from the Petals repository. |
java.io.File |
getSharedLibraryDirectory(java.lang.String sharedLibraryId)
Returns the root directory of the shared library |
java.io.File |
getSharedLibraryInstallDirectory(java.lang.String sharedLibraryId)
Returns the install directory of the shared library |
java.io.File |
getSharedLibraryWorkDirectory(java.lang.String sharedLibraryId)
Returns the work directory of the shared library |
void |
removeComponent(java.lang.String componentId)
Delete and clean all directories and related data from the Petals repository, for the given component identifier. |
void |
removeServiceAssembly(java.lang.String serviceAssemblyId)
Delete and clean all directories and related data from the Petals repository, for the given sa identifier. |
void |
removeSharedLibrary(java.lang.String sharedLibraryId,
java.lang.String version)
Delete and clean all directories and related data from the Petals repository, for the given sl identifier. |
protected void |
start()
|
protected void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.ow2.petals.util.LoggingUtil log
| Constructor Detail |
|---|
public RepositoryServiceImpl()
| Method Detail |
|---|
public java.io.File addComponent(java.lang.String componentId,
java.io.File tempFile)
throws java.io.IOException,
ComponentAlreadyExistsException
RepositoryService
addComponent in interface RepositoryServicecomponentId - The component name (as JBI identifier, unique into the local
repository. Must be non null and non empty.tempFile - The root directory of teh exploded component archive. Must be
non null.
File
java.io.IOException - if it fails to create install and work dirs for the component
or if it fails to copy package into install dir
ComponentAlreadyExistsException - The component already exists in the repository.
public java.io.File addServiceAssembly(java.lang.String serviceAssemblyId,
java.io.File tempFile)
throws java.io.IOException,
ServiceAssemblyAlreadyExistsException
RepositoryService
addServiceAssembly in interface RepositoryServiceserviceAssemblyId - String unique sa id that identifies an unique sa
directory into the petals repository. Must be non null and non
emptytempFile - File the service assembly package file to add
into the repository. Must be non null
File
java.io.IOException - if it fails to create install and work dirs for the sa or if
it fails to copy package into install dir
ServiceAssemblyAlreadyExistsException - The serviced assembly already exists in the repository.
public java.io.File addSharedLibrary(java.lang.String sharedLibraryId,
java.lang.String version,
java.io.File tempFile)
throws java.io.IOException,
SharedLibraryAlreadyExistsException
RepositoryService
addSharedLibrary in interface RepositoryServicesharedLibraryId - String unique sl id that identifies an unique sl
directory into the petals repository. Must be non null and non
emptyversion - Version of the shared library as defined by JBI.tempFile - File the shared lib package file to add into the
repository. Must be non null
File
java.io.IOException - if it fails to create install and work dirs for the sl or if
it fails to copy package into install dir
SharedLibraryAlreadyExistsException - The sl already exists in the repository.
public java.io.File explodeSUIntoSAInstallDirectory(java.lang.String serviceUnitId,
java.net.URL suZipLocation,
java.lang.String serviceAssemblyId)
throws java.io.IOException
RepositoryService
explodeSUIntoSAInstallDirectory in interface RepositoryServicesuZipLocation - URL the SU Zip archive file to add flatten into
the repository.
File installation root of su in the repository. Must
be a valid directory.
java.io.IOException - if SU install root can't be created or SU archive can't be
unzipped
public java.io.File getComponentDirectory(java.lang.String componentId)
throws java.io.IOException
RepositoryService
getComponentDirectory in interface RepositoryServicecomponentId - String unique component id that identifies an
unique component directory into the petals repository.
java.io.IOException - if an error occurred during component root retrieval
public java.io.File getComponentInstallDirectory(java.lang.String componentId)
throws java.io.IOException
RepositoryService
getComponentInstallDirectory in interface RepositoryServicecomponentId - String unique component id that identifies an
unique component directory into the petals repository.
java.io.IOException - if an error occurred during component root retrievalpublic java.io.File getComponentsDirectory()
RepositoryService
getComponentsDirectory in interface RepositoryService
public java.io.File getComponentWorkDirectory(java.lang.String componentId)
throws java.io.IOException
RepositoryService
getComponentWorkDirectory in interface RepositoryServicecomponentId - String unique component id that identifies an
unique component directory into the petals repository.
java.io.IOException - if an error occurred during component root retrievalpublic java.io.File getLostPlusFoundDirectory()
RepositoryService
getLostPlusFoundDirectory in interface RepositoryServicepublic java.io.File getRepositoryDirectory()
RepositoryService
getRepositoryDirectory in interface RepositoryServicepublic java.io.File getServiceAssembliesDirectory()
RepositoryService
getServiceAssembliesDirectory in interface RepositoryService
public java.io.File getServiceAssemblyDirectory(java.lang.String serviceAssemblyId)
throws java.io.IOException
RepositoryService
getServiceAssemblyDirectory in interface RepositoryServicejava.io.IOException - if an error occured during service assembly root retrieval
public java.io.File getServiceAssemblyInstallDirectory(java.lang.String serviceAssemblyId)
throws java.io.IOException
RepositoryService
getServiceAssemblyInstallDirectory in interface RepositoryServiceserviceAssemblyId - String unique sa id that identifies an unique sa
directory into the petals repository.
java.io.IOException - if an error occured during service assembly root retrieval
public java.io.File getServiceAssemblyWorkDirectory(java.lang.String serviceAssemblyId)
throws java.io.IOException
RepositoryService
getServiceAssemblyWorkDirectory in interface RepositoryServicejava.io.IOException - if an error occured during service assembly root retrievalpublic java.io.File getSharedLibrariesDirectory()
RepositoryService
getSharedLibrariesDirectory in interface RepositoryService
public java.io.File getSharedLibraryDirectory(java.lang.String sharedLibraryId)
throws java.io.IOException
RepositoryService
getSharedLibraryDirectory in interface RepositoryServicesharedLibraryId - String unique sl id that identifies an unique sl
directory into the petals repository.
java.io.IOException - if an error occured during shared lib root retrieval
public java.io.File getSharedLibraryInstallDirectory(java.lang.String sharedLibraryId)
throws java.io.IOException
RepositoryService
getSharedLibraryInstallDirectory in interface RepositoryServicejava.io.IOException - if an error occured during shared lib root retrieval
public java.io.File getSharedLibraryWorkDirectory(java.lang.String sharedLibraryId)
throws java.io.IOException
RepositoryService
getSharedLibraryWorkDirectory in interface RepositoryServicejava.io.IOException - if an error occured during shared lib root retrieval
public void removeComponent(java.lang.String componentId)
throws java.io.FileNotFoundException,
java.io.IOException
RepositoryService
removeComponent in interface RepositoryServicecomponentId - String unique component id that identifies an
unique component directory into the petals repository.
java.io.FileNotFoundException - the component does not exist in the repository.
java.io.IOException - if an error occurred during the delete of related files
public void removeServiceAssembly(java.lang.String serviceAssemblyId)
throws java.io.FileNotFoundException,
java.io.IOException
RepositoryService
removeServiceAssembly in interface RepositoryServiceserviceAssemblyId - String unique sa id that identifies an unique sa
directory into the petals repository.
java.io.FileNotFoundException - the service assembly does not exist in the repository.
java.io.IOException - if an error occurred during the delete of related files
public void removeSharedLibrary(java.lang.String sharedLibraryId,
java.lang.String version)
throws java.io.FileNotFoundException,
java.io.IOException
RepositoryService
removeSharedLibrary in interface RepositoryServicesharedLibraryId - unique sl id that identifies an unique sl directory into the
petals repository.version - Version of the shared library as defined by JBI.
java.io.FileNotFoundException - the shared library does not exist in the repository.
java.io.IOException - if an error occurred during the delete of related files
protected void start()
throws java.io.IOException
java.io.IOExceptionprotected void stop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||