Package br.gov.frameworkdemoiselle

Examples of br.gov.frameworkdemoiselle.DemoiselleException


        buffer.append(", ");
        buffer.append(qualifier.getClass().getCanonicalName());
      }

      String message = getBundle().getString("bean-not-found", buffer.toString());
      throw new DemoiselleException(message, cause);
    }

    return instance;
  }
View Full Code Here


    try {
      instance = (T) getReference(manager.getBeans(beanClass));

    } catch (NoSuchElementException cause) {
      String message = getBundle().getString("bean-not-found", beanClass.getCanonicalName());
      throw new DemoiselleException(message, cause);
    }

    return instance;
  }
View Full Code Here

    try {
      instance = (T) getReference(manager.getBeans(beanName));

    } catch (NoSuchElementException cause) {
      String message = getBundle().getString("bean-not-found", beanName);
      throw new DemoiselleException(message, cause);
    }

    return instance;
  }
View Full Code Here

  public boolean hasPermission(String resource, String operation) {
    throw getException();
  }

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

  public void setRollbackOnly() {
    throw getException();
  }

  private DemoiselleException getException() {
    return new DemoiselleException(getBundle().getString("transaction-not-defined",
        Transactional.class.getSimpleName()));
  }
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

    if (processors.isEmpty()) {
      unloadTempContexts();
    }

    if (failure != null) {
      throw new DemoiselleException(failure);
    }
  }
View Full Code Here

   *
   * @param method
   */
  private final void validateHandler(final Method method) {
    if (method.getParameterTypes().length != 1) {
      throw new DemoiselleException(getBundle().getString("must-declare-one-single-parameter",
          method.toGenericString()));
    }
  }
View Full Code Here

        cache.put(name, connection);
        statusCache.put(connection, new Status());
        getLogger().info(getBundle().getString("connection-was-created", name));

      } catch (Exception cause) {
        throw new DemoiselleException(getBundle().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(getBundle().getString("more-than-one-datasource-defined",
          Name.class.getSimpleName()));
    } else {
      result = names.iterator().next();
    }
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.