code: public MacroGroup getMacros(boolean global) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          Macros request = new Macros();
          request.setType(IQ.Type.get);
          request.setTo(workgroupJID);
          request.setPersonal(!global);
  
          Macros response = connection.createStanzaCollectorAndSend(request).nextResultOrThrow();
          return response.getRootGroup();
      }
docs: Asks the workgroup for it's Global Macros.
  
  @param global true to retrieve global macros, otherwise false for personal macros.
  @return MacroGroup the root macro group.
  @throws XMPPErrorException if an error occurs while getting information from the server.
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException