<commit_before>/*
 * Copyright 2004-2005 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.codehaus.groovy.grails.plugins;

import grails.util.BuildScope;
import grails.util.Environment;
import groovy.lang.GroovyObject;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.codehaus.groovy.grails.commons.GrailsApplication;
import org.codehaus.groovy.grails.commons.spring.RuntimeSpringConfiguration;
import org.codehaus.groovy.grails.plugins.support.WatchPattern;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.core.io.Resource;
import org.springframework.core.type.filter.TypeFilter;
import org.w3c.dom.Element;

/**
 * <p>Plugin interface that adds Spring {@link org.springframework.beans.factory.config.BeanDefinition}s
 * to a registry based on a {@link GrailsApplication} object. After all <code>GrailsPlugin</code> classes
 * have been processed the {@link org.springframework.beans.factory.config.BeanDefinition}s in the registry are
 * loaded in a Spring {@link org.springframework.context.ApplicationContext} that's the singular
 * configuration unit of Grails applications.</p>
 *
 * <p>It's up to implementation classes to determine where <code>GrailsPlugin</code> instances are loaded
 * from.</p>
 *
 * @author <NAME>
 * @author <NAME>
 *
 * @since 0.2
 * @see org.springframework.beans.factory.support.BeanDefinitionRegistry
 */
@SuppressWarnings("rawtypes")
public interface GrailsPlugin extends ApplicationContextAware, Comparable, GrailsPluginInfo {

    int EVENT_ON_CHANGE = 0;
    int EVENT_ON_CONFIG_CHANGE = 1;
    int EVENT_ON_SHUTDOWN = 2;

    String DO_WITH_DYNAMIC_METHODS = "doWithDynamicMethods";

    /**
     * The scopes to which this plugin applies
     */
    String SCOPES = "scopes";

    /**
     * The environments to which this plugin applies
     */
    String ENVIRONMENTS = "environments";

    /**
     * The prefix used in plug-ins paths
     */
    String PLUGINS_PATH = "/plugins";

    /**
     * Defines the name of the property that specifies resources which this plugin monitors for changes
     * in the format a Ant-style path
     */
    String WATCHED_RESOURCES = "watchedResources";

    /**
     * Defines the name of the property that specifies a List or plugins that this plugin evicts
     * Eviction occurs when the PluginManager loads
     */
    String EVICT = "evict";

    /**
     * The status of the plugin.
     */
    String STATUS = "status";

    /**
     * When a plugin is "enabled" it will be loaded as usual.
     */
    String STATUS_ENABLED = "enabled";

    /**
     * When a plugin is "disabled" it will not be loaded
     */
    String STATUS_DISABLED = "disabled";

    /**
     * Defines the name of the property that defines a list of plugin names that this plugin influences.
     * A influenced plugin will be refreshed (@see refresh()) when a watched resource changes
     */
    String INFLUENCES = "influences";

    /**
     * Defines the name of the property that defines the closure that will be invoked
     * when a watched resource changes
     */
    String ON_CHANGE = "onChange";

    /**
     * Defines the name of the property that holds a closure to be invoked when shutdown is called
     */
    String ON_SHUTDOWN = "onShutdown";

    /**
     * Defines the name of the property that defines the closure that will be invoked
     * when a the Grails configuration object changes
     */
    String ON_CONFIG_CHANGE = "onConfigChange";

    /**
     * Defines the name of the property that defines the closure that will be invoked
     * when the web.xml is being generated
     */
    String DO_WITH_WEB_DESCRIPTOR = "doWithWebDescriptor";

    /**
     * Defines the name of the property that defines the closure that will be invoked during runtime spring configuration
     */
    String DO_WITH_SPRING = "doWithSpring";

    /**
     * Defines the name of the property that defines a closure that will be invoked after intialisation
     * and when the application context has been built
     */
    String DO_WITH_APPLICATION_CONTEXT = "doWithApplicationContext";

    /**
     * Defines the name of the property that specifies which plugins this plugin depends on
     */
    String DEPENDS_ON = "dependsOn";

    /**
     * Define the list of ArtefactHandlers supporting by the plugin
     */
    String ARTEFACTS = "artefacts";

    /**
     * The name of the property that provides a list of shipped, but overridable artefactssw
     */
    String PROVIDED_ARTEFACTS = "providedArtefacts";

