use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method removeUserFromGroup.
/**
* Insert the method's description here.
* Creation date: (11/28/00 5:43:44 PM)
* @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
*/
public VCImageInfo removeUserFromGroup(VCImageInfo imageInfo, String userToRemove) throws DataAccessException {
try {
//
// publish from database
//
VCImageInfo newImageInfo = (VCImageInfo) removeUserFromGroup0(imageInfo, VersionableType.VCImage, imgInfoHash, userToRemove);
//
// delete Image from cache
//
xmlHash.remove(imageInfo.getVersion().getVersionKey());
fireDatabaseUpdate(new DatabaseEvent(this, DatabaseEvent.UPDATE, imageInfo, newImageInfo));
return newImageInfo;
} catch (RemoteProxyException e) {
handleRemoteProxyException(e);
throw new DataAccessException(e.getMessage());
}
}
use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method delete.
/**
* Insert the method's description here.
* Creation date: (2/5/01 4:58:40 PM)
* @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
* @exception org.vcell.util.DataAccessException The exception description.
*/
public void delete(VCImageInfo vcImageInfo) throws DataAccessException {
try {
//
// delete from database
//
sessionManager.getUserMetaDbServer().deleteVCImage(vcImageInfo.getVersion().getVersionKey());
//
// delete VCImage from cache and VCImageInfo from imgInfo list
//
xmlHash.remove(vcImageInfo.getVersion().getVersionKey());
imgInfoHash.remove(vcImageInfo.getVersion().getVersionKey());
fireDatabaseDelete(new DatabaseEvent(this, DatabaseEvent.DELETE, vcImageInfo, null));
} catch (RemoteProxyException e) {
handleRemoteProxyException(e);
throw new DataAccessException(e.getMessage());
}
}
use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method removeUserFromGroup.
/**
* Insert the method's description here.
* Creation date: (11/28/00 5:43:44 PM)
* @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
*/
public GeometryInfo removeUserFromGroup(GeometryInfo geometryInfo, String userToRemove) throws DataAccessException {
try {
//
// publish from database
//
GeometryInfo newGeometryInfo = (GeometryInfo) removeUserFromGroup0(geometryInfo, VersionableType.Geometry, geoInfoHash, userToRemove);
// //
// // delete Geometry from cache
// //
// xmlHash.remove(geometryInfo.getVersion().getVersionKey());
// //
// // delete any MathModelMetaData's that use this GeometryInfo from cache
// //
// MathModelInfo referencedMathModelInfos[] = getMathModelReferences(geometryInfo);
// for (int i = 0; i < referencedMathModelInfos.length; i++){
// xmlHash.remove(referencedMathModelInfos[i].getVersion().getVersionKey());
// }
// //
// // delete any BioModelMetaData's that use this GeometryInfo from cache
// //
// BioModelInfo referencedBioModelInfos[] = getBioModelReferences(geometryInfo);
// for (int i = 0; i < referencedBioModelInfos.length; i++){
// xmlHash.remove(referencedBioModelInfos[i].getVersion().getVersionKey());
// }
fireDatabaseUpdate(new DatabaseEvent(this, DatabaseEvent.UPDATE, geometryInfo, newGeometryInfo));
return newGeometryInfo;
} catch (RemoteProxyException e) {
handleRemoteProxyException(e);
throw new DataAccessException(e.getMessage());
}
}
use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method save.
/**
* Insert the method's description here.
* Creation date: (2/5/01 4:58:40 PM)
*/
public VCImage save(VCImage vcImage) throws DataAccessException {
try {
String vcImageXML = null;
try {
vcImageXML = XmlHelper.imageToXML(vcImage);
} catch (XmlParseException e) {
e.printStackTrace(System.out);
throw new DataAccessException(e.getMessage());
}
String savedVCImageXML = sessionManager.getUserMetaDbServer().saveVCImage(new BigString(vcImageXML)).toString();
VCImage savedVCImage = null;
try {
savedVCImage = XmlHelper.XMLToImage(savedVCImageXML);
} catch (XmlParseException e) {
e.printStackTrace(System.out);
throw new DataAccessException(e.getMessage());
}
savedVCImage.refreshDependencies();
KeyValue savedKey = savedVCImage.getVersion().getVersionKey();
if (xmlHash.get(savedKey) == null) {
xmlHash.put(savedKey, savedVCImageXML);
}
try {
ISize size = new ISize(savedVCImage.getNumX(), savedVCImage.getNumY(), savedVCImage.getNumZ());
GIFImage browseData = BrowseImage.makeBrowseGIFImage(savedVCImage);
VCImageInfo savedVCImageInfo = new VCImageInfo(savedVCImage.getVersion(), size, savedVCImage.getExtent(), browseData, VCellSoftwareVersion.fromSystemProperty());
imgInfoHash.put(savedKey, savedVCImageInfo);
fireDatabaseInsert(new DatabaseEvent(this, DatabaseEvent.INSERT, null, savedVCImageInfo));
} catch (Exception e) {
e.printStackTrace(System.out);
}
return savedVCImage;
} catch (RemoteProxyException e) {
e.printStackTrace(System.out);
throw new DataAccessException(VCellErrorMessages.FAIL_SAVE_MESSAGE + "\n\n" + e.getMessage());
}
}
use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.
the class ClientDocumentManager method getServerSimulationStatus.
/**
* Insert the method's description here.
* Creation date: (9/1/2004 10:48:52 AM)
* @return cbit.vcell.solver.ode.gui.SimulationStatus
* @param vcSimulationIdentifier cbit.vcell.solver.VCSimulationIdentifier
*/
public SimulationStatus getServerSimulationStatus(VCSimulationIdentifier vcSimulationIdentifier) throws DataAccessException {
if (simulationStatusHash.containsKey(vcSimulationIdentifier.getSimulationKey())) {
return (SimulationStatus) simulationStatusHash.get(vcSimulationIdentifier.getSimulationKey());
} else {
SimulationStatus simulationStatus = null;
try {
simulationStatus = sessionManager.getSimulationController().getSimulationStatus(vcSimulationIdentifier.getSimulationKey());
} catch (RemoteProxyException e) {
handleRemoteProxyException(e);
try {
simulationStatus = sessionManager.getSimulationController().getSimulationStatus(vcSimulationIdentifier.getSimulationKey());
} catch (RemoteProxyException e2) {
handleRemoteProxyException(e2);
throw new DataAccessException("SimulationStatus inquiry for '" + vcSimulationIdentifier + "' failed\n" + e2.getMessage());
}
}
simulationStatusHash.put(vcSimulationIdentifier.getSimulationKey(), simulationStatus);
return simulationStatus;
}
}
Aggregations