Can only be set once (by AccessFilter) at deploy time.
198440
public static void setServiceUser(String user) {
        if (serviceUser == null) {
            if (StringHelper.isEmpty(user))
                serviceUser = "N/A";
            else
                serviceUser = user;
        }
    }
291731
private void initAccessTokens(String accessToken, String refreshToken, Long expireTime) {
		this.accessToken = accessToken;
		this.expireTime = expireTime;		
		if (refreshToken != null) {
			this.refreshToken = refreshToken;
		}
	}
616316
private void setUnavailableUntil(long time, boolean isInit) //PM01373
	{
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
            logger.logp(Level.FINE, CLASS_NAME, "setUnavailableUntil", "setUnavailableUntil() : " + time);
        if(isInit){
			state = UNINITIALIZED_STATE;  //PM01373
		}
		else {
        state = UNAVAILABLE_STATE;
		}
        unavailableUntil = time;
        evtSource.onServletUnavailableForService(getServletEvent());
    }
412220
public static void deploy(Context context, Interceptor interceptor, Filter filter) {
        final Probe probe = new Probe(context, interceptor, filter);
        LayoutInflater.from(context).setFactory2(new ProbeViewFactory(context, probe));
    }
1257353
public void setPredicates(@Nonnull final AccessAssertion... predicates) {
        if (this.predicates != null) {
            throw new AssertionError("Predicates can only be set a single time");
        }
        if (predicates.length < 1) {
            throw new IllegalArgumentException("There must be at least 1 predicate");
        }
        this.predicates = Arrays.asList(predicates);
    }
1369422
public void setFilter(Filter filter)
    {
        if (this.filter == null)
        {
            this.filter = new FilterList();
        }
        if (filter != null)
        {
            this.filter.addFilter(filter);
        }
    }
1179497
async function onUISetSettings(newSettings) {
    // WebAPI settings
    if (newSettings.webapi.server_port != -1) {
        pi.server.publish('client_settings', {port: newSettings.webapi.server_port});
    }

    let filters = localStorage.getItem('API_FILTERS',{});

    for (const clName of Object.keys(newSettings.webapi.api_filter)) {
        const clo = filters[clName] || {};
        clo.filter = newSettings.webapi.api_filter[clName] || '';
        filters[clName] = clo;
    }

    localStorage.setItem('API_FILTERS',filters);

    // MQTT settings
    pi.server.publish('client_settings', {mqtt: newSettings.mqtt});



    // Network settings
    const rootPwd = newSettings.network.root_passwd;
    delete newSettings.network.root_passwd ; // Root password is not saved to the file
    //newSettings.network.root_passwd = ''; // Root password is not saved to the file

    if (!newSettings.network.interfaces) {
        return newSettings;
    }

    let interf;
    for (const k of Object.keys(newSettings.network.interfaces)) {
        interf = k;
    }
    const ss = newSettings.network.interfaces[interf];

    const cname = NMCLI_CONNECTION_NAME_PREFIX + '_' + interf;
    let commands = [];
    // Delete connection (may fail for first time)
    commands.push(['nmcli', 'connection', 'down', cname]);
    commands.push(['nmcli', 'connection', 'delete', cname]);

    if (interf.indexOf('wlan')==0) {
        const manualap = ss.apname_manual.trim();
        commands.push([
            'nmcli', 'connection', 'add', 'con-name', cname,
            'type', 'wifi', 'ifname', interf, 'ssid',
            (manualap.length==0 ? ss.apname : manualap)]);
    } else { // if( interf.indexOf('eth')==0 )
        commands.push([
            'nmcli', 'connection', 'add', 'con-name', cname,
            'type', 'ethernet', 'ifname', interf]);
    }
    const ignoreErrorHandler = (cmd) => {
        const ignoreErrorCmds = ['delete', 'down'];
        return (ignoreErrorCmds.indexOf(cmd[2]) >= 0);
    };
    await executeCommands(
        commands,
        ignoreErrorHandler,
        {sudo: true, password: rootPwd},
    );

    commands = [];
    if (newSettings.network.detail.ip == undefined) { // DHCP
        commands.push(['nmcli', 'connection', 'modify', cname,
            'ipv4.method', 'auto']);
    } else { // static ip
        if (newSettings.network.detail.default_gateway == undefined) {
            newSettings.network.detail.default_gateway = '';
        }
        const ipSetting =
            (newSettings.network.detail.ip + ' '
             + newSettings.network.detail.default_gateway).trim();
        commands.push(['nmcli', 'connection', 'modify', cname,
            'ipv4.method', 'manual', 'ipv4.addresses', ipSetting]);
    }
    await executeCommands(
        commands, null, {sudo: true, password: rootPwd}
    ).then(() => {
        commands = [];
    }).catch((e) => {
        if (newSettings.network.detail.ip == undefined) { // DHCP
            throw e;
        }
        // static ip
        // The new version 'nmcli' has changed ipv4.gateway format
        commands = [];
        commands.push([
            'nmcli', 'connection', 'modify', cname,
            'ipv4.method', 'manual',
            'ipv4.addresses', newSettings.network.detail.ip,
            'ipv4.gateway', newSettings.network.detail.default_gateway]);
    });
    if (commands.length > 0) {
        await executeCommands(commands, null, {sudo: true, password: rootPwd});
        commands = [];
    }

    if (interf.indexOf('wlan')==0) {
        if (ss.password != ss.password2) {
            throw new Error('Password mismatch.');
        }
        const apPwd = ss.password; ss.password = ss.password2 = '';
        commands.push(['nmcli', 'connection', 'modify', cname,
            'wifi-sec.key-mgmt', 'wpa-psk', 'wifi-sec.psk', apPwd]);
    }
    // commands.push(['nmcli','connection','down', cname]);
    commands.push(['nmcli', 'connection', 'up', cname]);

    if (newSettings.network.server_power != 'none') {
        commands.push([]); // Accept and save settings first
        if (newSettings.network.server_power == 'reboot') {
            commands.push(['reboot']);
        }
        if (newSettings.network.server_power == 'shutdown') {
            commands.push(['shutdown', '-h', 'now']);
        }
        newSettings.network.server_power = 'none';
    }

    // log('Commands:');
    // log(JSON.stringify(commands,null,'\t'));


    await executeCommands(
        commands,
        ignoreErrorHandler,
        {sudo: true, password: rootPwd},
    );
    return newSettings;
}
380567
static void disableAttribute(ModelNode model) {
        Date enabledTime = new Date();
        DateFormat df = new SimpleDateFormat(DATEFORMAT_ATTR);
        model.get(DeploymentAttributes.DISABLED_TIME.getName()).set(enabledTime.getTime());
        model.get(DeploymentAttributes.DISABLED_TIMESTAMP.getName()).set(df.format(enabledTime));
    }
