diff --git a/java/gerrit/AbstractCommitUserIdentityPredicate.java b/java/gerrit/AbstractCommitUserIdentityPredicate.java index bd8cf1af44..51c4a3bf6d 100644 --- a/java/gerrit/AbstractCommitUserIdentityPredicate.java +++ b/java/gerrit/AbstractCommitUserIdentityPredicate.java @@ -30,6 +30,20 @@ import com.googlecode.prolog_cafe.lang.Term; import java.io.IOException; import org.eclipse.jgit.lib.PersonIdent; +/** + * Abstract Prolog predicate for a Git person identity of a change. + * + *

Checks that the terms that are provided as input to this Prolog predicate match a Git person + * identity of the change (either author or committer). + * + *

The terms that are provided as input to this Prolog predicate are: + * + *

+ */ abstract class AbstractCommitUserIdentityPredicate extends Predicate.P3 { private static final SymbolTerm user = SymbolTerm.intern("user", 1); private static final SymbolTerm anonymous = SymbolTerm.intern("anonymous"); diff --git a/java/gerrit/PRED_change_branch_1.java b/java/gerrit/PRED_change_branch_1.java index 4501169c88..62744f7f96 100644 --- a/java/gerrit/PRED_change_branch_1.java +++ b/java/gerrit/PRED_change_branch_1.java @@ -23,6 +23,16 @@ import com.googlecode.prolog_cafe.lang.Prolog; import com.googlecode.prolog_cafe.lang.SymbolTerm; import com.googlecode.prolog_cafe.lang.Term; +/** + * Prolog predicate for the destination branch of a change. + * + *

Checks that the term that is provided as input to this Prolog predicate is a string atom that + * matches the destination branch of the change. + * + *

+ *   'change_branch'(-Branch)
+ * 
+ */ public class PRED_change_branch_1 extends Predicate.P1 { public PRED_change_branch_1(Term a1, Operation n) { arg1 = a1; diff --git a/java/gerrit/PRED_change_owner_1.java b/java/gerrit/PRED_change_owner_1.java index d42c0e1e38..f6fbb80eca 100644 --- a/java/gerrit/PRED_change_owner_1.java +++ b/java/gerrit/PRED_change_owner_1.java @@ -25,6 +25,16 @@ import com.googlecode.prolog_cafe.lang.StructureTerm; import com.googlecode.prolog_cafe.lang.SymbolTerm; import com.googlecode.prolog_cafe.lang.Term; +/** + * Prolog predicate for the owner of a change. + * + *

Checks that the term that is provided as input to this Prolog predicate is a user ID term that + * matches the account ID of the change owner. + * + *

+ *   'change_owner'(user(-ID))
+ * 
+ */ public class PRED_change_owner_1 extends Predicate.P1 { private static final SymbolTerm user = SymbolTerm.intern("user", 1); diff --git a/java/gerrit/PRED_change_project_1.java b/java/gerrit/PRED_change_project_1.java index a973e1c93a..b2ef109c26 100644 --- a/java/gerrit/PRED_change_project_1.java +++ b/java/gerrit/PRED_change_project_1.java @@ -23,6 +23,16 @@ import com.googlecode.prolog_cafe.lang.Prolog; import com.googlecode.prolog_cafe.lang.SymbolTerm; import com.googlecode.prolog_cafe.lang.Term; +/** + * Prolog predicate for the project of a change. + * + *

Checks that the term that is provided as input to this Prolog predicate is a string atom that + * matches the project of the change. + * + *

+ *   'change_project'(-Project)
+ * 
+ */ public class PRED_change_project_1 extends Predicate.P1 { public PRED_change_project_1(Term a1, Operation n) { arg1 = a1; diff --git a/java/gerrit/PRED_change_topic_1.java b/java/gerrit/PRED_change_topic_1.java index 11d737ab54..f0175ef624 100644 --- a/java/gerrit/PRED_change_topic_1.java +++ b/java/gerrit/PRED_change_topic_1.java @@ -23,6 +23,16 @@ import com.googlecode.prolog_cafe.lang.Prolog; import com.googlecode.prolog_cafe.lang.SymbolTerm; import com.googlecode.prolog_cafe.lang.Term; +/** + * Prolog predicate for the topic of a change. + * + *

Checks that the term that is provided as input to this Prolog predicate is a string atom that + * matches the topic of the change. + * + *

+ *   'change_topic'(-Topic)
+ * 
+ */ public class PRED_change_topic_1 extends Predicate.P1 { public PRED_change_topic_1(Term a1, Operation n) { arg1 = a1; diff --git a/java/gerrit/PRED_commit_author_3.java b/java/gerrit/PRED_commit_author_3.java index 998b30e3ca..3381344777 100644 --- a/java/gerrit/PRED_commit_author_3.java +++ b/java/gerrit/PRED_commit_author_3.java @@ -21,6 +21,27 @@ import com.googlecode.prolog_cafe.lang.Prolog; import com.googlecode.prolog_cafe.lang.Term; import org.eclipse.jgit.revwalk.RevCommit; +/** + * Prolog predicate for the Git author of the current patch set of a change. + * + *

Checks that the terms that are provided as input to this Prolog predicate match the Git author + * of the current patch set of the change. + * + *

The terms that are provided as input to this Prolog predicate are: + * + *

+ * + *
+ *   'commit_author'(user(-ID), -FullName, -Email)
+ * 
+ */ public class PRED_commit_author_3 extends AbstractCommitUserIdentityPredicate { public PRED_commit_author_3(Term a1, Term a2, Term a3, Operation n) { super(a1, a2, a3, n); diff --git a/java/gerrit/PRED_commit_committer_3.java b/java/gerrit/PRED_commit_committer_3.java index 293d8cec22..1757336b03 100644 --- a/java/gerrit/PRED_commit_committer_3.java +++ b/java/gerrit/PRED_commit_committer_3.java @@ -21,6 +21,27 @@ import com.googlecode.prolog_cafe.lang.Prolog; import com.googlecode.prolog_cafe.lang.Term; import org.eclipse.jgit.revwalk.RevCommit; +/** + * Prolog predicate for the Git committer of the current patch set of a change. + * + *

Checks that the terms that are provided as input to this Prolog predicate match the Git + * committer of the current patch set of the change. + * + *

The terms that are provided as input to this Prolog predicate are: + * + *

+ * + *
+ *   'commit_committer'(user(-ID), -FullName, -Email)
+ * 
+ */ public class PRED_commit_committer_3 extends AbstractCommitUserIdentityPredicate { public PRED_commit_committer_3(Term a1, Term a2, Term a3, Operation n) { super(a1, a2, a3, n); diff --git a/java/gerrit/PRED_commit_message_1.java b/java/gerrit/PRED_commit_message_1.java index eb996d6425..3485af6bbc 100644 --- a/java/gerrit/PRED_commit_message_1.java +++ b/java/gerrit/PRED_commit_message_1.java @@ -24,7 +24,10 @@ import com.googlecode.prolog_cafe.lang.Term; import org.eclipse.jgit.revwalk.RevCommit; /** - * Returns the commit message as a symbol + * Prolog predicate for the commit message of a change. + * + *

Checks that the term that is provided as input to this Prolog predicate is a string atom that + * matches the commit message of the change. * *

  *   'commit_message'(-Msg)
diff --git a/java/gerrit/PRED_project_default_submit_type_1.java b/java/gerrit/PRED_project_default_submit_type_1.java
index d70a9e4096..77a02619dd 100644
--- a/java/gerrit/PRED_project_default_submit_type_1.java
+++ b/java/gerrit/PRED_project_default_submit_type_1.java
@@ -24,6 +24,16 @@ import com.googlecode.prolog_cafe.lang.Prolog;
 import com.googlecode.prolog_cafe.lang.SymbolTerm;
 import com.googlecode.prolog_cafe.lang.Term;
 
+/**
+ * Prolog predicate for the default submit type of the project of a change.
+ *
+ * 

Checks that the term that is provided as input to this Prolog predicate is a string atom that + * matches the default submit type of the change's project. + * + *

+ *   'project_default_submit_type'(-SubmitType)
+ * 
+ */ public class PRED_project_default_submit_type_1 extends Predicate.P1 { private static final SymbolTerm[] term; diff --git a/java/gerrit/PRED_pure_revert_1.java b/java/gerrit/PRED_pure_revert_1.java index 6300a668b7..19e7b68ccc 100644 --- a/java/gerrit/PRED_pure_revert_1.java +++ b/java/gerrit/PRED_pure_revert_1.java @@ -22,7 +22,17 @@ import com.googlecode.prolog_cafe.lang.Predicate; import com.googlecode.prolog_cafe.lang.Prolog; import com.googlecode.prolog_cafe.lang.Term; -/** Checks if change is a pure revert of the change it references in 'revertOf'. */ +/** + * Prolog Predicate that checks if the change is a pure revert of the change it references in + * 'revertOf'. + * + *

The input is an integer atom where '1' represents a pure revert and '0' represents a non-pure + * revert. + * + *

+ *   'pure_revert'(-PureRevert)
+ * 
+ */ public class PRED_pure_revert_1 extends Predicate.P1 { public PRED_pure_revert_1(Term a1, Operation n) { arg1 = a1; diff --git a/java/gerrit/PRED_unresolved_comments_count_1.java b/java/gerrit/PRED_unresolved_comments_count_1.java index d4abcc54c2..9a1fcca5bd 100644 --- a/java/gerrit/PRED_unresolved_comments_count_1.java +++ b/java/gerrit/PRED_unresolved_comments_count_1.java @@ -22,6 +22,16 @@ import com.googlecode.prolog_cafe.lang.Predicate; import com.googlecode.prolog_cafe.lang.Prolog; import com.googlecode.prolog_cafe.lang.Term; +/** + * Prolog predicate for the number of unresolved comments of a change. + * + *

Checks that the term that is provided as input to this Prolog predicate is an integer atom + * that matches the number of unresolved comments of the change. + * + *

+ *   'unresolved_comments_count'(-NumberOfUnresolvedComments)
+ * 
+ */ public class PRED_unresolved_comments_count_1 extends Predicate.P1 { public PRED_unresolved_comments_count_1(Term a1, Operation n) { arg1 = a1; diff --git a/java/gerrit/PRED_uploader_1.java b/java/gerrit/PRED_uploader_1.java index 681d86cace..89e367e819 100644 --- a/java/gerrit/PRED_uploader_1.java +++ b/java/gerrit/PRED_uploader_1.java @@ -27,6 +27,16 @@ import com.googlecode.prolog_cafe.lang.StructureTerm; import com.googlecode.prolog_cafe.lang.SymbolTerm; import com.googlecode.prolog_cafe.lang.Term; +/** + * Prolog predicate for the uploader of the current patch set of a change. + * + *

Checks that the term that is provided as input to this Prolog predicate is a user ID term that + * matches the account ID of the uploader of the current patch set. + * + *

+ *   'uploader'(user(-ID))
+ * 
+ */ public class PRED_uploader_1 extends Predicate.P1 { private static final FluentLogger logger = FluentLogger.forEnclosingClass();