org.globus.ogsa.impl.base.servicegroup.persistence
Class ServiceGroupXindiceHandler

java.lang.Object
  extended byorg.globus.ogsa.impl.base.servicegroup.persistence.ServiceGroupXindiceHandler
All Implemented Interfaces:
ServiceGroupPersistenceHandler

public class ServiceGroupXindiceHandler
extends java.lang.Object
implements ServiceGroupPersistenceHandler

The ServiceGroupXindiceHandler class. This class interacts with the Xidnice Driver to store/retrieve Service data in/from Xindice


Constructor Summary
ServiceGroupXindiceHandler(GridServiceBase serviceBase)
          The constructor of the class.
 
Method Summary
 boolean add(LocatorType serviceGroupEntryLocator, LocatorType memberServiceLocator, ExtensibilityType content, TerminationTimeType terminationTimeType)
          Saves a service group entry to the Xindice collection.
 boolean cleanupServiceGroupEntryService(java.lang.String serviceHandle)
          Removes the serviceGroup Entry service from the Xindice collection.
 boolean cleanupServiceGroupRegistrationService()
          Removes the serviceGroup Registration service from the Xindice collection.
 HandleType[] getAllServiceGroupEntryLocators()
          Retrieves all service group entries from the collection.
protected  java.lang.String getBaseCollectionName()
          Retrieves the base collection name.
protected  java.lang.String getRootCollectionName()
           
 org.w3c.dom.Document getServiceGroupEntryContentData(java.lang.String serviceGroupEntryHandle)
          Retrieves the content Document pertaining to a ServiceGroupEntry handle
 EntryType[] getServiceGroupEntryData(java.lang.String serviceGroupHandle)
          Retrieves the list of serviceGroup's Entry service data.
 HandleType[] getServiceGroupEntryLocators(HandleType[] memberServiceHandles)
          Retrieves the corresponding service group entries from the collection.
 org.w3c.dom.Element getServiceGroupEntryMemberServiceLocatorData(java.lang.String serviceGroupEntryHandle)
          Retrieves the MemberServiceLocator service data for a given ServiceGroupEntry Handle
 void initialize()
          Initializes the Xindice instance by creating the base collection, and initializing it for the given service group instance.
 boolean remove(HandleType[] memberServiceHandles)
          Removes the corresponding service group entries from the collection.
 boolean removeServiceGroupEntry(HandleType serviceGroupEntryHandle)
          Removes the service group entries from the collection.
protected  void setBaseCollectionName(java.lang.String baseCollectionName)
          Sets the base collection name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceGroupXindiceHandler

public ServiceGroupXindiceHandler(GridServiceBase serviceBase)
                           throws java.lang.Exception
The constructor of the class.

Method Detail

getRootCollectionName

protected java.lang.String getRootCollectionName()

setBaseCollectionName

protected void setBaseCollectionName(java.lang.String baseCollectionName)
Sets the base collection name.


getBaseCollectionName

protected java.lang.String getBaseCollectionName()
Retrieves the base collection name.

Returns:
String - the base coolection name.

initialize

public void initialize()
                throws java.lang.Exception
Initializes the Xindice instance by creating the base collection, and initializing it for the given service group instance.

Specified by:
initialize in interface ServiceGroupPersistenceHandler
Throws:
java.lang.Exception - on error

add

public boolean add(LocatorType serviceGroupEntryLocator,
                   LocatorType memberServiceLocator,
                   ExtensibilityType content,
                   TerminationTimeType terminationTimeType)
            throws AddRefusedFaultType
Saves a service group entry to the Xindice collection.

Specified by:
add in interface ServiceGroupPersistenceHandler
Parameters:
serviceGroupEntryLocator - - The Service Group Entry Locator
memberServiceLocator - - The member service Locator
content - - The Member Content
terminationTimeType - - Termination Time
Returns:
true on success
Throws:
AddRefusedFaultType - if the operation could not be completed

remove

