Author: ffang
Date: Sat Aug 16 04:21:21 2008
New Revision: 686478
URL: http://svn.apache.org/viewvc?rev=686478&view=rev
Log:
[SM-1512]update file component generated reference docs
Modified:
servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileComponent.java
servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java
servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java
Modified:
servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileComponent.java
URL:
http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileComponent.java?rev=686478&r1=686477&r2=686478&view=diff
==============================================================================
---
servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileComponent.java
(original)
+++
servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileComponent.java
Sat Aug 16 04:21:21 2008
@@ -32,7 +32,7 @@
* A file based component
*
* @version $Revision$
- * @org.apache.xbean.XBean element="component" description="File Component"
+ * @org.apache.xbean.XBean element="component" description="a JBI component
that interacts with the file system. It hosts endpoints that reads data from
and writes data to the file system."
*/
public class FileComponent extends DefaultComponent {
@@ -42,6 +42,12 @@
return endpoints;
}
+ /**
+ * Sets the list of endpoint managed by the component.
+ *
+ * @param endpoints an array of <code>FileEndpointType</code> objects
+ * @org.apache.xbean.Property description="a list of beans defining the
endpoints hosted by the component"
+ */
public void setEndpoints(FileEndpointType[] endpoints) {
this.endpoints = endpoints;
}
Modified:
servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java
URL:
http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java?rev=686478&r1=686477&r2=686478&view=diff
==============================================================================
---
servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java
(original)
+++
servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FilePollerEndpoint.java
Sat Aug 16 04:21:21 2008
@@ -121,20 +121,32 @@
// Properties
//-------------------------------------------------------------------------
+ /**
+ * Returns the file the endpoint polls.
+ *
+ * @return the <code>File</code> object for the file being polled
+ */
public File getFile() {
return file;
}
/**
- * Sets the file to poll, which can be a directory or a file.
+ * Specifies the file to be polled. This can be a directory or a file.
+ * If it is a directory, all files in the directory, or its
+ * subdirectories, will be processed by the endpoint. If it is a file,
olny
+ * files matching the filename will be processed.
*
- * @param file
+ * @param file a <code>File</code> object representing the directory or
file to poll
+ * @org.apache.xbean.Property description="the relative path of the file
to poll. This can be a directory or a file. If it is a directory, all files in
the directory, or its subdirectories, will be processed by the endpoint. If it
is a file, olny files matching the filename will be processed."
*/
public void setFile(File file) {
this.file = file;
}
/**
+ * Returns the object used to manage the endpoint's file locking
+ * strategy.
+ *
* @return the lockManager
*/
public LockManager getLockManager() {
@@ -142,18 +154,33 @@
}
/**
- * @param lockManager the lockManager to set
+ * Specifies a class that implements the locking strategy used by
+ * the endpoint. This class must be an implementation of the
+ * <code>org.apache.servicemix.locks.LockManager</code> interface.
+ *
+ * @param lockManager the <code>LockManager</code> implementation to use
+ * @org.apache.xbean.Property description="the bean defining the class
implementing the file locking strategy"
*/
public void setLockManager(LockManager lockManager) {
this.lockManager = lockManager;
}
+ /**
+ * Returns the object implementing the endpoint's file filter.
+ *
+ * @return the file filer
+ */
public FileFilter getFilter() {
return filter;
}
/**
- * Sets the optional filter to choose which files to process
+ * Specifies a class that implements the filtering logic used to
+ * choose which files to process. This class must be an
+ * implementation of the <code>java.io.FileFilter</code> interface.
+ *
+ * @param filter a <code>FileFilter</code> implementation defining
the endpoints filtering logic
+ * @org.apache.xbean.Property description="the bean defining the
class implementing the file filtering strategy"
*/
public void setFilter(FileFilter filter) {
this.filter = filter;
@@ -166,43 +193,92 @@
return deleteFile;
}
+ /**
+ * Specifiedsif the endpoint should delete a file after it is
+ * consumed. The default is true.
+ *
+ * @param deleteFile a boolean specifying if the file should be
deleted
+ * @org.apache.xbean.Property description="specifies if files are
deleted after the endpoint processes them. The defualt is <code>true</code>."
+ */
public void setDeleteFile(boolean deleteFile) {
this.deleteFile = deleteFile;
}
+ /**
+ * Returns wheter the endpoint should poll subdirectories.
+ */
public boolean isRecursive() {
return recursive;
}
+ /**
+ * Specifies if the endpoint should poll the subdirectories of the
+ * directory being polled. Setting this to false means that the
+ * endpoint will only poll the specified directory for files. If
the
+ * endpoint is polling for a specific file, this property is
ignored.
+ *
+ * @param recursive a boolen specifying if subdirectories should be
polled
+ * @org.apache.xbean.Property description="specifies if
subdirectories are polled. The defualt is <code>true</code>."
+ */
public void setRecursive(boolean recursive) {
this.recursive = recursive;
}
+ /** Returns wheter the endpoint should create the directory being polled
+ * if it does not exist.
+ */
public boolean isAutoCreateDirectory() {
return autoCreateDirectory;
}
+ /**
+ * Specifies if the endpoint should create the directory it is
+ * configured to poll if it does not exist. If you set this to
+ * <code>false</code> and the directory does not exist, the
endpoint
+ * will not do anything.
+ *
+ * @param autoCreateDirectory a boolean specifying if the endpoint
creates directories
+ * @org.apache.xbean.Property description="specifies if directories
are created. The defualt is <code>true</code>."
+ */
public void setAutoCreateDirectory(boolean autoCreateDirectory) {
this.autoCreateDirectory = autoCreateDirectory;
}
+ /**
+ * Returns the object responsible for marshaling files into the NMR.
+ */
public FileMarshaler getMarshaler() {
return marshaler;
}
+ /**
+ * Specifies a <code>FileMarshaler</code> object that will marshal
+ * file data into the NMR. The default file marshaller can read
+ * valid XML data. <code>FileMarshaler</code> objects are
+ * implementations of
+ * <code>org.apache.servicemix.components.util.FileMarshaler</code>.
+ *
+ * @param marshaler a <code>FileMarshaler</code> object that can
read data from the file system
+ * @org.apache.xbean.Property description="the bean defining the
class used to marshal data from the file system"
+ */
public void setMarshaler(FileMarshaler marshaler) {
this.marshaler = marshaler;
}
+ /**
+ * Returns the file representing the location where processed files
+ * are archived.
+ */
public File getArchive() {
return archive;
}
/**
- * Configure a directory to archive files before deleting them.
- *
- * @param archive the archive directory
- */
+ * Specifies a directory to which processed files are archived.
+ *
+ * @param archive a <code>File</code> object for the archive
directory
+ * @org.apache.xbean.Property description="the relative path of the
directory where processed files will be archived"
+ */
public void setArchive(File archive) {
this.archive = archive;
}
Modified:
servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java
URL:
http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java?rev=686478&r1=686477&r2=686478&view=diff
==============================================================================
---
servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java
(original)
+++
servicemix/components/bindings/servicemix-file/trunk/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java
Sat Aug 16 04:21:21 2008
@@ -27,7 +27,7 @@
import org.apache.servicemix.components.util.FileMarshaler;
/**
- * An endpoint which receives a message and writes the content to a file.
+ * An endpoint which receives messages from the NMR and writes the message to
the file system.
*
* @org.apache.xbean.XBean element="sender"
*
@@ -110,52 +110,125 @@
// Properties
//-------------------------------------------------------------------------
+
+ /**
+ * Returns the <code>File</code> object for the directory where the
+ * endpoint writes files.
+ */
public File getDirectory() {
return directory;
}
+ /**
+ * Specifies the directory where the endpoint writes files.
+ *
+ * @param directory a <code>File</code> object representing the
directory
+ * @org.apache.xbean.Property description="the relative path of the
directory to which the endpoint writes files"
+ */
public void setDirectory(File directory) {
this.directory = directory;
}
+ /**
+ * Returns the object responsible for marshaling message data into
+ * files.
+ */
public FileMarshaler getMarshaler() {
return marshaler;
}
+ /**
+ * Specifies a <code>FileMarshaler</code> object that will marshal
+ * message data from the NMR into a file. The default file
+ * marshaller can write valid XML data. <code>FileMarshaler</code>
+ * objects are implementations of
+ * <code>org.apache.servicemix.components.util.FileMarshaler</code>.
+ *
+ * @param marshaler a <code>FileMarshaler</code> object that can
write message data to the file system
+ * @org.apache.xbean.Property description="the bean defining the
class used to marshal messages to the file system"
+ */
public void setMarshaler(FileMarshaler marshaler) {
this.marshaler = marshaler;
}
+ /**
+ * Returns the string attached to the begining of generated
temporary
+ * file names.
+ */
public String getTempFilePrefix() {
return tempFilePrefix;
}
+ /**
+ * Specifies a string to attach to the begining of generated
+ * temporary file names. Temporary file names are generated when
the
+ * endpoint cannot determine the name of the file from the message.
+ *
+ * @param tempFilePrefix a string to prefix to generated file names
+ * @org.apache.xbean.Property description="a string that will be
attached to the begining of any temporary file names. Temporary file names are
generated when the endpoint cannot determine the name of the file from the
message data."
+ */
public void setTempFilePrefix(String tempFilePrefix) {
this.tempFilePrefix = tempFilePrefix;
}
+ /**
+ * Returns the string attached to the end of generated temporary
+ * file names.
+ */
public String getTempFileSuffix() {
return tempFileSuffix;
}
+ /**
+ * Specifies a string to append to generated temporary file names.
+ * Temporary file names are generated when the endpoint cannot
+ * determine the name of the file from the message.
+ *
+ * @param tempFileSuffix a string to append to generated file names
+ * @org.apache.xbean.Property description="a string that will be
appended to any temporary file names. Temporary file names are generated when
the endpoint cannot determine the name of the file from the message data."
+ */
public void setTempFileSuffix(String tempFileSuffix) {
this.tempFileSuffix = tempFileSuffix;
}
+ /** Returns wheter the endpoint should create the target directory
+ * if it does not exist.
+ */
public boolean isAutoCreateDirectory() {
return autoCreateDirectory;
}
+ /**
+ * Specifies if the endpoint should create the target directory if
+ * it does not exist. If you set this to
+ * <code>false</code> and the directory does not exist, the
endpoint
+ * will not do anything.
+ *
+ * @param autoCreateDirectory a boolean specifying if the endpoint
creates directories
+ * @org.apache.xbean.Property description="specifies if directories
are created. The defualt is <code>true</code>."
+ */
public void setAutoCreateDirectory(boolean autoCreateDirectory) {
this.autoCreateDirectory = autoCreateDirectory;
}
+ /**
+ * Returns whether the endpoint will append data to an existing
file.
+ */
public boolean isAppend() {
return append;
}
+ /**
+ * Specifies if the endpoint appends data to existing files or if
+ * it will overwrite existing files. The default is for the
endpoint
+ * to overwrite existing files. Setting this to <code>true</code>
+ * instructs the endpoint to append data.
+ *
+ * @param append a boolean specifying if the endpoint appends data
to existing files
+ * @org.apache.xbean.Property description="specifies if data is
appended to existing files. The defualt is <code>false</code>."
+ */
public void setAppend(boolean append) {
this.append = append;
}
-}
+}
\ No newline at end of file