Search in sources :

Example 21 with RemoteProxyException

use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.

the class ClientDocumentManager method addUserToGroup.

/**
 * Insert the method's description here.
 * Creation date: (11/28/00 5:43:44 PM)
 * @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
 */
public MathModelInfo addUserToGroup(MathModelInfo mathModelInfo, String userToAdd) throws DataAccessException {
    try {
        // 
        // publish from database
        // 
        MathModelInfo newMathModelInfo = (MathModelInfo) addUserToGroup0(mathModelInfo, VersionableType.MathModelMetaData, mathModelInfoHash, userToAdd);
        // 
        // delete MathModelMetaData from cache
        // 
        xmlHash.remove(mathModelInfo.getVersion().getVersionKey());
        fireDatabaseUpdate(new DatabaseEvent(this, DatabaseEvent.UPDATE, mathModelInfo, newMathModelInfo));
        return newMathModelInfo;
    } catch (RemoteProxyException e) {
        handleRemoteProxyException(e);
        throw new DataAccessException(e.getMessage());
    }
}
Also used : MathModelInfo(org.vcell.util.document.MathModelInfo) DataAccessException(org.vcell.util.DataAccessException) RemoteProxyException(cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)

Example 22 with RemoteProxyException

use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.

the class ClientDocumentManager method setGroupPrivate.

/**
 * Insert the method's description here.
 * Creation date: (11/28/00 5:43:44 PM)
 * @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
 */
public VCImageInfo setGroupPrivate(VCImageInfo imageInfo) throws DataAccessException {
    try {
        // 
        // unpublish from database
        // 
        VCImageInfo newImageInfo = (VCImageInfo) setGroupPrivate0(imageInfo, VersionableType.VCImage, imgInfoHash);
        // 
        // 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());
    }
}
Also used : VCImageInfo(cbit.image.VCImageInfo) DataAccessException(org.vcell.util.DataAccessException) RemoteProxyException(cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)

Example 23 with RemoteProxyException

use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.

the class ClientDocumentManager method setGroupPublic.

/**
 * Insert the method's description here.
 * Creation date: (11/28/00 5:43:44 PM)
 * @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
 */
public MathModelInfo setGroupPublic(MathModelInfo mathModelInfo) throws DataAccessException {
    try {
        // 
        // publish from database
        // 
        MathModelInfo newMathModelInfo = (MathModelInfo) setGroupPublic0(mathModelInfo, VersionableType.MathModelMetaData, mathModelInfoHash);
        // 
        // delete MathModelMetaData from cache
        // 
        xmlHash.remove(mathModelInfo.getVersion().getVersionKey());
        fireDatabaseUpdate(new DatabaseEvent(this, DatabaseEvent.UPDATE, mathModelInfo, newMathModelInfo));
        return newMathModelInfo;
    } catch (RemoteProxyException e) {
        handleRemoteProxyException(e);
        throw new DataAccessException(e.getMessage());
    }
}
Also used : MathModelInfo(org.vcell.util.document.MathModelInfo) DataAccessException(org.vcell.util.DataAccessException) RemoteProxyException(cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)

Example 24 with RemoteProxyException

use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.

the class ClientDocumentManager method setGroupPublic.

/**
 * Insert the method's description here.
 * Creation date: (11/28/00 5:43:44 PM)
 * @param bioModelInfo cbit.vcell.biomodel.BioModelInfo
 */
public BioModelInfo setGroupPublic(BioModelInfo bioModelInfo) throws DataAccessException {
    try {
        // 
        // publish from database
        // 
        BioModelInfo newBioModelInfo = (BioModelInfo) setGroupPublic0(bioModelInfo, VersionableType.BioModelMetaData, bioModelInfoHash);
        // 
        // delete BioModelMetaData from cache
        // 
        xmlHash.remove(bioModelInfo.getVersion().getVersionKey());
        fireDatabaseUpdate(new DatabaseEvent(this, DatabaseEvent.UPDATE, bioModelInfo, newBioModelInfo));
        return newBioModelInfo;
    } catch (RemoteProxyException e) {
        handleRemoteProxyException(e);
        throw new DataAccessException(e.getMessage());
    }
}
Also used : BioModelInfo(org.vcell.util.document.BioModelInfo) DataAccessException(org.vcell.util.DataAccessException) RemoteProxyException(cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)

