As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
public static boolean deleteGroups(String groupname) { boolean control=true; String[] delgroup = {groupname}; try{ AccessControlServiceSoapBindingStub accessControlService = WebServiceFactory.getAccessControlService(); NewAuthority cpGrpAuth = new NewAuthority(GROUP_AUTHORITY_TYPE,groupname); NewAuthority[] newAuthorities = {cpGrpAuth}; accessControlService.deleteAuthorities(delgroup); } catch(Exception e) { e.printStackTrace(); control=false; } return control; }
You need to obtain the node reference to the user group and use the nodeService to delete the node.
You need to obtain the node reference to the user group and use the nodeService to delete the node.can you give me a code please?
public StringBuilder deleteGroup(String alfrescoAxisUrl, String groupName) throws AccessControlFault, RemoteException { StringBuilder stringBuilder = new StringBuilder(); AccessControlServiceSoapBindingStub accessControlService = WebServiceFactory .getAccessControlService(alfrescoAxisUrl); AuthorityFilter authorityFilter = new AuthorityFilter(); authorityFilter.setAuthorityType(GROUP); String[] deleteAuthorities = {Constants.GROUP_PREFIX + groupName}; accessControlService.deleteAuthorities(deleteAuthorities); stringBuilder.append("Delete Group"); stringBuilder.append("\n"); return stringBuilder; }