AnsweredAssumed Answered

How to set the UuID of a Reference manually

Question asked by robobot on Feb 23, 2010
Latest reply on Apr 1, 2010 by mjuarez
Hello there,

i have the following piece of code to create a folder. Now i want to set the uuid of the new Reference manually when the new folder is created. How can i do that ? Thank you very much.

  public String createFolder(String folderPath, final String folderId,final String folderName) throws RemoteException, RepositoryFault {
    final ParentReference parentReference = new ParentReference(STORE,null,folderPath,Constants.ASSOC_CONTAINS,getChildName(folderName));
    final String newId = (null == folderId) ? "-1" : folderId;
    CMLCreate create = new CMLCreate(newId, parentReference, null, null, null, Constants.TYPE_FOLDER, createDefaultProperties(folderName));
    //create content manipulation language
    CML cml = new CML();
    //set content to create
    cml.setCreate(new CMLCreate[]{create});  
    UpdateResult[] result;
    try {
    } catch (RepositoryFault e) {
    } catch (RemoteException e) {
    return folderPath;