|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.file.SilverpeasFileProvider
public class SilverpeasFileProvider
A provider of Silverpeas files. This provider aims to provide a single point to simply retrieve
files managed in Silverpeas in the form of a SilverpeasFile
instances. The SilverpeasFile
class provides useful methods to
manage the files in Silverpeas. Both and SilverpeasFile
classes support a mechanism of pre and post operations processing permitting to hook additional
treatments on the files handled in Silverpeas.
FileHandler
class that offers a higher level access to the
files managed in Silverpeas. This class is dedicated to provide a low-level and a single and
unique point to access the files in Silverpeas with a support for an additional computing in
order to hook parallel behaviours on the handled file.
The Silverpeas File Provider provides two extensions points to hook additional computations with
the file operations. For example, a process can be hooked to resize automatically the images on
the demand (see ImageResizingProcessor
for a such example of
processors). To hook such processors, they have to implement the
SilverpeasFileProcessor
interface.
Method Summary | |
---|---|
void |
addProcessor(SilverpeasFileProcessor processor)
Adds a processor of SilverpeasFile. |
static SilverpeasFile |
getFile(SilverpeasFileDescriptor descriptor)
|
static SilverpeasFile |
getFile(String absolutePath)
|
static SilverpeasFileProvider |
getInstance()
|
SilverpeasFile |
getSilverpeasFile(SilverpeasFileDescriptor descriptor)
Gets a SilverpeasFile instance matching the description provided by the specified
file descriptor. |
SilverpeasFile |
getSilverpeasFile(String absolutePath)
Gets a SilverpeasFile instance for the file located at the specified absolute path. |
static SilverpeasFile |
newFile(SilverpeasFileDescriptor descriptor)
|
static SilverpeasFile |
newFile(String absolutePath)
|
SilverpeasFile |
newSilverpeasFile(SilverpeasFileDescriptor descriptor)
Gets a new SilverpeasFile instance for the file described by the specified file
descriptor. |
SilverpeasFile |
newSilverpeasFile(String absolutePath)
Gets a new SilverpeasFile instance for the file located at the specified absolute
path. |
protected static SilverpeasFile |
processAfter(SilverpeasFile file,
SilverpeasFileProcessor.ProcessingContext context)
Triggers the chain of post-processors against the specified file and according to the specified processing context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SilverpeasFileProvider getInstance()
public static SilverpeasFile getFile(SilverpeasFileDescriptor descriptor)
descriptor
- a descriptor of a SilverpeasFile.
getSilverpeasFile(SilverpeasFileDescriptor)
public static SilverpeasFile getFile(String absolutePath)
absolutePath
- the absolute path of a file.
getSilverpeasFile(String)
public static SilverpeasFile newFile(String absolutePath)
absolutePath
- the absolute path at which will be located the file.
newSilverpeasFile(String)
public static SilverpeasFile newFile(SilverpeasFileDescriptor descriptor)
descriptor
- a descriptor of a SilverpeasFile.
newSilverpeasFile(org.silverpeas.file.SilverpeasFileDescriptor)
public SilverpeasFile newSilverpeasFile(String absolutePath)
SilverpeasFile
instance for the file located at the specified absolute
path. If the file already exists, it is this file that will be returned. No chain of pre and
post processing are performed against the new Silverpeas file.
absolutePath
- the absolute path at which will be located the file.
public SilverpeasFile newSilverpeasFile(SilverpeasFileDescriptor descriptor)
SilverpeasFile
instance for the file described by the specified file
descriptor. If the file already exists, it is this file that will be returned. No chain of pre
and post processing are performed against the new Silverpeas file.
descriptor
- a descriptor of a SilverpeasFile.
public SilverpeasFile getSilverpeasFile(SilverpeasFileDescriptor descriptor)
SilverpeasFile
instance matching the description provided by the specified
file descriptor.
A chain of pre and post file processing will be performed against the file
to retrieve; in this case, the returned file can be a modified version of the targeted file:
descriptor
- a descriptor of a SilverpeasFile.
public SilverpeasFile getSilverpeasFile(String absolutePath)
SilverpeasFile
instance for the file located at the specified absolute path.
A chain of pre and post file processing will be performed against the file
to retrieve; in this case, the returned file can be a modified version of the targeted file:
absolutePath
- the absolute path of a file.
public void addProcessor(SilverpeasFileProcessor processor)
SilverpeasFileProcessor.getPriority()
method.
SilverpeasFileProcessor
processor
- a SilverpeasFile processor to add.protected static SilverpeasFile processAfter(SilverpeasFile file, SilverpeasFileProcessor.ProcessingContext context)
file
- the Silverpeas file on which the post-processors will work.context
- the file operation context.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |