Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fujitsu.iflow.common.wfapp
Class WFAppUtil

    java.lang.Object
      com.fujitsu.iflow.common.wfapp.WFAppUtil

public class WFAppUtil
extends java.lang.Object

WFAppUtil is the utility class used for workflow application packager and installer.

Constructor Summary
`WFAppUtil()`

Method Summary
`static WFAppManifest` | `checkFilesWithBPM(WFAppManifest manifest, java.lang.String type)` Checks the existance of server side files based on manifest.
`static boolean` | `deleteDir(java.io.File dir)` Deletes a directory.
`static void` | `exportFilesFromBPM(WFAppManifest manifest, java.lang.String type)` Exports the server side files based on manifest.
`static java.util.Enumeration` | `getChildElements(org.w3c.dom.Element from)` Returns a list of child elements.
`static void` | `importFilesIntoBPM(WFAppManifest manifest, java.lang.String type)` Imports the server side files based on manifest.
`static void` | `rewritePattern(java.io.File file, java.util.Hashtable mapping)` Rewrites substrings inside the specified file.
`static java.lang.String` | `rewritePattern(java.lang.String str, java.util.Hashtable mapping)` Looks up a particular pattern in a string and replaces it with the new pattern.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### WFAppUtil

    public WFAppUtil()

Method Detail

### rewritePattern

    public static java.lang.String rewritePattern(java.lang.String str,
                                                  java.util.Hashtable mapping)
                                           throws IflowException

  Looks up a particular pattern in a string and replaces it with the new pattern.

  Parameters:
    `str` - The string the changes have to be made within.
    `mapping` - The hashtable containing the patterns that have to be substituted as well as the ones they have to be substituted with. The pattern that is looked for within the string is the key value of the hashtable-entry.
  Returns:
    The string where the old patterns are replaced by the new ones.
  Throws:
    `IflowException`

### rewritePattern

    public static void rewritePattern(java.io.File file,
                                      java.util.Hashtable mapping)
                               throws IflowException

  Rewrites substrings inside the specified file.

  Parameters:
    `file` - The file.
    `mapping` - The hash table that maps old pattern into new pattern.
  Throws:
    `IflowException`

### importFilesIntoBPM

    public static void importFilesIntoBPM(WFAppManifest manifest,
                                          java.lang.String type)
                                   throws IflowException

  Imports the server side files based on manifest.

  Parameters:
    `manifest` - The manifest.
    `type` - The application file type.
  Throws:
    `IflowException`

### exportFilesFromBPM

    public static void exportFilesFromBPM(WFAppManifest manifest,
                                          java.lang.String type)
                                   throws IflowException

  Exports the server side files based on manifest.

  Parameters:
    `manifest` - The manifest.
    `type` - The application file type.
  Throws:
    `IflowException`

### checkFilesWithBPM

    public static WFAppManifest checkFilesWithBPM(WFAppManifest manifest,
                                                  java.lang.String type)
                                           throws IflowException

  Checks the existance of server side files based on manifest.

  Parameters:
    `manifest` - The manifest.
    `type` - The application file type.
  Returns:
    The updated manifest.
  Throws:
    `IflowException`

### getChildElements

    public static java.util.Enumeration getChildElements(org.w3c.dom.Element from)

  Returns a list of child elements.

  Parameters:
    `from` - A Node/Element from which we want to get all the child elements.
  Returns:
    An Enumeration of Element objects.

### deleteDir

    public static boolean deleteDir(java.io.File dir)

  Deletes a directory.

  Parameters:
    `dir` - The directory.
  Returns:
    `true` or `false`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD