Package com.cedarsoft

Examples of com.cedarsoft.NotFoundException


  @Override
  @Nonnull
  public T findStoredObject( @Nonnull Matcher<T> matcher, @Nonnull String notFoundMessage ) throws NotFoundException {
    T found = findStoredObject( matcher );
    if ( found == null ) {
      throw new NotFoundException( notFoundMessage );
    }

    return found;
  }
View Full Code Here


  @Override
  public void remove( @Nonnull T object, @Nonnull String removeMessage ) throws NotFoundException {
    try {
      lock.writeLock().lock();
      if ( !storedObjects.remove( object ) ) {
        throw new NotFoundException( removeMessage );
      }
      for ( Listener<T> listener : new ArrayList<Listener<T>>( listeners ) ) {
        listener.objectRemoved( object );
      }
    } finally {
View Full Code Here

  @Override
  @NotNull
  public Taggable findTaggable( @NotNull T o ) throws NotFoundException {
    WeakReference<Taggable> weakReference = store.get( o );
    if ( weakReference == null ) {
      throw new NotFoundException();
    }
    Taggable taggable = weakReference.get();
    if ( taggable == null ) {
      throw new NotFoundException();
    }
    return taggable;
  }
View Full Code Here

    for ( Tag tag : tags.getTags() ) {
      if ( tag.getDescription().equals( description ) ) {
        return tag;
      }
    }
    throw new NotFoundException( "No tag found for description <" + description + '>' );
  }
View Full Code Here

  @NotNull
  public T findStoredObject( @NotNull @NonNls Matcher<T> matcher, @NotNull @NonNls String notFoundMessage ) throws NotFoundException {
    T found = findStoredObject( matcher );
    if ( found == null ) {
      throw new NotFoundException( notFoundMessage );
    }

    return found;
  }
View Full Code Here

  @NotNull
  public T findStoredObject( @NotNull @NonNls Matcher<T> matcher, @NotNull @NonNls String notFoundMessage ) throws NotFoundException {
    T found = findStoredObject( matcher );
    if ( found == null ) {
      throw new NotFoundException( notFoundMessage );
    }

    return found;
  }
View Full Code Here

    for ( BeanUiAccess<?> uiAccess : beanUiAccesses ) {
      if ( uiAccess.getBeanType().equals( beanType ) ) {
        return ( BeanUiAccess<T> ) uiAccess;
      }
    }
    throw new NotFoundException( "No BeanUiAccess found for " + beanType );
  }
View Full Code Here

   */
  @NotNull
  public <P, C> TreeLayer<P, C> getLayer( @NotNull Class<P> parentType ) throws NotFoundException {
    TreeLayer<?, ?> tree = configurations.get( parentType );
    if ( tree == null ) {
      throw new NotFoundException( "No tree layer found for " + parentType );
    }
    return ( TreeLayer<P, C> ) tree;
  }
View Full Code Here

    for ( Tag tag : tags.getTags() ) {
      if ( tag.getDescription().equals( description ) ) {
        return tag;
      }
    }
    throw new NotFoundException( "No tag found for description <" + description + '>' );
  }
View Full Code Here

  @Override
  @NotNull
  public Taggable findTaggable( @NotNull T o ) throws NotFoundException {
    WeakReference<Taggable> weakReference = store.get( o );
    if ( weakReference == null ) {
      throw new NotFoundException();
    }
    Taggable taggable = weakReference.get();
    if ( taggable == null ) {
      throw new NotFoundException();
    }
    return taggable;
  }
View Full Code Here

TOP

Related Classes of com.cedarsoft.NotFoundException

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.