How to create DM site in Alfresco using Java program
1. Use the repo tier webscript to invoke siteService to actually create the site.
SiteInfo dmSite = siteService.createSite("site-dashboard", "DM", " Document Management", "Document Management", SiteVisibility.PUBLIC);
2. To initialize the site dashboard, use Share tier webscript that uses a remote call to repo tier webscript to creates the site.
ApplicationContext applicationContext = null;
ScriptSiteData scriptSiteData = new ScriptSiteData(requestContext, applicationContext);
Scriptable dmToken = new BaseFunction();
Response response = remoteClient.call("http://localhost:8080/alfresco/s/");
dmToken.put("siteid", dmToken, dmShortName); //get dmShortName from response.
dmSiteCreation = scriptSiteData.newPreset("site-dashboard", dmToken);
SiteInfo dmSite = siteService.createSite("site-dashboard", "DM", " Document Management", "Document Management", SiteVisibility.PUBLIC);
2. To initialize the site dashboard, use Share tier webscript that uses a remote call to repo tier webscript to creates the site.
ApplicationContext applicationContext = null;
ScriptSiteData scriptSiteData = new ScriptSiteData(requestContext, applicationContext);
Scriptable dmToken = new BaseFunction();
Response response = remoteClient.call("http://localhost:8080/alfresco/s/");
dmToken.put("siteid", dmToken, dmShortName); //get dmShortName from response.
dmSiteCreation = scriptSiteData.newPreset("site-dashboard", dmToken);
How to create Record management site in Alfresco using java program
It is same way as DM site creation, except initialize the site-dash board
1. Use the repo tier webscript to invoke siteService to actually create the site.
SiteInfo rmSite = siteService.createSite("site-dashboard", "RM", " Record Management", "Record Management", SiteVisibility.PUBLIC);
2. To initialize the site dashboard, use Share tier webscript that uses a remote call to repo tier webscript to creates the site.
ApplicationContext applicationContext = null;
ScriptSiteData scriptSiteData = new ScriptSiteData(requestContext, applicationContext);
Scriptable rmToken = new BaseFunction();
Response response = remoteClient.call("http://localhost:8080/alfresco/s/");
rmToken.put("siteid", rmToken, rmShortName); //get rmShortName from response.
rmSiteCreation = scriptSiteData.newPreset("rm-site-dashboard", rmToken);
1. Use the repo tier webscript to invoke siteService to actually create the site.
SiteInfo rmSite = siteService.createSite("site-dashboard", "RM", " Record Management", "Record Management", SiteVisibility.PUBLIC);
2. To initialize the site dashboard, use Share tier webscript that uses a remote call to repo tier webscript to creates the site.
ApplicationContext applicationContext = null;
ScriptSiteData scriptSiteData = new ScriptSiteData(requestContext, applicationContext);
Scriptable rmToken = new BaseFunction();
Response response = remoteClient.call("http://localhost:8080/alfresco/s/");
rmToken.put("siteid", rmToken, rmShortName); //get rmShortName from response.
rmSiteCreation = scriptSiteData.newPreset("rm-site-dashboard", rmToken);
No comments:
Post a Comment