254942
public void setAccess(String access) {
        if ("public".equals(access)) publicScope = true;
        else if ("protected".equals(access)) protectedScope = true;
        else if ("package".equals(access)) packageScope = true;
        else if ("private".equals(access)) privateScope = true;
    }
848796
@Override
    public void afterPropertiesSet() throws Exception {
        Assert.notNull(userAuthorisationUri, "The userAuthorisationUri must be set");
        Assert.notNull(redirectUri, "The redirectUri must be set");
        Assert.notNull(accessTokenUri, "The accessTokenUri must be set");
        Assert.notNull(clientId, "The clientId must be set");
        Assert.notNull(clientSecret, "The clientSecret must be set");
        Assert.notNull(userInfoUri, "The userInfoUri must be set");
    }
746349
private void initFilters() {
        ditaWriterFilter = new DitaWriterFilter();
        ditaWriterFilter.setLogger(logger);
        ditaWriterFilter.setJob(job);
        ditaWriterFilter.setEntityResolver(reader.getEntityResolver());

        topicFragmentFilter = new TopicFragmentFilter(ATTRIBUTE_NAME_CONREF, ATTRIBUTE_NAME_CONREFEND);

        tempFileNameScheme.setBaseDir(job.getInputDir());
    }
1119859
function(filter, setOption){
        if(filter.group && setOption.name){
            //change group name
            this._groupFilter(filter, function(){
                setOption.name && (this.name = setOption.name);
            });
        }
        if(!filter.group){
            filter.group = 'root';
        }
        this._filter(filter, function(){
            if(this.type == 'ip'){
                setOption.ip && (this.ip = setOption.ip);
                setOption.domain && (this.domain = setOption.domain);
                setOption.comment && (this.comment = setOption.comment);
                (setOption.enable != undefined) && (this.enable = setOption.enable);
            }else{
                setOption.text && (this.text = setOption.text);
            }
        });
        return this;
    }
