Update the ldap entry with the given registered service.

@param rs the rs
@return the registered service
548185
private RegisteredService update(final RegisteredService rs) {
        val currentDn = getCurrentDnForRegisteredService(rs);

        if (StringUtils.isNotBlank(currentDn)) {
            LOGGER.debug("Updating registered service at [{}]", currentDn);
            val entry = this.ldapServiceMapper.mapFromRegisteredService(this.baseDn, rs);
            LdapUtils.executeModifyOperation(currentDn, this.connectionFactory, entry);
        } else {
            LOGGER.debug("Failed to locate DN for registered service by id [{}]. Attempting to save the service anew", rs.getId());
            insert(rs);
        }
        return rs;
    }
628249
@Override
    protected S addService(S service, ServiceProperties props) {
        if (reference.compareAndSet(null, service)) {
            return service;
        }
        return null;
    }
643442
public <A> A register(final boolean autoSync, final A rs) {
        if (rs == null) return null;
        return (A) register(autoSync, "", rs);
    }
1127711
public static base_response update(nitro_service client, dnssrvrec resource) throws Exception {
		dnssrvrec updateresource = new dnssrvrec();
		updateresource.domain = resource.domain;
		updateresource.target = resource.target;
		updateresource.priority = resource.priority;
		updateresource.weight = resource.weight;
		updateresource.port = resource.port;
		updateresource.ttl = resource.ttl;
		return updateresource.update_resource(client);
	}
1258048
public void updateServiceUri(String serviceName, String providerId,
            String uri) {
        getServiceDirectoryClient().updateServiceInstanceUri(serviceName, providerId, uri);
    }
808001
protected void updatedSslSupport(SSLSupport service, Map<String, Object> props) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "updatedSslSupport", props);
        }

        sslSupport = service;

        // If the default pid has changed.. we need to go hunting for who was using the default.
        String id = (String) props.get(SSL_CFG_REF);
        if (!defaultId.equals(id)) {
            for (SSLChannelOptions options : sslOptions.values()) {
                options.updateRefId(id);
                options.updateRegistration(bContext, sslConfigs);
            }
            defaultId = id;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "updatedSslSupport", "defaultConfigId=" + defaultId);
        }
    }
709624
protected ServiceRegistration registerProxy(Object objectProxy, Class clazz) {
        Dictionary<String, Object> props = new Hashtable<String, Object>();
        ServiceRegistration registration;
        registration = context.registerService(clazz, objectProxy, props);

        return registration;
    }
96063
@Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MULTIPLE, target = "(config.displayId=*)")
    protected Map<String, Object> setUserRegistry(ServiceReference<UserRegistryService> ref) {
        adjustUserRegistryServiceRef(ref);

        // determine a new user registry service
        userRegistryService.set(null);
        return getServiceProperties();
    }
117901
public Object addingService(ServiceReference reference)
    {
        HttpService httpService = (HttpService) context.getService(reference);

        String alias = this.getAlias();
        String name = this.getProperty(RESOURCE_NAME);
        if (name == null)
            name = alias;
        try {
            httpService.registerResources(alias, name, httpContext);
        } catch (NamespaceException e) {
            e.printStackTrace();
        }

        return httpService;
    }
135133
protected <T extends DSet.Entry> void requestEntryAdd (String name, DSet<T> set, T entry)
    {
        // if we're on the authoritative server, we update the set immediately
        boolean applyImmediately = isAuthoritative();
        if (applyImmediately) {
            set.add(entry);
        }
        // dispatch an entry added event
        postEvent(new EntryAddedEvent<T>(_oid, name, entry).setAlreadyApplied(applyImmediately));
    }
1174194
protected <T extends DSet.Entry> void requestEntryUpdate (String name, DSet<T> set, T entry)
    {
        requestEntryUpdate(name, set, entry, Transport.DEFAULT);
    }
697283
public <A> A register(final boolean autoSync, final Class<? extends A> clazz, final A rs) {
        return register(autoSync, "", clazz, rs);
    }
505408
public static base_responses update(nitro_service client, sslservicegroup resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			sslservicegroup updateresources[] = new sslservicegroup[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new sslservicegroup();
				updateresources[i].servicegroupname = resources[i].servicegroupname;
				updateresources[i].sessreuse = resources[i].sessreuse;
				updateresources[i].sesstimeout = resources[i].sesstimeout;
				updateresources[i].nonfipsciphers = resources[i].nonfipsciphers;
				updateresources[i].ssl3 = resources[i].ssl3;
				updateresources[i].tls1 = resources[i].tls1;
				updateresources[i].serverauth = resources[i].serverauth;
				updateresources[i].commonname = resources[i].commonname;
				updateresources[i].sendclosenotify = resources[i].sendclosenotify;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
1354597
private static void updateLibertyServer() throws Exception {
        ServerConfiguration server = emptyConfiguration.clone();

        LdapRegistry ldap = new LdapRegistry();
        ldap.setId("ldap1");
        ldap.setRealm("LDAPRealm");
        ldap.setHost("localhost");
        ldap.setPort(String.valueOf(ds.getListenPort()));
        ldap.setBaseDN(SUB_DN);
        ldap.setBindDN(InMemoryLDAPServer.getBindDN());
        ldap.setBindPassword(InMemoryLDAPServer.getBindPassword());
        ldap.setLdapType("Custom");
        LdapEntityType type1 = new LdapEntityType("Group", null, new String[] { "groupOfNames" }, new String[] { GROUP_BASE_DN });
        LdapEntityType type2 = new LdapEntityType("PersonAccount", null, new String[] { "inetOrgPerson" }, new String[] { USER_BASE_DN });
        ldap.getLdapEntityTypes().add(type1);
        ldap.getLdapEntityTypes().add(type2);

        LDAPFatUtils.createFederatedRepository(server, "LDAPRealmFed", new String[] { SUB_DN });

        server.getLdapRegistries().add(ldap);

        updateConfigDynamically(libertyServer, server);
    }
1294889
public GrpcServiceBuilder addServices(BindableService... bindableServices) {
        requireNonNull(bindableServices, "bindableServices");
        return addServices(ImmutableList.copyOf(bindableServices));
    }
952935
public <A> A register(final String name, final Class<? extends A> clazz, final A rs) {
        return register(true, name, clazz, rs);
    }
224079
protected WSFederationRegisteredService getWsFederationRegisteredService(final Service targetService) {
        val svc = wsFederationRequestConfigurationContext.getServicesManager().findServiceBy(targetService, WSFederationRegisteredService.class);
        RegisteredServiceAccessStrategyUtils.ensureServiceAccessIsAllowed(targetService, svc);
        return svc;
    }