|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.fopps.model.AbstractItem
|
+--org.fopps.model.TreeItem
|
+--org.fopps.model.Feature
A feature represents a defined scope of functionality. A feature may reflected by
#define MY_FEATURE)
Features are organized in a tree-like structure to reflect dependencies of features. Another opportunity to describe dependencies are constraints.
Artefact,
Constraint,
ConfigurationBuilder| Field Summary | |
static java.lang.String |
ROOT_FEATURE_NAME
Name of the global root feature |
| Fields inherited from class org.fopps.model.TreeItem |
mChildren, mParent |
| Fields inherited from class org.fopps.model.AbstractItem |
ADDED_EVENT, CHANGE_EVENT, name, REMOVED_EVENT |
| Constructor Summary | |
Feature(java.lang.String name)
Creates a new feature without parent |
|
Feature(java.lang.String name,
TreeItem mParent)
Creates a new feature with given parent. |
|
Feature(java.lang.String pName,
TreeItem pParent,
boolean pChildrenAllowed)
Creates a new feature with given parent. |
|
| Method Summary | |
void |
addAttachment(Artefact pArtefact)
Adds an attachment to this feature |
static java.lang.String |
buildSymbolicVar(java.lang.String pString)
Builds the name of the symbolic var from a string. |
java.lang.String |
createDefaultVar(Feature pFeature)
Creates a default variable, if default variable will be empty. |
void |
fireItemChanged()
Passes change events to parent, if necessary. |
java.util.List |
getAttachments()
Returns all attached artefacts. |
BindingTime |
getBinding()
Returns the binding kind of the feature. |
java.lang.String |
getSymbolicVar()
Returns the variable name of the feature |
boolean |
hasAttachments()
Returns true, if feature has artefacts |
boolean |
isAlternative()
Returns true, if feature is an alternative |
boolean |
isAvailable()
(see setAvailable) |
boolean |
isEnabledByDefault()
Returns true, if feature is enabled by default |
boolean |
isOptional()
Returns true, if feature is optional |
void |
removeAllAttachments()
Removes all attachments |
void |
removeAttachment(Artefact pArtefact)
Removes a given attachment |
void |
setAlternative(boolean alternative)
Change current feature to an alternative. |
void |
setAttachments(java.util.Collection pAttachments)
Adds a list of attachments |
void |
setAvailable(boolean available)
Marks the feature as (in)available regarding project scheduling. |
void |
setBinding(BindingTime pBinding)
Sets the new binding kind of the feature. |
void |
setEnabledByDefault(boolean enabledByDefault)
Enables or diables feature by default. |
void |
setOptional(boolean optional)
Sets current feature as optional.or mandatory |
void |
setSymbolicVar(java.lang.String pSymbolicVar)
Sets the name of the variable name of the feature |
java.lang.String |
toString()
|
void |
validateAttachments()
Check all attachments. |
| Methods inherited from class org.fopps.model.TreeItem |
addChildren, allChildrenCount, childrenAllowed, childrenCount, delete, first, getChildAt, getChildren, getDepth, getIndexOfChild, getParent, getPath, getRoot, isLeaf, last, notifyListeners, removeAllChildren, removeAllChildrenRecursive, removeChildren, setChildren, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String ROOT_FEATURE_NAME
| Constructor Detail |
public Feature(java.lang.String name)
name - Name of the feature
public Feature(java.lang.String name,
TreeItem mParent)
name - Name of the feature
public Feature(java.lang.String pName,
TreeItem pParent,
boolean pChildrenAllowed)
pChildrenAllowed - Flag which determines, if children are allowed or not| Method Detail |
public BindingTime getBinding()
BindingTimepublic void setBinding(BindingTime pBinding)
pBinding - New binding kindpublic java.lang.String getSymbolicVar()
public void setSymbolicVar(java.lang.String pSymbolicVar)
public boolean isEnabledByDefault()
public void setEnabledByDefault(boolean enabledByDefault)
public boolean isAvailable()
public void setAvailable(boolean available)
Changes of availability will also passed to the child nodes
public java.util.List getAttachments()
public void setAttachments(java.util.Collection pAttachments)
public void addAttachment(Artefact pArtefact)
public void removeAttachment(Artefact pArtefact)
public void removeAllAttachments()
public void validateAttachments()
public boolean hasAttachments()
public boolean isOptional()
public void setOptional(boolean optional)
public boolean isAlternative()
public void setAlternative(boolean alternative)
public void fireItemChanged()
fireItemChanged in class AbstractItemAbstractItem.setBlockEvents(boolean)public static java.lang.String buildSymbolicVar(java.lang.String pString)
public java.lang.String createDefaultVar(Feature pFeature)
pFeature - Feature for which the var should be createdpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||