|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.extentech.ExtenXLS.eventui.swing.ExtenXLSFileHandler
public class ExtenXLSFileHandler
Governs all XLS/DOML file choosing and template operations
WizardPanel1, WizardPanel3| Field Summary | |
|---|---|
static byte |
CHOOSEEXISTINGXLS
|
static byte |
CREATEFROMTEMPLATE
|
static byte |
OPENEXISTINGRDF
|
| Constructor Summary | |
|---|---|
ExtenXLSFileHandler()
Default constructor retrieves resources from ExtenXLSMapperWizard.properties file |
|
| Method Summary | |
|---|---|
static boolean |
copy(java.io.File source,
java.io.File target)
Copy method, using FileChannel#transferTo NOTE: will overwrite existing files |
static boolean |
copyAskOverwrite(java.lang.String sourcefName,
java.lang.String targetfName)
|
java.lang.String |
getRDFName()
|
static java.lang.String |
getRelativePath(java.lang.String fname,
java.lang.String dir)
Utility to strip a file path of a specific directory, leaving the relative directory intact |
java.lang.String |
getRelativeRDFPath()
Returns the path relative to the working directory from the current rdfname |
XMLBeanNode |
getRootNode()
|
java.lang.String |
getTemplateNameFromRoot()
|
static java.lang.String |
getWorkingDir()
|
boolean |
initRootNode(boolean newrpt)
Takes rdfname with fully qualified path and creates a DataObject |
java.lang.String |
openFromServer()
Popups up a list of stored templates for the user (will prompt for a user name and password if none have already been defined) and allows selection from the list If selection is successful, will retrieve the XML bytes from the server and write the converted XLS to a temporary file (few!). |
java.lang.String |
openRDFFile()
Allows choosing of an existing DOML Filename. |
java.lang.String |
openRDFFileX()
Allows choosing of an existing DOML Filename WITHOUT working directory limitations Sets rdfname with fully qualified doml filename or "" if error/cancel |
java.lang.String |
openXLSFile()
allows selection of an existing XLS filename WITHOUT working directory restrictions |
java.lang.String |
openXLSFile(byte OpenType)
Retrieves an XLS file either from disk (OpenType=CHOOSEEXISTINGXLS) or creates a new XLS file from template (OpenType=CREATEFROMTEMPLATE). |
static java.nio.ByteBuffer |
readFile(java.lang.String fpath)
read in bytes from a file path. |
void |
reportError(java.lang.String errMsg,
java.lang.String title)
Fairly Generic Error Reporting |
void |
setParent(java.awt.Container parent)
|
boolean |
setRDFName(java.lang.String rdfname)
allows setting of an (existing) rdfname. |
void |
setWorkingDirectory(java.lang.String wdir)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte CREATEFROMTEMPLATE
public static final byte CHOOSEEXISTINGXLS
public static final byte OPENEXISTINGRDF
| Constructor Detail |
|---|
public ExtenXLSFileHandler()
| Method Detail |
|---|
public void setParent(java.awt.Container parent)
public XMLBeanNode getRootNode()
public java.lang.String openFromServer()
public java.lang.String openXLSFile()
public java.lang.String openXLSFile(byte OpenType)
Note rdfName is XLS file name with .DOML extension.
byte - OpenType, one of the predefined ExtenXLSFileHandler Open Types
public java.lang.String openRDFFileX()
public java.lang.String openRDFFile()
public void setWorkingDirectory(java.lang.String wdir)
public boolean setRDFName(java.lang.String rdfname)
public boolean initRootNode(boolean newrpt)
newrpt - truth of "DOML file has not been created yet"
public java.lang.String getRelativeRDFPath()
public java.lang.String getRDFName()
public java.lang.String getTemplateNameFromRoot()
public static java.lang.String getRelativePath(java.lang.String fname,
java.lang.String dir)
fname - file pathdir - directory to test
public static java.lang.String getWorkingDir()
public static boolean copy(java.io.File source,
java.io.File target)
throws java.io.IOException
File - sourceFile - target
java.io.IOException
public static boolean copyAskOverwrite(java.lang.String sourcefName,
java.lang.String targetfName)
throws java.io.IOException
java.io.IOException
public static java.nio.ByteBuffer readFile(java.lang.String fpath)
throws java.io.IOException
fpath -
java.io.IOException
public void reportError(java.lang.String errMsg,
java.lang.String title)
errMsg - title -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||