Package org.saiku.service.util.exception

Examples of org.saiku.service.util.exception.SaikuServiceException


        }
      } else {
        throw new Exception("repo URL is null");
      }
    } catch (Exception e) {
      throw new SaikuServiceException(e.getMessage(), e);
    }
  }
View Full Code Here


        fw.close();
        datasources.put(datasource.getName(), datasource);
        return datasource;

      } else {
        throw new SaikuServiceException("Cannot save datasource because uri or datasource is null uri("
                                        + (uri == null) + ")");
      }
    } catch (Exception e) {
      throw new SaikuServiceException("Error saving datasource", e);
    }
  }
View Full Code Here

          return true;
        }
      }
      throw new Exception("Cannot delete datasource file uri:" + uri);
    } catch (Exception e) {
      throw new SaikuServiceException("Cannot delete datasource", e);
    }
  }
View Full Code Here

  @NotNull
  Connection getConnection() {
    if (objects.containsKey(ObjectKey.CONNECTION)) {
      return (Connection) objects.get(ObjectKey.CONNECTION);
    }
    throw new SaikuServiceException("Context: " + id + " does not contain a connection object");
  }
View Full Code Here

      Object o = objects.get(ObjectKey.QUERY);
      if (o instanceof ThinQuery) {
        return (ThinQuery) objects.get(ObjectKey.QUERY);
      }
    }
    throw new SaikuServiceException("Context: " + id + " does not contain a query object");
  }
View Full Code Here

  @NotNull
  public Statement getStatement() {
    if (objects.containsKey(ObjectKey.STATEMENT)) {
      return (Statement) objects.get(ObjectKey.STATEMENT);
    }
    throw new SaikuServiceException("Context: " + id + " does not contain a statement object");

  }
View Full Code Here

        s.unparse(new ParseTreeWriter(new PrintWriter(writer)));
      } catch (SaikuIncompatibleException se) {
        LOG.debug("Cannot convert to new query model mdx, falling back to old version", se);
        this.query.getSelect().unparse(new ParseTreeWriter(new PrintWriter(writer)));
      } catch (Exception e) {
        throw new SaikuServiceException("Cannot convert to new query model", e);
      }
    } else {
      this.query.getSelect().unparse(new ParseTreeWriter(new PrintWriter(writer)));
    }
    return writer.toString();
View Full Code Here

          final Constructor<IDatasourceProcessor> ctor =
              clazz.getConstructor();
          final IDatasourceProcessor dsProcessor = ctor.newInstance();
          datasource = dsProcessor.process(datasource);
        } catch (Exception e) {
          throw new SaikuServiceException("Error applying DatasourceProcessor \"" + processor + "\"", e);
        }
      }
    }
    return datasource;
  }
View Full Code Here

          final Constructor<IConnectionProcessor> ctor =
              clazz.getConstructor();
          final IConnectionProcessor conProcessor = ctor.newInstance();
          return conProcessor.process(con);
        } catch (Exception e) {
          throw new SaikuServiceException("Error applying ConnectionProcessor \"" + processor + "\"", e);
        }
      }
    }
    return con;
  }
View Full Code Here


  public IQuery getIQuery(String queryName) {
    IQuery query = getIQueryMap().get(queryName);
    if (query == null) {
      throw new SaikuServiceException("No query with name (" + queryName + ") found");
    }
    return query;
  }
View Full Code Here

TOP

Related Classes of org.saiku.service.util.exception.SaikuServiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.