This is the most important class which is used to creating extension which are latter added to `jar` task and each task of type {
| Modifiers | Name | Description |
|---|---|---|
class |
FeatureExtension.FeatureIncludesProperty |
This inner Class is used just to create objects inside `includes` method inorder to resolve the passed closure and extract the required information.This class is o=not used anywhere else. |
class |
FeatureExtension.FeaturePluginProperty |
This inner Class is used just to create objects inside `plugin` method inorder to resolve the passed closure and extract the required information. |
| Modifiers | Name | Description |
|---|---|---|
java.lang.String |
arch |
Used to set optional property `arch` for feature XML file |
FeaturePropertyExtension |
copyright |
The object is used by copyright method to configure the configure the closure and later extract information from them regarding copyright |
FeaturePropertyExtension |
description |
The object is used by description method to configure the configure the closure and later extract information from them regarding description |
org.w3c.dom.Document |
doc |
The Below properties are used during the XML file creation |
org.w3c.dom.Element |
featureRootElement |
|
java.lang.String |
id |
Used to configure the id of feature |
java.util.List<FeatureIncludesProperty> |
includes |
This List is used to store all the Features that the user wants to include |
java.lang.String |
label |
Used to write short descriptive label inside the XML file |
FeaturePropertyExtension |
license |
The object is used by license method to configure the configure the closure and later extract information from them regarding license |
java.lang.String |
nl |
Used to set optional property `nl` for feature XML file |
java.lang.String |
os |
Used to set optional property `os` for feature XML file |
java.util.List<FeaturePluginProperty> |
plugins |
This List is used to store all the Pluginss that the user wants to include |
java.lang.String |
providerName |
Used to configure the providerName of feature |
java.lang.String |
version |
Used to configure the version of feature archive |
java.lang.String |
ws |
Used to set optional property `ws` for feature XML file |
| Constructor and description |
|---|
FeatureExtension
(org.gradle.api.Task task)The constructor does few things 1) Initializes all the String member used for property setting to "" 2) Creates all the required instance of {@Link FeaturePropertyExtension} 3) Initializes Both the lists user for storing information 4) Creates the Document object and Root elemnt for the XML file to be created 5) Add another extension named `require` to the task object 6)Creates `build`, `build/libs` and `build/features` directory (creating directory was necessary or else it was giving error in some case) and `build/features/feature.xml`. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
copyright(groovy.lang.Closure configurator)This method is used to set all the copyright related information within the feature. |
|
void |
createFeatureArchive()This function simply calls two functions 1) writeFile() :- to write the `feature.xml` file itself 2) writeManifestFile :- this method from {@Link FeatureRequirePropertyExtension} is used to write manifest file inside the archives |
|
void |
description(groovy.lang.Closure configurator)This method is used to set all the description related information within the feature. |
|
java.lang.String |
getArch() |
|
java.lang.String |
getId() |
|
java.lang.String |
getLabel() |
|
java.lang.String |
getNl() |
|
java.lang.String |
getOs() |
|
java.lang.String |
getProviderName() |
|
java.lang.String |
getVersion() |
|
java.lang.String |
getWs() |
|
void |
includes(java.lang.String id, java.lang.String version, groovy.lang.Closure configurator)This methods takes three parameter namely id,version and a Closure which is used to create a object of Class FeatureIncludesProperty and the created object is then added to list named includes. |
|
void |
license(groovy.lang.Closure configurator)This method is used to set all the license related information within the feature. |
|
void |
plugin(java.lang.String id, java.lang.String version, groovy.lang.Closure configurator)This methods takes three parameter namely id,version and a Closure which is used to create a object of Class FeaturePluginProperty and the created object is then added to list named plugins. |
|
void |
setArch(java.lang.String arch) |
|
void |
setId(java.lang.String id) |
|
void |
setLabel(java.lang.String label) |
|
void |
setNl(java.lang.String nl) |
|
void |
setOs(java.lang.String os) |
|
void |
setProviderName(java.lang.String providerName) |
|
void |
setVersion(java.lang.String version) |
|
void |
setWs(java.lang.String ws) |
|
void |
writeFile()This function simply writes creates a element , adds attributes to them and then adds the created element to Root Element of the XML file. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), 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() |
Used to set optional property `arch` for feature XML file
The object is used by copyright method to configure the configure the closure and later extract information from them regarding copyright
The object is used by description method to configure the configure the closure and later extract information from them regarding description
The Below properties are used during the XML file creation
Used to configure the id of feature
This List is used to store all the Features that the user wants to include
Used to write short descriptive label inside the XML file
The object is used by license method to configure the configure the closure and later extract information from them regarding license
Used to set optional property `nl` for feature XML file
Used to set optional property `os` for feature XML file
This List is used to store all the Pluginss that the user wants to include
Used to configure the providerName of feature
Used to configure the version of feature archive
Used to set optional property `ws` for feature XML file
The constructor does few things 1) Initializes all the String member used for property setting to "" 2) Creates all the required instance of {
task - this object is stored into a private member for further usageThis method is used to set all the copyright related information within the feature. It uses the copyright object created within the constructor to extract the information from Closure passed.
configurator - the closure is used to create a DSL and latter extract information from it within the functionThis function simply calls two functions 1) writeFile() :- to write the `feature.xml` file itself 2) writeManifestFile :- this method from {
This method is used to set all the description related information within the feature. It uses the description object created within the constructor to extract the information from Closure passed.
configurator - the closure is used to create a DSL and latter extract information from it within the functionThis methods takes three parameter namely id,version and a Closure which is used to create a object of Class FeatureIncludesProperty and the created object is then added to list named includes. IN order to resolve the passed Closure an object of class FeatureIncludesProperty(it is a private inner class)
id - id of the feature to be includedversion - version of the feature to be includedconfigurator - used to pass all the optional information regarding the required featureThis method is used to set all the license related information within the feature. It uses the license object created within the constructor to extract the information from Closure passed.
configurator - the closure is used to create a DSL and latter extract information from it within the functionThis methods takes three parameter namely id,version and a Closure which is used to create a object of Class FeaturePluginProperty and the created object is then added to list named plugins. In order to resolve the passed Closure an object of class FeaturePluginProperty(it is a private inner class)
id - id of the plugin to be includedversion - version of the plugin to be includedconfigurator - used to pass all the optional information regarding the required pluginThis function simply writes creates a element , adds attributes to them and then adds the created element to Root Element of the XML file. Before creating the element or attribute, it first checks if it s set by the user, thereby does not create unncessary elements and attributes in XML file
Groovy Documentation