程序包 cn.leancloud

类 LCUser

    • 字段详细资料

      • ATTR_USERNAME

        public static final java.lang.String ATTR_USERNAME
        另请参阅:
        常量字段值
      • ATTR_EMAIL

        public static final java.lang.String ATTR_EMAIL
        另请参阅:
        常量字段值
      • ATTR_MOBILEPHONE

        public static final java.lang.String ATTR_MOBILEPHONE
        另请参阅:
        常量字段值
      • ATTR_SESSION_TOKEN

        public static final java.lang.String ATTR_SESSION_TOKEN
        另请参阅:
        常量字段值
      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        另请参阅:
        常量字段值
      • FOLLOWER_TAG

        public static final java.lang.String FOLLOWER_TAG
        另请参阅:
        常量字段值
      • FOLLOWEE_TAG

        public static final java.lang.String FOLLOWEE_TAG
        另请参阅:
        常量字段值
    • 构造器详细资料

      • LCUser

        public LCUser()
        constructor
    • 方法详细资料

      • currentUser

        public static LCUser currentUser()
        获取当前登录用户
        返回:
        current user. Notice: you SHOULDN'T invoke this method to get current user in lean engine.
      • getEmail

        public java.lang.String getEmail()
        get user email.
        返回:
        user email.
      • setEmail

        public void setEmail​(java.lang.String email)
        set user email
        参数:
        email - user email.
      • getUsername

        public java.lang.String getUsername()
        get user name.
        返回:
        user name
      • setUsername

        public void setUsername​(java.lang.String name)
        set user name.
        参数:
        name - username
      • getPassword

        public java.lang.String getPassword()
        get user password.
        返回:
        user password.
      • setPassword

        public void setPassword​(java.lang.String password)
        set user password.
        参数:
        password - user password.
      • getMobilePhoneNumber

        public java.lang.String getMobilePhoneNumber()
        get user mobilephone.
        返回:
        user mobilephone number.
      • setMobilePhoneNumber

        public void setMobilePhoneNumber​(java.lang.String mobile)
        set user mobilephone.
        参数:
        mobile - user mobilephone number.
      • isMobilePhoneVerified

        public boolean isMobilePhoneVerified()
        whether user's mobilephone is verified or not.
        返回:
        flag to indicate user's mobilephone is verified or not
      • getSessionToken

        public java.lang.String getSessionToken()
        get user session token. if user not login, session token is null.
        返回:
        user session token, null if not login.
      • internalChangeSessionToken

        public void internalChangeSessionToken​(java.lang.String token)
        not use it!
        参数:
        token - user token.
      • isAuthenticated

        public boolean isAuthenticated()
        whether user is authenticated or not.
        返回:
        flag to indicate user is authenticated or not.
      • isAnonymous

        public boolean isAnonymous()
        Whether is anonymous or not.
        返回:
        flag to indicate current user is anonymous or not.
      • signUp

        public void signUp()
        sign up(blocking).
      • signUpInBackground

        public io.reactivex.Observable<LCUser> signUpInBackground()
        sign up in background.
        返回:
        observable instance.
      • signUpOrLoginByMobilePhone

        public static LCUser signUpOrLoginByMobilePhone​(java.lang.String mobilePhoneNumber,
                                                        java.lang.String smsCode)
        signUpOrLoginByMobilePhone
        参数:
        mobilePhoneNumber - mobile phone
        smsCode - sms code
        返回:
        user instance.
      • signUpOrLoginByMobilePhone

        public static <T extends LCUser> T signUpOrLoginByMobilePhone​(java.lang.String mobilePhoneNumber,
                                                                      java.lang.String smsCode,
                                                                      java.lang.Class<T> clazz)
        signUpOrLoginByMobilePhone
        类型参数:
        T - template type.
        参数:
        mobilePhoneNumber - mobile phone number
        smsCode - sms code
        clazz - class name
        返回:
        user instance.
      • signUpOrLoginByMobilePhoneInBackground

        public static io.reactivex.Observable<? extends LCUser> signUpOrLoginByMobilePhoneInBackground​(java.lang.String mobilePhoneNumber,
                                                                                                       java.lang.String smsCode)
        signUpOrLoginByMobilePhoneInBackground
        参数:
        mobilePhoneNumber - mobile phone number.
        smsCode - sms code
        返回:
        observable instance.
      • signUpOrLoginByMobilePhoneInBackground

        public static <T extends LCUser> io.reactivex.Observable<T> signUpOrLoginByMobilePhoneInBackground​(java.lang.String mobilePhoneNumber,
                                                                                                           java.lang.String smsCode,
                                                                                                           java.lang.Class<T> clazz)
        signUpOrLoginByMobilePhoneInBackground
        类型参数:
        T - template type.
        参数:
        mobilePhoneNumber - mobile phone number
        smsCode - sms code
        clazz - class name
        返回:
        observable instance.
      • logIn

        public static io.reactivex.Observable<? extends LCUser> logIn​(java.lang.String username,
                                                                      java.lang.String password)
        logIn in background
        参数:
        username - username
        password - user password
        返回:
        observable instance.
      • logInAnonymously

        public static io.reactivex.Observable<? extends LCUser> logInAnonymously()
        login as anonymous user in background.
        返回:
        observable instance.
      • logIn

        public static <T extends LCUser> io.reactivex.Observable<T> logIn​(java.lang.String username,
                                                                          java.lang.String password,
                                                                          java.lang.Class<T> clazz)
        logIn in background
        类型参数:
        T - template type.
        参数:
        username - username
        password - user password
        clazz - user class name
        返回:
        observable instance.
      • loginByMobilePhoneNumber

        public static io.reactivex.Observable<? extends LCUser> loginByMobilePhoneNumber​(java.lang.String mobile,
                                                                                         java.lang.String password)
        logIn with mobile phone and password.
        参数:
        mobile - mobile phone
        password - password
        返回:
        observable instance.
      • loginByEmail

        public static io.reactivex.Observable<? extends LCUser> loginByEmail​(java.lang.String email,
                                                                             java.lang.String password)
        logIn with email and password
        参数:
        email - email.
        password - password.
        返回:
        observable instance.
      • loginByMobilePhoneNumber

        public static <T extends LCUser> io.reactivex.Observable<T> loginByMobilePhoneNumber​(java.lang.String mobile,
                                                                                             java.lang.String password,
                                                                                             java.lang.Class<T> clazz)
        logIn with mobile phone and password.
        类型参数:
        T - template type.
        参数:
        mobile - mobile phone.
        password - user password.
        clazz - user class.
        返回:
        observable instance.
      • loginBySMSCode

        public static io.reactivex.Observable<? extends LCUser> loginBySMSCode​(java.lang.String mobile,
                                                                               java.lang.String smsCode)
        logIn with mobile phone and sms code.
        参数:
        mobile - mobile phone.
        smsCode - sms code.
        返回:
        observable instance.
      • loginBySMSCode

        public static <T extends LCUser> io.reactivex.Observable<T> loginBySMSCode​(java.lang.String mobile,
                                                                                   java.lang.String smsCode,
                                                                                   java.lang.Class<T> clazz)
        logIn with mobile phone and sms code.
        类型参数:
        T - template type.
        参数:
        mobile - mobile phone.
        smsCode - sms code.
        clazz - user class.
        返回:
        observable instance.
      • loginWithAuthData

        public static io.reactivex.Observable<? extends LCUser> loginWithAuthData​(java.util.Map<java.lang.String,​java.lang.Object> authData,
                                                                                  java.lang.String platform)
        login with auth data.
        参数:
        authData - auth data.
        platform - platform string.
        返回:
        observable instance.
      • loginWithAuthData

        public static io.reactivex.Observable<? extends LCUser> loginWithAuthData​(java.util.Map<java.lang.String,​java.lang.Object> authData,
                                                                                  java.lang.String platform,
                                                                                  java.lang.String unionId,
                                                                                  java.lang.String unionIdPlatform,
                                                                                  boolean asMainAccount)
        login with auth data.
        参数:
        authData - auth data.
        platform - platform string.
        unionId - unionid.
        unionIdPlatform - unionid platform string.
        asMainAccount - flag to treat as main account.
        返回:
        observable instance.
      • loginWithAuthData

        public static <T extends LCUser> io.reactivex.Observable<T> loginWithAuthData​(java.lang.Class<T> clazz,
                                                                                      java.util.Map<java.lang.String,​java.lang.Object> authData,
                                                                                      java.lang.String platform)
        login with auth data.
        类型参数:
        T - template type.
        参数:
        authData - auth data.
        platform - platform string.
        clazz - user class name.
        返回:
        observable instance.
      • loginWithAuthData

        public static <T extends LCUser> io.reactivex.Observable<T> loginWithAuthData​(java.lang.Class<T> clazz,
                                                                                      java.util.Map<java.lang.String,​java.lang.Object> authData,
                                                                                      java.lang.String platform,
                                                                                      java.lang.String unionId,
                                                                                      java.lang.String unionIdPlatform,
                                                                                      boolean asMainAccount)
        login with auth data.
        类型参数:
        T - template type.
        参数:
        authData - auth data.
        platform - platform string.
        unionId - unionid.
        unionIdPlatform - unionid platform string.
        asMainAccount - flag to treat as main account.
        clazz - user class name.
        返回:
        observable instance.
      • loginWithAuthData

        public io.reactivex.Observable<LCUser> loginWithAuthData​(java.util.Map<java.lang.String,​java.lang.Object> authData,
                                                                 java.lang.String platform,
                                                                 boolean failOnNotExist)
        login with auth data.
        参数:
        authData - auth data.
        platform - platform string.
        failOnNotExist - flag to indicate to exit if failed or not.
        返回:
        observable instance.
      • loginWithAuthData

        public io.reactivex.Observable<LCUser> loginWithAuthData​(java.util.Map<java.lang.String,​java.lang.Object> authData,
                                                                 java.lang.String platform,
                                                                 java.lang.String unionId,
                                                                 java.lang.String unionIdPlatform,
                                                                 boolean asMainAccount,
                                                                 boolean failOnNotExist)
        login with auth data.
        参数:
        authData - auth data.
        platform - platform string.
        unionId - union id.
        unionIdPlatform - the platform which union id is binding with.
        asMainAccount - flag indicating that whether current platform is main account or not.
        failOnNotExist - flag to indicate to exit if failed or not.
        返回:
        observable instance.
      • associateWithAuthData

        public io.reactivex.Observable<LCUser> associateWithAuthData​(java.util.Map<java.lang.String,​java.lang.Object> authData,
                                                                     java.lang.String platform)
        associate with third party data.
        参数:
        authData - auth data.
        platform - platform name.
        返回:
        observable instance.
      • associateWithAuthData

        public io.reactivex.Observable<LCUser> associateWithAuthData​(java.util.Map<java.lang.String,​java.lang.Object> authData,
                                                                     java.lang.String platform,
                                                                     java.lang.String unionId,
                                                                     java.lang.String unionIdPlatform,
                                                                     boolean asMainAccount)
        associate with third party data.
        参数:
        authData - auth data.
        platform - platform name.
        unionId - union id.
        unionIdPlatform - the platform which union id is binding with.
        asMainAccount - flag indicating that whether current platform is main account or not.
        返回:
        observable instance.
      • dissociateWithAuthData

        public io.reactivex.Observable<LCUser> dissociateWithAuthData​(java.lang.String platform)
        dissociate with third party data.
        参数:
        platform - platform name.
        返回:
        observable instance.
      • checkAuthenticatedInBackground

        public io.reactivex.Observable<java.lang.Boolean> checkAuthenticatedInBackground()
        check authenticated status in background.
        返回:
        observable instance.
      • refreshSessionTokenInBackground

        public io.reactivex.Observable<java.lang.Boolean> refreshSessionTokenInBackground()
        refresh session token in background.
        返回:
        observable instance.
      • becomeWithSessionToken

        public static LCUser becomeWithSessionToken​(java.lang.String sessionToken)
        instantiate AVUser object with sessionToken(synchronized)
        参数:
        sessionToken - session token
        返回:
        AVUser instance. this method DOES NOT change AVUser#currentUser, it makes sense for being called in lean engine.
      • becomeWithSessionToken

        public static LCUser becomeWithSessionToken​(java.lang.String sessionToken,
                                                    boolean saveToCurrentUser)
        instantiate AVUser object with sessionToken(synchronized)
        参数:
        sessionToken - session token
        saveToCurrentUser - flag indicating whether change current user or not. true - save user to AVUser#currentUser. false - not save.
        返回:
        AVUser instance.
      • becomeWithSessionTokenInBackground

        public static io.reactivex.Observable<? extends LCUser> becomeWithSessionTokenInBackground​(java.lang.String sessionToken)
        instantiate AVUser object with sessionToken(asynchronous)
        参数:
        sessionToken - session token
        返回:
        Observable instance. this method DOES NOT change AVUser#currentUser, it makes sense for being called in lean engine.
      • becomeWithSessionTokenInBackground

        public static io.reactivex.Observable<? extends LCUser> becomeWithSessionTokenInBackground​(java.lang.String sessionToken,
                                                                                                   boolean saveToCurrentUser)
        instantiate AVUser object with sessionToken(asynchronous)
        参数:
        sessionToken - session token
        saveToCurrentUser - flag indicating whether change current user or not. true - save user to AVUser#currentUser. false - not save.
        返回:
        Observable instance.
      • becomeWithSessionToken

        public static <T extends LCUser> T becomeWithSessionToken​(java.lang.String sessionToken,
                                                                  java.lang.Class<T> clazz)
        instantiate AVUser object with sessionToken(synchronized)
        参数:
        sessionToken - session token
        clazz - class name.
        返回:
        AVUser instance. this method DOES NOT change AVUser#currentUser, it makes sense for being called in lean engine.
      • becomeWithSessionToken

        public static <T extends LCUser> T becomeWithSessionToken​(java.lang.String sessionToken,
                                                                  boolean saveToCurrentUser,
                                                                  java.lang.Class<T> clazz)
        instantiate AVUser object with sessionToken(synchronized)
        类型参数:
        T - template.
        参数:
        sessionToken - session token
        saveToCurrentUser - flag indicating whether change current user or not. true - save user to AVUser#currentUser. false - not save.
        clazz - class name.
        返回:
        AVUser instance.
      • becomeWithSessionTokenInBackground

        public static <T extends LCUser> io.reactivex.Observable<T> becomeWithSessionTokenInBackground​(java.lang.String sessionToken,
                                                                                                       java.lang.Class<T> clazz)
        instantiate AVUser object with sessionToken(asynchronous)
        类型参数:
        T - generic type.
        参数:
        sessionToken - session token
        clazz - class name
        返回:
        Observable instance. this method DOES NOT change AVUser#currentUser, it makes sense for being called in lean engine.
      • becomeWithSessionTokenInBackground

        public static <T extends LCUser> io.reactivex.Observable<T> becomeWithSessionTokenInBackground​(java.lang.String sessionToken,
                                                                                                       boolean saveToCurrentUser,
                                                                                                       java.lang.Class<T> clazz)
        instantiate AVUser object with sessionToken(asynchronous)
        类型参数:
        T - generic type
        参数:
        sessionToken - session token
        saveToCurrentUser - flag indicating whether change current user or not. true - save user to AVUser#currentUser. false - not save.
        clazz - class name
        返回:
        Observable instance.
      • createWithSessionToken

        public static LCUser createWithSessionToken​(java.lang.String objectId,
                                                    java.lang.String sessionToken)
                                             throws LCException
        抛出:
        LCException
      • createWithSessionToken

        public static <T extends LCUser> T createWithSessionToken​(java.lang.Class<T> clazz,
                                                                  java.lang.String objectId,
                                                                  java.lang.String sessionToken)
                                                           throws LCException
        抛出:
        LCException
      • logOut

        public static void logOut()
        user logout.
      • getUserQuery

        public static <T extends LCUserLCQuery<T> getUserQuery​(java.lang.Class<T> clazz)
        Get User Query
        类型参数:
        T - template type.
        参数:
        clazz - class name.
        返回:
        query instance.
      • getQuery

        public static LCQuery<LCUser> getQuery()
        Get User Query
        返回:
        query instance.
      • strictlyFind

        public static io.reactivex.Observable<java.util.List<LCUser>> strictlyFind​(QueryConditions queryConditions)
        Get User list by query with conditions
        参数:
        queryConditions -
        返回:
        query result
      • getRolesInBackground

        public io.reactivex.Observable<java.util.List<LCRole>> getRolesInBackground()
        Get roles in background.
        返回:
        observable instance.
      • enableAutomaticUser

        public static void enableAutomaticUser()
      • isEnableAutomatic

        public static boolean isEnableAutomatic()
      • disableAutomaticUser

        public static void disableAutomaticUser()
      • changeCurrentUser

        public static void changeCurrentUser​(LCUser newUser,
                                             boolean save)
        change current user instance.
        参数:
        newUser - new instance.
        save - flag indicating that whether save current user to cache or not.
      • getCurrentUser

        public static LCUser getCurrentUser()
        get current user, null if non-login.
        返回:
        user instance.
      • getCurrentUser

        public static <T extends LCUser> T getCurrentUser​(java.lang.Class<T> userClass)
        get current user, null if non-login.
        类型参数:
        T - template type.
        参数:
        userClass - user object class.
        返回:
        user instance.
      • requestPasswordResetInBackground

        public static io.reactivex.Observable<LCNull> requestPasswordResetInBackground​(java.lang.String email)
        Password-relative operations
        参数:
        email - user email.
        返回:
        observable instance.
      • requestPasswordResetBySmsCodeInBackground

        public static io.reactivex.Observable<LCNull> requestPasswordResetBySmsCodeInBackground​(java.lang.String phoneNumber)
        request sms code for resetting password
        参数:
        phoneNumber - mobile phone number
        返回:
        observable instance
      • requestPasswordResetBySmsCodeInBackground

        public static io.reactivex.Observable<LCNull> requestPasswordResetBySmsCodeInBackground​(java.lang.String phoneNumber,
                                                                                                java.lang.String validateToken)
        request sms code for resetting password, collaborating with AVCaptcha
        参数:
        phoneNumber - mobile phone number
        validateToken - validated token, retrieved after invoking AVCaptcha#verifyCaptchaCodeInBackground
        返回:
        observable instance
      • resetPasswordBySmsCodeInBackground

        public static io.reactivex.Observable<LCNull> resetPasswordBySmsCodeInBackground​(java.lang.String smsCode,
                                                                                         java.lang.String newPassword)
        reset password with sms code for current user.
        参数:
        smsCode - sms code
        newPassword - new password
        返回:
        observable instance
      • updatePasswordInBackground

        public io.reactivex.Observable<LCNull> updatePasswordInBackground​(java.lang.String oldPass,
                                                                          java.lang.String newPass)
        update current user's password
        参数:
        oldPass - old password
        newPass - new password
        返回:
        observable instance
      • requestEmailVerifyInBackground

        public static io.reactivex.Observable<LCNull> requestEmailVerifyInBackground​(java.lang.String email)
        request verified email
        参数:
        email - email address
        返回:
        observable instance
      • requestMobilePhoneVerifyInBackground

        public static io.reactivex.Observable<LCNull> requestMobilePhoneVerifyInBackground​(java.lang.String mobilePhone)
        request sms code for verification mobile phone.
        参数:
        mobilePhone - mobile phone number.
        返回:
        observable instance
      • requestMobilePhoneVerifyInBackground

        public static io.reactivex.Observable<LCNull> requestMobilePhoneVerifyInBackground​(java.lang.String mobilePhone,
                                                                                           java.lang.String validateToken)
        request sms code for verification mobile phone, collaborating with AVCaptcha
        参数:
        mobilePhone - mobile phone number.
        validateToken - validated token, retrieved after invoking AVCaptcha#verifyCaptchaCodeInBackground
        返回:
        observable instance.
      • requestLoginSmsCodeInBackground

        public static io.reactivex.Observable<LCNull> requestLoginSmsCodeInBackground​(java.lang.String mobilePhone)
        request sms code for login
        参数:
        mobilePhone - mobile phone number.
        返回:
        observable instance
      • requestLoginSmsCodeInBackground

        public static io.reactivex.Observable<LCNull> requestLoginSmsCodeInBackground​(java.lang.String mobilePhone,
                                                                                      java.lang.String validateToken)
        request sms code for login, collaborating with AVCaptcha
        参数:
        mobilePhone - mobile phone number
        validateToken - validated token, retrieved after invoking AVCaptcha#verifyCaptchaCodeInBackground
        返回:
        observable instance.
      • verifyMobilePhoneInBackground

        public static io.reactivex.Observable<LCNull> verifyMobilePhoneInBackground​(java.lang.String verifyCode)
        verify sms code with current user's phone number.
        参数:
        verifyCode - sms code
        返回:
        observable instance.
      • requestSMSCodeForUpdatingPhoneNumberInBackground

        public static io.reactivex.Observable<LCNull> requestSMSCodeForUpdatingPhoneNumberInBackground​(java.lang.String mobilePhone,
                                                                                                       LCSMSOption option)
        request sms code for updating phone number of current user.
        参数:
        mobilePhone - mobile phone number.
        option - sms option
        返回:
        observable instance
      • requestSMSCodeForUpdatingPhoneNumberInBackground

        public static io.reactivex.Observable<LCNull> requestSMSCodeForUpdatingPhoneNumberInBackground​(LCUser asAuthenticatedUser,
                                                                                                       java.lang.String mobilePhone,
                                                                                                       LCSMSOption option)
        request sms code for updating phone number of current user.
        参数:
        asAuthenticatedUser - explicit user for request authentication.
        mobilePhone - mobile phone number.
        option - sms option
        返回:
        observable instance in general, this method should be invoked in lean engine.
      • verifySMSCodeForUpdatingPhoneNumberInBackground

        public static io.reactivex.Observable<LCNull> verifySMSCodeForUpdatingPhoneNumberInBackground​(java.lang.String code,
                                                                                                      java.lang.String mobilePhone)
        verify sms code for updating phone number of current user.
        参数:
        code - sms code
        mobilePhone - mobile phone number.
        返回:
        observable instance
      • verifySMSCodeForUpdatingPhoneNumberInBackground

        public static io.reactivex.Observable<LCNull> verifySMSCodeForUpdatingPhoneNumberInBackground​(LCUser asAuthenticatedUser,
                                                                                                      java.lang.String code,
                                                                                                      java.lang.String mobilePhone)
        verify sms code for updating phone number of current user.
        参数:
        asAuthenticatedUser - explicit user for request authentication.
        code - sms code
        mobilePhone - mobile phone number.
        返回:
        observable instance in general, this method should be invoked in lean engine.
      • followInBackground

        public io.reactivex.Observable<JSONObject> followInBackground​(java.lang.String userObjectId)
        follow somebody in background.
        参数:
        userObjectId - target user objectId.
        返回:
        observable instance.
      • followInBackground

        public io.reactivex.Observable<JSONObject> followInBackground​(LCUser asAuthenticatedUser,
                                                                      java.lang.String userObjectId)
        follow somebody in background.
        参数:
        asAuthenticatedUser - explicit user for request authentication.
        userObjectId - target user objectId.
        返回:
        observable instance. in general, this method should be invoked in lean engine.
      • followInBackground

        public io.reactivex.Observable<JSONObject> followInBackground​(java.lang.String userObjectId,
                                                                      java.util.Map<java.lang.String,​java.lang.Object> attributes)
        follow somebody in background.
        参数:
        userObjectId - target user objectId.
        attributes - friendship attributes.
        返回:
        observable instance.
      • followInBackground

        public io.reactivex.Observable<JSONObject> followInBackground​(LCUser asAuthenticatedUser,
                                                                      java.lang.String userObjectId,
                                                                      java.util.Map<java.lang.String,​java.lang.Object> attributes)
        follow somebody in background.
        参数:
        asAuthenticatedUser - explicit user for request authentication.
        userObjectId - target user objectId.
        attributes - friendship attributes.
        返回:
        observable instance. in general, this method should be invoked in lean engine.
      • unfollowInBackground

        public io.reactivex.Observable<JSONObject> unfollowInBackground​(java.lang.String userObjectId)
        unfollow somebody in background.
        参数:
        userObjectId - target user objectId.
        返回:
        observable instance.
      • unfollowInBackground

        public io.reactivex.Observable<JSONObject> unfollowInBackground​(LCUser asAuthenticatedUser,
                                                                        java.lang.String userObjectId)
        unfollow somebody in background.
        参数:
        asAuthenticatedUser - explicit user for request authentication.
        userObjectId - target user objectId.
        返回:
        observable instance. in general, this method should be invoked in lean engine.
      • followerQuery

        public LCQuery<LCObject> followerQuery()
        get follower query.
        返回:
        query instance.
      • followeeQuery

        public LCQuery<LCObject> followeeQuery()
        get followee query.
        返回:
        query instance.
      • followerQuery

        public static <T extends LCObjectLCQuery<T> followerQuery​(java.lang.String userObjectId,
                                                                    java.lang.Class<T> clazz)
        get follower query.
        类型参数:
        T - template type.
        参数:
        userObjectId - user object id.
        clazz - result class.
        返回:
        query instance.
      • followeeQuery

        public static <T extends LCObjectLCQuery<T> followeeQuery​(java.lang.String userObjectId,
                                                                    java.lang.Class<T> clazz)
        get followee query.
        类型参数:
        T - template type.
        参数:
        userObjectId - user object id.
        clazz - result class.
        返回:
        query instance.
      • friendshipQuery

        public LCQuery<LCFriendship> friendshipQuery​(boolean isFollowerDirection)
        get friendship query of current user.
        参数:
        isFollowerDirection - query direction: true - query follower of current user(users which followed current user). false - query followee of current user(users which current user followed).
        返回:
        query instance, null for non-authenticated user.
      • queryFriendship

        public io.reactivex.Observable<java.util.List<LCFriendship>> queryFriendship()
        query current user's friendship.
        返回:
        Observable instance to monitor operation result.
      • queryFriendship

        public io.reactivex.Observable<java.util.List<LCFriendship>> queryFriendship​(int offset,
                                                                                     int limit,
                                                                                     java.lang.String orderBy)
        query current user's friendship.
        参数:
        offset - result offset.
        limit - result size limit.
        返回:
        Observable instance to monitor operation result.
      • applyFriendshipInBackground

        public io.reactivex.Observable<LCFriendshipRequest> applyFriendshipInBackground​(LCUser friend,
                                                                                        java.util.Map<java.lang.String,​java.lang.Object> attributes)
        apply new friendship to someone.
        参数:
        friend - target user.
        attributes - additional attributes.
        返回:
        Observable instance to monitor operation result.
      • applyFriendshipInBackground

        public io.reactivex.Observable<LCFriendshipRequest> applyFriendshipInBackground​(LCUser asAuthenticatedUser,
                                                                                        LCUser friend,
                                                                                        java.util.Map<java.lang.String,​java.lang.Object> attributes)
        apply new friendship to someone.
        参数:
        asAuthenticatedUser - explicit user for request authentication.
        friend - target user.
        attributes - additional attributes.
        返回:
        Observable instance to monitor operation result. in general, this method should be invoked in lean engine.
      • updateFriendship

        public io.reactivex.Observable<LCFriendship> updateFriendship​(LCFriendship friendship)
        update friendship attributes.
        参数:
        friendship - friendship instance.
        返回:
        observable instance.
      • updateFriendship

        public io.reactivex.Observable<LCFriendship> updateFriendship​(LCUser asAuthenticatedUser,
                                                                      LCFriendship friendship)
        update friendship attributes.
        参数:
        asAuthenticatedUser - explicit user for request authentication.
        friendship - friendship instance.
        返回:
        observable instance. in general, this method should be invoked in lean engine.
      • blockFriendInBackground

        public io.reactivex.Observable<JSONObject> blockFriendInBackground​(java.lang.String objectId)
        block somebody in background.
        参数:
        objectId - target user objectId.
        返回:
        observable instance.
      • unblockFriendInBackground

        public io.reactivex.Observable<JSONObject> unblockFriendInBackground​(java.lang.String objectId)
        unblock somebody in background.
        参数:
        objectId - target user objectId.
        返回:
        observable instance.
      • friendshipBlockQuery

        public LCQuery<LCObject> friendshipBlockQuery()
        get block query.
        返回:
        query instance.
      • friendshipBlockQuery

        public static <T extends LCObjectLCQuery<T> friendshipBlockQuery​(java.lang.Class<T> clazz)
        get block query.
        类型参数:
        T - template type.
        参数:
        clazz - result class.
        返回:
        query instance.
      • acceptFriendshipRequest

        public io.reactivex.Observable<LCFriendshipRequest> acceptFriendshipRequest​(LCFriendshipRequest request,
                                                                                    java.util.Map<java.lang.String,​java.lang.Object> attributes)
        accept a friendship.
        参数:
        request - friendship request.
        attributes - additional attributes.
        返回:
        Observable instance to monitor operation result. notice: attributes is necessary as parameter bcz they are not properties of FriendshipRequest.
      • acceptFriendshipRequest

        public io.reactivex.Observable<LCFriendshipRequest> acceptFriendshipRequest​(LCUser asAuthenticatedUser,
                                                                                    LCFriendshipRequest request,
                                                                                    java.util.Map<java.lang.String,​java.lang.Object> attributes)
        accept a friendship.
        参数:
        asAuthenticatedUser - explicit user for request authentication.
        request - friendship request.
        attributes - additional attributes.
        返回:
        Observable instance to monitor operation result. notice: attributes is necessary as parameter bcz they are not properties of FriendshipRequest. in general, this method should be invoked in lean engine.
      • declineFriendshipRequest

        public io.reactivex.Observable<LCFriendshipRequest> declineFriendshipRequest​(LCFriendshipRequest request)
        decline a friendship.
        参数:
        request - friendship request.
        返回:
        Observable instance to monitor operation result.
      • declineFriendshipRequest

        public io.reactivex.Observable<LCFriendshipRequest> declineFriendshipRequest​(LCUser asAuthenticatedUser,
                                                                                     LCFriendshipRequest request)
        decline a friendship.
        参数:
        asAuthenticatedUser - explicit user for request authentication.
        request - friendship request.
        返回:
        Observable instance to monitor operation result. in general, this method should be invoked in lean engine.
      • friendshipRequestQuery

        public LCQuery<LCFriendshipRequest> friendshipRequestQuery​(int status,
                                                                   boolean includeTargetUser,
                                                                   boolean requestToMe)
        get query for AVFriendshipRequest.
        参数:
        status - request status. following value can be used individually or combined with `and` operator: AVFriendshipRequest.STATUS_PENDING(0x01) - request is pending yet. AVFriendshipRequest.STATUS_ACCEPTED(0x02) - request is accepted by user. AVFriendshipRequest.STATUS_DECLINED(0x04) - request is declined by user. AVFriendshipRequest.STATUS_ANY(0x07) - no matter status, all of requests are wanted by current query.
        includeTargetUser - boolean flag, indicating that need to include target user pointer or not.
        requestToMe - boolean flag, indicating all requests are sent to current user or not. true - someone others sent requests to current user. false - current user sent requests to others.
        返回:
        AVFriendshipRequest query, null for current user isn't authenticated or status is invlaid.
      • getFollowersAndFolloweesInBackground

        public void getFollowersAndFolloweesInBackground​(FollowersAndFolloweesCallback callback)
        get follower and followee in background.
        参数:
        callback - callback handler. request authentication with current user.
      • getFollowersAndFolloweesInBackground

        public void getFollowersAndFolloweesInBackground​(LCUser asAuthenticatedUser,
                                                         FollowersAndFolloweesCallback callback)
        get follower and followee in background.
        参数:
        asAuthenticatedUser - explicit user for request authentication.
        callback - callback handler. in general, this method should be invoked in lean engine.
      • alwaysUseSubUserClass

        public static void alwaysUseSubUserClass​(java.lang.Class<? extends LCUser> clazz)
        通过设置此方法,所有关联对象中的 AVUser 对象都会被强转成注册的 AVUser 子类对象
        参数:
        clazz - class name
      • cast

        public static <T extends LCUser> T cast​(LCUser user,
                                                java.lang.Class<T> clazz)
        通过这个方法可以将 AVUser 对象强转为其子类对象
        类型参数:
        T - template type.
        参数:
        user - user object.
        clazz - user class name.
        返回:
        user subclass instance.