Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.websphere.personalization.resources
Interface ResourceManager3

    public interface ResourceManager3

The ResourceManager3 interface is intended to facilitate update of the data mapped in by the Resource interface. This is the peer to the ResourceDomain3 interface.

See Also:
  `ResourceDomain3`

Field Summary
`static java.lang.String` | `COPYRIGHT`

Method Summary
`void` | `add(Resource resource, RequestContext context)` Use this method to add to a Resource instance to the data store.
`Resource` | `createResourceFromStream(java.io.InputStreamReader inputStream, RequestContext context, java.lang.String format)` Creates a resource from a stream, such as an XML stream.
`java.util.Enumeration` | `createResourcesFromStream(java.io.InputStreamReader inputStream, RequestContext context, java.lang.String format)` Creates a set resources from a single stream, such as an XML stream.
`void` | `delete(Resource resource, RequestContext context)` Use this method to delete a Resource instance from the data store.
`java.lang.String[]` | `getSupportedStreamFormats()` Answers the list of supported formats for createResourceFromStream and writeResourceToStream.
`void` | `init(RequestContext context)` Perform any initialization required before a resource can be accessed using this manager.
`void` | `sync(Resource resource, RequestContext context)` Use this method to send any updates made for the Resource instance.
`void` | `writeResourcesToStream(java.io.OutputStreamWriter outputStream, java.util.Enumeration resources, RequestContext context, java.lang.String format)` Creates a stream from a set of resources.
`void` | `writeResourceToStream(java.io.OutputStreamWriter outputStream, Resource resource, RequestContext context, java.lang.String format)` Creates a stream from a resource.

Field Detail

### COPYRIGHT

    static final java.lang.String COPYRIGHT

Method Detail

### add

    void add(Resource resource,
             RequestContext context)
             throws AddResourceException,
                    DuplicateResourceException

  Use this method to add to a Resource instance to the data store.

  Throws:
    `AddResourceException`
    `DuplicateResourceException`

### delete

    void delete(Resource resource,
                RequestContext context)
                throws DeleteResourceException

  Use this method to delete a Resource instance from the data store.

  Throws:
    `DeleteResourceException`

### sync

    void sync(Resource resource,
              RequestContext context)
              throws ResourceUpdateException

  Use this method to send any updates made for the Resource instance. This method is called from Update rules acting on resource collections.

  Throws:
    `ResourceUpdateException`

### createResourceFromStream

    Resource createResourceFromStream(java.io.InputStreamReader inputStream,
                                      RequestContext context,
                                      java.lang.String format)
                                      throws CreateResourceFromStreamException

  Creates a resource from a stream, such as an XML stream.

  Parameters:
    `inputStream` - The stream containing the data from which the resource should be created.
    `context` - The request context
    `format` - The format (e.g. "XML", "CSL")
  Returns:
  Throws:
    `CreateResourceFromStreamException`

### writeResourceToStream

    void writeResourceToStream(java.io.OutputStreamWriter outputStream,
                               Resource resource,
                               RequestContext context,
                               java.lang.String format)
                               throws WriteResourceToStreamException

  Creates a stream from a resource.

  Parameters:
    `outputStream` - The stream to which the generated form will be written.
    `resource` - The resource from which the stream should be created.
    `context` - The request context.
    `format` - The desired fornat (e.g. "XML", "CSL")
  Throws:
    `WriteResourceToStreamException`

### createResourcesFromStream

    java.util.Enumeration createResourcesFromStream(java.io.InputStreamReader inputStream,
                                                    RequestContext context,
                                                    java.lang.String format)
                                                    throws CreateResourceFromStreamException

  Creates a set resources from a single stream, such as an XML stream.

  Parameters:
    `inputStream` - The stream containing the data from which the resources should be created.
    `context` - The request context
    `format` - The format (e.g. "XML", "CSL")
  Returns:
  Throws:
    `CreateResourceFromStreamException`

### writeResourcesToStream

    void writeResourcesToStream(java.io.OutputStreamWriter outputStream,
                                java.util.Enumeration resources,
                                RequestContext context,
                                java.lang.String format)
                                throws WriteResourceToStreamException

  Creates a stream from a set of resources.

  Parameters:
    `outputStream` - The stream to which the generated form will be written.
    `resources` - The resources from which the stream should be created.
    `context` - The request context.
    `format` - The desired format (e.g. "XML", "CSL")
  Throws:
    `WriteResourceToStreamException`

### getSupportedStreamFormats

    java.lang.String[] getSupportedStreamFormats()

  Answers the list of supported formats for createResourceFromStream and writeResourceToStream.

  Returns:
    a list of supported formats.

### init

    void init(RequestContext context)
              throws InitException

  Perform any initialization required before a resource can be accessed using this manager. For example, create any database table required to hold resource instances. It is safe to call this method more than once.

  Throws:
    `InitException` - Thrown if there is a problem initializing the resource collection. For instance, if this method tries to create tables and the user connecting to the database does not have authority to create tables.

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD