Class Feature
- java.lang.Object
-
- org.apache.karaf.features.internal.model.Content
-
- org.apache.karaf.features.internal.model.Feature
-
- All Implemented Interfaces:
Blacklisting
,Feature
public class Feature extends Content implements Feature
Definition of the Feature.
Java class for feature complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="feature"> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <element name="details" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="config" type="{http://karaf.apache.org/xmlns/features/v1.0.0}config" maxOccurs="unbounded" minOccurs="0"/> <element name="configfile" type="{http://karaf.apache.org/xmlns/features/v1.0.0}configFile" maxOccurs="unbounded" minOccurs="0"/> <element name="feature" type="{http://karaf.apache.org/xmlns/features/v1.0.0}dependency" maxOccurs="unbounded" minOccurs="0"/> <element name="bundle" type="{http://karaf.apache.org/xmlns/features/v1.0.0}bundle" maxOccurs="unbounded" minOccurs="0"/> <element name="conditional" type="{http://karaf.apache.org/xmlns/features/v1.0.0}conditional" maxOccurs="unbounded" minOccurs="0"/> <element name="capability" type="{http://karaf.apache.org/xmlns/features/v1.0.0}capability" maxOccurs="unbounded" minOccurs="0"/> <element name="requirement" type="{http://karaf.apache.org/xmlns/features/v1.0.0}requirement" maxOccurs="unbounded" minOccurs="0"/> </sequence> <attribute name="name" use="required" type="{http://karaf.apache.org/xmlns/features/v1.0.0}featureName" /> <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" default="0.0.0" /> <attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="resolver" type="{http://karaf.apache.org/xmlns/features/v1.0.0}resolver" /> </restriction> </complexContent> </complexType>
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Capability>
capability
protected List<Conditional>
conditional
static String
DEFAULT_VERSION
protected String
description
protected String
details
protected Boolean
hidden
protected String
install
protected List<Library>
library
protected String
name
protected String
namespace
protected String
repositoryUrl
protected List<Requirement>
requirement
protected String
resolver
protected List<String>
resourceRepositories
protected Scoping
scoping
protected Integer
startLevel
protected String
version
static char
VERSION_SEPARATOR
-
Fields inherited from class org.apache.karaf.features.internal.model.Content
bundle, config, configfile, feature
-
Fields inherited from interface org.apache.karaf.features.Feature
DEFAULT_INSTALL_MODE
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
List<Capability>
getCapabilities()
Get the feature capabilities.List<Conditional>
getConditional()
Get the value of the conditional property.String
getDescription()
Get the value of the description property.String
getDetails()
Get the feature details.String
getId()
String
getInstall()
Get the feature install flag.List<Library>
getLibraries()
String
getName()
Get the value of the name property.String
getNamespace()
String
getRepositoryUrl()
List<Requirement>
getRequirements()
Get the feature requirements.String
getResolver()
Get the value of the resolver property.List<String>
getResourceRepositories()
Scoping
getScoping()
Get the feature scoping.int
getStartLevel()
Get the value of the startLevel property.String
getVersion()
Get the value of the version property.int
hashCode()
boolean
hasVersion()
Since version has a default value ("0.0.0"), returns whether or not the version has been set.protected void
interpolation(Properties properties)
boolean
isBlacklisted()
Returnstrue
if this item is blacklisted.boolean
isHidden()
Get the value of the hidden property.void
postUnmarshall()
void
setBlacklisted(boolean blacklisted)
void
setDescription(String value)
Set the value of the description property.void
setDetails(String details)
Set the feature details.void
setHidden(Boolean value)
Set the value of the hidden property.void
setInstall(String install)
Set the feature install flag.void
setName(String value)
Set the value of the name property.void
setNamespace(String namespace)
void
setRepositoryUrl(String repositoryUrl)
void
setResolver(String value)
Set the value of the resolver property.void
setResourceRepositories(List<String> resourceRepositories)
void
setScoping(Scoping scoping)
Set the feature scoping.void
setStartLevel(Integer value)
Set the value of the startLevel property.void
setVersion(String value)
Set the value of the version property.String
toString()
Return a string representation of the feature.static Feature
valueOf(String str)
-
Methods inherited from class org.apache.karaf.features.internal.model.Content
getBundle, getBundles, getConfig, getConfigfile, getConfigurationFiles, getConfigurations, getDependencies, getFeature
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.karaf.features.Feature
getBundles, getConfigurationFiles, getConfigurations, getDependencies
-
-
-
-
Field Detail
-
VERSION_SEPARATOR
public static final char VERSION_SEPARATOR
- See Also:
- Constant Field Values
-
DEFAULT_VERSION
public static final String DEFAULT_VERSION
- See Also:
- Constant Field Values
-
details
protected String details
-
name
protected String name
-
version
protected String version
-
description
protected String description
-
resolver
protected String resolver
-
install
protected String install
-
startLevel
protected Integer startLevel
-
hidden
protected Boolean hidden
-
conditional
protected List<Conditional> conditional
-
capability
protected List<Capability> capability
-
requirement
protected List<Requirement> requirement
-
scoping
protected Scoping scoping
-
namespace
protected String namespace
-
repositoryUrl
protected String repositoryUrl
-
-
Method Detail
-
getName
public String getName()
Get the value of the name property.
-
setName
public void setName(String value)
Set the value of the name property.- Parameters:
value
- allowed object isString
-
getVersion
public String getVersion()
Get the value of the version property.- Specified by:
getVersion
in interfaceFeature
- Returns:
- possible object is
String
-
setVersion
public void setVersion(String value)
Set the value of the version property.- Parameters:
value
- allowed object isString
-
hasVersion
public boolean hasVersion()
Since version has a default value ("0.0.0"), returns whether or not the version has been set.- Specified by:
hasVersion
in interfaceFeature
- Returns:
- true if the feature has a version, false else.
-
getDescription
public String getDescription()
Get the value of the description property.- Specified by:
getDescription
in interfaceFeature
- Returns:
- possible object is
String
.
-
setDescription
public void setDescription(String value)
Set the value of the description property.- Parameters:
value
- allowed object isString
.
-
getDetails
public String getDetails()
Get the feature details.- Specified by:
getDetails
in interfaceFeature
- Returns:
- the feature details.
-
setDetails
public void setDetails(String details)
Set the feature details.- Parameters:
details
- the feature details.
-
getResolver
public String getResolver()
Get the value of the resolver property.- Specified by:
getResolver
in interfaceFeature
- Returns:
- possible object is
String
.
-
getInstall
public String getInstall()
Get the feature install flag.- Specified by:
getInstall
in interfaceFeature
- Returns:
- the feature install flags.
-
setInstall
public void setInstall(String install)
Set the feature install flag.- Parameters:
install
- the feature install flag.
-
setResolver
public void setResolver(String value)
Set the value of the resolver property.- Parameters:
value
- allowed object isString
.
-
getStartLevel
public int getStartLevel()
Get the value of the startLevel property.- Specified by:
getStartLevel
in interfaceFeature
- Returns:
- possible object is
Integer
.
-
setStartLevel
public void setStartLevel(Integer value)
Set the value of the startLevel property.- Parameters:
value
- allowed object isInteger
.
-
isHidden
public boolean isHidden()
Get the value of the hidden property.
-
setHidden
public void setHidden(Boolean value)
Set the value of the hidden property.- Parameters:
value
- true to set the feature as hidden, false else.
-
getConditional
public List<Conditional> getConditional()
Get the value of the conditional property. This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not aset
method for the feature property. For example, to add a new item, do as follows:getConditionals().add(newItem);
Objects of the following type(s) are allowed in the listConditional
.- Specified by:
getConditional
in interfaceFeature
- Returns:
- the list of feature conditions.
-
getCapabilities
public List<Capability> getCapabilities()
Get the feature capabilities.- Specified by:
getCapabilities
in interfaceFeature
- Returns:
- the feature capabilities as a
List
..
-
getRequirements
public List<Requirement> getRequirements()
Get the feature requirements.- Specified by:
getRequirements
in interfaceFeature
- Returns:
- the feature requirements as a
List
.
-
getScoping
public Scoping getScoping()
Get the feature scoping.- Specified by:
getScoping
in interfaceFeature
- Returns:
- the feature scoping.
-
setScoping
public void setScoping(Scoping scoping)
Set the feature scoping.- Parameters:
scoping
- the feature scoping.
-
toString
public String toString()
Return a string representation of the feature.
-
interpolation
protected void interpolation(Properties properties)
-
getLibraries
public List<Library> getLibraries()
- Specified by:
getLibraries
in interfaceFeature
-
postUnmarshall
public void postUnmarshall()
-
getNamespace
public String getNamespace()
- Specified by:
getNamespace
in interfaceFeature
-
setNamespace
public void setNamespace(String namespace)
-
getResourceRepositories
public List<String> getResourceRepositories()
- Specified by:
getResourceRepositories
in interfaceFeature
-
getRepositoryUrl
public String getRepositoryUrl()
- Specified by:
getRepositoryUrl
in interfaceFeature
-
setRepositoryUrl
public void setRepositoryUrl(String repositoryUrl)
-
isBlacklisted
public boolean isBlacklisted()
Description copied from interface:Blacklisting
Returnstrue
if this item is blacklisted.- Specified by:
isBlacklisted
in interfaceBlacklisting
- Returns:
-
setBlacklisted
public void setBlacklisted(boolean blacklisted)
-
-