Well, to answer my own question, I see that I can set a CustomResourceSpecifier 
by editing my descriptor xml directly (thanks to a post by Adam Lally in 2008; 
http://www.mail-archive.com/[email protected]/msg01437.html )

I have this now:

      <externalResource>
        <name>theResource</name>
        <description>my resource</description>
        <customResourceSpecifier>
          
<resourceClassName>com.my.resourcemanagers.MyDataResource</resourceClassName>
          <parameters>
            <parameter name="param1" value="paramval1"/>
            <parameter name="param2" value="paramval2"/>
          </parameters>
        </customResourceSpecifier>
      </externalResource>


I then implemented as

public class MyDataResource extends Resource_ImplBase implements 
ParameterizedDataResource, DataResource, SharedResourceObject

This actually works and does what I want. But I suspect I'm not really using 
the framework correctly. Does anyone knows the canonical way to use these 
various Resource classes?


Stephan

On Mar 16, 2012, at 12:30 PM, Stephan Greene wrote:

> I am implementing a SharedResourceObject which requires a DataResource more 
> involved than just a url to access the data the resource represents. I need 
> something like the ParameterizedDataResource -- but I don't see how to 
> instantiate this. The load() method of SharedResourceObject takes a 
> DataResource object parameter. How do I configure my SharedResourceObject to 
> use some other kind of DataResource? I know how to implement the data 
> resource I need, but I can't figure out how to tell the framework that I want 
> to use my own data resource with my own SharedResourceObject.
> 
> Does it involve a CustomResourceSpecifier? I can't figure out how to use 
> that, either. Any help appreciated.
> 
> Stephan
> 

Reply via email to