public class ClientState
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static SemanticVersion |
DEFAULT_CQL_VERSION |
Constructor and Description |
---|
ClientState() |
ClientState(boolean internalCall)
Construct a new, empty ClientState
|
Modifier and Type | Method and Description |
---|---|
void |
ensureHasPermission(Permission perm,
IResource resource) |
void |
ensureNotAnonymous() |
static SemanticVersion[] |
getCQLSupportedVersion() |
SemanticVersion |
getCQLVersion() |
java.lang.String |
getKeyspace() |
java.lang.String |
getRawKeyspace() |
AuthenticatedUser |
getUser() |
void |
hasAllKeyspacesAccess(Permission perm) |
void |
hasColumnFamilyAccess(java.lang.String keyspace,
java.lang.String columnFamily,
Permission perm) |
void |
hasKeyspaceAccess(java.lang.String keyspace,
Permission perm) |
void |
login(AuthenticatedUser user)
Attempts to login the given user.
|
void |
setCQLVersion(java.lang.String str) |
void |
setKeyspace(java.lang.String ks) |
void |
validateLogin() |
public static final SemanticVersion DEFAULT_CQL_VERSION
public ClientState()
public ClientState(boolean internalCall)
public java.lang.String getRawKeyspace()
public java.lang.String getKeyspace() throws InvalidRequestException
InvalidRequestException
public void setKeyspace(java.lang.String ks) throws InvalidRequestException
InvalidRequestException
public void login(AuthenticatedUser user) throws AuthenticationException
AuthenticationException
public void hasAllKeyspacesAccess(Permission perm) throws UnauthorizedException
UnauthorizedException
public void hasKeyspaceAccess(java.lang.String keyspace, Permission perm) throws UnauthorizedException, InvalidRequestException
public void hasColumnFamilyAccess(java.lang.String keyspace, java.lang.String columnFamily, Permission perm) throws UnauthorizedException, InvalidRequestException
public void ensureHasPermission(Permission perm, IResource resource) throws UnauthorizedException
UnauthorizedException
public void validateLogin() throws UnauthorizedException
UnauthorizedException
public void ensureNotAnonymous() throws UnauthorizedException
UnauthorizedException
public void setCQLVersion(java.lang.String str) throws InvalidRequestException
InvalidRequestException
public AuthenticatedUser getUser()
public SemanticVersion getCQLVersion()
public static SemanticVersion[] getCQLSupportedVersion()
Copyright © 2013 The Apache Software Foundation