<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.watchlist.internal.documents;

import javax.inject.Named;
import javax.inject.Singleton;

import org.xwiki.component.annotation.Component;
import org.xwiki.model.reference.LocalDocumentReference;

import com.xpn.xwiki.XWiki;
import com.xpn.xwiki.doc.AbstractMandatoryClassInitializer;
import com.xpn.xwiki.objects.classes.BaseClass;

/**
 * Document initializer for {@value #DOCUMENT_FULL_NAME}.
 * 
 * @version $Id$
 */
@Component
@Named(WatchListJobClassDocumentInitializer.DOCUMENT_FULL_NAME)
@Singleton
public class WatchListJobClassDocumentInitializer extends AbstractMandatoryClassInitializer
{
    /**
     * Class document name.
     */
    public static final String DOCUMENT_NAME = "WatchListJobClass";

    /**
     * Class document full name.
     */
    public static final String DOCUMENT_FULL_NAME = XWiki.SYSTEM_SPACE + "." + DOCUMENT_NAME;

    /**
     * Class document reference.
     */
    public static final LocalDocumentReference DOCUMENT_REFERENCE =
        new LocalDocumentReference(XWiki.SYSTEM_SPACE, DOCUMENT_NAME);

    /**
     * Email template field name.
     */
    public static final String TEMPLATE_FIELD = "template";

    /**
     * Last fire time field name.
     */
    public static final String LAST_FIRE_TIME_FIELD = "last_fire_time";

    /**
     * Default constructor.
     */
    public WatchListJobClassDocumentInitializer()
    {
        super(DOCUMENT_REFERENCE, "XWiki WatchList Notifier Class");
    }

    @Override
    protected boolean isMainWikiOnly()
    {
        // Main wiki document.
        return true;
    }

    @Override
    protected void createClass(BaseClass xclass)
    {
        xclass.addTextField(TEMPLATE_FIELD, "Document holding the notification message template to use", 80);
        xclass.addDateField(LAST_FIRE_TIME_FIELD, "Last notifier fire time", "dd/MM/yyyy HH:mm:ss", 1);
    }
}<commit_msg>XWIKI-15452: Use auto-suggestion on xproperties that can support it<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.watchlist.internal.documents;

import javax.inject.Named;
import javax.inject.Singleton;

import org.xwiki.component.annotation.Component;
import org.xwiki.model.reference.LocalDocumentReference;

import com.xpn.xwiki.XWiki;
import com.xpn.xwiki.doc.AbstractMandatoryClassInitializer;
import com.xpn.xwiki.objects.classes.BaseClass;

/**
 * Document initializer for {@value #DOCUMENT_FULL_NAME}.
 * 
 * @version $Id$
 */
@Component
@Named(WatchListJobClassDocumentInitializer.DOCUMENT_FULL_NAME)
@Singleton
public class WatchListJobClassDocumentInitializer extends AbstractMandatoryClassInitializer
{
    /**
     * Class document name.
     */
    public static final String DOCUMENT_NAME = "WatchListJobClass";

    /**
     * Class document full name.
     */
    public static final String DOCUMENT_FULL_NAME = XWiki.SYSTEM_SPACE + "." + DOCUMENT_NAME;

    /**
     * Class document reference.
     */
    public static final LocalDocumentReference DOCUMENT_REFERENCE =
        new LocalDocumentReference(XWiki.SYSTEM_SPACE, DOCUMENT_NAME);

    /**
     * Email template field name.
     */
    public static final String TEMPLATE_FIELD = "template";

    /**
     * Last fire time field name.
     */
    public static final String LAST_FIRE_TIME_FIELD = "last_fire_time";

    /**
     * Default constructor.
     */
    public WatchListJobClassDocumentInitializer()
    {
        super(DOCUMENT_REFERENCE, "XWiki WatchList Notifier Class");
    }

    @Override
    protected boolean isMainWikiOnly()
    {
        // Main wiki document.
        return true;
    }

    @Override
    protected void createClass(BaseClass xclass)
    {
        xclass.addPageField(TEMPLATE_FIELD, "Document holding the notification message template to use", 80);
        xclass.addDateField(LAST_FIRE_TIME_FIELD, "Last notifier fire time", "dd/MM/yyyy HH:mm:ss", 1);
    }
}
{'fraction_non_alphanumeric': 0.08141999293535854, 'fraction_numerical': 0.006534793359237019, 'mean_word_length': 3.512350597609562, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4338865', 'n_tokens_mistral': 1621, 'n_tokens_neox': 1549, 'n_words': 528}