Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  1. Create a Java class that implements the ddf.catalog.resource.ResourceWriter interface.

    Code Block
    languagejava
    titleResourceWriter Implementation Skeleton
    import java.io.IOException;
    import java.net.URI;
    import java.util.Map;
    import ddf.catalog.resource.Resource;
    import ddf.catalog.resource.ResourceNotFoundException;
    import ddf.catalog.resource.ResourceNotSupportedException;
    import ddf.catalog.resource.ResourceWriter;
     
    public class SampleResourceWriter implements ResourceWriter {
     
     @Override
     public void deleteResource(URI uri, Map<String, Object> arguments) throws ResourceNotFoundException, IOException {
       // WRITE IMPLEMENTATION
     }
     
     @Override
     public URI storeResource(Resource resource, Map<String, Object> arguments)throws ResourceNotSupportedException, IOException {
       // WRITE IMPLEMENTATION
       return null;
     }
     
     @Override
     public URI storeResource(Resource resource, String id, Map<String, Object> arguments) throws ResourceNotSupportedException, IOException {
     
       // WRITE IMPLEMENTATION
       return null;
     }
    }
  2. Register the implementation as a Service in the OSGi Service Registry.

    Code Block
    languagehtml/xml
    titleBlueprint Service Registration Example
    ...
    <service ref="[[ResourceWriterReference]]" interface="ddf.catalog.resource.ResourceWriter" />
    ...
  3. Deploy the OSGi bundled packaged service to the 
    Insert excerpt
    ApplicationName
    ApplicationName
    nopaneltrueApplicationName
     run-time.

...