Factory method to create ServiceInfo instances that contain a single locatable service.

@param serviceName
@param acls        for the single locatableService of this Service.
@return
324207
public static ServiceInfo of(String serviceName, ServiceAcl... acls) {
        return new ServiceInfo(serviceName, TreePVector.from(Arrays.asList(acls)));
    }
219727
private NamedAdminObjectServiceInfo createNamedAdminObjectServiceInfo(String id) {
        NamedAdminObjectServiceInfo aosInfo = adminObjectServices.get(id);
        if (aosInfo == null) {
            aosInfo = new NamedAdminObjectServiceInfo(id,
                            new ConcurrentServiceReferenceSet<AdminObjectService>(REFERENCE_ADMIN_OBJECT_SERVICES),
                            new ConcurrentServiceReferenceSet<AdminObjectService>(REFERENCE_ADMIN_OBJECT_SERVICES));
            adminObjectServices.put(id, aosInfo);
        }
        return aosInfo;
    }
619913
public static nssimpleacl get(nitro_service service, String aclname) throws Exception{
		nssimpleacl obj = new nssimpleacl();
		obj.set_aclname(aclname);
		nssimpleacl response = (nssimpleacl) obj.get_resource(service);
		return response;
	}
668895
public String   build(ServiceInstance<?> serviceInstance, Map<String, Object> variables)
    {
        Map<String, Object>     localVariables = Maps.newHashMap();
        localVariables.put(FIELD_OPEN_BRACE, "{");
        localVariables.put(FIELD_CLOSE_BRACE, "}");
        localVariables.put(FIELD_SCHEME, "http");

        if ( serviceInstance != null )
        {
            localVariables.put(FIELD_NAME, nullCheck(serviceInstance.getName()));
            localVariables.put(FIELD_ID, nullCheck(serviceInstance.getId()));
            localVariables.put(FIELD_ADDRESS, nullCheck(serviceInstance.getAddress()));
            localVariables.put(FIELD_PORT, nullCheck(serviceInstance.getPort()));
            localVariables.put(FIELD_SSL_PORT, nullCheck(serviceInstance.getSslPort()));
            localVariables.put(FIELD_REGISTRATION_TIME_UTC, nullCheck(serviceInstance.getRegistrationTimeUTC()));
            localVariables.put(FIELD_SERVICE_TYPE, (serviceInstance.getServiceType() != null) ? serviceInstance.getServiceType().name().toLowerCase() : "");
            if ( serviceInstance.getSslPort() != null )
            {
                localVariables.put(FIELD_SCHEME, "https");
            }
        }

        localVariables.putAll(variables);

        StringBuilder       str = new StringBuilder();
        for ( Part p : parts )
        {
            if ( p.isVariable() )
            {
                Object value = localVariables.get(p.getValue());
                if ( value == null )
                {
                    log.debug("Variable not found: " + p.getValue());
                }
                else
                {
                    str.append(value);
                }
            }
            else
            {
                str.append(p.getValue());
            }
        }

        return str.toString();
    }
896331
public List<ModelServiceInstance> getUPModelInstances(String serviceName){
        List<ModelServiceInstance> list = new ArrayList<ModelServiceInstance>();
        for(ModelServiceInstance instance : getModelInstances(serviceName)){
            if(instance.getStatus().equals(OperationalStatus.UP)) {
                list.add(instance);
            }
        }
        return list;
    }
1179516
public BrokerServiceAccessor getServiceAccessor(String serviceId) {
        for (BrokerServiceAccessor serviceAccessor : serviceAccessors) {
            if (serviceId.equals(serviceAccessor.getServiceDescription().getId())) {
                return serviceAccessor;
            }
        }

        throw new NotFoundException("Could not find service broker with service_id " + serviceId);
    }
563978
def make_serviceitem_servicedllsignatureexists(dll_sig_exists, condition='is', negate=False):
    
    document = 'ServiceItem'
    search = 'ServiceItem/serviceDLLSignatureExists'
    content_type = 'bool'
    content = dll_sig_exists
    ii_node = ioc_api.make_indicatoritem_node(condition, document, search, content_type, content,
                                              negate=negate)
    return ii_node
1077179
@Override
    public Collection<ServiceInstance<T>> queryForInstances(String name) throws Exception
    {
        return queryForInstances(name, null);
    }
71336
public static <S> S loadOptionalService(Class<S> serviceInterface)
  {
    S service = null;
    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    if(classLoader != null) {
      service = loadService(serviceInterface, classLoader);
    }
    if(service == null) {
      service = loadService(serviceInterface, Classes.class.getClassLoader());
    }
    return service;
  }
