Package br.gov.frameworkdemoiselle

Examples of br.gov.frameworkdemoiselle.DemoiselleException


    return getRequest().isUserInRole(role);
  }

  @Override
  public boolean hasPermission(String resource, String operation) {
    throw new DemoiselleException(getBundle().getString("has-permission-not-supported",
        RequiredPermission.class.getSimpleName()));
  }
View Full Code Here


    return getRequest().isUserInRole(role);
  }

  @Override
  public boolean hasPermission(String resource, String operation) {
    throw new DemoiselleException(getBundle().getString("has-permission-not-supported",
        RequiredPermission.class.getSimpleName()));
  }
View Full Code Here

   * @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()");
  }
View Full Code Here

  public User getUser() {
    throw getException();
  }

  private DemoiselleException getException() {
    return new DemoiselleException(getBundle().getString("authenticator-not-defined",
        SecurityContext.class.getSimpleName()));
  }
View Full Code Here

        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;
  }
View Full Code Here

  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();
    }
View Full Code Here

          logger.info(bundle.getString("connection-was-closed", key));
        }

      } catch (Exception cause) {
        throw new DemoiselleException(bundle.getString("connection-close-failed", key), cause);
      }
    }

    cache.clear();
  }
View Full Code Here

    for (String dataBaseName : getDataSourceNames(contextClassLoader)) {

      try {
        create(dataBaseName);
      } catch (Throwable t) {
        throw new DemoiselleException(t);
      }

      logger.debug(bundle.getString("datasource-name-found", dataBaseName));
    }
  }
View Full Code Here

    if (config.getDriverClass() != null) {
      result.addAll(config.getDriverClass().keySet());
    }

    if (result.isEmpty()) {
      throw new DemoiselleException(bundle.getString("datasource-name-not-found"));
    }

    return result;
  }
View Full Code Here

    } else if (url != null) {
      result = new BasicDataSourceProxy(dataSourceName, config, bundle);
     
    } else {
      throw new DemoiselleException(bundle.getString("uncompleted-datasource-configuration", dataSourceName));
    }

    return result;
  }
View Full Code Here

TOP

Related Classes of br.gov.frameworkdemoiselle.DemoiselleException

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.