    /**
     * The name of the property that provides a list of plugins this plugin should load before
     */
    String PLUGIN_LOAD_BEFORE_NAMES = "loadBefore";
<commit_msg>removed unused "influences" constant<commit_after>/*
 * Copyright 2004-2005 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.codehaus.groovy.grails.plugins;

import grails.util.BuildScope;
import grails.util.Environment;
import groovy.lang.GroovyObject;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.codehaus.groovy.grails.commons.GrailsApplication;
import org.codehaus.groovy.grails.commons.spring.RuntimeSpringConfiguration;
import org.codehaus.groovy.grails.plugins.support.WatchPattern;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.core.io.Resource;
import org.springframework.core.type.filter.TypeFilter;
import org.w3c.dom.Element;

/**
 * <p>Plugin interface that adds Spring {@link org.springframework.beans.factory.config.BeanDefinition}s
 * to a registry based on a {@link GrailsApplication} object. After all <code>GrailsPlugin</code> classes
 * have been processed the {@link org.springframework.beans.factory.config.BeanDefinition}s in the registry are
 * loaded in a Spring {@link org.springframework.context.ApplicationContext} that's the singular
 * configuration unit of Grails applications.</p>
 *
 * <p>It's up to implementation classes to determine where <code>GrailsPlugin</code> instances are loaded
 * from.</p>
 *
 * @author <NAME>
 * @author <NAME>
 *
 * @since 0.2
 * @see org.springframework.beans.factory.support.BeanDefinitionRegistry
 */
@SuppressWarnings("rawtypes")
public interface GrailsPlugin extends ApplicationContextAware, Comparable, GrailsPluginInfo {

    int EVENT_ON_CHANGE = 0;
    int EVENT_ON_CONFIG_CHANGE = 1;
    int EVENT_ON_SHUTDOWN = 2;

    String DO_WITH_DYNAMIC_METHODS = "doWithDynamicMethods";

    /**
     * The scopes to which this plugin applies
     */
    String SCOPES = "scopes";

    /**
     * The environments to which this plugin applies
     */
    String ENVIRONMENTS = "environments";

    /**
     * The prefix used in plug-ins paths
     */
    String PLUGINS_PATH = "/plugins";

    /**
     * Defines the name of the property that specifies resources which this plugin monitors for changes
     * in the format a Ant-style path
     */
    String WATCHED_RESOURCES = "watchedResources";

    /**
     * Defines the name of the property that specifies a List or plugins that this plugin evicts
     * Eviction occurs when the PluginManager loads
     */
    String EVICT = "evict";

    /**
     * The status of the plugin.
     */
    String STATUS = "status";

    /**
     * When a plugin is "enabled" it will be loaded as usual.
     */
    String STATUS_ENABLED = "enabled";

    /**
     * When a plugin is "disabled" it will not be loaded
     */
    String STATUS_DISABLED = "disabled";

    /**
     * Defines the name of the property that defines the closure that will be invoked
     * when a watched resource changes
     */
    String ON_CHANGE = "onChange";

    /**
     * Defines the name of the property that holds a closure to be invoked when shutdown is called
     */
    String ON_SHUTDOWN = "onShutdown";

    /**
     * Defines the name of the property that defines the closure that will be invoked
     * when a the Grails configuration object changes
     */
    String ON_CONFIG_CHANGE = "onConfigChange";

    /**
     * Defines the name of the property that defines the closure that will be invoked
     * when the web.xml is being generated
     */
    String DO_WITH_WEB_DESCRIPTOR = "doWithWebDescriptor";

    /**
     * Defines the name of the property that defines the closure that will be invoked during runtime spring configuration
     */
    String DO_WITH_SPRING = "doWithSpring";

    /**
     * Defines the name of the property that defines a closure that will be invoked after intialisation
     * and when the application context has been built
     */
    String DO_WITH_APPLICATION_CONTEXT = "doWithApplicationContext";

    /**
     * Defines the name of the property that specifies which plugins this plugin depends on
     */
    String DEPENDS_ON = "dependsOn";

    /**
     * Define the list of ArtefactHandlers supporting by the plugin
     */
    String ARTEFACTS = "artefacts";

    /**
     * The name of the property that provides a list of shipped, but overridable artefacts
     */
    String PROVIDED_ARTEFACTS = "providedArtefacts";

    /**
     * The name of the property that provides a list of plugins this plugin should load before
     */
    String PLUGIN_LOAD_BEFORE_NAMES = "loadBefore";

{'fraction_non_alphanumeric': 0.07998855944322623, 'fraction_numerical': 0.003432167032128897, 'mean_word_length': 3.2694342694342695, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '3023950', 'n_tokens_mistral': 2903, 'n_tokens_neox': 2801, 'n_words': 1068}