6566676869707172
return getRequest().isUserInRole(role); } @Override public boolean hasPermission(String resource, String operation) { throw new DemoiselleException(getBundle().getString("has-permission-not-supported", RequiredPermission.class.getSimpleName())); }
5859606162636465
187188189190191192193
* @deprecated Use {@link #getCurrentUser()} instead. * @see br.gov.frameworkdemoiselle.security.SecurityContext#getUser() */ @Override public User getUser() { throw new DemoiselleException("Utilize o método getCurrentUser() ao invés do getUser()"); }
8384858687888990
public User getUser() { throw getException(); } private DemoiselleException getException() { return new DemoiselleException(getBundle().getString("authenticator-not-defined", SecurityContext.class.getSimpleName())); }
6869707172737475767778
cache.put(name, connection); logger.info(bundle.getString("connection-was-created", name)); } catch (Exception cause) { throw new DemoiselleException(bundle.getString("connection-creation-failed", name), cause); } } return connection; }
116117118119120121122123124125126
private String getNameFromCache() { String result; Set<String> names = producer.getCache().keySet(); if (names.size() > 1) { throw new DemoiselleException(bundle.getString("more-than-one-datasource-defined", Name.class.getSimpleName())); } else { result = names.iterator().next(); }
143144145146147148149150151152153
logger.info(bundle.getString("connection-was-closed", key)); } } catch (Exception cause) { throw new DemoiselleException(bundle.getString("connection-close-failed", key), cause); } } cache.clear(); }
4748495051525354555657
for (String dataBaseName : getDataSourceNames(contextClassLoader)) { try { create(dataBaseName); } catch (Throwable t) { throw new DemoiselleException(t); } logger.debug(bundle.getString("datasource-name-found", dataBaseName)); } }
68697071727374757677
if (config.getDriverClass() != null) { result.addAll(config.getDriverClass().keySet()); } if (result.isEmpty()) { throw new DemoiselleException(bundle.getString("datasource-name-not-found")); } return result; }
118119120121122123124125126127
} else if (url != null) { result = new BasicDataSourceProxy(dataSourceName, config, bundle); } else { throw new DemoiselleException(bundle.getString("uncompleted-datasource-configuration", dataSourceName)); } return result; }