Get the absolute path to where the service has registered itself.
This includes the base registry path
Null until the service is registered
@return the service registration path.
178366
public String getAbsoluteSelfRegistrationPath() {
    if (selfRegistrationPath == null) {
      return null;
    }
    String root = registryOperations.getConfig().getTrimmed(
        RegistryConstants.KEY_REGISTRY_ZK_ROOT,
        RegistryConstants.DEFAULT_ZK_REGISTRY_ROOT);
    return RegistryPathUtils.join(root, selfRegistrationPath);
  }
714678
private static ServiceRegistrarFactory createFactory(final Path path) {
    final ServiceRegistrarFactory factory;
    final Path absolutePath = path.toAbsolutePath();
    try {
      factory = ServiceRegistrarLoader.load(absolutePath);
      final String name = factory.getClass().getName();
      log.info("Loaded service registrar plugin: {} ({})", name, absolutePath);
    } catch (ServiceRegistrarLoadingException e) {
      throw new RuntimeException("Unable to load service registrar plugin: "
                                 + absolutePath, e);
    }
    return factory;
  }
1279093
static KeyStore getKeyStore(OperationContext context) throws OperationFailedException {
        ServiceRegistry serviceRegistry = context.getServiceRegistry(true);
        PathAddress currentAddress = context.getCurrentAddress();
        RuntimeCapability<Void> runtimeCapability = KEY_STORE_RUNTIME_CAPABILITY.fromBaseCapability(currentAddress.getLastElement().getValue());
        ServiceName serviceName = runtimeCapability.getCapabilityServiceName();
        ServiceController<KeyStore> serviceController = getRequiredService(serviceRegistry, serviceName, KeyStore.class);

        return Assert.assertNotNull(serviceController.getValue());
    }
169871
public String getName() {
    ResourceServices services = getServices();
    return (services != null) ? services.getResourceName() : null;
  }
1220533
public function getRegistrableDomain()
    {
        if (null === $this->suffix) {
            return null;
        }

        return null === $this->hostname ? null : $this->hostname . '.' . $this->suffix;
    }
767905
protected RegisteredService getRegisteredServiceFromRequest(final RequestContext requestContext) {
        val currentService = WebUtils.getService(requestContext);
        return this.servicesManager.findServiceBy(currentService);
    }
678249
private static ServiceRegistrarFactory createFactory() {
    final ServiceRegistrarFactory factory;
    final ServiceRegistrarFactory installed;
    try {
      installed = ServiceRegistrarLoader.load();
    } catch (ServiceRegistrarLoadingException e) {
      throw new RuntimeException("Unable to load service registrar", e);
    }
    if (installed == null) {
      log.debug("No service registrar plugin configured");
      factory = new NopServiceRegistrarFactory();
    } else {
      factory = installed;
      final String name = factory.getClass().getName();
      log.info("Loaded installed service registrar: {}", name);
    }
    return factory;
  }
1234139
protected RegisteredService getRegisteredServiceFromFile(final File file) {
        val fileName = file.getName();
        if (fileName.startsWith(".")) {
            LOGGER.trace("[{}] starts with ., ignoring", fileName);
            return null;
        }
        if (Arrays.stream(getExtensions()).noneMatch(fileName::endsWith)) {
            LOGGER.trace("[{}] doesn't end with valid extension, ignoring", fileName);
            return null;
        }
        val matcher = this.serviceFileNamePattern.matcher(fileName);
        if (matcher.find()) {
            val serviceId = matcher.group(2);
            if (NumberUtils.isCreatable(serviceId)) {
                val id = Long.parseLong(serviceId);
                return findServiceById(id);
            }
            val serviceName = matcher.group(1);
            return findServiceByExactServiceName(serviceName);
        }
        LOGGER.warn("Provided file [{}} does not match the recommended service definition file pattern [{}]",
            file.getName(),
            this.serviceFileNamePattern.pattern());
        return null;
    }
136166
public Registry getRegistry() throws RemoteException {
        if (registry == null) {
            if (StringUtils.hasText(host)) {
                registry = LocateRegistry.getRegistry(host, port);
            } else {
                registry = LocateRegistry.getRegistry(port);
            }
        }

        return registry;
    }
1138438
def _get_config_path(self):
        
        org = self.service.space.org.name
        space = self.service.space.name
        name = self.name

        return "~/.predix/%s/%s/%s.json" % (org, space, name)
883647
public String path() {
    /* build the fully qualified url with all query parameters */
    StringBuilder path = new StringBuilder();
    if (this.target != null) {
      path.append(this.target);
    }
    if (this.uriTemplate != null) {
      path.append(this.uriTemplate.toString());
    }
    if (path.length() == 0) {
      /* no path indicates the root uri */
      path.append("/");
    }
    return path.toString();

  }
826381
protected RegisteredService getRegisteredServiceFromRequest(final RequestContext requestContext, final String entityId) {
        val currentService = WebUtils.getService(requestContext);
        val service = this.serviceFactory.createService(entityId);
        var registeredService = this.servicesManager.findServiceBy(service);
        if (registeredService == null) {
            LOGGER.debug("Entity id [{}] not found in the registry. Fallback onto [{}]", entityId, currentService);
            registeredService = this.servicesManager.findServiceBy(currentService);
        }
        LOGGER.debug("Located service definition [{}]", registeredService);
        return registeredService;
    }
566614
public Result<T> put(T service)
    {
        check(service);

        ServiceType serviceType = service.resolveServiceType();
        T previous = null;

        lock();
        try
        {
            ServiceType existingServiceType = keysToServiceTypes.get(service.getKey());
            if (existingServiceType != null && !existingServiceType.equals(serviceType))
                throw new ServiceLocationException("Invalid registration of service " + service.getKey() +
                                                   ": already registered under service type " + existingServiceType +
                                                   ", cannot be registered also under service type " + serviceType, SLPError.INVALID_REGISTRATION);
            keysToServiceTypes.put(service.getKey(), serviceType);
            previous = keysToServiceInfos.put(service.getKey(), service);
            service.setRegistered(true);
            if (previous != null) previous.setRegistered(false);
        }
        finally
        {
            unlock();
        }

        notifyServiceAdded(previous, service);
        return new Result<T>(previous, service);
    }
1322275
public CPath getCPath()
    {
        if ( parent == null ) {
            return CPath.ROOT;
        }

        CMFolder currentFolder = this;
        StringBuilder path = new StringBuilder(  );

        while ( currentFolder.parent != null ) {
            path.insert( 0, currentFolder.name );
            path.insert( 0, '/' );

            currentFolder = currentFolder.parent;
        }

        return new CPath( path.toString() );
    }
985923
public ServiceRefAmp getLocalService()
  {
    ServiceRefAmp serviceRefRoot = _podRoot.getLocalService();
    //ServiceRefAmp serviceRefRoot = _podRoot.getClientService();
    
    if (serviceRefRoot == null) {
      return null;
    }
    
    ServiceRefActive serviceRefLocal = _serviceRefLocal;
    
    if (serviceRefLocal != null) {
      ServiceRefAmp serviceRef = serviceRefLocal.getService(serviceRefRoot);
      
      if (serviceRef != null) {
        return serviceRef;
      }
    }
    
    ServiceRefAmp serviceRef = serviceRefRoot.onLookup(_path);

    _serviceRefLocal = new ServiceRefActive(serviceRefRoot, serviceRef);
    
    // serviceRef.start();
    
    return serviceRef;
  }
1035750
@Override
    public String getPath() {
        // We need to URL encode '+'s to work around an S3 bug
        // (Cf. https://forums.aws.amazon.com/thread.jspa?threadID=55746)
        return PAIRTREE_ROOT + PATH_SEP + PairtreeUtils.mapToPtPath(myID).replace(UNENCODED_PLUS, ENCODED_PLUS) +
                PATH_SEP + PairtreeUtils.encodeID(myID).replace(UNENCODED_PLUS, ENCODED_PLUS);
    }
889391
@Extension
    public static WindowsInstallerLink registerIfApplicable() {
        if(!Functions.isWindows())
            return null; // this is a Windows only feature

        if(Lifecycle.get() instanceof WindowsServiceLifecycle)
            return null; // already installed as Windows service

        // this system property is set by the launcher when we run "java -jar jenkins.war"
        // and this is how we know where is jenkins.war.
        String war = SystemProperties.getString("executable-war");
        if(war!=null && new File(war).exists()) {
            WindowsInstallerLink link = new WindowsInstallerLink(new File(war));

            // TODO possibly now unused (JNLP installation mode is long gone):
            if(SystemProperties.getString(WindowsInstallerLink.class.getName()+".prominent")!=null)
                Jenkins.getInstance().getActions().add(link);

            return link;
        }

        return null;
    }