Example 25 with RemoteProxyException

use of cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException in project vcell by virtualcell.

the class ClientDocumentManager method saveAsNew.

/**
 * Insert the method's description here.
 * Creation date: (1/19/01 11:27:52 AM)
 */
public BioModel saveAsNew(BioModel bioModel, java.lang.String newName, String[] independentSims) throws DataAccessException {
    try {
        String bioModelXML = null;
        try {
            bioModel.getVCMetaData().cleanupMetadata();
            bioModelXML = XmlHelper.bioModelToXML(bioModel);
        } catch (XmlParseException e) {
            e.printStackTrace(System.out);
            throw new DataAccessException(e.getMessage());
        }
        String savedBioModelXML = sessionManager.getUserMetaDbServer().saveBioModelAs(new BigString(bioModelXML), newName, independentSims).toString();
        BioModel savedBioModel = getBioModelFromDatabaseXML(new XMLHolder<BioModel>(savedBioModelXML));
        KeyValue savedKey = savedBioModel.getVersion().getVersionKey();
        if (xmlHash.get(savedKey) == null) {
            xmlHash.put(savedKey, savedBioModelXML);
        }
        BioModelInfo savedBioModelInfo = new BioModelInfo(savedBioModel.getVersion(), savedBioModel.getModel().getKey(), savedBioModel.createBioModelChildSummary(), VCellSoftwareVersion.fromSystemProperty());
        bioModelInfoHash.put(savedKey, savedBioModelInfo);
        SimulationContext[] scArr = savedBioModel.getSimulationContexts();
        for (int i = 0; i < scArr.length; i++) {
            updateGeometryRelatedHashes(scArr[i].getGeometry());
        }
        fireDatabaseInsert(new DatabaseEvent(this, DatabaseEvent.INSERT, null, savedBioModelInfo));
        return savedBioModel;
    } catch (RemoteProxyException e) {
        e.printStackTrace(System.out);
        throw new DataAccessException(VCellErrorMessages.FAIL_SAVE_MESSAGE + "\n\n" + e.getMessage());
    }
}
Also used : KeyValue(org.vcell.util.document.KeyValue) BioModelInfo(org.vcell.util.document.BioModelInfo) BigString(org.vcell.util.BigString) XmlParseException(cbit.vcell.xml.XmlParseException) SimulationContext(cbit.vcell.mapping.SimulationContext) BigString(org.vcell.util.BigString) BioModel(cbit.vcell.biomodel.BioModel) DataAccessException(org.vcell.util.DataAccessException) RemoteProxyException(cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)

Aggregations

RemoteProxyException (cbit.vcell.message.server.bootstrap.client.RemoteProxyVCellConnectionFactory.RemoteProxyException)39 DataAccessException (org.vcell.util.DataAccessException)38 XmlParseException (cbit.vcell.xml.XmlParseException)9 BigString (org.vcell.util.BigString)8 KeyValue (org.vcell.util.document.KeyValue)8 BioModelInfo (org.vcell.util.document.BioModelInfo)7 MathModelInfo (org.vcell.util.document.MathModelInfo)7 VCImageInfo (cbit.image.VCImageInfo)6 GeometryInfo (cbit.vcell.geometry.GeometryInfo)5 BioModel (cbit.vcell.biomodel.BioModel)3 MathException (cbit.vcell.math.MathException)3 MathModel (cbit.vcell.mathmodel.MathModel)3 ExpressionException (cbit.vcell.parser.ExpressionException)3 ObjectNotFoundException (org.vcell.util.ObjectNotFoundException)3 PermissionException (org.vcell.util.PermissionException)3 GIFImage (cbit.image.GIFImage)2 VCImage (cbit.image.VCImage)2 Geometry (cbit.vcell.geometry.Geometry)2 SimulationContext (cbit.vcell.mapping.SimulationContext)2 SimulationStatus (cbit.vcell.server.SimulationStatus)2