def extract_portal(portaladdress,contentpath,adminuser,adminpassword, specifiedUsers):
    
    specifiedUsers = specifiedUsers.lower()
    excludeUsersList = []
    includeUsersList = []
    #if first character is a minus, then the "specifiedUsers" variable
    # contains a comma delimited string of the users to exclude from the extract
    if len(specifiedUsers) > 0:
        if specifiedUsers.find("-") == 0:
            specifiedUsers = specifiedUsers.replace("-","",1)
            excludeUsersList = specifiedUsers.split(",")
        else:
            includeUsersList = specifiedUsers.split(",")
    
    # Create root output folder if it doesn't exist.
    if not os.path.exists(contentpath):
            os.makedirs(contentpath)
    os.chdir(contentpath)
    
    #Make Admin connection to portal and retrieve portal info
    portaladmin = Portal(portaladdress, adminuser, adminpassword)
    

    # ------------------------------------------------------------------------
    # Extract Portal Properties
    # ------------------------------------------------------------------------
    portal_properties = portaladmin.properties()
    
    print "\n- Extracting portal info ..."
    json.dump(portal_properties, open('portal_properties.json','w'))
    
    #Get portal featured items
    
    # get a list of portal resources
    resources = portaladmin.resources(portal_properties['id'])
    json.dump(resources,open('resources.json','w'))
 
    # ------------------------------------------------------------------------
    # Extract users, groups and items
    # ------------------------------------------------------------------------       
    print "\n- Extracting users, groups and items ..."
    
    # Get list of users on the source portal
    usersList = []
    usersListAllNames = portaladmin.users()
    
    # Create list of users that we don't want to extract content for.
    # NOTE: specify user names in lowercase.
    userExcludeList = ["admin", "system_publisher", "administrator"]
    
    # If user has specified users to exclude from extract then add these
    # users to the exclude list
    if len(excludeUsersList) > 0:
        userExcludeList.extend(excludeUsersList)
    
    # Create output file to store username and fullname properties
    userfile = open(os.path.join(contentpath,'userfile.txt'),'w')
    
    # If only specific users should be extracted
    # then only keep those users in the user information dictionary
    if len(includeUsersList) > 0:
        for u in usersListAllNames:
            userName = u["username"]
            if userName.lower() in includeUsersList:
                usersList.append(u)
    else:
        usersList = usersListAllNames
    
    userfile.write("SourceUserName,TargetUserName,TargetPassword\n")
    
    for u in usersList:
        userName = u["username"]
        if userName.lower() not in userExcludeList:
            users[str(userName)] = None
            userfile.write(userName + "," + userName + ",MyDefault4Password!" + "\n")
    userfile.close()   
    
    for username in users.keys():
        # Create output folder if it doesn't exist
        extractpath = os.path.join(contentpath, username)
        if not os.path.exists(extractpath):
            os.makedirs(extractpath)
        
        print "\n" + sectionBreak
        print "Extracting content for user: " + username
        
        # Dump user info to json file
        userinfo = portaladmin.user(username)
        filepath = os.path.join(extractpath, 'userinfo.json')
        json.dump(userinfo, open(filepath,'w'))

        # Extract folders for user
        extract_folders(portaladmin, extractpath, username)
        
        # Extract items owned by user
        extract_items(portaladmin, extractpath, username)
    
        # Extract groups owned by user
        extract_groups_from_user_info(portaladmin, userinfo, extractpath)
Return all :class:`~fluent_contents.models.ContentItem` model classes which are exposed by plugins.
dataset/ETHPy150Open Esri/ops-server-config/Publish/Portal/PortalContentExtract.py/extract_portal--crossover with--dataset/ETHPy150Open edoburu/django-fluent-contents/fluent_contents/extensions/pluginpool.py/PluginPool.get_model_classes