com.corticon.eclipse.core

## Interface IPersistenceServicesDelegate

-     public interface IPersistenceServicesDelegate

  A persistence services delegate provides external functions needed by model APIs which are implemented differently depending on the type of persistence store used.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.eclipse.emf.ecore.resource.Resource` | `createResource(org.eclipse.emf.common.util.URI aURIResource)` Using the specified URI, create a new Resource in the editing domain and return that Resource to the caller.
    `void` | `deleteResource(org.eclipse.emf.ecore.resource.Resource aResource)` Delete the specified Resource.
    `org.eclipse.emf.ecore.resource.Resource` | `findResource(org.eclipse.emf.common.util.URI aURI)` Find the Resource corresponding to the specified URI in the ResourceSet.
    `long` | `getModificationStamp(org.eclipse.emf.ecore.resource.Resource aResource)` Get the modification stamp for the specified EMF resource.
    `java.lang.String` | `getNewResourceName(org.eclipse.emf.common.util.URI aURIContainer, java.lang.String astrFileName, java.lang.String astrFileExtension)` Given the URI of a container in the Eclipse Workspace (either project or folder), a "base" filename and a file extension, return a new unique filename within that container by appending sequence numbers (if needed) until a unique name can be found.
    `org.eclipse.emf.ecore.resource.Resource` | `loadResource(org.eclipse.emf.common.util.URI aURIResource)` Load the specified Resource into the editing domain's ResourceSet.
    `org.eclipse.emf.ecore.resource.Resource` | `reloadResource(org.eclipse.emf.ecore.resource.Resource aResource)` Reload the specified resource (unload/load).
    `void` | `removeResource(org.eclipse.emf.ecore.resource.Resource aResource)` Remove the specified resource from the resource set.
    `boolean` | `renameResource(org.eclipse.emf.ecore.resource.Resource aResource, org.eclipse.emf.common.util.URI aURIResourceNew)` Rename the Resource identified by the specified URI.
    `void` | `saveResource(org.eclipse.emf.ecore.resource.Resource aResource)` Save the contents of the specified resource.
    `void` | `setModelAPIState(IModelAPIState aIModelAPIState)` Setter for model API state.
    `void` | `unloadResource(org.eclipse.emf.ecore.resource.Resource aResource)` Unload the specified resource.

- - ### Method Detail

    - #### createResource

          org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.common.util.URI aURIResource)

      Using the specified URI, create a new Resource in the editing domain and return that Resource to the caller.
      Parameters:
        `aURIResource` - URI of Resource to be created.
      Returns:
        Reference to new Resource.

    - #### deleteResource

          void deleteResource(org.eclipse.emf.ecore.resource.Resource aResource)

      Delete the specified Resource. This involves removing the Resource from the ResourceSet and also deleting the file from the Eclipse workspace.
      Parameters:
        `aResource` - Resource to be deleted.

    - #### findResource

          org.eclipse.emf.ecore.resource.Resource findResource(org.eclipse.emf.common.util.URI aURI)

      Find the Resource corresponding to the specified URI in the ResourceSet.
      Parameters:
        `aURI` - URI to locate.
      Returns:
        Resource instance or `null`.

    - #### getModificationStamp

          long getModificationStamp(org.eclipse.emf.ecore.resource.Resource aResource)

      Get the modification stamp for the specified EMF resource. The modification stamp is typically a long integer (UTC) representing the time the resource was last updated.
      Parameters:
        `aResource` - Resource whose modification stamp should be returned.

    - #### getNewResourceName

          java.lang.String getNewResourceName(org.eclipse.emf.common.util.URI aURIContainer,
                                            java.lang.String astrFileName,
                                            java.lang.String astrFileExtension)

      Given the URI of a container in the Eclipse Workspace (either project or folder), a "base" filename and a file extension, return a new unique filename within that container by appending sequence numbers (if needed) until a unique name can be found. The container URI must be Eclipse platform relative: platform:/Examples/TradeAllocation/Rules
      Parameters:
        `aURIContainer` - Container relative path.
        `astrFileName` - File name.
        `astrFileExtension` - File extension.
      Returns:
        New Ruleflow name.

    - #### renameResource

          boolean renameResource(org.eclipse.emf.ecore.resource.Resource aResource,
                               org.eclipse.emf.common.util.URI aURIResourceNew)

      Rename the Resource identified by the specified URI.
      Parameters:
        `aResource` - Resource to be renamed.
        `aURIResourceNew` - New Resource URI.
      Returns:
        `true` if the command was successful.

    - #### reloadResource

          org.eclipse.emf.ecore.resource.Resource reloadResource(org.eclipse.emf.ecore.resource.Resource aResource)

      Reload the specified resource (unload/load).
      Parameters:
        `aResource` - Resource to be reloaded.
      Returns:
        Resource that was reloaded.

    - #### removeResource

          void removeResource(org.eclipse.emf.ecore.resource.Resource aResource)

      Remove the specified resource from the resource set.
      Parameters:
        `aResource` - Resource to be removed.

    - #### loadResource

          org.eclipse.emf.ecore.resource.Resource loadResource(org.eclipse.emf.common.util.URI aURIResource)

      Load the specified Resource into the editing domain's ResourceSet.
      Parameters:
        `aURIResource` - URI of Resource to load.
      Returns:
        Resource that was loaded or `null` if an error occurs.

    - #### saveResource

          void saveResource(org.eclipse.emf.ecore.resource.Resource aResource)

      Save the contents of the specified resource.
      Parameters:
        `aResource` - Resource instance to save.

    - #### setModelAPIState

          void setModelAPIState(IModelAPIState aIModelAPIState)

      Setter for model API state.
      Parameters:
        `aIModelAPI` - Model API instance.

    - #### unloadResource

          void unloadResource(org.eclipse.emf.ecore.resource.Resource aResource)

      Unload the specified resource. This essentially resets the resource to unchanged state.
      Parameters:
        `aResource` - Resource to unload.

Copyright © 2005-2013 Progress Software Corporation and/or its subsidiaries and affiliates. All rights reserved.