Search in sources :

Example 16 with VersionInfo

use of org.vcell.util.document.VersionInfo in project vcell by virtualcell.

the class DatabaseWindowManager method accessPermissions.

public void accessPermissions() {
    VersionInfo selectedVersionInfo = getPanelSelection() == null ? null : getPanelSelection();
    accessPermissions(getComponent(), selectedVersionInfo);
}
Also used : VersionInfo(org.vcell.util.document.VersionInfo)

Example 17 with VersionInfo

use of org.vcell.util.document.VersionInfo in project vcell by virtualcell.

the class ClientRequestManager method createSelectLoadGeomTask.

private AsynchClientTask createSelectLoadGeomTask(final TopLevelWindowManager requester) {
    AsynchClientTask selectLoadGeomTask = new AsynchClientTask("Select/Load geometry...", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {

        @Override
        public void run(Hashtable<String, Object> hashTable) throws Exception {
            VersionInfo vcVersionInfo = (VersionInfo) hashTable.get(VERSIONINFO_KEY);
            Geometry geom = null;
            if (vcVersionInfo instanceof VCDocumentInfo) {
                geom = getGeometryFromDocumentSelection(requester.getComponent(), (VCDocumentInfo) vcVersionInfo, false);
            } else if (vcVersionInfo instanceof VCImageInfo) {
                VCImage img = getDocumentManager().getImage((VCImageInfo) vcVersionInfo);
                geom = new Geometry("createSelectLoadGeomTask", img);
            } else {
                throw new Exception("Unexpected versioninfo type.");
            }
            // pregenerate sampled image, cpu intensive
            geom.precomputeAll(new GeometryThumbnailImageFactoryAWT());
            hashTable.put(GEOMETRY_KEY, geom);
        }
    };
    return selectLoadGeomTask;
}
Also used : Geometry(cbit.vcell.geometry.Geometry) VersionInfo(org.vcell.util.document.VersionInfo) GeometryThumbnailImageFactoryAWT(cbit.vcell.geometry.GeometryThumbnailImageFactoryAWT) AsynchClientTask(cbit.vcell.client.task.AsynchClientTask) VCDocumentInfo(org.vcell.util.document.VCDocumentInfo) Hashtable(java.util.Hashtable) VCImage(cbit.image.VCImage) VCImageInfo(cbit.image.VCImageInfo) ProgrammingException(org.vcell.util.ProgrammingException) GeometryException(cbit.vcell.geometry.GeometryException) IOException(java.io.IOException) DataAccessException(org.vcell.util.DataAccessException) PropertyVetoException(java.beans.PropertyVetoException) ImageException(cbit.image.ImageException) UtilCancelException(org.vcell.util.UtilCancelException) DataFormatException(java.util.zip.DataFormatException) UserCancelException(org.vcell.util.UserCancelException)

Example 18 with VersionInfo

use of org.vcell.util.document.VersionInfo in project vcell by virtualcell.

the class LocalUserMetaDbServerMessaging method groupSetPrivate.

/**
 * This method was created in VisualAge.
 * @return void
 * @param key KeyValue
 * @exception DataAccessException The exception description.
 * @exception java.rmi.RemoteException The exception description.
 */
public org.vcell.util.document.VersionInfo groupSetPrivate(org.vcell.util.document.VersionableType vType, org.vcell.util.document.KeyValue key) throws DataAccessException, ObjectNotFoundException {
    try {
        log.print("LocalUserMetaDbServerMessaging.groupSetPrivate(vType=" + vType.getTypeName() + ", Key=" + key + ")");
        VersionInfo newVersionInfo = dbServerProxy.groupSetPrivate(vType, key);
        return newVersionInfo;
    } catch (DataAccessException e) {
        log.exception(e);
        throw e;
    } catch (Throwable e) {
        log.exception(e);
        throw new DataAccessException(e.getMessage());
    }
}
Also used : VersionInfo(org.vcell.util.document.VersionInfo) DataAccessException(org.vcell.util.DataAccessException)

Example 19 with VersionInfo

use of org.vcell.util.document.VersionInfo in project vcell by virtualcell.

the class DatabaseServerImpl method groupRemoveUser.

/**
 * This method was created in VisualAge.
 * @return void
 * @param key KeyValue
 * @exception org.vcell.util.DataAccessException The exception description.
 * @exception java.rmi.RemoteException The exception description.
 */
public VersionInfo groupRemoveUser(User user, VersionableType vType, KeyValue key, String userRemoveFromGroup, boolean isHiddenFromOwner) throws DataAccessException, ObjectNotFoundException {
    try {
        if (lg.isTraceEnabled())
            lg.trace("DatabaseServerImpl.groupRemoveUser(vType=" + vType.getTypeName() + ", Key=" + key + ", userRemoveFromGroup=" + userRemoveFromGroup + ")");
        dbTop.groupRemoveUser(user, vType, key, true, userRemoveFromGroup, isHiddenFromOwner);
        VersionInfo newVersionInfo = (VersionInfo) (dbTop.getVersionableInfos(user, key, vType, false, true, true).elementAt(0));
        return newVersionInfo;
    } catch (SQLException e) {
        lg.error(e.getMessage(), e);
        throw new DataAccessException(e.getMessage());
    } catch (ObjectNotFoundException e) {
        lg.error(e.getMessage(), e);
        throw new ObjectNotFoundException(e.getMessage());
    } catch (Throwable e) {
        lg.error(e.getMessage(), e);
        throw new DataAccessException(e.getMessage());
    }
}
Also used : VersionInfo(org.vcell.util.document.VersionInfo) SQLException(java.sql.SQLException) ObjectNotFoundException(org.vcell.util.ObjectNotFoundException) DataAccessException(org.vcell.util.DataAccessException)

Example 20 with VersionInfo

use of org.vcell.util.document.VersionInfo in project vcell by virtualcell.

the class DatabaseServerImpl method groupSetPublic.

/**
 * This method was created in VisualAge.
 * @return void
 * @param key KeyValue
 * @exception org.vcell.util.DataAccessException The exception description.
 * @exception java.rmi.RemoteException The exception description.
 */
public VersionInfo groupSetPublic(User user, VersionableType vType, KeyValue key) throws DataAccessException, ObjectNotFoundException {
    try {
        if (lg.isTraceEnabled())
            lg.trace("DatabaseServerImpl.groupSetPublic(vType=" + vType.getTypeName() + ", Key=" + key + ")");
        dbTop.groupSetPublic(user, vType, key, true);
        VersionInfo newVersionInfo = (VersionInfo) (dbTop.getVersionableInfos(user, key, vType, false, true, true).elementAt(0));
        return newVersionInfo;
    } catch (SQLException e) {
        lg.error(e.getMessage(), e);
        throw new DataAccessException(e.getMessage());
    } catch (ObjectNotFoundException e) {
        lg.error(e.getMessage(), e);
        throw new ObjectNotFoundException(e.getMessage());
    } catch (Throwable e) {
        lg.error(e.getMessage(), e);
        throw new DataAccessException(e.getMessage());
    }
}
Also used : VersionInfo(org.vcell.util.document.VersionInfo) SQLException(java.sql.SQLException) ObjectNotFoundException(org.vcell.util.ObjectNotFoundException) DataAccessException(org.vcell.util.DataAccessException)

Aggregations

VersionInfo (org.vcell.util.document.VersionInfo)28 DataAccessException (org.vcell.util.DataAccessException)18 ObjectNotFoundException (org.vcell.util.ObjectNotFoundException)10 SQLException (java.sql.SQLException)6 BigDecimal (java.math.BigDecimal)5 VersionableTypeVersion (org.vcell.util.document.VersionableTypeVersion)5 ResultSet (java.sql.ResultSet)4 Statement (java.sql.Statement)4 Hashtable (java.util.Hashtable)4 MathModelInfo (org.vcell.util.document.MathModelInfo)4 Version (org.vcell.util.document.Version)4 VCImageInfo (cbit.image.VCImageInfo)3 AsynchClientTask (cbit.vcell.client.task.AsynchClientTask)3 GeometryInfo (cbit.vcell.geometry.GeometryInfo)3 Connection (java.sql.Connection)3 Vector (java.util.Vector)3 TreePath (javax.swing.tree.TreePath)3 BioModelInfo (org.vcell.util.document.BioModelInfo)3 VCDocumentInfoNode (cbit.vcell.desktop.VCellBasicCellRenderer.VCDocumentInfoNode)2 SimulationInfo (cbit.vcell.solver.SimulationInfo)2