<commit_before>/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.xwiki.job;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Base class for {@link Request} implementations.
 * 
 * @version $Id$
 * @since 4.0M1
 */
public abstract class AbstractRequest implements Request
{
    /**
     * Serialization identifier.
     */
    private static final long serialVersionUID = 1L;

    /**
     * @see #getId()
     */
    private List<String> id;

    /**
     * The properties.
     */
    private Map<String, Object> properties = new HashMap<String, Object>();

    /**
     * Default constructor.
     */
    public AbstractRequest()
    {

    }

    /**
     * @param request the request to copy
     */
    public AbstractRequest(Request request)
    {
        for (String key : request.getPropertyNames()) {
            setProperty(key, request.getProperty(key));
        }
    }

    @Override
    public List<String> getId()
    {
        return this.id;
    }

    /**
     * @param id the identifier used to access the job
     * @since 4.1M2
     */
    public void setId(List<String> id)
    {
        this.id = new ArrayList<String>(id);
    }<commit_msg>XCOMMONS-178: Allow a list as job id Fix bug<commit_after>/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.xwiki.job;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Base class for {@link Request} implementations.
 * 
 * @version $Id$
 * @since 4.0M1
 */
public abstract class AbstractRequest implements Request
{
    /**
     * Serialization identifier.
     */
    private static final long serialVersionUID = 1L;

    /**
     * @see #getId()
     */
    private List<String> id;

    /**
     * The properties.
     */
    private Map<String, Object> properties = new HashMap<String, Object>();

    /**
     * Default constructor.
     */
    public AbstractRequest()
    {

    }

    /**
     * @param request the request to copy
     */
    public AbstractRequest(Request request)
    {
        for (String key : request.getPropertyNames()) {
            setProperty(key, request.getProperty(key));
        }
    }

    @Override
    public List<String> getId()
    {
        return this.id;
    }

    /**
     * @param id the identifier used to access the job
     * @since 4.1M2
     */
    public void setId(List<String> id)
    {
        this.id = id != null ? new ArrayList<String>(id) : null;
    }
{'fraction_non_alphanumeric': 0.09497336113041464, 'fraction_numerical': 0.00996062080148251, 'mean_word_length': 2.7288428324697755, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2281213', 'n_tokens_mistral': 1206, 'n_tokens_neox': 1168, 'n_words': 473}