Package org.apache.wicket.util.file

Examples of org.apache.wicket.util.file.IResourceFinder


   * @see org.apache.wicket.settings.IResourceSettings#addResourceFolder(java.lang.String)
   */
  public void addResourceFolder(final String resourceFolder)
  {
    // Get resource finder
    final IResourceFinder finder = getResourceFinder();

    // Make sure it's a path
    if (!(finder instanceof IResourcePath))
    {
      throw new IllegalArgumentException(
View Full Code Here


   * @see org.apache.wicket.settings.IResourceSettings#addResourceFolder(java.lang.String)
   */
  public void addResourceFolder(final String resourceFolder)
  {
    // Get resource finder
    final IResourceFinder finder = getResourceFinder();

    // Make sure it's a path
    if (!(finder instanceof IResourcePath))
    {
      throw new IllegalArgumentException(
View Full Code Here

    Assert.assertNotNull(Application.get().getResourceSettings().getResourceFinder());
  }

  public void testHonorsResourceFinderSettingsSetByApplication()
  {
    final IResourceFinder customResourceFinder = new IResourceFinder()
    {
      public IResourceStream find(Class<?> clazz, String pathname)
      {
        throw new UnsupportedOperationException("Not implemented");
      }

      @Override
      public String toString()
      {
        return "customResourceFinder";
      }
    };
    WebApplication wicketApplication = new DummyWebApplication()
    {
      @Override
      protected void init()
      {
        IResourceSettings resourceSettings = getResourceSettings();
        resourceSettings.setResourceFinder(customResourceFinder);
      }
    };
    new MockWebApplication(wicketApplication, "foo");
    IResourceFinder resourceFinderInApplication = Application.get().getResourceSettings().getResourceFinder();
    Assert.assertSame(customResourceFinder, resourceFinderInApplication);
  }
View Full Code Here

    Assert.assertNotNull(Application.get().getResourceSettings().getResourceFinder());
  }

  public void testHonorsResourceFinderSettingsSetByApplication()
  {
    final IResourceFinder customResourceFinder = new IResourceFinder()
    {
      public IResourceStream find(Class<?> clazz, String pathname)
      {
        throw new UnsupportedOperationException("Not implemented");
      }

      @Override
      public String toString()
      {
        return "customResourceFinder";
      }
    };
    WebApplication wicketApplication = new DummyWebApplication()
    {
      @Override
      protected void init()
      {
        IResourceSettings resourceSettings = getResourceSettings();
        resourceSettings.setResourceFinder(customResourceFinder);
      }
    };
    new MockWebApplication(wicketApplication, "foo");
    IResourceFinder resourceFinderInApplication = Application.get()
      .getResourceSettings()
      .getResourceFinder();
    Assert.assertSame(customResourceFinder, resourceFinderInApplication);
  }
View Full Code Here

   * @see org.apache.wicket.settings.IResourceSettings#addResourceFolder(java.lang.String)
   */
  public void addResourceFolder(final String resourceFolder)
  {
    // Get resource finder
    final IResourceFinder finder = getResourceFinder();

    // Make sure it's a path
    if (!(finder instanceof IResourcePath))
    {
      throw new IllegalArgumentException(
View Full Code Here

   * @see org.apache.wicket.settings.IResourceSettings#addResourceFolder(java.lang.String)
   */
  public void addResourceFolder(final String resourceFolder)
  {
    // Get resource finder
    final IResourceFinder finder = getResourceFinder();

    // Make sure it's a path
    if (!(finder instanceof IResourcePath))
    {
      throw new IllegalArgumentException(
View Full Code Here

   * @see org.apache.wicket.settings.IResourceSettings#addResourceFolder(java.lang.String)
   */
  public void addResourceFolder(final String resourceFolder)
  {
    // Get resource finder
    final IResourceFinder finder = getResourceFinder();

    // Make sure it's a path
    if (!(finder instanceof IResourcePath))
    {
      throw new IllegalArgumentException(
View Full Code Here

   * @see org.apache.wicket.settings.IResourceSettings#addResourceFolder(java.lang.String)
   */
  public void addResourceFolder(final String resourceFolder)
  {
    // Get resource finder
    final IResourceFinder finder = getResourceFinder();

    // Make sure it's a path
    if (!(finder instanceof IResourcePath))
    {
      throw new IllegalArgumentException(
View Full Code Here

   * @see org.apache.wicket.settings.IResourceSettings#addResourceFolder(java.lang.String)
   */
  public void addResourceFolder(final String resourceFolder)
  {
    // Get resource finder
    final IResourceFinder finder = getResourceFinder();

    // Make sure it's a path
    if (!(finder instanceof IResourcePath))
    {
      throw new IllegalArgumentException(
View Full Code Here

   * @see org.apache.wicket.settings.IResourceSettings#addResourceFolder(java.lang.String)
   */
  public void addResourceFolder(final String resourceFolder)
  {
    // Get resource finder
    final IResourceFinder finder = getResourceFinder();

    // Make sure it's a path
    if (!(finder instanceof IResourcePath))
    {
      throw new IllegalArgumentException(
View Full Code Here

TOP

Related Classes of org.apache.wicket.util.file.IResourceFinder

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.