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

## oracle.ifs.beans
Class FolderPathResolver

    java.lang.Object
      oracle.ifs.beans.FolderPathResolver

All Implemented Interfaces:
  java.lang.Cloneable

    public final class FolderPathResolver

extends java.lang.Object
implements java.lang.Cloneable

The `FolderPathResolver` class is used for tracking the current directory while navigating around in a folder tree. It can also be used for finding PublicObjects in a folder tree hierarchy.

It is able to find a PublicObject using the absolute path or a relative path. It understands wildcards, folder delimiters, and illegal characters within an absolute path.

For ease in folder navigation, one can set the "root" and "home" folders.

(Published)

Field Summary
`static java.lang.String` | `CURRENT_DIRECTORY_TOKEN` The "current directory" token.
`static java.lang.String` | `FOLDER_DELIMITER` The default folder path delimiter.
`protected Folder` | `m_CurrentDirectory` The Folder representing the current directory
`protected java.lang.String` | `m_CurrentPath` The String representing the current directory.
`protected java.lang.String` | `m_Delim` used to maintain the path Strings as up-to-date as possible costs one string compare
`protected boolean` | `m_IsRootTopDirectory` Is the Root Folder the top directory?
`protected IfsObjectResolver` | `m_LookupResolver` the lookup handler
`protected Folder` | `m_RootFolder` The Folder representing the root directory.
`protected LibrarySession` | `m_Session` The current session
`protected Folder` | `m_TopDirectory` The Folder representing the top directory
`protected java.lang.String` | `m_TopPath` The String representing the top directory.
`static char` | `MATCH_ALL` The character used as the wildcard to match any (0 or more) characters.
`static char` | `MATCH_ONE` The character used as the wildcard to match any single character.
`protected static char[]` | `s_IllegalCharacterSet` illegal filename chars and legal delimiter chars
`protected static char[]` | `s_LegalDelimiters` legal delimiters
`static java.lang.String` | `UP_DIRECTORY_TOKEN` The "change directory UP one level" token.

Constructor Summary
`FolderPathResolver(LibrarySession session)` default constructor.

Method Summary
`static void` | `assertLegalDelimiter(java.lang.String delimiter)` checks to make sure delimiter is a legal delimitier
`static boolean` | `containsWildcard(java.lang.String s)` Checks whether folder path contains any wildcards.
`static java.lang.String` | `exchangeDelimiters(java.lang.String path, java.lang.String oldDelim, java.lang.String newDelim)` used to adapt paths to a change in the LibrarySession.getFolderPathDelimiter
`static PublicObject[]` | `filterItems(PublicObject[] pos, java.lang.String match)` Performs wildcard filtering of Folder.getItems() wildcard matching
`PublicObject` | `findPublicObjectByPath(java.lang.String path)` Returns the PublicObject for which the path specifies.
`java.lang.String` | `getAbsolutePath(java.lang.String relativePath)` Gets the absolute path from a realtive path
`Folder` | `getCurrentDirectory()` Get the current directory in effect.
`protected static java.lang.String` | `getCurrentLocationEmbedded(java.lang.String delim)` defaults to "/./"
`protected static java.lang.String` | `getCurrentLocationPrefix(java.lang.String delim)` defaults to "./"
`java.lang.String` | `getCurrentPath()` Get the current file path in effect.
`static char[]` | `getIllegalPathCharacters()` Get the illegal path characters.
`static char[]` | `getLegalPathDelimiters()` Get the legal path delimiters.
`Folder` | `getTopDirectory()` Get the top directory in effect.
`java.lang.String` | `getTopPath()` Get the top file path in effect.
`static boolean` | `isLegalDelimiter(java.lang.String delimiter)` checks to make sure delimiter is a legal delimitier
`void` | `setCurrentDirectory(Folder folder)` Sets the current path to the specified Folder's path
`void` | `setHomeFolder()` Change current folder to a home folder for the current user.
`void` | `setHomeFolder(DirectoryUser user)` Set current folder to the home folder of a specified directory user
`void` | `setHomeFolder(java.lang.String username)` Change current folder to a home folder for a specified user.
`void` | `setHomeFolder(java.lang.String username, java.lang.String anonymousUsername, boolean robust)` Change current folder to a home folder for a specified user.
`void` | `setRelativePath(java.lang.String path)` Change current folder to relative path
`void` | `setRootFolder()` Change current folder to the Root Folder
`void` | `setRootFolder(Folder root)` Change current folder to the Root Folder

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

Field Detail

### s_IllegalCharacterSet

    protected static final char[] s_IllegalCharacterSet

  Description copied from class: `FolderPathResolver`
  illegal filename chars and legal delimiter chars

  (Unpublished)

### s_LegalDelimiters

    protected static final char[] s_LegalDelimiters

  Description copied from class: `FolderPathResolver`
  legal delimiters

  (Unpublished)