55473
@Override
    public void onFilterEnabled(Displayer displayer, DataSetGroup groupOp) {
        view.gotoFirstPage();
        super.onFilterEnabled(displayer, groupOp);
    }
1073622
private static void setUsersInfo(Catalog catalog, UsersType users) throws RuntimeException {
        if (users == null) {
            return;
        }

        // The database name is not available in deployment.xml (it is defined
        // in project.xml). However, it must always be named "database", so
        // I've temporarily hardcoded it here until a more robust solution is
        // available.
        Database db = catalog.getClusters().get("cluster").getDatabases().get("database");

        SecureRandom sr = new SecureRandom();

        for (UsersType.User user : users.getUser()) {
            Set<String> roles = extractUserRoles(user);
            String sha1hex = user.getPassword();
            String sha256hex = user.getPassword();
            if (user.isPlaintext()) {
                sha1hex = extractPassword(user.getPassword(), ClientAuthScheme.HASH_SHA1);
                sha256hex = extractPassword(user.getPassword(), ClientAuthScheme.HASH_SHA256);
            } else if (user.getPassword().length() == 104) {
                int sha1len = ClientAuthScheme.getHexencodedDigestLength(ClientAuthScheme.HASH_SHA1);
                sha1hex = sha1hex.substring(0, sha1len);
                sha256hex = sha256hex.substring(sha1len);
            } else {
                // if one user has invalid password, give a warn.
                hostLog.warn("User \"" + user.getName() + "\" has invalid masked password in deployment file.");
                // throw exception disable user with invalid masked password
                throw new RuntimeException("User \"" + user.getName() + "\" has invalid masked password in deployment file");
            }
            org.voltdb.catalog.User catUser = db.getUsers().get(user.getName());
            if (catUser == null) {
                catUser = db.getUsers().add(user.getName());
            }

            // generate salt only once for sha1 and sha256
            String saltGen = BCrypt.gensalt(BCrypt.GENSALT_DEFAULT_LOG2_ROUNDS,sr);
            String hashedPW =
                    BCrypt.hashpw(
                            sha1hex,
                            saltGen);
            String hashedPW256 =
                    BCrypt.hashpw(
                            sha256hex,
                            saltGen);
            catUser.setShadowpassword(hashedPW);
            catUser.setSha256shadowpassword(hashedPW256);
            //use fixed seed for comparison
            catUser.setPassword( BCrypt.hashpw(sha256hex, "$2a$10$pWO/a/OQkFyQWQDpchZdEe"));
            // process the @groups and @roles comma separated list
            for (final String role : roles) {
                final Group catalogGroup = db.getGroups().get(role);
                // if the role doesn't exist, ignore it.
                if (catalogGroup != null) {
                    GroupRef groupRef = catUser.getGroups().get(role);
                    if (groupRef == null) {
                        groupRef = catUser.getGroups().add(role);
                    }
                    groupRef.setGroup(catalogGroup);
                }
                else {
                    hostLog.warn("User \"" + user.getName() +
                            "\" is assigned to non-existent role \"" + role + "\" " +
                            "and may not have the expected database permissions.");
                }
            }
        }
    }
442111
private void validateNotSameNameAndTypeOfDeployment(DeploymentDescription deployment) {
        for (Deployment existing : deployments) {
            if (existing.getDescription().getName().equals(deployment.getName())) {
                if (
                    (existing.getDescription().isArchiveDeployment() && deployment.isArchiveDeployment()) ||
                        (existing.getDescription().isDescriptorDeployment() && deployment.isDescriptorDeployment())) {
                    throw new IllegalArgumentException("Can not add multiple " +
                        Archive.class.getName() + " deployments with the same name: " + deployment.getName());
                }
            }
        }
    }
205583
public void init(FilterConfig filterConfig) throws ServletException {
    super.init(filterConfig);

    String dirBrowse = filterConfig.getInitParameter("directoryBrowsingDisallowed");

    if (dirBrowse != null) {
      dirBrowse = dirBrowse.toLowerCase();

      directoryBrowsingDisallowed = dirBrowse.equals("yes") ||
                                    dirBrowse.equals("true");
    }
  }
165883
@Override
    public void sessionCreated(NextFilter nextFilter, IoSession session)
            throws Exception {
        for (Map.Entry<String, Object> e : attributes.entrySet()) {
            session.setAttribute(e.getKey(), e.getValue());
        }

        nextFilter.sessionCreated(session);
    }