to.etc.domui.util.resources
Class SimpleResourceFactory

java.lang.Object
  extended by to.etc.domui.util.resources.SimpleResourceFactory
All Implemented Interfaces:
IResourceFactory

public class SimpleResourceFactory
extends java.lang.Object
implements IResourceFactory

Handles all normal $xxx type resources. These either come from web files (default) or if not found there from a class resource below /resources/.

Author:
Frits Jalvingh Created on Jan 14, 2011

Constructor Summary
SimpleResourceFactory()
           
 
Method Summary
 int accept(java.lang.String name)
          Return a > 0 value when this factory can provide (recognises the name format) for this resource.
 IResourceRef getResource(DomApplication da, java.lang.String name, IResourceDependencyList rdl)
          Create the ref for the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleResourceFactory

public SimpleResourceFactory()
Method Detail

accept

public int accept(java.lang.String name)
Description copied from interface: IResourceFactory
Return a > 0 value when this factory can provide (recognises the name format) for this resource. The return value is a score; the factory returning the highest score will win. Accepting a resource does not imply that the resource actually exists.

Specified by:
accept in interface IResourceFactory
Returns:

getResource

public IResourceRef getResource(@Nonnull
                                DomApplication da,
                                @Nonnull
                                java.lang.String name,
                                @Nonnull
                                IResourceDependencyList rdl)
                         throws java.lang.Exception
Description copied from interface: IResourceFactory
Create the ref for the resource.

Specified by:
getResource in interface IResourceFactory
Returns:
Throws:
java.lang.Exception