Package cn.leancloud
Class LCStatus
java.lang.Object
cn.leancloud.LCObject
cn.leancloud.LCStatus
Status 预定义属性:
1. messageId, Integer, message sequence number, Receiver-side only
2. inboxType, String, identifier for multiple purpose, default is 'default' which stands for timeline.
3. source, Pointer, point to source user.
4. owner, Pointer, point to target user, Receiver-side only.
status sample:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class cn.leancloud.LCObject
LCObject.Hook -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intFields inherited from class cn.leancloud.LCObject
acl, className, endpointClassName, KEY_ACL, KEY_CLASSNAME, KEY_CREATED_AT, KEY_IGNORE_HOOKS, KEY_OBJECT_ID, KEY_UPDATED_AT, logger, objectId, operations, serverData, totallyOverwrite, UUID_LEN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.voidaddAll(String key, Collection<?> values) Deprecated.voidaddAllUnique(String key, Collection<?> values) Deprecated.voidDeprecated.static LCStatuscreateStatus(String imageUrl, String message) create a status instance.static LCStatuscreateStatusWithData(Map<String, Object> data) create a status instance.io.reactivex.Observable<LCNull> delete statusstatic io.reactivex.Observable<LCNull> deleteInBackground(LCStatus status) delete status(class method)static io.reactivex.Observable<LCNull> deleteInBackground(LCUser asAuthenticatedUser, LCStatus status) delete status(class method)booleanfetch()Deprecated.Deprecated.Deprecated.io.reactivex.Observable<LCObject> Deprecated.io.reactivex.Observable<LCObject> Deprecated.io.reactivex.Observable<LCObject> fetchInBackground(String includeKeys) Deprecated.get customized key value.getACL()Deprecated.get image url attribute.到达收件箱类型, 默认是`default`,私信是`private`, 可以自定义任何类型get message textlong此状态在用户 Inbox 中的 ID 注意: 仅用于分片查询,不具有唯一性获取 Status 的发送者static io.reactivex.Observable<LCStatus> getStatusWithIdInBackground(LCUser asAuthenticatedUser, String statusId) fetch status with specified objectIdstatic io.reactivex.Observable<LCStatus> getStatusWithIdInBackground(String statusId) fetch status with specified objectIdinthashCode()static LCStatusQueryinboxQuery(LCUser owner, String inboxType) query statuses send to User owner and with inboxType default query direction: from NEW to OLD.booleanDeprecated.void添加 AVStatus 中的一对自定义内容voidrefresh()Deprecated.voidDeprecated.io.reactivex.Observable<LCObject> Deprecated.void删除 AVStatus 中的一对自定义内容voidsave()Deprecated.voidDeprecated.io.reactivex.Observable<? extends LCObject> Deprecated.io.reactivex.Observable<LCStatus> sendPrivatelyInBackground(String receiverObjectId) send privately message.io.reactivex.Observable<LCStatus> send status to followers.io.reactivex.Observable<LCStatus> sendToFollowersInBackground(String inboxType) send status with inboxType to followers.io.reactivex.Observable<LCStatus> sendToUsersInBackground(LCQuery query) send to user with query.io.reactivex.Observable<LCStatus> sendToUsersInBackground(String inboxType, LCQuery query) send to user with query and inboxType.voidDeprecated.voidsetFetchWhenSave(boolean fetchWhenSave) Deprecated.voidsetImageUrl(String imageUrl) set image url attribute.voidsetInboxType(String type) set inbox type.voidsetMessage(String msg) set message textprotected voidsetMessageId(long messageId) voidset source of statusstatic LCStatusQuerystatusQuery(LCUser source) query statuses sent by User owner.toObject()Methods inherited from class cn.leancloud.LCObject
abortOperations, addNewOperation, bitAnd, bitOr, bitXor, cast, containsKey, createWithoutData, createWithoutData, decrement, decrement, delete, delete, deleteAll, deleteAll, deleteAllInBackground, deleteAllInBackground, deleteEventually, deleteEventually, deleteInBackground, disableAfterHook, disableBeforeHook, extractCascadingObjects, extractUnsavedFiles, fetch, fetchIfNeededInBackground, fetchIfNeededInBackground, fetchInBackground, generateACLFromServerData, generateCascadingSaveObjects, generateChangedParam, getBoolean, getBytes, getClassName, getCreatedAt, getCreatedAtString, getDate, getDouble, getInt, getJSONArray, getJSONObject, getLCFile, getLCGeoPoint, getLCObject, getList, getLong, getNumber, getObjectId, getQuery, getRelation, getRequestMethod, getRequestRawEndpoint, getServerData, getString, getUnsavedFiles, getUpdatedAt, getUpdatedAtString, getUuid, has, hasCircleReference, ignoreHook, increment, increment, internalClassName, internalGet, internalId, internalPut, isDataAvailable, onDataSynchronized, onSaveFailure, onSaveSuccess, parseLCObject, refresh, refreshInBackground, refreshInBackground, refreshInBackground, registerSubclass, removeAll, removeOperationForKey, resetAll, resetByRawData, resetServerData, save, saveAll, saveAll, saveAllInBackground, saveAllInBackground, saveEventually, saveInBackground, saveInBackground, saveInBackground, setClassName, setObjectId, toJSONObject, toJSONString, toString, validFieldName, verifyInternalId
-
Field Details
-
CLASS_NAME
- See Also:
-
ATTR_MESSAGE_ID
- See Also:
-
ATTR_INBOX_TYPE
- See Also:
-
ATTR_SOURCE
- See Also:
-
ATTR_OWNER
- See Also:
-
ATTR_IMAGE
- See Also:
-
ATTR_MESSAGE
- See Also:
-
INVALID_MESSAGE_ID
public static final int INVALID_MESSAGE_ID- See Also:
-
-
Constructor Details
-
LCStatus
public LCStatus()default constructor. -
LCStatus
constructor from AVObject instance.- Parameters:
o- object instance
-
-
Method Details
-
createStatus
create a status instance.- Parameters:
imageUrl- image urlmessage- message text- Returns:
- Return an instance of AVStatus
-
createStatusWithData
create a status instance.- Parameters:
data- map data- Returns:
- Return an instance of AVStatus
-
setImageUrl
set image url attribute.- Parameters:
imageUrl- image url
-
getImageUrl
get image url attribute.- Returns:
- Return the value of image url
-
setMessage
set message text- Parameters:
msg- the message text.
-
getMessage
get message text- Returns:
- Return the message text.
-
getMessageId
public long getMessageId()此状态在用户 Inbox 中的 ID 注意: 仅用于分片查询,不具有唯一性- Returns:
- Return the message id in inbox.
-
setMessageId
protected void setMessageId(long messageId) -
getInboxType
到达收件箱类型, 默认是`default`,私信是`private`, 可以自定义任何类型- Returns:
- inbox type.
-
getSource
获取 Status 的发送者- Returns:
- source user of the status
-
setSource
set source of status- Parameters:
source- source user of the status
-
setInboxType
set inbox type.- Parameters:
type- inbox type
-
put
添加 AVStatus 中的一对自定义内容 -
get
get customized key value. -
remove
删除 AVStatus 中的一对自定义内容 -
deleteInBackground
delete status- Overrides:
deleteInBackgroundin classLCObject- Returns:
- Observable instance
-
deleteInBackground
delete status(class method)- Parameters:
status- instance of AVStatus- Returns:
- Observable instance
-
deleteInBackground
public static io.reactivex.Observable<LCNull> deleteInBackground(LCUser asAuthenticatedUser, LCStatus status) delete status(class method)- Parameters:
asAuthenticatedUser- explicit user for request authentication.status- instance of AVStatus- Returns:
- Observable instance in general, this method should be invoked in lean engine.
-
getStatusWithIdInBackground
fetch status with specified objectId- Parameters:
statusId- status id.- Returns:
- Observable instance
-
getStatusWithIdInBackground
public static io.reactivex.Observable<LCStatus> getStatusWithIdInBackground(LCUser asAuthenticatedUser, String statusId) fetch status with specified objectId- Parameters:
asAuthenticatedUser- explicit user for request authentication.statusId- status id.- Returns:
- Observable instance in general, this method should be invoked in lean engine.
-
sendToUsersInBackground
send to user with query.- Parameters:
query- instance of AVQuery- Returns:
- Observable instance
-
sendToUsersInBackground
send to user with query and inboxType.- Parameters:
inboxType- inbox typequery- instance of AVQuery- Returns:
- Observable instance
-
sendToFollowersInBackground
send status to followers.- Returns:
- Observable instance
-
sendToFollowersInBackground
send status with inboxType to followers.- Parameters:
inboxType- inbox type- Returns:
- Observable instance
-
sendPrivatelyInBackground
send privately message.- Parameters:
receiverObjectId- receiver objectId- Returns:
- Observable instance
-
statusQuery
query statuses sent by User owner. default query direction: from NEW to OLD.- Parameters:
source- source User- Returns:
- instance of AVStatusQuery
-
inboxQuery
query statuses send to User owner and with inboxType default query direction: from NEW to OLD.- Parameters:
owner- owner userinboxType- inbox type- Returns:
- instance of AVStatusQuery
-
toObject
-
equals
-
hashCode
public int hashCode() -
add
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException -
getACL
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException -
setACL
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException -
addAll
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException -
addAllUnique
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException- Overrides:
addAllUniquein classLCObject- Parameters:
key- target key.values- value collection.
-
addUnique
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException -
fetch
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException -
fetch
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException -
refresh
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException -
refresh
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException -
fetchIfNeeded
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException- Overrides:
fetchIfNeededin classLCObject- Returns:
- current object.
-
fetchIfNeededInBackground
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException- Overrides:
fetchIfNeededInBackgroundin classLCObject- Returns:
- observable instance.
-
fetchInBackground
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException- Overrides:
fetchInBackgroundin classLCObject- Returns:
- observable instance.
-
refreshInBackground
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException- Overrides:
refreshInBackgroundin classLCObject- Returns:
- observable instance.
-
fetchInBackground
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException- Overrides:
fetchInBackgroundin classLCObject- Parameters:
includeKeys- include keys, which object will be return together.- Returns:
- observable instance.
-
save
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException -
saveInBackground
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException- Overrides:
saveInBackgroundin classLCObject- Returns:
- observable instance.
-
saveEventually
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException- Overrides:
saveEventuallyin classLCObject
-
isFetchWhenSave
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException- Overrides:
isFetchWhenSavein classLCObject- Returns:
- flag for fetchWhenSave.
-
setFetchWhenSave
Deprecated.此方法并没有实现,调用会抛出 UnsupportedOperationException- Overrides:
setFetchWhenSavein classLCObject- Parameters:
fetchWhenSave- flag.
-