}
public static void setGoToCoverScreenInfo(GoToCoverScreenInfo goToCoverScreenInfo,ServerSessionManager ssm) {
try {
// Find the GoToCoverScreen.xml file, creating it if necessary.
ContentCollection collection = getSystemContentRepository();
ContentCollection grps = (ContentCollection) collection.getParent().getChild("groups");
if(grps==null) {
grps = (ContentCollection) collection.getParent().createChild("groups", Type.COLLECTION);
}
ContentCollection grpusrs = (ContentCollection) grps.getChild("users");
if(grpusrs == null) {
grpusrs = (ContentCollection) grps.createChild("users", Type.COLLECTION);
}
ContentCollection csColl = (ContentCollection) grpusrs.getChild("GoToCoverScreen");
if(csColl==null) {
csColl = (ContentCollection) grpusrs.createChild("GoToCoverScreen", Type.COLLECTION);
}
ArrayList<ContentNode> resources = (ArrayList<ContentNode>)csColl.getChildren();
if (resources != null && resources.size()!=0) {
csColl.removeChild(resources.get(0).getName());
}
ContentResource resource = (ContentResource)csColl.createChild("GoToCoverScreen"+new Date().getTime()+".xml", Type.RESOURCE);
// Write the new list to the resource
ByteArrayOutputStream os = new ByteArrayOutputStream();
Writer w = new OutputStreamWriter(os);
goToCoverScreenInfo.encode(w);