How to Create a New Folder in UCM with API?
954977Nov 19 2012 — edited Nov 21 2012Hi,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;
}