org.apache.archiva.configuration
Class FileTypes

java.lang.Object
  extended by org.apache.archiva.configuration.FileTypes
All Implemented Interfaces:
org.apache.archiva.redback.components.registry.RegistryListener

@Service(value="fileTypes")
public class FileTypes
extends Object
implements org.apache.archiva.redback.components.registry.RegistryListener

FileTypes


Field Summary
private  ArchivaConfiguration archivaConfiguration
           
private  List<String> artifactPatterns
           
static String ARTIFACTS
           
static String AUTO_REMOVE
           
static List<String> DEFAULT_EXCLUSIONS
          Deprecated.  
private  Map<String,List<String>> defaultTypeMap
          Map of default values for the file types.
static String IGNORED
           
static String INDEXABLE_CONTENT
           
 
Constructor Summary
FileTypes()
           
 
Method Summary
 void afterConfigurationChange(org.apache.archiva.redback.components.registry.Registry registry, String propertyName, Object propertyValue)
           
 void beforeConfigurationChange(org.apache.archiva.redback.components.registry.Registry registry, String propertyName, Object propertyValue)
           
 List<String> getFileTypePatterns(String id)
           Get the list of patterns for a specified filetype.
private  void initialiseTypeMap(Configuration configuration)
           
 void initialize()
           
 boolean matchesArtifactPattern(String relativePath)
           
 boolean matchesDefaultExclusions(String relativePath)
           
 void setArchivaConfiguration(ArchivaConfiguration archivaConfiguration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARTIFACTS

public static final String ARTIFACTS
See Also:
Constant Field Values

AUTO_REMOVE

public static final String AUTO_REMOVE
See Also:
Constant Field Values

INDEXABLE_CONTENT

public static final String INDEXABLE_CONTENT
See Also:
Constant Field Values

IGNORED

public static final String IGNORED
See Also:
Constant Field Values

archivaConfiguration

@Inject
@Named(value="archivaConfiguration#default")
private ArchivaConfiguration archivaConfiguration

defaultTypeMap

private Map<String,List<String>> defaultTypeMap
Map of default values for the file types.


artifactPatterns

private List<String> artifactPatterns

DEFAULT_EXCLUSIONS

public static final List<String> DEFAULT_EXCLUSIONS
Deprecated. 
Default exclusions from artifact consumers that are using the file types. Note that this is simplistic in the case of the support files (based on extension) as it is elsewhere - it may be better to match these to actual artifacts and exclude later during scanning.

Constructor Detail

FileTypes

public FileTypes()
Method Detail

setArchivaConfiguration

public void setArchivaConfiguration(ArchivaConfiguration archivaConfiguration)

getFileTypePatterns

public List<String> getFileTypePatterns(String id)

Get the list of patterns for a specified filetype.

You will always get a list. In this order.

Parameters:
id - the id to lookup.
Returns:
the list of patterns.

matchesArtifactPattern

public boolean matchesArtifactPattern(String relativePath)

matchesDefaultExclusions

public boolean matchesDefaultExclusions(String relativePath)

initialize

@PostConstruct
public void initialize()

initialiseTypeMap

private void initialiseTypeMap(Configuration configuration)

afterConfigurationChange

public void afterConfigurationChange(org.apache.archiva.redback.components.registry.Registry registry,
                                     String propertyName,
                                     Object propertyValue)
Specified by:
afterConfigurationChange in interface org.apache.archiva.redback.components.registry.RegistryListener

beforeConfigurationChange

public void beforeConfigurationChange(org.apache.archiva.redback.components.registry.Registry registry,
                                      String propertyName,
                                      Object propertyValue)
Specified by:
beforeConfigurationChange in interface org.apache.archiva.redback.components.registry.RegistryListener


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.