cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Deprecating OAuthPermission.isDefault
Date Thu, 21 Apr 2016 16:41:56 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 13303df9a -> bb76ab10e


Deprecating OAuthPermission.isDefault


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/bb76ab10
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/bb76ab10
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/bb76ab10

Branch: refs/heads/3.1.x-fixes
Commit: bb76ab10ec11ae28ad85972afe32a79d0df7d3da
Parents: 13303df
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Apr 21 17:41:41 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Apr 21 17:41:41 2016 +0100

----------------------------------------------------------------------
 .../rs/security/oauth2/common/Permission.java   | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/bb76ab10/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Permission.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Permission.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Permission.java
index c98f82d..4ad7d08 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Permission.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Permission.java
@@ -22,6 +22,7 @@ import java.io.Serializable;
 
 import javax.persistence.Id;
 import javax.persistence.MappedSuperclass;
+import javax.persistence.Transient;
 /**
  * Base permission description
  * @see OAuthAuthorizationData
@@ -31,7 +32,7 @@ public class Permission implements Serializable {
     private static final long serialVersionUID = 8988574955042726083L;
     private String permission;
     private String description;
-    private boolean isDefault;
+    private boolean isDefaultPermission;
     private boolean invisibleToClient;
     
     public Permission() {
@@ -86,12 +87,18 @@ public class Permission implements Serializable {
      * optionally select 'add' and/or 'update' scopes, in addition to the default 'read'
one. 
      * @param isDefault true if the permission has been allocated by default
      */
-    public void setDefault(boolean value) {
-        this.isDefault = value;
+    public void setDefaultPermission(boolean value) {
+        this.isDefaultPermission = value;
     }
 
+    public boolean isDefaultPermission() {
+        return isDefaultPermission;
+    }
+    
+    @Deprecated
+    @Transient
     public boolean isDefault() {
-        return isDefault;
+        return isDefaultPermission;
     }
 
     public boolean isInvisibleToClient() {
@@ -125,7 +132,8 @@ public class Permission implements Serializable {
             || this.description != null && !this.description.equals(that.description))
{
             return false;
         }
-        if (this.invisibleToClient != that.invisibleToClient || this.isDefault != that.isDefault)
{ //NOPMD
+        if (this.invisibleToClient != that.invisibleToClient //NOPMD
+            || this.isDefaultPermission != that.isDefaultPermission) { //NOPMD
             return false;
         }
         
@@ -142,7 +150,7 @@ public class Permission implements Serializable {
             hashCode = 31 * hashCode + description.hashCode();
         }
         hashCode = 31 * hashCode + Boolean.valueOf(invisibleToClient).hashCode();
-        hashCode = 31 * hashCode + Boolean.valueOf(isDefault).hashCode();
+        hashCode = 31 * hashCode + Boolean.valueOf(isDefaultPermission).hashCode();
         
         return hashCode;
     }


Mime
View raw message