### UP_DIRECTORY_TOKEN

    public static final java.lang.String UP_DIRECTORY_TOKEN

  Description copied from class: `FolderPathResolver`
  The "change directory UP one level" token.

  See Also:
    Constant Field Values
  (Published)

### CURRENT_DIRECTORY_TOKEN

    public static final java.lang.String CURRENT_DIRECTORY_TOKEN

  Description copied from class: `FolderPathResolver`
  The "current directory" token.

  See Also:
    Constant Field Values
  (Published)

### FOLDER_DELIMITER

    public static final java.lang.String FOLDER_DELIMITER

  Description copied from class: `FolderPathResolver`
  The default folder path delimiter.

  See Also:
    Constant Field Values
  (Published)

### MATCH_ALL

    public static final char MATCH_ALL

  Description copied from class: `FolderPathResolver`
  The character used as the wildcard to match any (0 or more) characters.

  See Also:
    Constant Field Values
  (Published)

### MATCH_ONE

    public static final char MATCH_ONE

  Description copied from class: `FolderPathResolver`
  The character used as the wildcard to match any single character.

  See Also:
    Constant Field Values
  (Published)

### m_Delim

    protected java.lang.String m_Delim

  Description copied from class: `FolderPathResolver`
  used to maintain the path Strings as up-to-date as possible costs one string compare

  (Unpublished)

### m_Session

    protected LibrarySession m_Session

  Description copied from class: `FolderPathResolver`
  The current session

  (Unpublished)

### m_LookupResolver

    protected IfsObjectResolver m_LookupResolver

  Description copied from class: `FolderPathResolver`
  the lookup handler

  (Unpublished)

### m_CurrentPath

    protected java.lang.String m_CurrentPath

  Description copied from class: `FolderPathResolver`
  The String representing the current directory.

  (Unpublished)

### m_TopPath

    protected java.lang.String m_TopPath

  Description copied from class: `FolderPathResolver`
  The String representing the top directory.

  (Unpublished)

### m_RootFolder

    protected Folder m_RootFolder

  Description copied from class: `FolderPathResolver`
  The Folder representing the root directory.

  (Unpublished)

### m_CurrentDirectory

    protected Folder m_CurrentDirectory

  Description copied from class: `FolderPathResolver`
  The Folder representing the current directory

  (Unpublished)

### m_TopDirectory

    protected Folder m_TopDirectory

  Description copied from class: `FolderPathResolver`
  The Folder representing the top directory

  (Unpublished)

### m_IsRootTopDirectory

    protected boolean m_IsRootTopDirectory

  Description copied from class: `FolderPathResolver`
  Is the Root Folder the top directory?

  (Unpublished)

Constructor Detail

### FolderPathResolver

    public FolderPathResolver(LibrarySession session)
                       throws IfsException

  default constructor.

  Parameters:
    `session` - LibrarySession the session
  Throws:
    `IfsException` - if operation fails.
  (Published)

Method Detail

### getIllegalPathCharacters

    public static char[] getIllegalPathCharacters()

  Description copied from class: `FolderPathResolver`
  Get the illegal path characters. This currently returns: {'\\', '/', ':', '*', '?', '"', '<', '>', '|'}

  Returns:
    an array of the illegal path characters
  (Published)

### getLegalPathDelimiters

    public static char[] getLegalPathDelimiters()

  Description copied from class: `FolderPathResolver`
  Get the legal path delimiters.

  Returns:
    an array of the legal path delimiters
  (Published)

### getCurrentPath

    public java.lang.String getCurrentPath()
                                    throws IfsException

  Description copied from class: `FolderPathResolver`
  Get the current file path in effect.

  Returns:
    the current file path
  Throws:
    `IfsException` - if operation fails.
  (Published)

### getTopPath

    public java.lang.String getTopPath()
                                throws IfsException

  Description copied from class: `FolderPathResolver`
  Get the top file path in effect.

  Returns:
    the top file path
  Throws:
    `IfsException` - if operation fails.
  (Published)

### getCurrentDirectory

    public Folder getCurrentDirectory()
                               throws IfsException

  Description copied from class: `FolderPathResolver`
  Get the current directory in effect.

  Returns:
    the current directory Folder object
  Throws:
    `IfsException` - if operation fails.
  (Published)

### getTopDirectory

    public Folder getTopDirectory()
                           throws IfsException

  Description copied from class: `FolderPathResolver`
  Get the top directory in effect.

  Returns:
    the top directory Folder object
  Throws:
    `IfsException` - if operation fails.
  (Published)

### setRootFolder

    public void setRootFolder()
                       throws IfsException

  Description copied from class: `FolderPathResolver`
  Change current folder to the Root Folder

  Throws:
    `IfsException` - if operation fails.
  (Published)

### setRootFolder

    public void setRootFolder(Folder root)
                       throws IfsException

  Description copied from class: `FolderPathResolver`
  Change current folder to the Root Folder

  Parameters:
    `root` - Folder that acts as the root
  Throws:
    `IfsException` - if operation fails.
  (Published)

