@Override public IConfig createConfig(String key) throws MException { throw new MException("not supported"); }
@Override public void valueChange(ValueChangeEvent event) { try { setValueToDataSource(getElement().getDataConnector(DataSource.CONNECTOR_TASK_DATA)); } catch (MException e) { e.printStackTrace(); } } });
} catch (MException e) { e.printStackTrace();
@Override public void removeConfig(IConfig config) throws MException { throw new MException("not supported"); }
@Override public int moveConfig(IConfig config, int newPos) throws MException { throw new MException("not supported"); }
@Override public int moveConfig(IConfig config, int newPos) throws MException { throw new MException("not supported"); }
@Override public IConfig createConfig(String key) throws MException { throw new MException("not supported"); }
@Override public void removeConfig(IConfig config) throws MException { throw new MException("not supported"); }
@Override public void inject(DefComponent parent) throws MException { throw new MException("can't link root into another container"); }
@Override public void removeConfig(IConfig config) throws MException { if (!(config instanceof XmlConfig)) throw new MException("not a xmlconfig"); if ( ((XmlConfig)config).element.getParentNode() != element) throw new MException("not child of this config"); element.removeChild(((XmlConfig)config).element); }
/** {@inheritDoc} */ @Override public boolean isReadOnly() throws Exception { if (closed) throw new MException(poolId,id,"Connection not valid"); return connection.isReadOnly(); }
/** * Return a parser object to parse a sql query. The parser should change the output to be * specialized to the database type. * @param language * * @return x * @throws MException */ public Parser getQueryParser(String language) throws MException { // return new SimpleQueryParser(); // from dialect // return new SqlCompiler(); // from dialect if (language == null || JdbcConnection.LANGUAGE_SQL.equals(language)) return sqlParser; if (DbConnection.LANGUAGE_COMMON.equals(language)) return commonParser; throw new MException(this,"language not supported", language); }
public IConfig setConfig(String key, HashConfig child) throws MException { if (child.parent != null) throw new MException("Config already linked"); LinkedList<IConfig> list = children.get(key); if (list == null) { list = new LinkedList<>(); children.put(key, list); } child.parent = this; child.name = key; list.add(child); childrenAll.add(child); return child; }
protected void updateArchiveDataSource() throws InvalidSyntaxException, MException { Collection<ServiceReference<DataSource>> refs = context.getServiceReferences(DataSource.class, "(osgi.jndi.service.name="+archiveDsName+")"); if (refs.size() == 0) throw new MException("datasource not found",archiveDsName); archiveDataSource = context.getService(refs.iterator().next()); archiveDsProvider.setDataSource(archiveDataSource); }
/** {@inheritDoc} */ @Override public DbStatement createStatement(String sql, String language) throws MException { synchronized (this) { if (closed) throw new MException("Connection not valid"); return new JdbcStatement(this, sql, language); } }
public <T extends CaoAspect> CaoCore registerAspectFactory(Class<T> ifc,CaoAspectFactory<T> factory) throws MException { if (aspectFactory.containsKey(ifc)) throw new MException("Aspect already registered",ifc); aspectFactory.put(ifc, factory); factory.doInitialize(this, actionList); return this; }
@Override public void undeploy(String name) throws MException { startEngine(); //TODO stop cases before ? ProcessInfo info = null; synchronized (availableProcesses) { info = availableProcesses.get(name); } if (info == null) throw new MException("Process not found",name); if (info.deployedName == null) throw new MException("Process is not deployed",name); ((DefaultProcessProvider)config.processProvider).removeProcess(info.deployedName); info.deployedName = null; }
/** {@inheritDoc} */ @Override public void commit() throws Exception { log().t(poolId,id,"commit"); if (closed) throw new MException(poolId,id,"Connection not valid"); if (!connection.getAutoCommit()) connection.commit(); }
/** * <p>getPool.</p> * * @param name a {@link java.lang.String} object. * @return a {@link de.mhus.lib.sql.DbPool} object. * @throws java.lang.Exception if any. */ public DbPool getPool(String name) throws Exception { if (bundle == null) throw new MException("Bundle already closed"); synchronized (bundle) { DbPool pool = bundle.get(name); if (pool == null) { IConfig poolCon = config.getNode(name); if (poolCon != null) { pool = new DefaultDbPool(poolCon, activator); bundle.put(name, pool); } else { throw new MException("pool config not found",name); } } return pool; } }
throw new MException("not a hashconfig"); throw new MException("config not in my list"); throw new MException("out of range"); int pos = list.indexOf(config); if (pos == list.size()-1) throw new MException("out of range"); list.remove(config); list.add(pos+1,(HashConfig) config); int pos = list.indexOf(config); if (pos == 0) throw new MException("out of range"); list.remove(config); list.add(pos-1,(HashConfig) config); throw new MException("out of range");