COSMOS ${releaseVersion} data-collection Project
Public API Specification

org.eclipse.cosmos.dc.mgmt.provisional.wsdm.persistence
Class FilePersistor

java.lang.Object
  extended by org.apache.muse.core.AbstractFilePersistence
      extended by org.apache.muse.core.routing.RouterFilePersistence
          extended by org.eclipse.cosmos.dc.mgmt.provisional.wsdm.persistence.FilePersistor
All Implemented Interfaces:
org.apache.muse.core.InitializationParameters, org.apache.muse.core.Persistence, org.apache.muse.core.ResourceManagerListener, org.apache.muse.core.routing.RouterPersistence

public class FilePersistor
extends org.apache.muse.core.routing.RouterFilePersistence


Constructor Summary
FilePersistor()
           
 
Method Summary
protected  org.apache.muse.core.Resource reloadResource(java.lang.String contextPath, org.w3c.dom.Element resourceXML)
          

This implementation treats the XML fragment as a wsa:ReferenceParameters element.
 void resourceAdded(org.apache.muse.ws.addressing.EndpointReference epr, org.apache.muse.core.Resource resource)
          This implementation checks to see if the resource type is one that is being persisted, and if so, creates a file for the instance.
 void resourceRemoved(org.apache.muse.ws.addressing.EndpointReference epr)
          This implementation checks to see if the resource type is one that is being persisted, and if so, tries to delete the resource's file.
 
Methods inherited from class org.apache.muse.core.routing.RouterFilePersistence
createResourceFile, getFilePrefix
 
Methods inherited from class org.apache.muse.core.AbstractFilePersistence
createResourceFile, destroyResourceFile, getContextPath, getFileNumber, getFileNumberTables, getInitializationParameter, getInitializationParameters, getNextFileName, getNextFileNumber, getPersistenceDirectory, getPersistenceLocation, getResourceManager, getResourceTypeDirectory, reload, reloadResources, setInitializationParameters, setPersistenceLocation, setResourceManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.muse.core.Persistence
getPersistenceLocation, getResourceManager, reload, setPersistenceLocation, setResourceManager
 
Methods inherited from interface org.apache.muse.core.InitializationParameters
getInitializationParameter, getInitializationParameters, setInitializationParameters
 

Constructor Detail

FilePersistor

public FilePersistor()
Method Detail

reloadResource

protected org.apache.muse.core.Resource reloadResource(java.lang.String contextPath,
                                                       org.w3c.dom.Element resourceXML)
                                                throws org.apache.muse.ws.addressing.soap.SoapFault


This implementation treats the XML fragment as a wsa:ReferenceParameters element. It creates an EPR for the given resource type (context path) and then adds the reference parameters to it. Finally, it creates an instance of the resource type and (re-)sets the EPR that it has constructed.

Overrides:
reloadResource in class org.apache.muse.core.routing.RouterFilePersistence
Throws:
org.apache.muse.ws.addressing.soap.SoapFault

resourceAdded

public void resourceAdded(org.apache.muse.ws.addressing.EndpointReference epr,
                          org.apache.muse.core.Resource resource)
                   throws org.apache.muse.ws.addressing.soap.SoapFault
This implementation checks to see if the resource type is one that is being persisted, and if so, creates a file for the instance.

Specified by:
resourceAdded in interface org.apache.muse.core.ResourceManagerListener
Overrides:
resourceAdded in class org.apache.muse.core.routing.RouterFilePersistence
Throws:
org.apache.muse.ws.addressing.soap.SoapFault

resourceRemoved

public void resourceRemoved(org.apache.muse.ws.addressing.EndpointReference epr)
                     throws org.apache.muse.ws.addressing.soap.SoapFault
This implementation checks to see if the resource type is one that is being persisted, and if so, tries to delete the resource's file.

Specified by:
resourceRemoved in interface org.apache.muse.core.ResourceManagerListener
Overrides:
resourceRemoved in class org.apache.muse.core.routing.RouterFilePersistence
Throws:
org.apache.muse.ws.addressing.soap.SoapFault

COSMOS ${releaseVersion} data-collection Project
Public API Specification