to.etc.domui.util.resources
Interface IResourceFactory

All Known Implementing Classes:
ClassRefResourceFactory, FragmentedThemeResourceFactory, SimpleResourceFactory, VersionedJsResourceFactory

public interface IResourceFactory

A factory which can provide for a resource depending on it's name.

Author:
Frits Jalvingh Created on Jan 14, 2011

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.
 

Method Detail

accept

int accept(@Nonnull
           java.lang.String name)
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.

Parameters:
name -
Returns:

getResource

@Nonnull
IResourceRef getResource(@Nonnull
                                 DomApplication da,
                                 @Nonnull
                                 java.lang.String name,
                                 @Nullable
                                 IResourceDependencyList rdl)
                         throws java.lang.Exception
Create the ref for the resource.

Parameters:
name -
rdl -
Returns:
Throws:
java.lang.Exception