| java.lang.Object org.sakaiproject.archive.impl.SiteMerger
SiteMerger | public class SiteMerger (Code) | | |
Method Summary | |
protected boolean | checkSakaiService(boolean m_filterSakaiServices, String[] m_filteredSakaiServices, String serviceName) | protected boolean | checkSystemRole(String system, String roleId, boolean filterSakaiRoles, String[] filteredSakaiRoles) When Sakai is importing a role in site.xml, check if it is a qualified role. | public String | merge(String fileName, String siteId, String creatorId, String m_storagePath, boolean filterSakaiServices, String[] filteredSakaiServices, boolean filterSakaiRoles, String[] filteredSakaiRoles) Process a merge for the file, or if it's a directory, for all contained files (one level deep). | protected void | mergeSite(String siteId, String fromSiteId, Element element, HashMap useIdTrans, String creatorId, boolean filterSakaiRoles, String[] filteredSakaiRoles) Merge the site definition from the site part of the archive file into the site service. | protected void | mergeSiteInfo(Element el, String siteId) Merge the site info like description from the site part of the archive file into the site service. | protected void | mergeSiteRoles(Element el, String siteId, HashMap useIdTrans, boolean filterSakaiRoles, String[] filteredSakaiRoles) | protected void | processMerge(String fileName, String siteId, StringBuffer results, Map attachmentNames, String creatorId, boolean filterSakaiService, String[] filteredSakaiService, boolean filterSakaiRoles, String[] filteredSakaiRoles) Read in an archive file and merge the entries into the specified site. | public void | setAuthzGroupService(AuthzGroupService service) | public void | setSecurityService(SecurityService service) | public void | setSiteService(SiteService service) | public void | setUserDirectoryService(UserDirectoryService service) | protected String | translateServiceName(String name) Old archives have the old CHEF 1.2 service names... | protected void | unlock(String lock, String reference) Check security permission. |
checkSakaiService | protected boolean checkSakaiService(boolean m_filterSakaiServices, String[] m_filteredSakaiServices, String serviceName)(Code) | | |
checkSystemRole | protected boolean checkSystemRole(String system, String roleId, boolean filterSakaiRoles, String[] filteredSakaiRoles)(Code) | | When Sakai is importing a role in site.xml, check if it is a qualified role.
Parameters: roleId - boolean value - true: the role is accepted for importing; otherwise, not; |
merge | public String merge(String fileName, String siteId, String creatorId, String m_storagePath, boolean filterSakaiServices, String[] filteredSakaiServices, boolean filterSakaiRoles, String[] filteredSakaiRoles)(Code) | | Process a merge for the file, or if it's a directory, for all contained files (one level deep).
Parameters: fileName - The site name (for the archive file) to read from. Parameters: mergeId - The id string to use to make ids in the merge consistent and unique. Parameters: creatorId - The creator idIf null or blank, the date/time string of the merge is used. |
mergeSite | protected void mergeSite(String siteId, String fromSiteId, Element element, HashMap useIdTrans, String creatorId, boolean filterSakaiRoles, String[] filteredSakaiRoles)(Code) | | Merge the site definition from the site part of the archive file into the site service.
Translate the id to the siteId.
Parameters: siteId - The id of the site getting imported into. Parameters: fromSiteId - The id of the site the archive was made from. Parameters: element - The XML DOM tree of messages to merge. Parameters: creatorId - The creator id |
mergeSiteRoles | protected void mergeSiteRoles(Element el, String siteId, HashMap useIdTrans, boolean filterSakaiRoles, String[] filteredSakaiRoles) throws PermissionException(Code) | | Merge the the permission-roles settings into the site
Parameters: element - The XML DOM tree of messages to merge. Parameters: siteId - The id of the site getting imported into. |
processMerge | protected void processMerge(String fileName, String siteId, StringBuffer results, Map attachmentNames, String creatorId, boolean filterSakaiService, String[] filteredSakaiService, boolean filterSakaiRoles, String[] filteredSakaiRoles)(Code) | | Read in an archive file and merge the entries into the specified site.
Parameters: fileName - The site name (for the archive file) to read from. Parameters: siteId - The id of the site to merge the content into. Parameters: results - A buffer to accumulate result messages. Parameters: attachmentNames - A map of old to new attachment names. Parameters: useIdTrans - A map of old WorkTools id to new Ctools id Parameters: creatorId - The creator id |
translateServiceName | protected String translateServiceName(String name)(Code) | | Old archives have the old CHEF 1.2 service names...
|
unlock | protected void unlock(String lock, String reference) throws PermissionException(Code) | | Check security permission.
Parameters: lock - The lock id string. Parameters: reference - The resource's reference string, or null if no resource is involved. exception: PermissionException - thrown if the user does not have access |
|
|