Ah, thanks.
What is a DS component?
Yes, I am working with CQ5.4 com.day.cq.dam.impl.DamAdapterFactory , which
isn't exported. And, no source code is provided.
http://repo.adobe.com/nexus/content/groups/public/com/day/cq/dam/cq-dam-core/5.4.0/cq-dam-core-5.4.0.pom
So, I am not sure if I can get a
Sam-
Are you saying that there's is already something which adapts Resource ->
Foo? And you can't change that class?
If so, this class needs to reference that existing AdapterFactory DIRECTLY
rather than via the AdapterManager. This is easy enough to do with a DS
component.
Regarding your service
I just want to extend Foo and FooFactory so that Bar (which extends Foo)
will be supplied in some cases..
Simple concept.. hard to do in Sling, I guess.
On Mon, Dec 17, 2012 at 1:22 PM, Ryan Lunka wrote:
> I see a couple things going on here…
>
> First, I think the reason you are going to see a
I see a couple things going on here…
First, I think the reason you are going to see an infinite recursion situation
is because you haven't defined HOW Resource will adapt to Foo. All the
AdapterFactory should do is take an Object and a class and create a new Object
of that Class FROM the adapt
Hey,
Given
public class Bar implements Foo {
...
}
I want to provide AdapterFactory that returns Bar instance when
resource.adaptTo(Foo.class) is called.
Here is my attempt:
=>8=
@Component(metatype = false, immediate = true)
@Service
@Properties({
@Property(name = SlingConstants.PROPERTY