|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Server
A representation of a Nesstar Server. The server is a container for statistical data and metadata in the form of studies. The studies are organised in one or more, possibly nested catalogues.
| Method Summary | ||
|---|---|---|
Role |
createRole(String roleId,
String label,
String description)
Create a new role. |
|
User |
createUser(String userId,
String password,
Role... roles)
Create a new user on the server. |
|
void |
deleteUser(String userId)
Delete a user on the server. |
|
|
getBank(Class<T> type)
Gets a Bank implementation containing objects according to type. |
|
User |
getCurrentUser()
Gets the current user. |
|
NesstarTreeNode |
getTreeRoot()
Get the root node of the server's object tree. |
|
NesstarList<User> |
getUsersWithSpecifiedRole(Role role)
Get a list of users associated with a specific role. |
|
boolean |
login(String username,
String password)
Login to the Nesstar server. |
|
void |
removeRole(String roleId)
Remove a role from the server. |
|
| Methods inherited from interface com.nesstar.api.NesstarObject |
|---|
getId, getLabel, getTimeStamp, reload, toURI |
| Method Detail |
|---|
boolean login(String username,
String password)
username - the User's id (for example "johnsmith").password - the user's personal password.
true if login was successful, false otherwise.
User getCurrentUser()
throws NotAuthorizedException,
IOException
NotAuthorizedException - If access was denied by the Nesstar server.
IOException - If there was an error while communicating with the server.
User createUser(String userId,
String password,
Role... roles)
throws NotAuthorizedException,
IOException
userId - the User's id (for example "johnsmith").password - the user's personal password.roles - One or more roles attributed to the user.
User on the server.
NotAuthorizedException - If access was denied by the Nesstar server.
IOException - If there was an error while communicating with the server.
IllegalArgumentException - If no roles were supplied, or if a supplied role is
associated with another server.on how to retrieve Role objects.
void deleteUser(String userId)
throws NotAuthorizedException,
IOException
userId - the User's id (for example "johnsmith").
NotAuthorizedException - If access was denied by the Nesstar server.
IOException - If there was an error while communicating with the server.
NesstarList<User> getUsersWithSpecifiedRole(Role role)
throws NotAuthorizedException,
IOException
role - a role object
NesstarList list of User on the server.
NotAuthorizedException - If access was denied by the Nesstar server.
IOException - If there was an error while communicating with the server.
Role createRole(String roleId,
String label,
String description)
throws NotAuthorizedException,
IOException
role.
roleId - the identify of a role.label - the human readable label of a role.description - the free text description of role in detail.
Role object on the server.
NotAuthorizedException - If access was denied by the Nesstar server.
IOException - If there was an error while communicating with the server.
void removeRole(String roleId)
throws NotAuthorizedException,
IOException
roleId -
NotAuthorizedException
IOException<T extends NesstarBankObject> Bank<T> getBank(Class<T> type)
type.
type - The type of object to be contained in the bank.
Bank implementation containing all type objects on this
server.
NesstarTreeNode getTreeRoot()
throws NotAuthorizedException,
IOException
NotAuthorizedException - If the user isn't allowed to access the tree.
IOException - If an error occurred communicating with the server.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||