fnug.config
Class DefaultBundleConfig

java.lang.Object
  extended by fnug.config.DefaultBundleConfig
All Implemented Interfaces:
BundleConfig

public class DefaultBundleConfig
extends Object
implements BundleConfig

Default implementation of BundleConfig

Author:
Martin Algesten

Field Summary
 
Fields inherited from interface fnug.config.BundleConfig
DEFAULT_CHECK_MODIFIED
 
Constructor Summary
DefaultBundleConfig(Resource configResource, String name, String basePath, String jsLintArgs, int checkModifiedInterval, String[] files)
          Constructs setting all configurations.
 
Method Summary
 String basePath()
          Base path of the bundle.
 int checkModifiedInterval()
          The interval in milliseconds that we are to check the modified dates of resources resolved by this bundle.
 Resource configResource()
          Returns the resource responsible for this configuration.
 String[] files()
          Files that comprises this bundle.
 String jsLintArgs()
          The arguments used for JSLint.
 String name()
          Name of the bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBundleConfig

public DefaultBundleConfig(Resource configResource,
                           String name,
                           String basePath,
                           String jsLintArgs,
                           int checkModifiedInterval,
                           String[] files)
Constructs setting all configurations.

Parameters:
configResource - Resource that built this instance.
name - See name()
basePath - See basePath()
jsLintArgs - See jsLintArgs()
checkModifiedInterval - See checkModifiedInterval()
files - See files()
Method Detail

configResource

public Resource configResource()
Returns the resource responsible for this configuration.

Specified by:
configResource in interface BundleConfig
Returns:
associated resource.

name

public String name()
Name of the bundle.

Specified by:
name in interface BundleConfig
Returns:
Bundle name. Must match Bundle.BUNDLE_ALLOWED_CHARS.

basePath

public String basePath()
Base path of the bundle. See Resource.getBasePath().

Specified by:
basePath in interface BundleConfig
Returns:
bundle base path

jsLintArgs

public String jsLintArgs()
The arguments used for JSLint. No arguments indicates that jslint is turned off.

Specified by:
jsLintArgs in interface BundleConfig
Returns:
The arguments used for JSLint. Example: white: true, onevar: true

checkModifiedInterval

public int checkModifiedInterval()
The interval in milliseconds that we are to check the modified dates of resources resolved by this bundle. A value of 0 disables modified checks.

Specified by:
checkModifiedInterval in interface BundleConfig
Returns:
number of milliseconds between checks.

files

public String[] files()
Files that comprises this bundle. Additional dependencies will be discovered using Resource.findRequiresTags().

Specified by:
files in interface BundleConfig
Returns:
Starting point files of this bundle.


Copyright © 2012. All Rights Reserved.