Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-01


oracle.stellent.wcm.server.content.spi.fs
Class FileSystemLoader

java.lang.Object
  extended by oracle.stellent.wcm.server.content.spi.fs.FileSystemLoader


public class FileSystemLoader
extends java.lang.Object

Nested Class Summary
static interface FileSystemLoader.ContentLoader
          Callback invoked when local content is not available
static interface FileSystemLoader.LockReleaser
          This interface is for outside callers to release a lock.

 

Constructor Summary
FileSystemLoader(StagingConfiguration stagingConfig, CacheDeleteQueue cacheDeleteQueue, java.lang.String... specialFiles)
          Create a new file system loader

 

Method Summary
 java.io.File clearCache()
          Clear the contents of the entire FileSystemLoader root directory into a new configured archive directory
 java.io.File getStagingDir()
           
 ContentStream readAndStoreStream(FileSystemLoader.ContentLoader contentLoader, java.lang.String path, java.lang.String... lockKeyList)
          Read the stream from the underlying store; if not found, refresh the stream
 boolean removeFile(java.lang.String path, java.lang.String... lockKeyList)
          Remove the file.
 void setConversionCacheMap(java.util.Map<java.lang.String,java.lang.String> map)
           
 boolean tryRemoveFile(java.lang.String path, java.lang.String... lockKeyList)
          Try to remove the file.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

FileSystemLoader

public FileSystemLoader(StagingConfiguration stagingConfig,
                        CacheDeleteQueue cacheDeleteQueue,
                        java.lang.String... specialFiles)
                 throws java.io.IOException
Create a new file system loader
Parameters:
stagingConfig - the staging configuration
specialFiles - a list of file names to be copied if the staging root moves
Throws:
java.io.IOException

Method Detail

setConversionCacheMap

public void setConversionCacheMap(java.util.Map<java.lang.String,java.lang.String> map)

clearCache

public java.io.File clearCache()
                        throws java.io.IOException
Clear the contents of the entire FileSystemLoader root directory into a new configured archive directory
Returns:
the newly created archive directory
Throws:
java.io.IOException - if an error occurs

readAndStoreStream

public ContentStream readAndStoreStream(FileSystemLoader.ContentLoader contentLoader,
                                        java.lang.String path,
                                        java.lang.String... lockKeyList)
                                 throws java.io.IOException,
                                        oracle.stellent.ridc.IdcClientException
Read the stream from the underlying store; if not found, refresh the stream
Parameters:
path - the path to the local stream
contentLoader - the object used to load the live stream
lockKeyList - the key to use to obtain the write lock
Returns:
a stream pointed at the local resource
Throws:
java.io.IOException
oracle.stellent.ridc.IdcClientException

tryRemoveFile

public boolean tryRemoveFile(java.lang.String path,
                             java.lang.String... lockKeyList)
Try to remove the file. It fails if can not obtain an exclusive lock by a quick try.
Parameters:
path - the relative path
Returns:
true if the file was deleted or did not exist at all

removeFile

public boolean removeFile(java.lang.String path,
                          java.lang.String... lockKeyList)
Remove the file. It waits for an exclusive lock before removing the file.
Parameters:
path - the relative path
Returns:
true if the file was deleted or did not exist at all

getStagingDir

public java.io.File getStagingDir()
Returns:
the current staging directory

Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-01


Copyright © 2010, Oracle and/or its affiliates. All rights reserved.