Package org.springmodules.cache.provider

Examples of org.springmodules.cache.provider.InvalidCacheModelException


   */
  protected void validateCachingModelProperties(Object cachingModel)
      throws InvalidCacheModelException {
    CoherenceCachingModel model = (CoherenceCachingModel) cachingModel;
    if (!StringUtils.hasText(model.getCacheName())) {
      throw new InvalidCacheModelException("Cache name should not be empty");
    }
  }
View Full Code Here


      throws InvalidCacheModelException {
    CoherenceFlushingModel model = (CoherenceFlushingModel) flushingModel;
    String[] cacheNames = model.getCacheNames();

    if (ObjectUtils.isEmpty(cacheNames)) {
      throw new InvalidCacheModelException(
          "There should be at least one cache name");
    }
  }
View Full Code Here

   */
  protected void validateCachingModelProperties(Object cachingModel)
      throws InvalidCacheModelException {
    JcsCachingModel model = (JcsCachingModel) cachingModel;
    if (!StringUtils.hasText(model.getCacheName())) {
      throw new InvalidCacheModelException("Cache name should not be empty");
    }
  }
View Full Code Here

      throws InvalidCacheModelException {
    JcsFlushingModel model = (JcsFlushingModel) flushingModel;
    CacheStruct[] structs = model.getCacheStructs();

    if (ObjectUtils.isEmpty(structs)) {
      throw new InvalidCacheModelException(
          "There should be at least one cache to flush");
    }

    int structCount = structs.length;
    for (int i = 0; i < structCount; i++) {
      CacheStruct struct = structs[i];
      if (!StringUtils.hasText(struct.getCacheName())) {
        throw new InvalidCacheModelException(
            "Cache name should not be empty in the struct with index <" + i
                + ">");
      }
    }
  }
View Full Code Here

   */
  protected void validateCachingModelProperties(Object cachingModel)
      throws InvalidCacheModelException {
    GigaSpacesCachingModel model = (GigaSpacesCachingModel) cachingModel;
    if (!StringUtils.hasText(model.getCacheName())) {
      throw new InvalidCacheModelException("Cache name should not be empty");
    }
  }
View Full Code Here

      throws InvalidCacheModelException {
    GigaSpacesFlushingModel model = (GigaSpacesFlushingModel) flushingModel;
    String[] cacheNames = model.getCacheNames();

    if (ObjectUtils.isEmpty(cacheNames)) {
      throw new InvalidCacheModelException(
          "There should be at least one cache name");
    }
  }
View Full Code Here

   */
  protected void validateCachingModelProperties(Object cachingModel)
      throws InvalidCacheModelException {
    JbossCacheCachingModel model = (JbossCacheCachingModel) cachingModel;
    if (!StringUtils.hasText(model.getNode())) {
      throw new InvalidCacheModelException(
          "The FQN of the cache node should not be empty");
    }
  }
View Full Code Here

      throws InvalidCacheModelException {
    JbossCacheFlushingModel model = (JbossCacheFlushingModel) flushingModel;
    String[] nodes = model.getNodes();

    if (ObjectUtils.isEmpty(nodes)) {
      throw new InvalidCacheModelException(
          "There should be at least one node FQN");
    }
  }
View Full Code Here

    CachingModel model = new MockCachingModel();
    Map models = new HashMap();
    models.put("key", model);

    InvalidCacheModelException expected = new InvalidCacheModelException("");
    validator.validateCachingModel(model);
    validatorControl.setThrowable(expected);

    replay();
View Full Code Here

   */
  protected void validateCachingModelProperties(Object cachingModel)
      throws InvalidCacheModelException {
    EhCacheCachingModel model = (EhCacheCachingModel) cachingModel;
    if (!StringUtils.hasText(model.getCacheName())) {
      throw new InvalidCacheModelException("Cache name should not be empty");
    }
  }
View Full Code Here

TOP

Related Classes of org.springmodules.cache.provider.InvalidCacheModelException

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.