Groovy Documentation

grails.util
[Java] Class AbstractBuildSettings

java.lang.Object
  grails.util.AbstractBuildSettings

public abstract class AbstractBuildSettings
extends java.lang.Object

Methods optimized to Java for the BuildSettings class.

Since:
1.3.4


Field Summary
protected java.util.Map 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 java.util.Map flatConfig

Flattened version of the ConfigObject for easy access from Java

protected java.io.File globalPluginsDir

The location where global plugins are installed to.

protected boolean globalPluginsDirSet

protected java.io.File projectPluginsDir

The location where project-specific plugins are installed to.

protected boolean projectPluginsDirSet

 
Method Summary
void addPluginDirectory(java.io.File location, boolean isInline)

Adds a plugin directory

groovy.util.ConfigObject getConfig()

java.io.File getGlobalPluginsDir()

java.util.Collection getImplicitPluginDirectories()

Returns a list of all plugin directories in both the given path and the global "plugins" directory together.

java.util.Collection getInlinePluginDirectories()

Returns an array of the inplace plugin locations.

protected java.util.Collection getInlinePluginsFromConfiguration(java.util.Map config)

Extracts the inline plugin dirs relative to the base dir of this project.

protected java.util.Collection getInlinePluginsFromConfiguration(java.util.Map config, java.io.File baseDir)

Extracts the inline plugin dirs from the given config, relative to the given baseDir.

java.util.Collection getPluginBaseDirectories()

Gets a list of all the known plugin base directories (directories where plugins are installed to).

java.util.Collection getPluginDirectories()

Obtains a list of plugin directories for the application

java.io.File getProjectPluginsDir()

boolean isInlinePluginLocation(java.io.File pluginLocation)

Returns true if the specified plugin location is an inline location.

void setConfig(groovy.util.ConfigObject config)

void setGlobalPluginsDir(java.io.File globalPluginsDir)

void setProjectPluginsDir(java.io.File projectPluginsDir)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

cache

protected java.util.Map 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.


flatConfig

@SuppressWarnings("rawtypes")
protected java.util.Map flatConfig
Flattened version of the ConfigObject for easy access from Java


globalPluginsDir

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


globalPluginsDirSet

protected boolean globalPluginsDirSet


projectPluginsDir

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


projectPluginsDirSet

protected boolean projectPluginsDirSet


 
Method Detail

addPluginDirectory

public void addPluginDirectory(java.io.File location, boolean isInline)
Adds a plugin directory
Parameters:
location - The plugin's locatino


getConfig

public groovy.util.ConfigObject getConfig()


getGlobalPluginsDir

public java.io.File getGlobalPluginsDir()


getImplicitPluginDirectories

public java.util.Collection 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


getInlinePluginDirectories

@SuppressWarnings("unchecked")
public java.util.Collection getInlinePluginDirectories()
Returns an array of the inplace plugin locations.


getInlinePluginsFromConfiguration

@SuppressWarnings({ "rawtypes" })
protected java.util.Collection getInlinePluginsFromConfiguration(@SuppressWarnings("hiding") java.util.Map config)
Extracts the inline plugin dirs relative to the base dir of this project.
See Also:
getInlinePluginsFromConfiguration(Map, File)


getInlinePluginsFromConfiguration

@SuppressWarnings({ "rawtypes", "hiding" })
protected java.util.Collection getInlinePluginsFromConfiguration(java.util.Map config, java.io.File baseDir)
Extracts the inline plugin dirs from the given config, relative to the given baseDir. TODO: consider trowing an error here if an plugin does not exists at the location.


getPluginBaseDirectories

@SuppressWarnings("unchecked")
public java.util.Collection 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


getPluginDirectories

@SuppressWarnings("unchecked")
public java.util.Collection getPluginDirectories()
Obtains a list of plugin directories for the application


getProjectPluginsDir

public java.io.File getProjectPluginsDir()


isInlinePluginLocation

@SuppressWarnings("unchecked")
public boolean isInlinePluginLocation(java.io.File pluginLocation)
Returns true if the specified plugin location is an inline location.


setConfig

public void setConfig(groovy.util.ConfigObject config)


setGlobalPluginsDir

public void setGlobalPluginsDir(java.io.File globalPluginsDir)


setProjectPluginsDir

public void setProjectPluginsDir(java.io.File projectPluginsDir)


 

Groovy Documentation