You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2003/11/17 18:41:27 UTC

DO NOT REPLY [Bug 24758] New: - ResourceFactory not extensible

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24758>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24758

ResourceFactory not extensible

           Summary: ResourceFactory not extensible
           Product: Velocity
           Version: 1.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Source
        AssignedTo: velocity-dev@jakarta.apache.org
        ReportedBy: cmore@atg.com


The class org.apache.velocity.runtime.resource.ResourceFactory provides
no mechanism for allowing sub-classes of Template or ContentResources
to be returned.

Since ResourceManagerImpl makes a call to ResourceFactory.getResource(),
the only way to override the behavior is to subclass ResourceManagerImpl
and cut-paste-then-modify the code for loadResource().

At the very least, moving the ResourceFactory.getResource() call into
a separate, protected method in ResourceManagerImpl would greatly simplify
sub-classing Templates and/or ContentResources.

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org