Skip to Main Content

Application Development Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to Create a New Folder in UCM with API?

954977Nov 19 2012 — edited Nov 21 2012
Hi,I'm working with UCM programing, now I know how to make a new file in UCM by API, but I don't know how to create a folder in UCM by API.
Many thanks to who can help me.You can give me an example like this:
public String createFile(String fileName, InputStream inputStream,
String parentFolderId) {
String dID = null;
try {
DataBinder dataBinder = this.idcClient.createBinder();
dataBinder.putLocal("IdcService", "CHECKIN_UNIVERSAL");
dataBinder.putLocal("dSecurityGroup", "Public");
dataBinder.putLocal("xCollectionID", parentFolderId);
dataBinder.getLocalData().setDate("dInDate", new Date());
TransferFile tf = new TransferFile(inputStream, fileName, -1L);
dataBinder.addFile("primaryFile", tf);
ServiceResponse response = this.idcClient.sendRequest(this.idcContext, dataBinder);
DataBinder responseData = response.getResponseAsBinder();
dID = responseData.getLocal("dID");
response.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
return dID;
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2012
Added on Nov 19 2012
10 comments
3,572 views