public boolean remove(HandleType[] memberServiceHandles)
               throws RemoveFailedFaultType,
                      MatchFailedFaultType
Removes the corresponding service group entries from the collection.

Specified by:
remove in interface ServiceGroupPersistenceHandler
Parameters:
memberServiceHandles - - Array of member service Handles for removal
Returns:
true on success
Throws:
RemoveFailedFaultType
MatchFailedFaultType

removeServiceGroupEntry

public boolean removeServiceGroupEntry(HandleType serviceGroupEntryHandle)
                                throws RemoveFailedFaultType
Removes the service group entries from the collection.

Specified by:
removeServiceGroupEntry in interface ServiceGroupPersistenceHandler
Parameters:
serviceGroupEntryHandle - - service group entry Handles for removal
Returns:
true on success
Throws:
RemoveFailedFaultType

getServiceGroupEntryLocators

public HandleType[] getServiceGroupEntryLocators(HandleType[] memberServiceHandles)
                                          throws java.lang.Exception
Retrieves the corresponding service group entries from the collection.

Specified by:
getServiceGroupEntryLocators in interface ServiceGroupPersistenceHandler
Parameters:
memberServiceHandles - - Array of member service Handles for removal
Returns:
result list of HandleType[] to service group entries
Throws:
java.lang.Exception

getAllServiceGroupEntryLocators

public HandleType[] getAllServiceGroupEntryLocators()
                                             throws java.lang.Exception
Retrieves all service group entries from the collection.

Specified by:
getAllServiceGroupEntryLocators in interface ServiceGroupPersistenceHandler
Returns:
list of HandleType[] to all service group entries
Throws:
java.lang.Exception

getServiceGroupEntryMemberServiceLocatorData

public org.w3c.dom.Element getServiceGroupEntryMemberServiceLocatorData(java.lang.String serviceGroupEntryHandle)
                                                                 throws java.lang.Exception
Retrieves the MemberServiceLocator service data for a given ServiceGroupEntry Handle

Specified by:
getServiceGroupEntryMemberServiceLocatorData in interface ServiceGroupPersistenceHandler
Parameters:
serviceGroupEntryHandle - - The Service Group Entry Locator
Returns:
Element representation of the service locator
Throws:
java.lang.Exception

getServiceGroupEntryContentData

public org.w3c.dom.Document getServiceGroupEntryContentData(java.lang.String serviceGroupEntryHandle)
                                                     throws java.lang.Exception
Retrieves the content Document pertaining to a ServiceGroupEntry handle

Specified by:
getServiceGroupEntryContentData in interface ServiceGroupPersistenceHandler
Parameters:
serviceGroupEntryHandle - - The Service Group Entry Handle
Returns:
content Document pertaining to the ServiceGroupEntry
Throws:
java.lang.Exception

getServiceGroupEntryData

public EntryType[] getServiceGroupEntryData(java.lang.String serviceGroupHandle)
                                     throws java.lang.Exception
Retrieves the list of serviceGroup's Entry service data.

Specified by:
getServiceGroupEntryData in interface ServiceGroupPersistenceHandler
Parameters:
serviceGroupHandle - - The Service Group Handle
Returns:
Array of entry service data pertaining to the ServiceGroup.
Throws:
java.lang.Exception

cleanupServiceGroupEntryService

public boolean cleanupServiceGroupEntryService(java.lang.String serviceHandle)
                                        throws java.lang.Exception
Removes the serviceGroup Entry service from the Xindice collection.

Specified by:
cleanupServiceGroupEntryService in interface ServiceGroupPersistenceHandler
Parameters:
serviceHandle - - The Service Group Entry service Handle
Returns:
true on success
Throws:
java.lang.Exception

cleanupServiceGroupRegistrationService

public boolean cleanupServiceGroupRegistrationService()
                                               throws java.lang.Exception
Removes the serviceGroup Registration service from the Xindice collection.

Specified by:
cleanupServiceGroupRegistrationService in interface ServiceGroupPersistenceHandler
Returns:
true on success
Throws:
java.lang.Exception