* under the License.
*/
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.ConfigurationNames;
import org.apache.maven.archiva.configuration.FileTypes;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer;
private static final String TYPE_CHECKSUM_CANNOT_CREATE = "checksum-create-failure";
private File repositoryDir;
-
- private List<String> propertyNameTriggers = new ArrayList<String>();
-
+
private List<String> includes = new ArrayList<String>();
public String getId()
}
public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue )
- {
- if ( propertyNameTriggers.contains( propertyName ) )
+ {
+ if ( ConfigurationNames.isRepositoryScanning( propertyName ) )
{
initIncludes();
}
public void initialize()
throws InitializationException
{
- propertyNameTriggers = new ArrayList<String>();
- propertyNameTriggers.add( "repositoryScanning" );
- propertyNameTriggers.add( "fileTypes" );
- propertyNameTriggers.add( "fileType" );
- propertyNameTriggers.add( "patterns" );
- propertyNameTriggers.add( "pattern" );
-
configuration.addChangeListener( this );
-
+
initIncludes();
}
}
* under the License.
*/
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.ConfigurationNames;
import org.apache.maven.archiva.configuration.FileTypes;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer;
private FileTypes filetypes;
private File repositoryDir;
-
- private List<String> propertyNameTriggers = new ArrayList<String>();
-
+
private List<String> includes = new ArrayList<String>();
public String getId()
}
public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue )
- {
- if ( propertyNameTriggers.contains( propertyName ) )
+ {
+ if ( ConfigurationNames.isRepositoryScanning( propertyName ) )
{
initIncludes();
}
public void initialize()
throws InitializationException
- {
- propertyNameTriggers = new ArrayList<String>();
- propertyNameTriggers.add( "repositoryScanning" );
- propertyNameTriggers.add( "fileTypes" );
- propertyNameTriggers.add( "fileType" );
- propertyNameTriggers.add( "patterns" );
- propertyNameTriggers.add( "pattern" );
-
+ {
configuration.addChangeListener( this );
initIncludes();
*/
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.ConfigurationNames;
import org.apache.maven.archiva.configuration.FileTypes;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer;
public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue )
{
- if ( propertyNameTriggers.contains( propertyName ) )
+ if ( ConfigurationNames.isRepositoryScanning( propertyName ) )
{
initIncludes();
}
public void initialize()
throws InitializationException
{
- propertyNameTriggers = new ArrayList<String>();
- propertyNameTriggers.add( "repositoryScanning" );
- propertyNameTriggers.add( "fileTypes" );
- propertyNameTriggers.add( "fileType" );
- propertyNameTriggers.add( "patterns" );
- propertyNameTriggers.add( "pattern" );
-
configuration.addChangeListener( this );
initIncludes();
import org.apache.commons.io.FileUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.ConfigurationNames;
import org.apache.maven.archiva.configuration.FileTypes;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer;
* @plexus.requirement role-hint="lucene"
*/
private RepositoryContentIndexFactory indexFactory;
-
- private List<String> propertyNameTriggers = new ArrayList<String>();
-
+
private List<String> includes = new ArrayList<String>();
private RepositoryContentIndex index;
public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue )
{
- if ( propertyNameTriggers.contains( propertyName ) )
+ if ( ConfigurationNames.isRepositoryScanning( propertyName ) )
{
initIncludes();
}
public void initialize()
throws InitializationException
{
- propertyNameTriggers = new ArrayList<String>();
- propertyNameTriggers.add( "repositoryScanning" );
- propertyNameTriggers.add( "fileTypes" );
- propertyNameTriggers.add( "fileType" );
- propertyNameTriggers.add( "patterns" );
- propertyNameTriggers.add( "pattern" );
-
configuration.addChangeListener( this );
initIncludes();