0

I'm trying to get an asset link (image), to create an object to use as a return of a rest service. I got all my object created only missing this link, I can't find any method to use for it on Java side. As FTL I don't have any problem to do it (using DamTemplatingFunctions). On JCR, on my article (on my own workspace) I got the asset key "jcr:xxxxxxxx..." and I can easily acess it, the only part missing is how can I retrieve the link for it from the dam workspace.

Thanks for all help or guidance.

JPeter
  • 219
  • 1
  • 14

1 Answers1

1

you can inject the DamTemplatingFunctions and then use the methods. Here an example how to inject

@Inject
public Example(DamTemplatingFunctions damTemplatingFunctions) {
    this.damTemplatingFunctions = damTemplatingFunctions;
}

private DamTemplatingFunctions damTemplatingFunctions;

HTH

Tom Wespi
  • 71
  • 4
  • Thanks for the help, I was able to do it using `Components` class like so: `private static DamTemplatingFunctions damTemplatingFunctions = Components.getComponent(DamTemplatingFunctions.class); ` and then I can use all of the methods happy coding =} – JPeter Jun 04 '18 at 10:37