688680
private static WebServiceRefPartialInfo buildPartialInfoFromWebServiceClient(Class<?> serviceInterfaceClass) {

        WebServiceClient webServiceClient = serviceInterfaceClass.getAnnotation(WebServiceClient.class);
        if (webServiceClient == null) {
            return null;
        }
        String className = serviceInterfaceClass.getName();
        String wsdlLocation = webServiceClient.wsdlLocation();
        QName serviceQName = null;
        String localPart = webServiceClient.name();
        if (localPart != null) {
            serviceQName = new QName(webServiceClient.targetNamespace(), localPart);
        }

        String handlerChainDeclaringClassName = null;
        javax.jws.HandlerChain handlerChainAnnotation = serviceInterfaceClass.getAnnotation(javax.jws.HandlerChain.class);
        if (handlerChainAnnotation != null)
            handlerChainDeclaringClassName = serviceInterfaceClass.getName();
        WebServiceRefPartialInfo partialInfo = new WebServiceRefPartialInfo(className, wsdlLocation, serviceQName, null, handlerChainDeclaringClassName, handlerChainAnnotation);
        return partialInfo;
    }
580948
public java.util.List<String> getServiceNames() {
        if (serviceNames == null) {
            serviceNames = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return serviceNames;
    }
687731
Map<CmsUUID, CmsAccessControlEntry> buildAceMap(Collection<CmsAccessControlEntry> acl) {

        if (acl == null) {
            acl = new ArrayList<>();
        }
        Map<CmsUUID, CmsAccessControlEntry> result = new HashMap<>();
        for (CmsAccessControlEntry ace : acl) {
            result.put(ace.getPrincipal(), ace);
        }
        return result;
    }
1130539
public BindingInfo createBindingInfo(Service service, String namespace,
                                         Object obj) {

        ServiceInfo si = new ServiceInfo();
        si.setTargetNamespace(ProtobufBindingFactory.PROTOBUF_BINDING_ID);

        BindingInfo info = new BindingInfo(si,
                ProtobufBindingFactory.PROTOBUF_BINDING_ID);

        return info;
    }
1080050
public Set<String> serviceNames() {
    Set<String> result = new LinkedHashSet<>();
    for (V1Annotation a : annotations) {
      if (a.endpoint == null) continue;
      if (a.endpoint.serviceName() == null) continue;
      result.add(a.endpoint.serviceName());
    }
    for (V1BinaryAnnotation a : binaryAnnotations) {
      if (a.endpoint == null) continue;
      if (a.endpoint.serviceName() == null) continue;
      result.add(a.endpoint.serviceName());
    }
    return result;
  }
993463
public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
    {
        $config = $this->getConfig($serviceLocator)[$requestedName];
        $service = new $this->serviceName();

        // Storage
        /** @var $storage StorageInterface */
        $storage = $serviceLocator->get($config['storage']);
        if (!$storage instanceof StorageInterface) {
            throw new ServiceNotCreatedException(sprintf(
                '"%s" expectes a AclMan\Storage\StorageInterface is set in the config; received "%s"',
                __METHOD__,
                is_object($storage) ? get_class($storage) : gettype($storage)
            ));
        }
        // PluginManager
        $pluginManager = $serviceLocator->get($config['plugin_manager']);

        // Config Service
        $acl = new Acl();
        /* @var Service $service */
        $service->setStorage($storage);
        $service->setAcl($acl);
        $service->setPluginManager($pluginManager);

        if (isset($config['allow_not_found_resource'])) {
            $service->setAllowNotFoundResource($config['allow_not_found_resource']);
        }

        return $service;
    }
561042
public static boolean hasService(Class<?> service, URL[] urls)
            throws ServiceConfigurationError {
        for (URL url: urls) {
            try {
                String fullName = prefix + service.getName();
                URL u = new URL(url, fullName);
                boolean found = parse(service, u);
                if (found)
                    return true;
            } catch (MalformedURLException e) {
                // should not happen; ignore it if it does
            }
        }
        return false;
    }
1292529
static Set<String> serviceNames(Service<HttpRequest, HttpResponse> service) {
        if (thriftServiceClass == null || entriesMethod == null || interfacesMethod == null) {
            return ImmutableSet.of();
        }
        return service.as(thriftServiceClass)
                      .map(s -> {
                          @SuppressWarnings("unchecked")
                          final Map<String, ?> entries = (Map<String, ?>) invokeMethod(entriesMethod, s);
                          assert entries != null;
                          return toServiceName(entries.values());
                      })
                      .orElse(ImmutableSet.of());
    }