uk.org.ogsadai.service.wsrf.resource
Class DataServiceResourceWrapper

java.lang.Object
  |
  +--uk.org.ogsadai.service.wsrf.resource.DataServiceResourceWrapper
All Implemented Interfaces:
org.globus.wsrf.Resource, org.globus.wsrf.ResourceIdentifier, org.globus.wsrf.ResourceLifetime, org.globus.wsrf.ResourceProperties

public class DataServiceResourceWrapper
extends java.lang.Object
implements org.globus.wsrf.Resource, org.globus.wsrf.ResourceLifetime, org.globus.wsrf.ResourceIdentifier, org.globus.wsrf.ResourceProperties

A wrapper for exposing uk.org.ogsadai.service.resource.DataServiceResources as WS-Resources. An associated ResourcePropertySet is created also. This has a name - uk.org.ogsadai.service.wsrf.WSRFConstants.RP_SET.

Author:
The OGSA-DAI Team.
See Also:
Resource, ResourceIdentifier, ResourceLifetime, ResourceProperties, DataServiceResource

Constructor Summary
DataServiceResourceWrapper(java.lang.Object id, java.lang.String defaultRoot, java.lang.String configRoot, SecurityContextProvider securityContextProvider)
          Create a new data service resource wrapped within this wrapper.
 
Method Summary
 java.util.Calendar getCurrentTime()
          (non-Javadoc)
 DataServiceResource getDataServiceResource()
          Return the wrapped data service resource.
 java.lang.Object getID()
          (non-Javadoc)
 org.globus.wsrf.ResourcePropertySet getResourcePropertySet()
          (non-Javadoc)
 java.util.Calendar getTerminationTime()
          (non-Javadoc)
 void setTerminationTime(java.util.Calendar time)
          (non-Javadoc)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataServiceResourceWrapper

public DataServiceResourceWrapper(java.lang.Object id,
                                  java.lang.String defaultRoot,
                                  java.lang.String configRoot,
                                  SecurityContextProvider securityContextProvider)
                           throws DataServiceResourceInternalException,
                                  DataServiceResourceUserException
Create a new data service resource wrapped within this wrapper. This includes building a WSRF-compliant ResourcePropertySet exposing the properties of the data service resource.

Parameters:
id - - ID of this data service resource.
defaultRoot - - default root directory for all relative path. This can be null.
configRoot - - directory within which configuration files for this resource are located. This can be absolute or relative or null.
securityContextProvider - - object providing security information for use in accessing OGSA-DAI properties.
Throws:
DataServiceResourceInternalException - if there is an internal problem experienced when parsing files or creating a data resource manager.
DataServiceResourceUserException - if there is a user-caused problem e.g. if id is null, configuration files cannot be found, or are of the incorrect format.
See Also:
DataServiceResource
Method Detail

setTerminationTime

public void setTerminationTime(java.util.Calendar time)
(non-Javadoc)

Specified by:
setTerminationTime in interface org.globus.wsrf.ResourceLifetime
See Also:
ResourceLifetime.setTerminationTime(java.util.Calendar)

getTerminationTime

public java.util.Calendar getTerminationTime()
(non-Javadoc)

Specified by:
getTerminationTime in interface org.globus.wsrf.ResourceLifetime
See Also:
ResourceLifetime.getTerminationTime()

getCurrentTime

public java.util.Calendar getCurrentTime()
(non-Javadoc)

Specified by:
getCurrentTime in interface org.globus.wsrf.ResourceLifetime
See Also:
ResourceLifetime.getCurrentTime()

getID

public java.lang.Object getID()
(non-Javadoc)

Specified by:
getID in interface org.globus.wsrf.ResourceIdentifier
See Also:
ResourceIdentifier.getID()

getResourcePropertySet

public org.globus.wsrf.ResourcePropertySet getResourcePropertySet()
(non-Javadoc)

Specified by:
getResourcePropertySet in interface org.globus.wsrf.ResourceProperties
See Also:
ResourceProperties.getResourcePropertySet()

getDataServiceResource

public DataServiceResource getDataServiceResource()
Return the wrapped data service resource.

Returns:
DataServiceResource