Class Model
- java.lang.Object
-
- org.apache.sling.provisioning.model.Traceable
-
- org.apache.sling.provisioning.model.Model
-
public class Model extends Traceable
A model is the central object. It consists of features.
-
-
Constructor Summary
Constructors Constructor Description Model()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FeaturegetFeature(java.lang.String name)Find the feature if availablejava.util.List<Feature>getFeatures()Return all features.FeaturegetOrCreateFeature(java.lang.String name)Get or create the feature.java.lang.StringtoString()-
Methods inherited from class org.apache.sling.provisioning.model.Traceable
getLocation, setLocation
-
-
-
-
Method Detail
-
getFeature
public Feature getFeature(java.lang.String name)
Find the feature if available- Parameters:
name- The feature name- Returns:
- The feature or
null.
-
getOrCreateFeature
public Feature getOrCreateFeature(java.lang.String name)
Get or create the feature.- Parameters:
name- Feature name- Returns:
- The feature for the given name.
-
getFeatures
public java.util.List<Feature> getFeatures()
Return all features. The returned list is modifiable and directly modifies the model.- Returns:
- The list of features.
-
-