Package org.sakaiproject.sitemanage.api
Interface SiteManageService
-
public interface SiteManageService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidimportToolContent(String oSiteId, org.sakaiproject.site.api.Site site, Map<String,List<String>> toolOptions, boolean bypassSecurity)Copy tool content from old sitevoidimportToolsIntoSite(org.sakaiproject.site.api.Site site, List<String> toolIds, Map<String,List<String>> importTools, Map<String,List<String>> toolOptions, boolean cleanup)Contains the actual workflow for tools to be imported and their references to be updatedbooleanimportToolsIntoSiteThread(org.sakaiproject.site.api.Site site, List<String> toolIds, Map<String,List<String>> toolsToImport, Map<String,List<String>> toolOptions, boolean cleanup)Import tools and content into the site.booleanisAddMissingToolsOnImportEnabled()Configuration setting for adding missing tools while importingStringtransferSiteResource(String oSiteId, String nSiteId, String siteAttribute)This is used to update exsiting site attributes with encoded site id in it.
-
-
-
Method Detail
-
importToolsIntoSiteThread
boolean importToolsIntoSiteThread(org.sakaiproject.site.api.Site site, List<String> toolIds, Map<String,List<String>> toolsToImport, Map<String,List<String>> toolOptions, boolean cleanup)Import tools and content into the site.
The actual copy is handled by a separate thread so that the user's thread is not held up. There can only be one import/copy per site at a given time
If the isAddMissingToolsOnImportEnabled setting is true, tools that are selected for import and don't already exist in the target site will be added automatically.
This essentially calls importToolsIntoSite in a new thread.- Parameters:
site- the site to import content intotoolIds- list of tools already in the sitetoolsToImport- list of tools that were selected for importcleanup- remove existing content in destination first- Returns:
- true if the site was successfully queued by the executor, false if there is already another import/copy being performed for this site.
-
importToolsIntoSite
void importToolsIntoSite(org.sakaiproject.site.api.Site site, List<String> toolIds, Map<String,List<String>> importTools, Map<String,List<String>> toolOptions, boolean cleanup)Contains the actual workflow for tools to be imported and their references to be updated- Parameters:
site- the sitetoolIds- the tool ids in the site to be imported intoimportTools- the tools selected to be importedcleanup- true if content should be removed before the tool is copied
-
importToolContent
void importToolContent(String oSiteId, org.sakaiproject.site.api.Site site, Map<String,List<String>> toolOptions, boolean bypassSecurity)
Copy tool content from old site- Parameters:
oSiteId- source (old) site idsite- destination sitebypassSecurity- use SecurityAdvisor if true
-
isAddMissingToolsOnImportEnabled
boolean isAddMissingToolsOnImportEnabled()
Configuration setting for adding missing tools while importing- Returns:
- true if missing tools should be added, otherwise false
-
transferSiteResource
String transferSiteResource(String oSiteId, String nSiteId, String siteAttribute)
This is used to update exsiting site attributes with encoded site id in it. A new resource item is added to the new site when needed- Parameters:
oSiteId- source (old) site idnSiteId- destination sitesiteAttribute- attribute to update- Returns:
- the new migrated resource url
-
-