discovery
Class ResourceOffering

java.lang.Object
  extended by discovery.ResourceOffering

public class ResourceOffering
extends java.lang.Object

The ResourceOffering is a class used for storing the information in each of the user's service offerings. This class processes the resource offering Node and stores the values in variables which should be used when accessing the services.

Author:
Gunn Olaussen & Kirsti N. Torgersen

Field Summary
private  org.w3c.dom.Node offering
           
private  java.lang.String offeringid
           
private  java.lang.String resourceid
           
private  java.lang.String securityMechId
           
 
Constructor Summary
ResourceOffering(org.w3c.dom.Node offering)
          The constructor gets a Node with the content of the offering which it parses to find the resourceID, securityMechId and the service endpoint.
 
Method Summary
private  org.w3c.dom.Node findNode(java.lang.String withName, org.w3c.dom.Node parent)
          Searches the input Node to find a Node with the name specified as a parameter and returns this Node.
 java.lang.String getMessageAuthMethod()
           
 void getOffering(javax.xml.soap.SOAPElement appendto)
          This method appends the offering to the input SOAPElement and throws an Exception if something goes wrong.
 java.lang.String getOfferingId()
           
 java.lang.String getResourceId()
           
private  void turnToSoap(org.w3c.dom.Node notSoap, javax.xml.soap.SOAPElement parent)
          This method turn the input Node notSoap into a SOAP node by adding the information from the Node into the input SOAPElement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offeringid

private java.lang.String offeringid

resourceid

private java.lang.String resourceid

offering

private org.w3c.dom.Node offering

securityMechId

private java.lang.String securityMechId
Constructor Detail

ResourceOffering

public ResourceOffering(org.w3c.dom.Node offering)
The constructor gets a Node with the content of the offering which it parses to find the resourceID, securityMechId and the service endpoint.

Parameters:
offering - Node The offering which is an XML Node
Method Detail

findNode

private org.w3c.dom.Node findNode(java.lang.String withName,
                                  org.w3c.dom.Node parent)
Searches the input Node to find a Node with the name specified as a parameter and returns this Node. Uses null to indicate that no Node with that name was found.


getOffering

public void getOffering(javax.xml.soap.SOAPElement appendto)
                 throws javax.xml.soap.SOAPException
This method appends the offering to the input SOAPElement and throws an Exception if something goes wrong.

Parameters:
appendto - SOAPElement The response which the offering should be added to.
Throws:
javax.xml.soap.SOAPException - Thrown to show that somethings went wrong and the offering could not be added

turnToSoap

private void turnToSoap(org.w3c.dom.Node notSoap,
                        javax.xml.soap.SOAPElement parent)
                 throws javax.xml.soap.SOAPException
This method turn the input Node notSoap into a SOAP node by adding the information from the Node into the input SOAPElement.

Throws:
javax.xml.soap.SOAPException

getOfferingId

public java.lang.String getOfferingId()
Returns:
String Returns the ID of the offering.

getResourceId

public java.lang.String getResourceId()
Returns:
String Returns the resourceID.

getMessageAuthMethod

public java.lang.String getMessageAuthMethod()
Returns:
String The message authentication method used