public class OrganizationDomain extends Object
Constructor and Description |
---|
OrganizationDomain(String serverUri,
String username,
String orgId,
String password,
String fileName)
Initializes the OrganizationDomain.
|
Modifier and Type | Method and Description |
---|---|
void |
initializeFromFile()
Ensures that the WattDepot server has all the instances defined in the
definition file.
|
void |
initializeFromFile(String name)
Ensures that the WattDepot server has all the instances defined in the
definition file.
|
void |
saveCurrentDomain()
Saves out the Organization's Depositories, Sensors, SensorGroups, and
CollectorProcessDefinitions.
|
void |
saveCurrentDomain(String name)
Saves out the Organization's Depositories, Sensors, SensorGroups, and
CollectorProcessDefinitions.
|
public OrganizationDomain(String serverUri, String username, String orgId, String password, String fileName) throws BadCredentialException, IdNotFoundException, BadSensorUriException
serverUri
- The URI for the WattDepot server.username
- The name of a user defined in the WattDepot server.orgId
- the id of the organization the user is in.password
- The password for the user.fileName
- The name of the definition file.BadCredentialException
- if the user or password don't match the
credentials in WattDepot.IdNotFoundException
- if the processId is not defined.BadSensorUriException
- if the Sensor's URI isn't valid.public void initializeFromFile() throws IOException
IOException
- if there is a problem reading the file.public void initializeFromFile(String name) throws IOException
name
- the name of the definition file.IOException
- if there is a problem reading the file.public void saveCurrentDomain() throws IOException
IOException
- if there is a problem writing the file.public void saveCurrentDomain(String name) throws IOException
name
- the name of the file to save to.IOException
- if there is a problem writing the file.Copyright © 2015 Collaborative Software Development Laboratory. All rights reserved.