use of org.bimserver.database.actions.AddExtendedDataToRevisionDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method addExtendedDataToRevision.
@Override
public void addExtendedDataToRevision(Long roid, SExtendedData extendedData) throws ServerException, UserException {
requireAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession(OperationType.POSSIBLY_WRITE);
try {
ExtendedData convert = getBimServer().getSConverter().convertFromSObject(extendedData, session.create(ExtendedData.class), session);
session.executeAndCommitAction(new AddExtendedDataToRevisionDatabaseAction(getBimServer(), session, getInternalAccessMethod(), roid, getAuthorization(), convert));
} catch (Exception e) {
handleException(e);
} finally {
session.close();
}
}
Aggregations