Create a new Website using the IBM WCM API
<%@ page import="com.ibm.workplace.wcm.api.*"%>
<%@ page import="java.util.*"%>
<%
// retrieve repository
Repository repository = WCM_API.getRepository();
// get workspace for current user
Workspace workspace = repository.getWorkspace(request.getUserPrincipal());
// Set library
workspace.setCurrentDocumentLibrary(workspace.getDocumentLibrary("WebContent"));
// create new site
Site newSite = workspace.createSite();
newSite.setName("Jerome");
newSite.setTitle("JeromeSlinger");
newSite.setDescription("New Site Created using WCM API");
String[] saveMessage = workspace.save((Document)newSite);
if (saveMessage.length==0){
out.println("Could not create new Site..
");
}else{
out.println("New Site created successfully.");
}
%>
Subscribe to:
Post Comments (Atom)
Generate reports from Opportunities using a Visualforce Page in Salesforce
Step 1: Create a Visualforce Page Go to the Setup menu in Salesforce. Search for "Visualforce Pages" in the Quick Find box and c...
-
So I ran into this nasty little bugger and my approval process came to a grinding halt. For those who have never seen this before your fi...
-
Inline Editing So now I have tested the inline editing jsp done by David De Vos.Simply brilliant! Really offers you the ability to offe...
No comments:
Post a Comment