com.sage.orion.sdata.servlet
Class SDataServer

java.lang.Object
  extended by com.sage.orion.sdata.servlet.SDataServer

public class SDataServer
extends java.lang.Object

Class holds elements to contact a web server


Constructor Summary
SDataServer(javax.servlet.http.HttpServletRequest request)
          Constructs an instance of the SDataServer class representing the server handling the request.
SDataServer(java.lang.String protocol, java.lang.String port, java.lang.String applicationContext, java.lang.String serverName, java.lang.String applicationName, java.lang.String contractName, java.lang.String dataSet)
          Constructs a new SDataServer
 
Method Summary
 java.lang.String getContractName()
          Gets the contract name of the SData server request.
 java.lang.String getListOfApplicationsURL()
          Get the URL representing the List of Applications based on the data from the initial request or SDataServer instantiation information.
 java.lang.String getListOfContractsURL()
          Get the URL representing the List of Contracts based on the data from the initial request or SDataServer instantiation information.
 java.lang.String getListOfDatasetsURL()
          Get the URL representing the List of Datasets based on the data from the initial request or SDataServer instantiation information.
 java.lang.String getServerURL()
          String form of external server URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDataServer

public SDataServer(java.lang.String protocol,
                   java.lang.String port,
                   java.lang.String applicationContext,
                   java.lang.String serverName,
                   java.lang.String applicationName,
                   java.lang.String contractName,
                   java.lang.String dataSet)
Constructs a new SDataServer

Parameters:
protocol - Either http / https is supported. Should not be null
port - Should not be null
applicationContext - May be null. The default is an empty string
serverName - Should not be null
applicationName - Should not be null
contractName - Should not be null
dataSet - My be null. When null, and "-" is used to represent the dataset portion.
Throws:
java.lang.IllegalArgumentException - If arguments are null except for applicationContext and dataSet

SDataServer

public SDataServer(javax.servlet.http.HttpServletRequest request)
Constructs an instance of the SDataServer class representing the server handling the request.

Parameters:
request - HttpServletRequest
Method Detail

getServerURL

public java.lang.String getServerURL()
String form of external server URL

Returns:
the server URL up to and including the '/' after the dataset, e.g. mycontext in url: "https://myserver:8080/mycontext/sdata/myapp/mycontract/-/"
where '-' represents the default dataset.

getListOfApplicationsURL

public java.lang.String getListOfApplicationsURL()
Get the URL representing the List of Applications based on the data from the initial request or SDataServer instantiation information.

Returns:
a string representing the url to request the list of applications.

getListOfContractsURL

public java.lang.String getListOfContractsURL()
Get the URL representing the List of Contracts based on the data from the initial request or SDataServer instantiation information.

Returns:
URL of which will get the list of contracts.

getListOfDatasetsURL

public java.lang.String getListOfDatasetsURL()
Get the URL representing the List of Datasets based on the data from the initial request or SDataServer instantiation information.

Returns:
URL of which will get the list of datasets.

getContractName

public java.lang.String getContractName()
Gets the contract name of the SData server request.

Returns:
the name of the contract for the current request or null if contract was not specified.


Copyright © 2011 Sage Software, Inc. All rights reserved.