Sets the shell server options from the confriguration.<p>

@param enabled the value of the 'enabled' attribute
@param portStr the value of the 'port' attribute
324389
public void setShellServerOptions(String enabled, String portStr) {

        int port;
        try {
            port = Integer.parseInt(portStr);
        } catch (NumberFormatException e) {
            port = CmsRemoteShellConstants.DEFAULT_PORT;
        }
        m_shellServerOptions = new CmsRemoteShellConfiguration(Boolean.parseBoolean(enabled), port);

    }
435249
function setOperations(operations, portType) {
  _.forEach(portType.childNodes, node => {
    if (node.localName === 'operation') {
      operations[node.getAttribute('name')] = node;
    }
  });
}
401367
SamlPortConfigBuilder setSchemeAndPortIfAbsent(ServerPort serverPort) {
        requireNonNull(serverPort, "serverPort");
        if (serverPort.hasHttps()) {
            setSchemeIfAbsent(SessionProtocol.HTTPS);
        } else if (serverPort.hasHttp()) {
            setSchemeIfAbsent(SessionProtocol.HTTP);
        } else {
            throw new IllegalArgumentException("unexpected session protocol: " + serverPort.protocols());
        }

        // Do not set a port if the port number is 0 which means that the port will be automatically chosen.
        final int port = serverPort.localAddress().getPort();
        if (isValidPort(port)) {
            setPortIfAbsent(port);
        }
        return this;
    }
1055742
public void setSupportedMediaTypes(List<MediaType> supportedMediaTypes) {
		Assert.notEmpty(supportedMediaTypes, "'supportedMediaTypes' must not be empty");
		this.supportedMediaTypes = new ArrayList<MediaType>(supportedMediaTypes);
	}
823072
public void setSupportedPlatforms(java.util.Collection<SupportedPlatform> supportedPlatforms) {
        if (supportedPlatforms == null) {
            this.supportedPlatforms = null;
            return;
        }

        this.supportedPlatforms = new com.amazonaws.internal.SdkInternalList<SupportedPlatform>(supportedPlatforms);
    }
871311
public void setOptions(JspToolsOptionsMap options) {
        if (logger!=null) {
            if(com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable(Level.FINEST)){
                logger.logp(Level.FINEST, CLASS_NAME,"setOptions", "setOptions is called");
            }
        }
        this.optionOverrides = options;
    }
863457
public void setGhostStyleEnabled(boolean enabled) {

        if (enabled) {
            m_textbox.addStyleName(CSS.textboxGhostMode());
        } else {
            m_textbox.removeStyleName(CSS.textboxGhostMode());
        }
    }
346128
public void setPorts(java.util.Collection<InstancePortInfo> ports) {
        if (ports == null) {
            this.ports = null;
            return;
        }

        this.ports = new java.util.ArrayList<InstancePortInfo>(ports);
    }
43943
void configurePort(String port) {

        if (StringUtils.isNotBlank(port)) {
            try {
                this.port = Integer.parseInt(port);
                log.info("Using port {}", this.port);
            } catch (NumberFormatException e) {
                log.info("Unable to parse server PORT variable ({}). Defaulting to port {}", port, this.port);
            }
        }
    }
866855
public void setAppServerDefaultDeploymentScanEnabled(boolean enabled) throws Exception {
        final String[] addressArr = { SUBSYSTEM, DEPLOYMENT_SCANNER, SCANNER, "default" };
        final Address address = Address.root().add(addressArr);
        final ModelNode req = createWriteAttributeRequest("scan-enabled", Boolean.toString(enabled), address);
        final ModelNode response = execute(req);

        if (!isSuccess(response)) {
            throw new FailureException(response);
        }
        return;
    }
1065904
public void setServer (String hostname, int[] ports, int[] datagramPorts)
    {
        _hostname = hostname;
        _ports = ports;
        _datagramPorts = datagramPorts;
    }
1077151
public void setStandardSocketBindingInterface(String socketBindingName, String interfaceName) throws Exception {
        setStandardSocketBindingInterfaceExpression(socketBindingName, null, interfaceName);
    }
1248789
@Override
    public void setComponentEnabled(boolean enabled) {
        super.setComponentEnabled(enabled);

        addButton.setEnabled(enabled);
        removeWithoutConfirmationCheckBox.setEnabled(enabled);

        boolean enable = enabled && getTable().getSelectionModel().getMinSelectionIndex() >= 0;
        if (modifyButton != null) {
            modifyButton.setEnabled(enable);
        }
        removeButton.setEnabled(enable);
    }
19586
private static void setServiceEnabled(final XMPPConnection connection,
            final boolean isEnabled) {
        ServiceDiscoveryManager manager = ServiceDiscoveryManager
                .getInstanceFor(connection);

        List<String> namespaces = new ArrayList<>();
        namespaces.addAll(Arrays.asList(NAMESPACE));
        namespaces.add(DataPacketExtension.NAMESPACE);
        if (!IBB_ONLY) {
            namespaces.add(Bytestream.NAMESPACE);
        }

        for (String namespace : namespaces) {
            if (isEnabled) {
                manager.addFeature(namespace);
            } else {
                manager.removeFeature(namespace);
            }
        }
    }
619409
public void setEnabled(String enabled) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0));
        }
        m_enabled = Boolean.valueOf(enabled).booleanValue();
    }
476578
public void setEnabled(boolean enabled) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0));
        }
        m_enabled = enabled;
    }
214587
def do_set_port_config(self, line):
        

        def f(p, args):
            try:
                target, port, key, value = args
            except:
                print("argument error")
                print(args)
                return

            # get switch id
            o = p.get()
            capable_switch_id = o.id

            try:
                capable_switch = ofc.OFCapableSwitchType(
                    id=capable_switch_id,
                    resources=ofc.OFCapableSwitchResourcesType(
                        port=[
                            ofc.OFPortType(
                                resource_id=port,
                                configuration=ofc.OFPortConfigurationType(
                                    **{key: value}))
                        ]
                    )
                )
            except TypeError:
                print("argument error")
                return
            try:
                p.edit_config(target, capable_switch)
            except Exception as e:
                print(e)

        self._request(line, f)