You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2018/11/13 08:49:31 UTC
[sling-org-apache-sling-feature] branch master updated: SLING-8100
: Add complete flag to Feature
This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature.git
The following commit(s) were added to refs/heads/master by this push:
new 5d3e9fb SLING-8100 : Add complete flag to Feature
5d3e9fb is described below
commit 5d3e9fb247c7a50e4e9d87bc67929d690362ccea
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Nov 13 09:49:23 2018 +0100
SLING-8100 : Add complete flag to Feature
---
.../java/org/apache/sling/feature/Feature.java | 26 ++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/feature/Feature.java b/src/main/java/org/apache/sling/feature/Feature.java
index 63dc52b..7acbaa8 100644
--- a/src/main/java/org/apache/sling/feature/Feature.java
+++ b/src/main/java/org/apache/sling/feature/Feature.java
@@ -78,6 +78,9 @@ public class Feature implements Comparable<Feature> {
/** Flag indicating whether this is a final feature */
private volatile boolean finalFlag = false;
+ /** Flag indicating whether this is a complete feature */
+ private volatile boolean completeFlag = false;
+
/** The optional include. */
private volatile Include include;
@@ -261,8 +264,8 @@ public class Feature implements Comparable<Feature> {
}
/**
- * Check whether the feature is final A final feature can't be included by other
- * features.
+ * Check whether the feature is final. A final feature can't be included by
+ * other features.
*
* @return {@code true} if it is final, {@code false} otherwise
*/
@@ -280,6 +283,25 @@ public class Feature implements Comparable<Feature> {
}
/**
+ * Check whether the feature is complete. A complete feature has no external
+ * dependencies and can run as-is.
+ *
+ * @return {@code true} if it is complete, {@code false} otherwise
+ */
+ public boolean isComplete() {
+ return completeFlag;
+ }
+
+ /**
+ * Set the complete flag
+ *
+ * @param flag The flag
+ */
+ public void setComplete(final boolean flag) {
+ this.completeFlag = flag;
+ }
+
+ /**
* Check whether the feature is already assembled
*
* @return {@code true} if it is assembled, {@code false} if it needs to be