on 10-31-2008 9:29 AM
Hi Everybody,
how can i copy a folder under src/mimes/Components/myFolder to KM-Content? Until now i try it with the following piece of code, but with no success. I get the Exception: InvalidUriException.
IResourceContext ctx = buildResourceContext();
RID sRid = RID.getRID("/LocalDevelopment~vd~de.gp.portal/_comp/src/mimes/Components/myFolder");
RID tRid = RID.getRID(vdElem.getTargetPath());
wdComponentAPI.getMessageManager().reportSuccess(tRid.toString());
IResource resource = ResourceFactory.getInstance().getResource(sRid,ctx);
ICopyParameter copy_param = new CopyParameter(true);
copy_param.setIgnorePropertyFailures(true);
resource.copy(tRid,copy_param);
regards,
Seed
Hi
It seems that it is not able to read given URL
Plz your URL is correct or not
If you are using window then put your double slash (
).
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anup,
if i try to copy a km folder to another place it works fine. But in this case, i am trying to copy a folder under my Project folder (/src/mimes/...), which is not stored under KM. So, the question is, is that the right way to copy a folder from ../src/mimes/Components/myFolder to a KM-Content?
The URL was correct.
regards,
Seed
Edited by: seed_mopo on Oct 31, 2008 10:50 AM
Hi,
the full exception was:
com.sapportals.wcm.repository.InvalidUriException: Invalid RID: No repository manager found for prefix: /LocalDevelopment~vd~de.gp.portal
souce code:
IResourceContext ctx = buildResourceContext();
RID sRid = RID.getRID("/LocalDevelopment~vd~de.gp.portal/src/mimes/Components/myFolder");
RID tRid = RID.getRID(vdElem.getTargetPath());
IResource resource = ResourceFactory.getInstance().getResource(sRid,ctx);
ICopyParameter copy_param = new CopyParameter(true);
copy_param.setIgnorePropertyFailures(true);
resource.copy(tRid,copy_param);
regards,
Seed
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.