code: @Override
      public String getProviderParticipantId(String domain, String interfaceName, int majorVersion, String defaultValue) {
  
          String token = ParticipantIdKeyUtil.getProviderParticipantIdKey(domain, interfaceName, majorVersion);
  
          String participantId;
  
          // first see if participantId exists in the persistence file
          if (persistedParticipantIds.containsKey(token.toLowerCase())) {
              participantId = persistedParticipantIds.getProperty(token.toLowerCase());
              // if not, use the default value that was passed in via properties
          } else if (defaultValue != null) {
              participantId = defaultValue;
              // if no default value, generate one and save it to the persistence file
          } else if (ProviderAnnotations.getInterfaceName(GlobalCapabilitiesDirectoryProvider.class)
                                        .equals(interfaceName)) {
              participantId = capabilitiesDirectoryEntry.getParticipantId();
          } else if (ProviderAnnotations.getInterfaceName(GlobalDomainAccessControllerProvider.class)
                                        .equals(interfaceName)) {
              participantId = domainAccessControllerEntry.getParticipantId();
          } else if (ProviderAnnotations.getInterfaceName(DiscoveryProvider.class).equals(interfaceName)) {
              participantId = discoveryProviderParticipantId;
          } else if (ProviderAnnotations.getInterfaceName(RoutingProvider.class).equals(interfaceName)) {
              participantId = routingProviderParticipantId;
          } else {
  
              participantId = createUuidString();
              persistedParticipantIds.put(token, participantId);
              FileOutputStream fileOutputStream = null;
              try {
                  fileOutputStream = new FileOutputStream(persistenceFileName);
                  persistedParticipantIds.store(fileOutputStream, null);
              } catch (IOException e1) {
                  logger.error("Error saving properties file for channelId", e1);
  
              } finally {
                  if (fileOutputStream != null) {
                      try {
                          fileOutputStream.close();
                      } catch (IOException e) {
                          logger.debug("error closing output stream", e);
                      }
                  }
              }
          }
          return participantId;
      }
docs: /*
  (non-Javadoc)
  
  @see io.joynr.capabilities.ParticipantIdStorage#
  getProviderParticipantId(java.lang.String, java.lang.Class, java.lang.String,
  java.lang.String)