public abstract class BaasObject
extends java.lang.Object
implements android.os.Parcelable
Modifier and Type | Method and Description |
---|---|
BaasDocument |
asDocument() |
BaasFile |
asFile() |
abstract java.lang.String |
getAuthor()
The username of the owner of this object, or null if this object is new.
|
abstract java.lang.String |
getCreationDate()
The date this object was created on the server, or null if the object is new.
|
abstract java.lang.String |
getId()
The id of this object on the server.
|
abstract long |
getVersion()
The version number of this object.
|
RequestToken |
grant(Grant grant,
java.lang.String username,
BaasHandler<java.lang.Void> handler)
Asynchronously grants the access
grant to this object to username . |
abstract RequestToken |
grant(Grant grant,
java.lang.String username,
int flags,
BaasHandler<java.lang.Void> handler)
Asynchronously grants the access
grant to this object to username . |
RequestToken |
grantAll(Grant grant,
java.lang.String role,
BaasHandler<java.lang.Void> handler)
Asynchronously grants the access
grant to this object to users with role . |
abstract RequestToken |
grantAll(Grant grant,
java.lang.String role,
int flags,
BaasHandler<java.lang.Void> handler)
Asynchronously grants the access
grant to this object to users with role . |
abstract BaasResult<java.lang.Void> |
grantAllSync(Grant grant,
java.lang.String role)
Synchronously grants the acces
grant to this object to all users in role |
abstract BaasResult<java.lang.Void> |
grantSync(Grant grant,
java.lang.String user)
Synchronously grants the access
grant to this object to username . |
abstract boolean |
isDirty() |
abstract boolean |
isDocument() |
abstract boolean |
isFile() |
boolean |
isNew()
Returns true if this object has no conunterpart on the BaasBox server.
|
RequestToken |
revoke(Grant grant,
java.lang.String username,
BaasHandler<java.lang.Void> handler)
Asynchronously revoke the access
grant to this object from username . |
abstract RequestToken |
revoke(Grant grant,
java.lang.String username,
int flags,
BaasHandler<java.lang.Void> handler)
Asynchronously revoke the access
grant to this object to username . |
RequestToken |
revokeAll(Grant grant,
java.lang.String role,
BaasHandler<java.lang.Void> handler)
Asynchronously revokes the access
grant to this object from users with role . |
abstract RequestToken |
revokeAll(Grant grant,
java.lang.String role,
int flags,
BaasHandler<java.lang.Void> handler)
Asynchronously revokes the access
grant to this object from users with role . |
abstract BaasResult<java.lang.Void> |
revokeAllSync(Grant grant,
java.lang.String role)
Synchronously revokes the acces
grant to this object from all users in role |
abstract BaasResult<java.lang.Void> |
revokeSync(Grant grant,
java.lang.String username)
Synchronously revokes the access
grant to this object from username . |
public abstract java.lang.String getAuthor()
public abstract java.lang.String getCreationDate()
public abstract long getVersion()
public final RequestToken grant(Grant grant, java.lang.String username, BaasHandler<java.lang.Void> handler)
grant
to this object to username
.
The outcome of the request is handed to the provided handler
.grant
- a non null Grant
username
- a non null usernamehandler
- an handler that will receive the outcome of the request.RequestToken
to manage the asynchronous requestpublic final RequestToken grantAll(Grant grant, java.lang.String role, BaasHandler<java.lang.Void> handler)
grant
to this object to users with role
.
The outcome of the request is handed to the provided handler
.grant
- a non null Grant
role
- a non null usernamehandler
- an handler that will receive the outcome of the request.RequestToken
to manage the asynchronous requestpublic abstract BaasResult<java.lang.Void> grantAllSync(Grant grant, java.lang.String role)
grant
to this object to all users in role
grant
- a non null Grant
role
- a non null roleBaasResult
public abstract BaasResult<java.lang.Void> grantSync(Grant grant, java.lang.String user)
grant
to this object to username
.grant
- a non null Grant
user
- a non null usernameBaasResult
public final boolean isNew()
public abstract boolean isDirty()
public abstract java.lang.String getId()
public final RequestToken revoke(Grant grant, java.lang.String username, BaasHandler<java.lang.Void> handler)
grant
to this object from username
.
The outcome of the request is handed to the provided handler
.grant
- a non null Grant
username
- a non null usernamehandler
- an handler that will receive the outcome of the request.RequestToken
to manage the asynchronous requestpublic abstract RequestToken grant(Grant grant, java.lang.String username, int flags, BaasHandler<java.lang.Void> handler)
grant
to this object to username
.
The outcome of the request is handed to the provided handler
.grant
- a non null Grant
username
- a non null usernameflags
- RequestOptions
handler
- an handler that will receive the outcome of the request.RequestToken
to manage the asynchronous requestpublic abstract RequestToken revoke(Grant grant, java.lang.String username, int flags, BaasHandler<java.lang.Void> handler)
grant
to this object to username
.
The outcome of the request is handed to the provided handler
.grant
- a non null Grant
username
- a non null usernameflags
- RequestOptions
handler
- an handler that will receive the outcome of the request.RequestToken
to manage the asynchronous requestpublic final RequestToken revokeAll(Grant grant, java.lang.String role, BaasHandler<java.lang.Void> handler)
grant
to this object from users with role
.
The outcome of the request is handed to the provided handler
.grant
- a non null Grant
role
- a non null usernamehandler
- an handler that will receive the outcome of the request.RequestToken
to manage the asynchronous requestpublic abstract RequestToken grantAll(Grant grant, java.lang.String role, int flags, BaasHandler<java.lang.Void> handler)
grant
to this object to users with role
.
The outcome of the request is handed to the provided handler
.grant
- a non null Grant
role
- a non null usernameflags
- RequestOptions
handler
- an handler that will receive the outcome of the request.RequestToken
to manage the asynchronous requestpublic abstract RequestToken revokeAll(Grant grant, java.lang.String role, int flags, BaasHandler<java.lang.Void> handler)
grant
to this object from users with role
.
The outcome of the request is handed to the provided handler
.grant
- a non null Grant
role
- a non null usernameflags
- RequestOptions
handler
- an handler that will receive the outcome of the request.RequestToken
to manage the asynchronous requestpublic abstract BaasResult<java.lang.Void> revokeAllSync(Grant grant, java.lang.String role)
grant
to this object from all users in role
grant
- a non null Grant
role
- a non null roleBaasResult
public abstract BaasResult<java.lang.Void> revokeSync(Grant grant, java.lang.String username)
grant
to this object from username
.grant
- a non null Grant
username
- a non null usernameBaasResult
public final BaasDocument asDocument()
public abstract boolean isDocument()
public final BaasFile asFile()
public abstract boolean isFile()