to.etc.domui.util.resources
Class ClassRefResourceFactory

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

public class ClassRefResourceFactory
extends java.lang.Object
implements IResourceFactory

Handles the $REF resource which explicitly refers to a resource in the classpath.

Author:
Frits Jalvingh Created on Jan 14, 2011

Constructor Summary
ClassRefResourceFactory()
           
 
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

ClassRefResourceFactory

public ClassRefResourceFactory()
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

@Nonnull
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