public void setCanSendPrivateMessage(String role) {
        if ( role == null ) {
            role = "(null)";
        }

        switch( role.toLowerCase() ) {
            case "none":
            case "moderators":
            case "participants":
            case "anyone":
                this.canSendPrivateMessage = role.toLowerCase();
                break;
            default:
                Log.warn( "Illegal value for muc#roomconfig_allowpm: '{}'. Defaulting to 'anyone'", role.toLowerCase() );
                this.canSendPrivateMessage = "anyone";
        }
    }
Sets the minimal role of persons that are allowed to send private messages in the room. The provided value is
any one of: "anyone", "moderators", "participants", "none". If another value is set, "anyone" is used instead.

@param role The minimal role of persons that are allowed to send private messages in the room (never null).
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java