Example #1
0
  // 그룹
  Boolean Update_Group(String GroupName, String Re_GroupName) {
    try {
      GroupColl = AdressDB.getCollection(GroupName);
      GroupColl.rename(Re_GroupName);

      return true;
    } catch (Exception e) {
      return false;
    }
  }
Example #2
0
 public void renameMirror(String fromAlfrescoHost, String toAlfrescoHost, String mirror) {
   String fromCollectionName = collectionName(fromAlfrescoHost, mirror);
   String toCollectionName = collectionName(toAlfrescoHost, mirror);
   if (db.collectionExists(toCollectionName)) {
     throw new RuntimeException(toCollectionName + " exists");
   }
   if (db.collectionExists(fromCollectionName)) {
     DBCollection fromCollection = db.getCollection(fromCollectionName);
     logger.debug("Renaming " + fromCollectionName + " to " + toCollectionName);
     fromCollection.rename(toCollectionName);
   } else {
     throw new RuntimeException(fromCollectionName + " doesn't exist");
   }
 }