aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/main/java/org/sonar/api/security
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar/api/security')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/security/GroupRole.java7
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/security/UserRole.java7
2 files changed, 14 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/security/GroupRole.java b/sonar-plugin-api/src/main/java/org/sonar/api/security/GroupRole.java
index 0dce5bea884..d0cfb857dc8 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/security/GroupRole.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/security/GroupRole.java
@@ -19,6 +19,8 @@
*/
package org.sonar.api.security;
+import org.apache.commons.lang.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
import org.sonar.api.database.BaseIdentifiable;
import javax.persistence.Column;
@@ -81,4 +83,9 @@ public class GroupRole extends BaseIdentifiable {
public boolean isAnyone() {
return groupId==ANYONE_GROUP_ID;
}
+
+ @Override
+ public String toString() {
+ return new ReflectionToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).toString();
+ }
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/security/UserRole.java b/sonar-plugin-api/src/main/java/org/sonar/api/security/UserRole.java
index eb1a8a10598..7925e55513f 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/security/UserRole.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/security/UserRole.java
@@ -19,6 +19,8 @@
*/
package org.sonar.api.security;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
import org.sonar.api.database.BaseIdentifiable;
import javax.persistence.Column;
@@ -78,4 +80,9 @@ public class UserRole extends BaseIdentifiable {
this.resourceId = resourceId;
return this;
}
+
+ @Override
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE).toString();
+ }
}