grails.util
Class AbstractBuildSettings

java.lang.Object
  extended by grails.util.AbstractBuildSettings

public class AbstractBuildSettings
extends Object

Methods optimized to Java for the BuildSettings class

Since:
1.3.4

Field Summary
protected  Map<String,Object> cache
          Used to cache results of certain expensive operations
protected  groovy.util.ConfigObject config
          The settings stored in the project's BuildConfig.groovy file if there is one.
protected  Map flatConfig
          Flattened version of the ConfigObject for easy access from Java
protected  File globalPluginsDir
          The location where global plugins are installed to.
protected  boolean globalPluginsDirSet
           
protected  File projectPluginsDir
          The location where project-specific plugins are installed to.
protected  boolean projectPluginsDirSet
           
 
Constructor Summary
AbstractBuildSettings()
           
 
Method Summary
 void addPluginDirectory(File location, boolean isInline)
          Adds a plugin directory
(package private)  void clearCache()
          Clears any locally cached values
 groovy.util.ConfigObject getConfig()
           
 File getGlobalPluginsDir()
           
 Collection<File> getImplicitPluginDirectories()
          Returns a list of all plugin directories in both the given path and the global "plugins" directory together.
 Collection<File> getInlinePluginDirectories()
          Returns an array of the inplace plugin locations.
protected  Collection<File> getInlinePluginsFromConfiguration(Map config)
           
 Collection<String> getPluginBaseDirectories()
          Gets a list of all the known plugin base directories (directories where plugins are installed to).
 Collection<File> getPluginDirectories()
          Obtains a list of plugin directories for the application
 File getProjectPluginsDir()
           
 boolean isInlinePluginLocation(File pluginLocation)
          Returns true if the specified plugin location is an inline location.
 void setConfig(groovy.util.ConfigObject config)
           
 void setGlobalPluginsDir(File globalPluginsDir)
           
 void setProjectPluginsDir(File projectPluginsDir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected Map<String,Object> cache
Used to cache results of certain expensive operations


config

protected groovy.util.ConfigObject config
The settings stored in the project's BuildConfig.groovy file if there is one.


projectPluginsDir

protected File projectPluginsDir
The location where project-specific plugins are installed to.


globalPluginsDir

protected File globalPluginsDir
The location where global plugins are installed to.


projectPluginsDirSet

protected boolean projectPluginsDirSet

globalPluginsDirSet

protected boolean globalPluginsDirSet

flatConfig

protected Map flatConfig
Flattened version of the ConfigObject for easy access from Java

Constructor Detail

AbstractBuildSettings

public AbstractBuildSettings()
Method Detail

clearCache

void clearCache()
Clears any locally cached values


getConfig

public groovy.util.ConfigObject getConfig()

setConfig

public void setConfig(groovy.util.ConfigObject config)

getProjectPluginsDir

public File getProjectPluginsDir()

setProjectPluginsDir

public void setProjectPluginsDir(File projectPluginsDir)

getGlobalPluginsDir

public File getGlobalPluginsDir()

setGlobalPluginsDir

public void setGlobalPluginsDir(File globalPluginsDir)

addPluginDirectory

public void addPluginDirectory(File location,
                               boolean isInline)
Adds a plugin directory

Parameters:
location - The plugin's locatino

getPluginDirectories

public Collection<File> getPluginDirectories()
Obtains a list of plugin directories for the application


getInlinePluginsFromConfiguration

protected Collection<File> getInlinePluginsFromConfiguration(Map config)

getImplicitPluginDirectories

public Collection<File> getImplicitPluginDirectories()
Returns a list of all plugin directories in both the given path and the global "plugins" directory together.

Returns:
A list of plugin directories as File objects

getPluginBaseDirectories

public Collection<String> getPluginBaseDirectories()
Gets a list of all the known plugin base directories (directories where plugins are installed to).

Returns:
Returns the base location where plugins are kept

isInlinePluginLocation

public boolean isInlinePluginLocation(File pluginLocation)
Returns true if the specified plugin location is an inline location.


getInlinePluginDirectories

public Collection<File> getInlinePluginDirectories()
Returns an array of the inplace plugin locations.