|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eodisp.core.repos.service.ReposModelServiceImpl
public class ReposModelServiceImpl
This implementation will be exported by the eodisp_remote package and therefore accessible through the network. Since the remote mechanism takes care of the objects, it is not implemented as singleton.
Field Summary | |
---|---|
(package private) static org.apache.log4j.Logger |
logger
Log4J logger for this class |
Fields inherited from interface org.eodisp.core.common.ReposModelService |
---|
REGISTRY_NAME |
Constructor Summary | |
---|---|
ReposModelServiceImpl()
Constructor. |
Method Summary | |
---|---|
java.lang.String |
addSom(SomFile somFile)
Adds a physical SOM file to the repository. |
void |
deleteSom(java.lang.String somName,
java.lang.String somVersion)
Deletes the physical SOM file that is locally stored on in the repository. |
org.eclipse.emf.ecore.sdo.EDataGraph |
getAllData()
Returns all data currently stored in the model repository. |
SomFile |
getSom(java.lang.String somName,
java.lang.String somVersion)
Reads a SOM file locally in the repository and returns it. |
void |
update(org.eclipse.emf.ecore.sdo.EDataGraph dataGraph)
Updates a data graph in the resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static org.apache.log4j.Logger logger
Constructor Detail |
---|
public ReposModelServiceImpl()
Method Detail |
---|
public org.eclipse.emf.ecore.sdo.EDataGraph getAllData() throws java.io.IOException
ReposModelService
getAllData
in interface ReposModelService
java.rmi.RemoteException
- see documentation of RemoteException
java.io.IOException
- Thrown if there is a problem loading the data.public void update(org.eclipse.emf.ecore.sdo.EDataGraph dataGraph) throws java.io.IOException
Updates are performed (saved) immediately, without any chance to undo changes.
update
in interface ReposModelService
dataGraph
- The data graph with the changes to be committed.
java.rmi.RemoteException
- see documentation of RemoteException
java.io.IOException
- thrown if there is a problem while saving the data to the
disk.public java.lang.String addSom(SomFile somFile) throws java.io.IOException, java.lang.IllegalStateException
addSom
in interface ReposModelService
somFile
- The object containing the physical file.
java.rmi.RemoteException
- see documentation of RemoteException
java.io.IOException
- thrown if the file could not be save in the repository.
java.lang.IllegalStateException
public SomFile getSom(java.lang.String somName, java.lang.String somVersion) throws SomNotKnownException, java.io.IOException
ReposModelService.addSom(SomFile)
method.
The name and version of the SOM will be used to lookup the location of the file on the file system.
getSom
in interface ReposModelService
somName
- The name of the SOM.somVersion
- The version of the SOM.
SomFile
, including the byte array
representing the data. It always returns a non null object. In
case of an error, an exception will be thrown, but never will be
a null
object returned.
SomNotKnownException
- thrown if no SOM file could be found that corresponds to the
given somName and somVersion.
java.rmi.RemoteException
- see documentation of RemoteException
java.io.IOException
- thrown in case of an error when reading the file or if the
file is too large.public void deleteSom(java.lang.String somName, java.lang.String somVersion) throws SomNotKnownException
An exception will be thrown if the file cannot be deleted, otherwise, the deletion process has succeeded.
deleteSom
in interface ReposModelService
somName
- The name of SOM.somVersion
- The version of the SOM.
SomNotKnownException
- thrown if no SOM file could be found that corresponds to the
given somName and somVersion.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |