Not allow to assign values to appId and cookie at the same time

With current implementation, flow id can be either assigned by
fromApp method or withCookie method. This misleads the end-user
to properly instantiate a new flow rule. This commit restricts the
flow id assignment which does not allow to assign cookie and
appId at the same time.

Change-Id: I8d7e27517c7ef636d427c3d8b8f9cc267fcb0702
diff --git a/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java b/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java
index c8f2e9c..e46d918 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/DefaultFlowRule.java
@@ -364,7 +364,7 @@
 
         @Override
         public FlowRule build() {
-            checkArgument(flowId != null || appId != null, "Either an application" +
+            checkArgument((flowId != null) ^ (appId != null), "Either an application" +
                     " id or a cookie must be supplied");
             checkNotNull(selector, "Traffic selector cannot be null");
             checkArgument(timeout != null || permanent != null, "Must either have " +