Class StorageIngestAction

  • All Implemented Interfaces:
    gov.nasa.jpl.oodt.cas.commons.spring.SpringSetIdInjectionType

    public class StorageIngestAction
    extends gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
    Class that will ingest registered products to the PDS Storage Service.
    Author:
    mcayanan
    • Constructor Detail

      • StorageIngestAction

        public StorageIngestAction​(URL storageServerUrl)
                            throws org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException
        Constructor.
        Parameters:
        storageServerUrl - URL to the PDS storage server.
        Throws:
        org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException - If there was an error connecting to the Storage Service.
    • Method Detail

      • performAction

        public boolean performAction​(File product,
                                     gov.nasa.jpl.oodt.cas.metadata.Metadata metadata)
                              throws gov.nasa.jpl.oodt.cas.crawl.structs.exceptions.CrawlerActionException
        Perform the action to ingest a product to the PDS Storage service.
        Specified by:
        performAction in class gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
        Parameters:
        product - The registered product.
        metadata - The metadata associated with the given product.
        Returns:
        true if the ingestion was successful, false otherwise.
        Throws:
        gov.nasa.jpl.oodt.cas.crawl.structs.exceptions.CrawlerActionException
      • performAction

        public String performAction​(File product,
                                    FileObject fileObject,
                                    gov.nasa.jpl.oodt.cas.metadata.Metadata metadata)
        Perform ingestion of a file object.
        Parameters:
        product - The file associated with the given file object.
        fileObject - The file object to ingest.
        metadata - The metadata associated with the given file.
        Returns:
        The storage service product identifier if an ingestion was successful. If an error occurred, a null will be returned.
      • setDataTransferType

        public void setDataTransferType​(String dataTransferType)
        Set the data transfer type.
        Parameters:
        dataTransferType - Either 'InPlaceProduct' or 'TransferProduct'.