How to validate if the DCR file exists before trying to read using LiveSiteDAL
I am reading the DCR using the LiveSiteDal with following code sample. But its getting Error in the log and creates struck threads some times.
Is there a way in LiveSiteDal to validate if that dcr is present before Reading the dcr file?
Document currDcrDoc = context.getLiveSiteDal().readXmlFile(
dcrPath);
Comments
-
I too felt when i was asking this, but still "dcrPath" which we will get will be relative path(based on current working dir starting from templatedata) and the physical path will vary based on the environment, so we need to find the current server location (jboss / weblogic or teamsite preview) and then append this path to find it, which i felt may be handled in LiveSite DAL, since we are reading a file form LiveSite DAN felt there will be an option to validate if exists.
That's why posted this question, to get the most appropriate solution to validate if the file exists before reading using LiveSiteDAL.
0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.