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);
}
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;
}
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());
}
}
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());
}
}
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());
}
}
Aggregations