Sun Adapter for SAG API

com.stc.connector.sagadapter.namepattern
Class SAGFileNameFinder

java.lang.Object
  extended by com.stc.connector.sagadapter.namepattern.SAGFileNameFinder

public class SAGFileNameFinder
extends java.lang.Object

It searches directory regular expression and file name regular expression and finds the matched full file name. SAG e*Way supports this feature in FileAct only if the file is addressable and accessable from JavaCAPS logicalhost JVM and swift file handler. For example, that is the case if SAG e*Way is configured to "Use Remote File Handler".

Version:
cvs revision: $Revision: 1.4 $ Last Modified: $Date: 2007/10/19 19:48:39 $
Author:
Harry Liu (harry.liu@sun.com)

Field Summary
static java.lang.String version
           
 
Constructor Summary
SAGFileNameFinder(java.lang.String dir, boolean dirIsRegex, java.lang.String file, boolean fileIsRegex)
          Constructor.
 
Method Summary
 java.lang.String[] findAllFullFileNames()
          Searches the dir and file name regular expressions and finds all matched full file names.
 java.lang.String findFirstFullFileName()
          Finds the first matching file name based on the directory regular expression and the file regular expression.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static final java.lang.String version
See Also:
Constant Field Values
Constructor Detail

SAGFileNameFinder

public SAGFileNameFinder(java.lang.String dir,
                         boolean dirIsRegex,
                         java.lang.String file,
                         boolean fileIsRegex)
Constructor.

Parameters:
dir - Directory name
dirIsRegex - true or false
file - File name
fileIsRegex - true or false
Method Detail

findFirstFullFileName

public java.lang.String findFirstFullFileName()
                                       throws java.io.IOException
Finds the first matching file name based on the directory regular expression and the file regular expression. If both dir and file names are literal, the literal full name will be constructed directly based on the original inputs and returned without matching attempt.

Returns:
The the first matched full file name; Returns null if no matching file.
Throws:
java.io.IOException - up on error

findAllFullFileNames

public java.lang.String[] findAllFullFileNames()
                                        throws java.io.IOException
Searches the dir and file name regular expressions and finds all matched full file names. If both dir and file names are literal, the literal full name will be constructed directly based on the original inputs and returned without matching attempt.

Returns:
The list of all full file names; Returns null if no matching file.
Throws:
java.io.IOException - up on error

Sun Adapter for SAG API

Copyright © 2008 Sun Microsystems, Inc. All rights reserved.