### setHomeFolder

    public void setHomeFolder()
                       throws IfsException

  Description copied from class: `FolderPathResolver`
  Change current folder to a home folder for the current user.

  Throws:
    `IfsException` - if operation fails.
  (Published)

### setHomeFolder

    public void setHomeFolder(java.lang.String username)
                       throws IfsException

  Description copied from class: `FolderPathResolver`
  Change current folder to a home folder for a specified user.

  Throws:
    `IfsException` - if operation fails.
  (Published)

### setHomeFolder

    public void setHomeFolder(DirectoryUser user)
                       throws IfsException

  Description copied from class: `FolderPathResolver`
  Set current folder to the home folder of a specified directory user

  Throws:
    `IfsException` - if operation fails.
  (Published)

### setHomeFolder

    public void setHomeFolder(java.lang.String username,
                              java.lang.String anonymousUsername,
                              boolean robust)
                       throws IfsException

  Description copied from class: `FolderPathResolver`
  Change current folder to a home folder for a specified user. if robust then: 1. the user's home folder, provided that there's a reachable path to it and the user isn't anonymous. 2. if none, set to the Folder referenced by the ValueDefault IFS.REPOS.InitialAnonymousFolder 3. If none, set to the anonymousUsername user's home folder 4. if none, set to the root folder

  Throws:
    `IfsException` - if operation fails.
  (Published)

### setCurrentDirectory

    public void setCurrentDirectory(Folder folder)
                             throws IfsException

  Description copied from class: `FolderPathResolver`
  Sets the current path to the specified Folder's path

  Throws:
    `IfsException` - if operation fails.
  (Published)

### getAbsolutePath

    public java.lang.String getAbsolutePath(java.lang.String relativePath)
                                     throws IfsException

  Description copied from class: `FolderPathResolver`
  Gets the absolute path from a realtive path

  Parameters:
    `relativePath` - can be absolute
  Throws:
    `IfsException`
  (Published)

### setRelativePath

    public void setRelativePath(java.lang.String path)
                         throws IfsException

  Description copied from class: `FolderPathResolver`
  Change current folder to relative path

  Throws:
    `IfsException` - if operation fails.
  (Published)

### findPublicObjectByPath

    public PublicObject findPublicObjectByPath(java.lang.String path)
                                        throws IfsException

  Description copied from class: `FolderPathResolver`
  Returns the PublicObject for which the path specifies. If the path ends in the folderpath delimiter then the PublicObject is a Folder or FolderLink.

  Returns:
    the PublicObject for which the path specifies.
  Throws:
    `IfsException` - if operation fails.
  (Published)

### containsWildcard

    public static boolean containsWildcard(java.lang.String s)
                                    throws IfsException

  Description copied from class: `FolderPathResolver`
  Checks whether folder path contains any wildcards.

  Returns:
    TRUE if any wildcards are found
  Throws:
    `IfsException`
  (Published)

### filterItems

    public static PublicObject[] filterItems(PublicObject[] pos,
                                             java.lang.String match)
                                      throws IfsException

  Description copied from class: `FolderPathResolver`
  Performs wildcard filtering of Folder.getItems() wildcard matching

  Parameters:
    `pos` - PublicObjects the objects to filter through
    `match` - the wildcard string to match
  Returns:
    the PublicObjects which pass through the wildcard filter.
  Throws:
    `IfsException`
  (Unpublished)

### exchangeDelimiters

    public static java.lang.String exchangeDelimiters(java.lang.String path,
                                                      java.lang.String oldDelim,
                                                      java.lang.String newDelim)

  Description copied from class: `FolderPathResolver`
  used to adapt paths to a change in the LibrarySession.getFolderPathDelimiter

  (Unpublished)

### getCurrentLocationPrefix

    protected static java.lang.String getCurrentLocationPrefix(java.lang.String delim)

  Description copied from class: `FolderPathResolver`
  defaults to "./"

  (Unpublished)

### getCurrentLocationEmbedded

    protected static java.lang.String getCurrentLocationEmbedded(java.lang.String delim)

  Description copied from class: `FolderPathResolver`
  defaults to "/./"

  (Unpublished)

### assertLegalDelimiter

    public static void assertLegalDelimiter(java.lang.String delimiter)
                                     throws IfsException

  Description copied from class: `FolderPathResolver`
  checks to make sure delimiter is a legal delimitier

  Throws:
    `IfsException` - if delimiter is not legal
  (Unpublished)

### isLegalDelimiter

    public static boolean isLegalDelimiter(java.lang.String delimiter)
                                    throws IfsException

  Description copied from class: `FolderPathResolver`
  checks to make sure delimiter is a legal delimitier

  Throws:
    `if` - operation fails
    `IfsException`
  (Unpublished)

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