directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject directory-kerby git commit: Added the new module to the parent; converted tabs into spaces; avoided too long lines
Date Thu, 02 Jul 2015 01:44:26 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master aa062fd3f -> a466155c7


Added the new module to the parent; converted tabs into spaces; avoided too long lines


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

Branch: refs/heads/master
Commit: a466155c7dfa49efef63414df7553abb783c81e8
Parents: aa062fd
Author: drankye <kai.zheng@intel.com>
Authored: Thu Jul 2 09:44:10 2015 +0800
Committer: Drankye <drankye@gmail.com>
Committed: Thu Jul 2 09:44:10 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kerby/KrbIdentityComparator.java |  2 +-
 .../org/apache/kerby/KrbIdentitySerializer.java | 18 +++---
 .../java/org/apache/kerby/MavibotBackend.java   | 64 ++++++++++----------
 kerby-backend/pom.xml                           |  1 +
 4 files changed, 43 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a466155c/kerby-backend/mavibot/src/main/java/org/apache/kerby/KrbIdentityComparator.java
----------------------------------------------------------------------
diff --git a/kerby-backend/mavibot/src/main/java/org/apache/kerby/KrbIdentityComparator.java
b/kerby-backend/mavibot/src/main/java/org/apache/kerby/KrbIdentityComparator.java
index 665e30a..da73111 100644
--- a/kerby-backend/mavibot/src/main/java/org/apache/kerby/KrbIdentityComparator.java
+++ b/kerby-backend/mavibot/src/main/java/org/apache/kerby/KrbIdentityComparator.java
@@ -37,7 +37,7 @@ public class KrbIdentityComparator implements Comparator<KrbIdentity>
{
 
     @Override
     public int compare(KrbIdentity o1, KrbIdentity o2) {
-	return o1.getPrincipalName().compareTo(o2.getPrincipalName());
+        return o1.getPrincipalName().compareTo(o2.getPrincipalName());
     }
 
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a466155c/kerby-backend/mavibot/src/main/java/org/apache/kerby/KrbIdentitySerializer.java
----------------------------------------------------------------------
diff --git a/kerby-backend/mavibot/src/main/java/org/apache/kerby/KrbIdentitySerializer.java
b/kerby-backend/mavibot/src/main/java/org/apache/kerby/KrbIdentitySerializer.java
index 2bba2a5..b8a494a 100644
--- a/kerby-backend/mavibot/src/main/java/org/apache/kerby/KrbIdentitySerializer.java
+++ b/kerby-backend/mavibot/src/main/java/org/apache/kerby/KrbIdentitySerializer.java
@@ -41,43 +41,43 @@ public class KrbIdentitySerializer implements ElementSerializer<KrbIdentity>
{
 
     @Override
     public byte[] serialize(KrbIdentity key) {
-	return null;
+        return null;
     }
 
     @Override
     public KrbIdentity deserialize(BufferHandler bufferHandler)
-	    throws IOException {
-	return null;
+            throws IOException {
+        return null;
     }
 
     @Override
     public KrbIdentity deserialize(ByteBuffer buffer) throws IOException {
-	return null;
+        return null;
     }
 
     @Override
     public KrbIdentity fromBytes(byte[] buffer) throws IOException {
-	return null;
+        return null;
     }
 
     @Override
     public KrbIdentity fromBytes(byte[] buffer, int pos) throws IOException {
-	return null;
+        return null;
     }
 
     @Override
     public int compare(KrbIdentity type1, KrbIdentity type2) {
-	return comparator.compare(type1, type2);
+        return comparator.compare(type1, type2);
     }
 
     @Override
     public Comparator<KrbIdentity> getComparator() {
-	return comparator;
+        return comparator;
     }
 
     @Override
     public Class<?> getType() {
-	return KrbIdentity.class;
+        return KrbIdentity.class;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a466155c/kerby-backend/mavibot/src/main/java/org/apache/kerby/MavibotBackend.java
----------------------------------------------------------------------
diff --git a/kerby-backend/mavibot/src/main/java/org/apache/kerby/MavibotBackend.java b/kerby-backend/mavibot/src/main/java/org/apache/kerby/MavibotBackend.java
index 7f78866..5f1d2e1 100644
--- a/kerby-backend/mavibot/src/main/java/org/apache/kerby/MavibotBackend.java
+++ b/kerby-backend/mavibot/src/main/java/org/apache/kerby/MavibotBackend.java
@@ -58,33 +58,33 @@ public class MavibotBackend extends AbstractIdentityBackend {
      * @throws Exception
      */
     public MavibotBackend(File location) throws Exception {
-	String dbPath = location.getAbsolutePath();
-
-	if (!location.exists()) {
-	    location.mkdirs();
-	}
-
-	if (location.isDirectory()) {
-	    dbPath += File.separator + DATABASE_NAME;
-	}
-
-	rm = new RecordManager(dbPath);
-
-	if (rm.getManagedTrees().contains(DATA_TREE)) {
-	    database = rm.getManagedTree(DATA_TREE);
-	} else {
-	    PersistedBTreeConfiguration<String, KrbIdentity> config = new PersistedBTreeConfiguration<String,
KrbIdentity>();
-	    // _no_ duplicates
-	    config.setAllowDuplicates(false);
-	    config.setBtreeType(BTreeTypeEnum.PERSISTED);
-	    config.setFilePath(dbPath);
-	    config.setKeySerializer(StringSerializer.INSTANCE);
-	    config.setName(DATA_TREE);
-	    config.setValueSerializer(KrbIdentitySerializer.INSTANCE);
-
-	    database = BTreeFactory.createPersistedBTree(config);
-	    rm.manage(database);
-	  }
+        String dbPath = location.getAbsolutePath();
+
+        if (!location.exists()) {
+            location.mkdirs();
+        }
+
+        if (location.isDirectory()) {
+            dbPath += File.separator + DATABASE_NAME;
+        }
+
+        rm = new RecordManager(dbPath);
+
+        if (rm.getManagedTrees().contains(DATA_TREE)) {
+            database = rm.getManagedTree(DATA_TREE);
+        } else {
+            PersistedBTreeConfiguration<String, KrbIdentity> config = new PersistedBTreeConfiguration<String,
KrbIdentity>();
+            // _no_ duplicates
+            config.setAllowDuplicates(false);
+            config.setBtreeType(BTreeTypeEnum.PERSISTED);
+            config.setFilePath(dbPath);
+            config.setKeySerializer(StringSerializer.INSTANCE);
+            config.setName(DATA_TREE);
+            config.setValueSerializer(KrbIdentitySerializer.INSTANCE);
+
+            database = BTreeFactory.createPersistedBTree(config);
+            rm.manage(database);
+        }
     }
 
     /**
@@ -92,7 +92,7 @@ public class MavibotBackend extends AbstractIdentityBackend {
      */
     @Override
     public List<String> getIdentities(int start, int limit) {
-	return null;
+        return null;
     }
 
     /**
@@ -100,7 +100,7 @@ public class MavibotBackend extends AbstractIdentityBackend {
      */
     @Override
     public List<String> getIdentities() {
-	return null;
+        return null;
     }
 
     /**
@@ -108,7 +108,7 @@ public class MavibotBackend extends AbstractIdentityBackend {
      */
     @Override
     protected KrbIdentity doGetIdentity(String principalName) {
-	return null;
+        return null;
     }
 
     /**
@@ -116,7 +116,7 @@ public class MavibotBackend extends AbstractIdentityBackend {
      */
     @Override
     protected KrbIdentity doAddIdentity(KrbIdentity identity) {
-	return null;
+        return null;
     }
 
     /**
@@ -124,7 +124,7 @@ public class MavibotBackend extends AbstractIdentityBackend {
      */
     @Override
     protected KrbIdentity doUpdateIdentity(KrbIdentity identity) {
-	return null;
+        return null;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a466155c/kerby-backend/pom.xml
----------------------------------------------------------------------
diff --git a/kerby-backend/pom.xml b/kerby-backend/pom.xml
index 2ad0838..d8c07a4 100644
--- a/kerby-backend/pom.xml
+++ b/kerby-backend/pom.xml
@@ -29,6 +29,7 @@
   <modules>
     <module>ldap-backend</module>
     <module>json-backend</module>
+    <module>mavibot</module>
     <module>zookeeper-backend</module>
   </modules>
 


Mime
View raw message