on 07-10-2009 11:04 AM
Hi All,
Using XML builder presently there are around 5 xml file written in a folder on Portal (EX.... documents\temp\xyz) per day and for a month (July) 31*5=155 XML file in a same folder on KM.
So for a year there is around 365*5=1825+ XML file present in a same folder.
My requirement is to get the files for a particular month, read the data from XML and display the same in JSP page (Using JSP Dynpage component).
Request your guidance to help me understand, if there is any kind of KM configu2026 that I can use to fetch the files for a particular month, else how should I filter the files quickly for a month & retrieve data from XML file.
Regards,
Sushil Jain
Can i use or do any thing that with Repository Filters?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use repository filter but it is not required for this scenario.
You can use KM API to read folder contents. Here ıs the code block you can use :
String path = "/documents/.....";
IResourceList fileList = null;
RID rid = RID.getRID(path);
try {
ResourceContext resourceContext =
new ResourceContext(
WPUMFactory.getServiceUserFactory().getServiceUser(
"cmadmin_service"));
ICollection folder =
(ICollection) ResourceFactory.getInstance().getResource(
rid,
resourceContext);
fileList = folder.getChildren();
} catch (UserManagementException ex) {
} catch (ResourceException ex) {
}
fileList is a collection of resources. You can use this collection and filter it according to its properties ( modified date, etc. )
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.