AnsweredAssumed Answered

How to rename authorityDisplayName Group using web services?

Question asked by relax on Jan 21, 2010
Latest reply on Mar 15, 2010 by relax
I create a User Groups using a web service. Then I would like to rename the group created by another name using web service.
Post talking about AuthorityService.

Is there a way to find AuthorityServiceImpl using web service?

Is there another method to rename User Groups using web service?

Thank you!

This is the code to create a User Group:

public StringBuilder createGroup(String alfrescoAxisUrl,
         String parentGroupName, String groupName)
         throws AccessControlFault, RemoteException {

      StringBuilder stringBuilder = new StringBuilder();

      AccessControlServiceSoapBindingStub accessControlService = WebServiceFactory
      // test if exist group name
      AuthorityFilter authorityFilter = new AuthorityFilter();

      String[] allAuthorities = accessControlService

      Boolean existGroup = ArrayUtils.contains(allAuthorities,
            Constants.GROUP_PREFIX + groupName);

      if (!existGroup) {
         NewAuthority newAuthorityGroup = new NewAuthority(GROUP, groupName);
         NewAuthority[] newAuthorities = { newAuthorityGroup };

         if (parentGroupName != null) {
            parentGroupName = Constants.GROUP_PREFIX + parentGroupName;
         stringBuilder.append("parentGroupName = ");
         stringBuilder.append(", groupName = ");
      } else {
         stringBuilder.append("group = ");
         stringBuilder.append(" already exists");;
      return stringBuilder;