org.globus.ogsa
Class ServiceGroupEntryGenerator

java.lang.Object
  extended byorg.globus.ogsa.ServiceGroupEntryGenerator

public class ServiceGroupEntryGenerator
extends java.lang.Object

The ServiceGroupEntryGenerator generates an OGSI ServiceGroup EntryType collection ServiceData from a ServiceNode (recursively), from a list of services, or from a list of handles

See Also:
ServiceData, ServiceNode, EntryType

Constructor Summary
ServiceGroupEntryGenerator()
           
 
Method Summary
static java.util.Collection handlesToEntries(java.util.Iterator handles)
          creates a collection of EntryType objects for a collection of services represented by their handles (as Strings)
static java.util.Collection nodeToEntries(ServiceNode node)
          creates a collection of EntryType objects for a node and all its child nodes.
static java.util.Collection servicesToEntries(java.util.Collection services)
          creates a collection of EntryType objects for a collection of services (supporting the ServiceProperties interface)
static boolean updateEntrySDE(ServiceData serviceData, ServiceProperties properties, boolean unbind)
          Updates the Entry SDE value.
static void updateServiceData(java.util.Collection services, GridServiceBase base)
          adds a collection of services (ServiceProperties) to the ServiceDataSet of a Grid service after converting them to a collection of EntryType service data
static void updateServiceData(java.util.Iterator handles, GridServiceBase base)
          adds a collection of handles (Strings) to the ServiceDataSet of a Grid service after converting them to a collection of EntryType service data
static void updateServiceDataEntries(java.util.Collection entries, GridServiceBase base)
          adds a collection of EntryTypes to the ServiceDataSet of a Grid service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceGroupEntryGenerator

public ServiceGroupEntryGenerator()
Method Detail

nodeToEntries

public static java.util.Collection nodeToEntries(ServiceNode node)
creates a collection of EntryType objects for a node and all its child nodes.

Parameters:
node - parent node containing services to be included in the EntryType (parent will be included too) collection
Returns:
collection of EntryTypes populated with properties of the input nodes
See Also:
EntryType

servicesToEntries

public static java.util.Collection servicesToEntries(java.util.Collection services)
creates a collection of EntryType objects for a collection of services (supporting the ServiceProperties interface)

Parameters:
services - collection of ServiceProperties objects
Returns:
collection of EntryTypes populated with properties of the input services
See Also:
EntryType, ServiceProperties

handlesToEntries

public static java.util.Collection handlesToEntries(java.util.Iterator handles)
creates a collection of EntryType objects for a collection of services represented by their handles (as Strings)

Parameters:
handles - Iterator over a set of Strings of service handles
Returns:
collection of EntryTypes populated with the input handles
See Also:
EntryType

updateServiceData

public static void updateServiceData(java.util.Collection services,
                                     GridServiceBase base)
                              throws GridServiceException
adds a collection of services (ServiceProperties) to the ServiceDataSet of a Grid service after converting them to a collection of EntryType service data

Parameters:
services - collection of ServiceProperties
base - Grid service that is to be populated with the service data elements containing ServiceGroup entries
Throws:
GridServiceException - if the service data could not be added
See Also:
EntryType, ServiceProperties, ServiceDataSet

updateServiceData

public static void updateServiceData(java.util.Iterator handles,
                                     GridServiceBase base)
                              throws GridServiceException
adds a collection of handles (Strings) to the ServiceDataSet of a Grid service after converting them to a collection of EntryType service data

Parameters:
handles - an iterator over handles in the form of Strings
base - Grid service that is to be populated with the service data elements containing ServiceGroup entries
Throws:
GridServiceException - if the service data could not be added
See Also:
EntryType, ServiceDataSet

updateServiceDataEntries

public static void updateServiceDataEntries(java.util.Collection entries,
                                            GridServiceBase base)
                                     throws GridServiceException
adds a collection of EntryTypes to the ServiceDataSet of a Grid service

Parameters:
entries - a Collection of EntryType objects
base - Grid service that is to be populated with the service data elements containing ServiceGroup entries
Throws:
GridServiceException - if the service data could not be added
See Also:
EntryType, ServiceDataSet

updateEntrySDE

public static boolean updateEntrySDE(ServiceData serviceData,
                                     ServiceProperties properties,
                                     boolean unbind)
                              throws GridServiceException
Updates the Entry SDE value.

Parameters:
serviceData - the Entry SDE
properties - the service that was added/modified/removed
unbind - true if service was unbound, false otherwise.
Returns:
true if Entry SDE was modified, false otherwise.
Throws:
GridServiceException


Copyright ? 1999 University of Chicago and The University of Southern California. All Rights Reserved.