public class WattDepotAdminClient extends WattDepotClient implements WattDepotAdminInterface
| Constructor and Description |
|---|
WattDepotAdminClient(String serverUri,
String username,
String orgId,
String password)
Creates a new WattDepotAdminClient.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteOrganization(String id)
Deletes the given Organization.
|
void |
deleteUser(String id,
String orgId)
Deletes the given User.
|
Organization |
getOrganization(String id) |
OrganizationList |
getOrganizations() |
UserInfo |
getUser(String id,
String orgId) |
UserPassword |
getUserPassword(String id,
String orgId) |
UserInfoList |
getUsers(String orgId) |
boolean |
isDefinedOrganization(String id)
Checks to see if the given id is a defined Organization's id.
|
boolean |
isDefinedUserInfo(String id,
String orgId)
Checks to see if the given id and orgId is a defined UserInfo id.
|
void |
putOrganization(Organization org)
Stores the given Organization in the WattDepot Server.
|
void |
putUser(UserInfo user)
Stores the given user in the WattDepot Server.
|
void |
updateOrganization(Organization org)
Updates the Organization in the WattDepot Server.
|
void |
updateUser(UserInfo user)
Updates the UserInfo in the WattDepot Server.
|
void |
updateUserPassword(UserPassword password)
Updates the Userpassword in the WattDepot Server.
|
deleteCollectorProcessDefinition, deleteDepository, deleteMeasurement, deleteMeasurementPruningDefinition, deleteMeasurementType, deleteSensor, deleteSensorGroup, deleteSensorModel, getAverageValues, getAverageValues, getCollectorProcessDefinition, getCollectorProcessDefinitions, getDailyValues, getDailyValues, getDepositories, getDepository, getDepositorySensors, getDescriptiveStats, getDescriptiveStats, getEarliestValue, getEarliestValue, getHistoricalValues, getHistoricalValues, getHourlyValues, getHourlyValues, getLatestValue, getLatestValue, getMaximumValues, getMaximumValues, getMeasurementPruningDefinition, getMeasurementPruningDefinitions, getMeasurements, getMeasurements, getMeasurementType, getMeasurementTypes, getMinimumValues, getMinimumValues, getOrganizationId, getSensor, getSensorGroup, getSensorGroups, getSensorModel, getSensorModels, getSensors, getSensorStatus, getSensorStatuses, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, getWattDepotUri, isDefinedCollectorProcessDefinition, isDefinedDepository, isDefinedMeasurementPruningDefinition, isDefinedMeasurementType, isDefinedSensor, isDefinedSensorGroup, isDefinedSensorModel, isHealthy, makeClient, putCollectorProcessDefinition, putDepository, putMeasurement, putMeasurementPruningDefinition, putMeasurements, putMeasurementType, putSensor, putSensorGroup, putSensorModel, updateCollectorProcessDefinition, updateDepository, updateMeasurementPruningDefinition, updateMeasurementType, updateSensor, updateSensorGroup, updateSensorModelpublic WattDepotAdminClient(String serverUri, String username, String orgId, String password) throws BadCredentialException
serverUri - The URI of the WattDepot server (e.g.
"http://server.wattdepot.org/")username - The name of the user. The user must be defined in the WattDepot
server.orgId - the id of the organization the user is in.password - The password for the user.BadCredentialException - If the user or password don't match the credentials on the
WattDepot server.public void deleteOrganization(String id) throws IdNotFoundException
WattDepotAdminInterfacedeleteOrganization in interface WattDepotAdminInterfaceid - the unique id of the Organization.IdNotFoundException - if the Organization's id is not found.public void deleteUser(String id, String orgId) throws IdNotFoundException
WattDepotAdminInterfacedeleteUser in interface WattDepotAdminInterfaceid - the unique id of the User.orgId - the id of the user's organization.IdNotFoundException - if the User's id is not found.public void putOrganization(Organization org)
WattDepotAdminInterfaceputOrganization in interface WattDepotAdminInterfaceorg - the Organization to store.public void putUser(UserInfo user)
WattDepotAdminInterfaceputUser in interface WattDepotAdminInterfaceuser - The UserInfo to store.public void updateOrganization(Organization org)
WattDepotAdminInterfaceupdateOrganization in interface WattDepotAdminInterfaceorg - the Organization to update.public void updateUser(UserInfo user)
WattDepotAdminInterfaceupdateUser in interface WattDepotAdminInterfaceuser - the UserInfo to update.public Organization getOrganization(String id) throws IdNotFoundException
getOrganization in interface WattDepotAdminInterfaceid - The unique id of the Organization.IdNotFoundException - if the id does not exist.public OrganizationList getOrganizations()
getOrganizations in interface WattDepotAdminInterfacepublic UserInfo getUser(String id, String orgId) throws IdNotFoundException
getUser in interface WattDepotAdminInterfaceid - The unique id of the UserInfo.orgId - the id of the user's organization.IdNotFoundException - if the id does not exist.public UserInfoList getUsers(String orgId)
getUsers in interface WattDepotAdminInterfaceorgId - the id of the users' organization.public UserPassword getUserPassword(String id, String orgId) throws IdNotFoundException
getUserPassword in interface WattDepotAdminInterfaceid - The unique id of the UserPassword.orgId - the organization id.IdNotFoundException - if the id does not exist.public void updateUserPassword(UserPassword password) throws IdNotFoundException
WattDepotAdminInterfaceupdateUserPassword in interface WattDepotAdminInterfacepassword - the UserPassword to update.IdNotFoundException - if the user id or organization ids are not
defined.public boolean isDefinedOrganization(String id)
WattDepotAdminInterfaceisDefinedOrganization in interface WattDepotAdminInterfaceid - the id to check.public boolean isDefinedUserInfo(String id, String orgId)
WattDepotAdminInterfaceisDefinedUserInfo in interface WattDepotAdminInterfaceid - the id to check.orgId - the organization id.Copyright © 2015 Collaborative Software Development Laboratory. All rights reserved.