discovery
Class ServiceOfferings
java.lang.Object
discovery.ServiceOfferings
public class ServiceOfferings
- extends java.lang.Object
The ServiceOfferings class is used to access the service offerings which are stored in an
XML file. It only has one method which finds the ResourceOfferings for the current user.
- Author:
- Gunn Olaussen & Kirsti N. Torgersen
Field Summary |
private static java.lang.String |
dbFile
|
Method Summary |
static ResourceOffering[] |
readOfferings(java.lang.String un)
This method searches through the XML file to find the current user. |
private static boolean |
usernameFound(org.w3c.dom.Node user,
java.lang.String un)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dbFile
private static final java.lang.String dbFile
- See Also:
- Constant Field Values
ServiceOfferings
public ServiceOfferings()
readOfferings
public static ResourceOffering[] readOfferings(java.lang.String un)
- This method searches through the XML file to find the current user. If this user exists
and has any service offerings the method creates a ResourceOffering object for each
offering and returns these.
- Returns:
- ResourceOffering[] List of this user's resource offerings
usernameFound
private static boolean usernameFound(org.w3c.dom.Node user,
java.lang.String un)
- Returns:
- boolean Checks if the input Node contains the correct username as specified in
the other input parameter. Returns true if it does and false otherwise.