]> source.dussan.org Git - archiva.git/commitdiff
better toString for debuging purpose
authorOlivier Lamy <olamy@apache.org>
Sat, 5 Jan 2013 15:07:38 +0000 (15:07 +0000)
committerOlivier Lamy <olamy@apache.org>
Sat, 5 Jan 2013 15:07:38 +0000 (15:07 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1429304 13f79535-47bb-0310-9956-ffa450edef68

redback-authorization/redback-authorization-api/src/main/java/org/apache/archiva/redback/authorization/AuthorizationDataSource.java
redback-authorization/redback-authorization-providers/redback-authorization-ldap/src/main/java/org/apache/archiva/redback/authorization/ldap/LdapAuthorizer.java

index 3f7b5bccf17ceed9d59a19a17209a402e21bf11f..392527a1490add4097d38ae767f37c1e0a306be3 100644 (file)
@@ -88,4 +88,17 @@ public class AuthorizationDataSource
     {
         this.resource = resource;
     }
+
+    @Override
+    public String toString()
+    {
+        final StringBuilder sb = new StringBuilder();
+        sb.append( "AuthorizationDataSource" );
+        sb.append( "{principal='" ).append( principal ).append( '\'' );
+        sb.append( ", user=" ).append( user );
+        sb.append( ", permission='" ).append( permission ).append( '\'' );
+        sb.append( ", resource='" ).append( resource ).append( '\'' );
+        sb.append( '}' );
+        return sb.toString();
+    }
 }
index edf09a7b0e4ce50d96700c8ad51831844278c6fa..969a8a0a7313aab4326f7f1535ae9653d5f379d9 100644 (file)
@@ -40,6 +40,6 @@ public class LdapAuthorizer
     public AuthorizationResult isAuthorized( AuthorizationDataSource source )
         throws AuthorizationException
     {
-        return null;  //To change body of implemented methods use File | Settings | File Templates.
+        return null;
     }
 }