public Long addFolderByExternalUserIdAndType(String SID,String externalUserId,Long parentFileExplorerItemId,String folderName,Long room_id,Boolean isOwner,Long externalFilesid,String externalType) throws AxisFault {
  try {
    Long users_id=sessionManagement.checkSession(SID);
    Long User_level=userManagement.getUserLevelByID(users_id);
    if (authLevelManagement.checkWebServiceLevel(User_level)) {
      Users userExternal=userManagement.getUserByExternalIdAndType(externalUserId,externalType);
      Long userId=userExternal.getUser_id();
      log.debug("addFolder " + parentFileExplorerItemId);
      if (parentFileExplorerItemId == -2 && isOwner) {
        return fileExplorerItemDao.add(folderName,"",0L,userId,room_id,userId,true,false,false,"",false,false,externalFilesid,externalType);
      }
 else {
        return fileExplorerItemDao.add(folderName,"",parentFileExplorerItemId,null,room_id,userId,true,false,false,"",false,false,externalFilesid,externalType);
      }
    }
  }
 catch (  Exception err) {
    log.error("[addFolderByExternalUserIdAndType]",err);
  }
  return null;
}

public Long addFolderByExternalUserIdAndType ( String SID , String externalUserId , Long parentFileExplorerItemId , String folderName , Long room_id , Boolean isOwner , Long externalFilesid , String externalType ) throws AxisFault { try { Long users_id = sessionManagement . checkSession ( SID ) ; Long User_level = userManagement . getUserLevelByID ( users_id ) ; if ( authLevelManagement . checkWebServiceLevel ( User_level ) ) { Users userExternal = userManagement . getUserByExternalIdAndType ( externalUserId , externalType ) ; Long userId = userExternal . getUser_id ( ) ; log . debug ( "addFolder " + parentFileExplorerItemId ) ; if ( parentFileExplorerItemId == - 2 && isOwner ) { return fileExplorerItemDao . add ( folderName , "" , 0L , userId , room_id , userId , true , false , false , "" , false , false , externalFilesid , externalType ) ; } else { return fileExplorerItemDao . add ( folderName , "" , parentFileExplorerItemId , null , room_id , userId , true , false , false , "" , false , false , externalFilesid , externalType ) ; } } } catch ( Exception err ) { log . error ( "[addFolderByExternalUserIdAndType]" , err ) ; } return null ; }
to add a folder to the private drive , set parentfileexploreritemid = 0 and isowner to 1 / true and externaluserid / externalusertype to a valid user
