06-12-2014 02:19 PM
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
final SiteInfo site = this.siteService.createSite(shortSiteName, shortSiteName, shortSiteName,
null, SiteVisibility.PRIVATE);
AuthenticationUtil.setRunAsUser(AuthenticationUtil.getSystemUserName());
final Set<String> zones = new HashSet<String>();
zones.add(AuthorityService.ZONE_APP_DEFAULT);
if (!this.authorityService.authorityExists(shortGroupName)) {
final String groupAlf = this.authorityService.createAuthority(AuthorityType.GROUP, shortGroupName,
groupName, zones);
if (this.siteService.canAddMember(site.getShortName(), groupAlf, SiteModel.SITE_COLLABORATOR)) {
this.siteService.setMembership(site.getShortName(), groupAlf, SiteModel.SITE_COLLABORATOR);
this.logger.info("Was group added to site ? -> " + this.siteService.isMember(site.getShortName(), groupAlf));
}
}
// Inserting contents.acp data …
2014-06-12 19:54:30,176 ERROR [activities.feed.FeedTaskProcessor] [DefaultScheduler_Worker-6] Skipping activity post 1 since failed to get recipients: java.lang.Exception: Failed to get site members: org.alfresco.repo.site.SiteDoesNotExistException: 05120021 Le site MySite n'existe pas. (MySite doesn't exist)
2014-06-12 19:54:30,185 ERROR [activities.feed.FeedTaskProcessor] [DefaultScheduler_Worker-6] Skipping activity post 2 since failed to get recipients: java.lang.Exception: Failed to get followers: java.lang.IllegalArgumentException: User does not exist!
2014-06-12 19:54:30,186 ERROR [activities.feed.FeedTaskProcessor] [DefaultScheduler_Worker-6] Skipping activity post 3 since failed to get recipients: java.lang.Exception: Failed to get followers: java.lang.IllegalArgumentException: User does not exist!
06-13-2014 02:37 AM
this.authorityService.authorityExists("GROUP_"+shortGroupName)
06-13-2014 04:32 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.