You can use the FileDal to access the file system.
not the datum type but through an external call using the FileDal java class.another alternative is to use wild carding in the DCR property. you can pull in all dcr's of a certain category and type.
<Data><Datum ID="D01" Name="My DCR" Type="DCR"> <DCR Category="SEGMembers" Type="memberinfo">templatedata/SEGMembers/memberinfo/data/*.xml</DCR></Datum></Data>
java.lang.RuntimeException: Failed to get data //becmtp01/default/main/iso20022.org/WORKAREA/group_iso20022/templatedata/SEGMembers/memberinfo/data/*.xml at com.interwoven.livesite.file.impl.CsFileDAL.read(CsFileDAL.java:158) at com.interwoven.livesite.model.property.DCRProperty.fetchDCRXML(DCRProperty.java:366) at com.interwoven.livesite.model.page.PageComponent.getTransformXML(PageComponent.java:689) at com.interwoven.livesite.web.site.action.ComponentPreviewAction.xml(ComponentPreviewAction.java:314)(...etc...)
you don't wild card the path but the category and type. take a look at the online help available from the component editor, there a link in the Appearances and Content XML text areas
Instead of just * for the value of the Name attribute in the the DCR-Category or DCR-Type elements, try .* (dot asterisk). The asterisk by itself isn't a regular expression and the help document indicates that it takes a string or regex.
&amp;amp;lt;br&amp;amp;gt; &amp;amp;lt;Data&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt; &amp;amp;lt;External&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt; &amp;amp;lt;Parameters&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt; &amp;amp;lt;Datum ID="BaseDirectory" Name="BaseDirectory" Type="DCR"&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt; ...&amp;amp;lt;br&amp;amp;gt; &amp;amp;lt;/Datum&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt; &amp;amp;lt;/Parameters&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt; &amp;amp;lt;Object Scope="local"&amp;amp;gt;your.custom.object.here&amp;amp;lt;/Object&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt; &amp;amp;lt;Method&amp;amp;gt;externalMethod&amp;amp;lt;/Method&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt; &amp;amp;lt;/External&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt; &amp;amp;lt;/Data&amp;amp;gt;&amp;amp;lt;br&amp;amp;gt;
/** * Gets names of all child files in a given directory, unrecursive. * @param directoryPath path to a directory. * @return the list of file names in the directory. */ String[] getChildFiles(String directoryPath); /** * Read a file using the default encoding. * @param path path to the file. * @see com.interwoven.livesite.system.Constants#DEFAULT_ENCODING * @return file data. */ String read(String path);
public Document externalMethod(RequestContext context) { Document doc = Dom4jUtils.newDocument(); Element root = doc.addElement("Records"); FileDalIfc dal = context.getFileDal(); String areaRelativeBasePath = context.getParameterString("BaseDirectory"); String absoluteBasePath = dal.getRoot() + dal.getSeparator() + areaRelativeBasePath; String[] files = dal.getChildFiles(absoluteBasePath); int count = files.length; for(int i=0;i<count;i++) { String absoluteFilePath = absoluteBasePath + dal.getSeparator() + files; Document dcr = Dom4jUtils.newDocument(dal.read(absoluteFilePath)); // add the dcr to the result doc; root.addElement(dcr.getRootElement().createCopy()); } return doc; }