AnsweredAssumed Answered

CMLCopy with new Content Type

Question asked by robobot on Feb 23, 2009
Now i can perform a copy operation with the following code:

public CML copyContent(final DMSData data, final Reference source){

    //new destination path   
    final String newDestination = DEFAULTWORKSPACE + FOLDER_BACKUP;    
    //create a copy object
    CMLCopy copy = new CMLCopy();
    ParentReference reference = new ParentReference(STORE, null, newDestination, Constants.ASSOC_CONTAINS, "{" + Constants.NAMESPACE_CONTENT_MODEL + "}"+data.getName());    
    copy.setWhere(new Predicate(new Reference[]{source}, STORE, null));
    CML cmlCopy = new CML();
    cmlCopy.setCopy(new CMLCopy[]{copy});
    return cmlCopy;

now i want to assign a new content type to the copied content. i have a namedvalue [] with the properties and values for the content type. but how i can use that namedvalue [] in above code ?

thank you.