dke.smwp.db
Class DB_IFS_Document

java.lang.Object
  |
  +--dke.smwp.db.DB_IFS_Document

public class DB_IFS_Document
extends java.lang.Object

Version:
1.0
Author:
Werner Enser

Field Summary
private static java.lang.String IFS_SCHEMA_PASSWORD
           
private static java.lang.String IFS_SERVICE_NAME
           
private static java.lang.String IFS_USER_NAME
           
private static java.lang.String IFS_USER_PASSWORD
           
 
Constructor Summary
DB_IFS_Document()
          default constructor
 
Method Summary
 void deleteDocument(java.lang.String systemId)
          delete ifs document designated by systemId
 void deleteDocument(java.lang.String fileName, java.lang.String[] folderNames)
          delete ifs document designated by fileName and folderNames
 java.lang.String getFileNameOfPath(java.lang.String systemId)
          parses the systemId String and returns its file name
 java.lang.String[] getFolderNamesOfPath(java.lang.String systemId)
          parses the systemId String and returns its folder names;
static void main(java.lang.String[] args)
           
 java.io.InputStream readDocument(java.lang.String systemId)
          reads document designated by systemId
 java.io.InputStream readDocument(java.lang.String fileName, java.lang.String[] folderNames)
          reads ifs document designated by fileName and folderNames
 void saveDocuemnt(java.lang.String systemId, java.io.Reader fileContentReader)
          saves ifs document designated by systemId
 void saveDocument(java.lang.String systemId, java.io.InputStream fileContentStream)
          saves ifs document designated by systemId
 void saveDocument(java.lang.String systemId, java.lang.String fileContent)
          saves ifs document designated by systemId and folderNames with following content fileContent
 void saveDocument(java.lang.String fileName, java.lang.String[] folderNames, java.io.InputStream fileContentStream)
          saves ifs document designated by systemId and folderNames with following content fileContentStream
 void saveDocument(java.lang.String fileName, java.lang.String[] folderNames, java.io.Reader fileContentReader)
          saves ifs document designated by systemId and folderNames with following content fileContentReader;
 void saveDocument(java.lang.String fileName, java.lang.String[] folderNames, java.lang.String fileContent)
          saves ifs document designated by systemId and folderNames with following content fileContent;
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

IFS_USER_NAME

private static java.lang.String IFS_USER_NAME

IFS_USER_PASSWORD

private static java.lang.String IFS_USER_PASSWORD

IFS_SERVICE_NAME

private static java.lang.String IFS_SERVICE_NAME

IFS_SCHEMA_PASSWORD

private static java.lang.String IFS_SCHEMA_PASSWORD
Constructor Detail

DB_IFS_Document

public DB_IFS_Document()
default constructor
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args -  
Throws:
IfsException -  

deleteDocument

public void deleteDocument(java.lang.String systemId)
delete ifs document designated by systemId
Parameters:
systemId - filename and path (f.e. /users/subfolder/users_name.xml)
Throws:
IfsException - ifs file deletion failed

deleteDocument

public void deleteDocument(java.lang.String fileName,
                           java.lang.String[] folderNames)
delete ifs document designated by fileName and folderNames
Parameters:
fileName - name of file which is to be deleted
folderNames - array of foldernames
Throws:
IfsException - ifs file deletion failed

readDocument

public java.io.InputStream readDocument(java.lang.String systemId)
reads document designated by systemId
Parameters:
systemId - filename and path (f.e. /users/subfolder/users_name.xml)
Returns:
InputStream of document which was read;
Throws:
IfsException - ifs file not found;

readDocument

public java.io.InputStream readDocument(java.lang.String fileName,
                                        java.lang.String[] folderNames)
reads ifs document designated by fileName and folderNames
Parameters:
fileName - name of file which is to be deleted
folderNames - array of foldernames, in which the file resides
Returns:
InputStream of document which was read;
Throws:
IfsException - ifs file not found

saveDocument

public void saveDocument(java.lang.String systemId,
                         java.io.InputStream fileContentStream)
saves ifs document designated by systemId
Parameters:
systemId - string containing folder and file information i.e. /users/Users_name.xml
fileContentStream - file content
Throws:
IfsException - ifs document creation failed

saveDocuemnt

public void saveDocuemnt(java.lang.String systemId,
                         java.io.Reader fileContentReader)
saves ifs document designated by systemId
Parameters:
systemId - String containing folder and file information i.e. /users/Users_name.xml
fileContentReader - file content
Throws:
IfsException - ifs document creation failed

saveDocument

public void saveDocument(java.lang.String fileName,
                         java.lang.String[] folderNames,
                         java.io.InputStream fileContentStream)
saves ifs document designated by systemId and folderNames with following content fileContentStream
Parameters:
fileName - name of the file which is to be created/updated
folderNames - name of the subfolder, in which the file is to be inserted
fileContentStream - content of the file
Throws:
IfsException - ifs document creation failed

saveDocument

public void saveDocument(java.lang.String fileName,
                         java.lang.String[] folderNames,
                         java.io.Reader fileContentReader)
saves ifs document designated by systemId and folderNames with following content fileContentReader;
Parameters:
fileName - name of the file which is to be created/updated
folderNames - name of the subfolder hierarchie, in which the file is to be inserted
fileContentReader - content of the file
Throws:
IfsException - ifs document creation failed

saveDocument

public void saveDocument(java.lang.String systemId,
                         java.lang.String fileContent)
saves ifs document designated by systemId and folderNames with following content fileContent
Parameters:
systemId - String containing folder and file information; i.e. /users/Users_name.xml
fileContent - content of the file which is to be saved
Throws:
IfsException - ifs document creation failed

saveDocument

public void saveDocument(java.lang.String fileName,
                         java.lang.String[] folderNames,
                         java.lang.String fileContent)
saves ifs document designated by systemId and folderNames with following content fileContent;
Parameters:
fileName - name of the file which is to be created/updated
folderNames - name of the subfolder hierarchy, in which the file is to be inserted
fileContent - content of the file
Throws:
IfsException -  

getFolderNamesOfPath

public java.lang.String[] getFolderNamesOfPath(java.lang.String systemId)
parses the systemId String and returns its folder names;
Parameters:
systemId - filename and path of file (f.e. /users/subfolder/users_name.xml)
Returns:
array folder names, defining folder hierarchy

getFileNameOfPath

public java.lang.String getFileNameOfPath(java.lang.String systemId)
parses the systemId String and returns its file name
Parameters:
systemId - filename and path of file (f.e. /users/subfolder/users_name.xml)
Returns:
filename