I don't know if this Forum is the right place for my issue. I created in KM successfully a CM Repository pointing to a Fileshare. When I want to get all children of the repository I tried the following:
// create an user object from the current user IWDClientUser wdClientUser = WDClientUser.getCurrentUser(); com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser(); //Create a EP user from the retrieved user IUser epUser = WPUMFactory.getUserFactory().getEP5User(sapUser); //Establish a Resource Context IResourceContext resourceContext = new ResourceContext(epUser); //get a resource factory IResourceFactory resourceFactory = ResourceFactory.getInstance(); //Get a RID from the CSV File RID file = RID.getRID(path); //Get a Iresource for CSV File to work on IResource resource = resourceFactory.getResource(file, resourceContext); ICollection collection = (ICollection) resource; IResourceList resourceList = collection.getChildren();
This code should give me all available children of a resource. The problem is, that the repository uses the permissions of the Fileshare (W2KSecurity). When a user wants to get all children, although he has no read permissions (but only for some children) for the resource, he gets an Exception. How can I get all children for which the user has the appropriate permissions?? Can someone help me out?
In the KM API I found the following method:
getChildren(Selector childrenSelector, Collator sortBy, IPropertyNameList propertyPrefill, String permissionNames)
I think this is the right method to use, but I was not able to implement it correctly.
Points will be awarded.