cancel
Showing results for 
Search instead for 
Did you mean: 

Target URL of resource in KM API

Former Member
0 Kudos

Hi,

I am working on KM API in EP 7.3, and i want to get the target URL of the resource fetched. I tried to use the resource.getTargetURL(), but it returns null.

Please suggest the solution.

Message was edited by: Ankur Goyal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ankur,

Go through the below link, hope it helps.

Regards,

Prithviraj.

Former Member
0 Kudos

Hi Prithivi,

I have already seen that, but it is of no help.

Anyways, thanks for your effort.

Regards,

Ankur

Former Member
0 Kudos

Hi,

I have got my answer through below code:

IURLGeneratorService ug =(IURLGeneratorService) ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.URLGENERATOR_SERVICE);

IHierarchicalUri uri = ug.getAbsoluteUri(PathKey.CONTENT_ACCESS_PATH);

                    IHierarchicalUri uriRef = uri.appendPath(resource.getRID().toExternalForm());

                    uriString = uriRef.toExternalForm();

Answers (0)