03-03-2009 12:52 AM
var timestamp = new Date().getTime();
var storeRootNode = avm.lookupStoreRoot(storeName);
var path = storeRootNode.path + "/ROOT";
var node = avm.lookupNode(path);
var fileName= "pr " + timestamp + ".xml";
var pressReleaseDocF= node.createNode(fileName, "wcm:avmplaincontent");
pressReleaseDoc.properties["cm:name"] = fileName;
var props= new Array(2);
props["wca:parentformname"] = "press-release";
props["wca:originalparentpath"] = "dgtest–admin–preview:/www/avm_webapps/ROOT";
pressReleaseDocF.addAspect("wca:forminstancedata", props);
pressReleaseDocF.save();
var props= new Array(2);
props["cm:title"] = fileName;
pressReleaseDocF.addAspect("cm:titled", props);
pressReleaseDocF.save();
var prNs= new Namespace("pr", "http://www.demo.net.au/alfresco/pr");
var pressReleaseXml2= <pr:press_release xmlns:pr="http://www.demo.net.au/alfresco/pr"
xmlns:alf="http://www.alfresco.org"
xmlns:chiba="http://chiba.sourceforge.net/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
</pr:press_release>;
pressReleaseXml2.prNs::title= "pr title "+timestamp;
pressReleaseXml2.prNs::overview= "the abstract";
pressReleaseXml2.prNs::location= "pr location";
pressReleaseXml2.prNs::body= "pr body";
pressReleaseXml2.prNs::include_media_contacts= "true";
pressReleaseXml2.prNs::launch_date= "2009-02-04";
pressReleaseXml2.prNs::expiration_date= "2009-04-06";
pressReleaseXml2.prNs::numtimes= "1";
pressReleaseDocF.content = pressReleaseXml2.toXMLString();
pressReleaseDocF.save();
08-28-2009 05:42 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.