Sitemap

Sunday, April 5, 2015

UCM: Retrieve the vault and weblayout path of a content


public class RetrievePaths extends ServiceHandler {

    public static final String CLASS_NAME = "CreateHDAFile";
    public static final String DDOCNAME = "LTSCHAUDHARYHY000208";

    public void retrievePathFiles() throws ServiceException, DataException, IOException {
        m_binder.clearResultSets();
        m_binder.putLocal("dDocName", DDOCNAME);
        executeService(m_binder, "DOC_INFO_BY_NAME");
        FileStoreProviderHelper utils = this.m_service.m_fileUtils;
        String webViewableFilePath =
            utils.computeRenditionPath(m_binder, "webViewableFile", utils.m_context);
        String primaryFilePath =
            utils.computeRenditionPath(m_binder, "primaryFile", utils.m_context);
    }
}

Thanks to Ryan for this tip. More details in the link below: https://groups.yahoo.com/neo/groups/intradoc_users/conversations/topics/25937

UPDATE: Use the service GET_FS_DOC_INFO to get both the vault and weblayout path of a content. From the localdata, access the keys primaryFile and webViewableFile of the binder.

No comments:

Post a Comment