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

## oracle.ifs.adk.filesystem
Interface FileSystem

All Known Implementing Classes:
  IfsFileSystem

public interface FileSystem

The FileSystem Interface allows developers to perform basic file system tasks with iFS. Developers will expect to be able to copy, move, and delete documents...etc easily.

In addition to standard file system operations (such as copy, move, and delete), this interface expects some iFS-specific features that are at the core of our product (such as versioning and searching).

Method Summary
`void` | `addFolderRelationship(Folder folder, PublicObject po)` Create a reference between a Folder and a PublicObject, essentially placing the PublicObject inside the Folder.
`void` | `cancelCheckout(PublicObject po)` Cancel a checkout.
`DirectoryUser` | `checkedOutBy(PublicObject po)` Return the DirectoryUser who currently has PublicObject po checked out, or null if po is not checked out.
`void` | `checkIn(PublicObject po, java.lang.String comment)` Implements the check-in semantics.
`PublicObject` | `checkOut(PublicObject po, boolean makeVersioned)` Implements the check-out semantics.
`Folder` | `copy(Folder fromFolder, Folder toFolder, boolean recursive, AccessControlList acl)` Copy a Folder into another Folder.
`PublicObject` | `copy(PublicObject po, Folder folder, AccessControlList acl, boolean overwrite)` Copy the PublicObject po into the specified folder.
`Document` | `createDocument(java.lang.String name, java.io.InputStream content, java.lang.String folderPath, AccessControlList acl, boolean doParse, ParserCallback callback)` Create a Document in iFS.
`Folder` | `createFolder(java.lang.String name, Folder destfolder, boolean createParents, AccessControlList acl)` Create a Folder in iFS.
`void` | `delete(Folder folder, boolean recursive)` Delete a Folder.
`void` | `delete(PublicObject po)` Delete a PublicObject.
`PublicObject` | `findPublicObjectById(java.lang.Long id)` Returns the PublicObject having the specified `id`.
`PublicObject` | `findPublicObjectByPath(java.lang.String path)` Returns the PublicObject pointed to by `path`.
`AttributeValue` | `getAttribute(PublicObject po, java.lang.String attrName)` Return a specified attribute of a PublicObject.
`AttributeValue[]` | `getAttributes(PublicObject po, java.lang.String[] attrNames)` Return the specified attributes of a PublicObject.
`DirectoryUser` | `getCurrentUser()` Display the current user in the session.
`java.io.InputStream` | `getDocumentContent(Document doc)` Retrieve the content of a Document as a stream.
`VersionDescription[]` | `getHistory(PublicObject po)` Retrieve the revision history of the specified PublicObject.
`LibrarySession` | `getLibrarySession()` Return the LibrarySession object being used to communicate with iFS.
`Folder[]` | `getParents(PublicObject po)` Return a list of parent Folders that reference the specified PublicObject.
`boolean` | `isCheckedOut(PublicObject po)` Check to see if a PublicObject is currently checked out.
`boolean` | `isVersioned(PublicObject po)` Check to see if a PublicObject is versioned.
`PublicObject[]` | `listFolder(Folder folder, java.lang.String pattern)` Return the items of the specified folder whose names match `pattern`.
`PublicObject` | `makeVersioned(PublicObject po)` Convert an unversioned PublicObject into versioned PublicObject.
`PublicObject` | `move(Folder fromFolder, Folder toFolder, PublicObject po, java.lang.String newName, AccessControlList acl, boolean overwrite)` Move a PublicObject from `fromFolder` to `toFolder` with the new name `newName`; if specified.
`void` | `removeFolderRelationship(Folder folder, PublicObject po, boolean rmNoRef)` Removes the relationship between a Folder and a PublicObject.
`void` | `rename(PublicObject po, java.lang.String newName)` Rename a PublicObject.
`java.io.InputStream` | `renderAsStream(PublicObject po, java.lang.String rendererType, java.lang.String rendererName)` Render the object out as a stream.
`void` | `setAttribute(PublicObject po, java.lang.String name, AttributeValue value)` Set an attribute for a PublicObject in iFS.
`void` | `setAttributes(PublicObject po, java.lang.String[] names, AttributeValue[] values)` Set attributes for a PublicObject in iFS.
`void` | `setLibrarySession(LibrarySession session)` Set a new LibrarySession to communicate with iFS.
`Document` | `updateDocument(java.lang.String name, java.io.InputStream content, java.lang.String folderPath, AccessControlList acl, boolean doParse, ParserCallback callback)` Update a document in iFS.

Method Detail

### addFolderRelationship

    public void addFolderRelationship(Folder folder,
                                      PublicObject po)
                               throws IfsException

  Create a reference between a Folder and a PublicObject, essentially placing the PublicObject inside the Folder.
  Parameters:
    `folder` - Folder object that will contain `po`
    `po` - PublicObject object
  Returns:
    None
  Throws:
    `IfsException(68010)` - - if a po by that name already exists in folder.

### cancelCheckout

    public void cancelCheckout(PublicObject po)
                        throws IfsException

  Cancel a checkout. Unreserve the VersionSeries for the document.
  Parameters:
    `po` - PublicObject object to be cancelled
  Returns:
    None
  Throws:
    `IfsException(68011)` - - if po is not checked out.
    `IfsException(68012)` - - if po is not versioned.

### checkIn

    public void checkIn(PublicObject po,
                        java.lang.String comment)
                 throws IfsException

  Implements the check-in semantics.
  Parameters:
    `po` - PublicObject to be checked in
    `comments` - CheckIn comments
  Returns:
    None
  Throws:
    `IfsException(68011)` - - if po is not checked out.
    `IfsException(68012)` - - if po is not versioned.

### checkOut

    public PublicObject checkOut(PublicObject po,
                                 boolean makeVersioned)
                          throws IfsException

  Implements the check-out semantics.
  Returns:
    PublicObject
  Throws:
    `IfsException(68012)` - - if po is not versioned.
    `IfsException(68014)` - - if po is already checked out.

### checkedOutBy

    public DirectoryUser checkedOutBy(PublicObject po)
                               throws IfsException

  Return the DirectoryUser who currently has PublicObject po checked out, or null if po is not checked out.
  Parameters:
    `po` - PublicObject
  Returns:
    DirectoryUser
  Throws:
    `IfsException(68012)` - - if po is not versioned.

### copy

    public PublicObject copy(PublicObject po,
                             Folder folder,
                             AccessControlList acl,
                             boolean overwrite)
                      throws IfsException

  Copy the PublicObject po into the specified folder.
  Parameters:
    `po` - PublicObject to copy from
    `folder` - Folder object to copy to
    `acl` - ACL to be applied to the newly created copy; if null, session user's default ACL will be used
    `overwrite` - If true, overwrite existing PublicObject in folder
  Returns:
    PublicObject (the new copy)
  Throws:
    `IfsException(68010)` - - if document already exists in folder.

### copy

    public Folder copy(Folder fromFolder,
                       Folder toFolder,
                       boolean recursive,
                       AccessControlList acl)
                throws IfsException

  Copy a Folder into another Folder. If the recursive flag is True, subfolders will be copied as well.
  Parameters:
    `fromFolder` - Folder to copy from
    `toFolder` - Folder to copy to
    `recursive` - If True, subfolders will be copied
    `acl` - ACL to be applied to the newly created copy of fromFolder (but not its items); if null, session user's default ACL will be used
  Returns:
    Folder (the toFolder)
  Throws:
    `IfsException` - - if operation failed.

### createDocument

    public Document createDocument(java.lang.String name,
                                   java.io.InputStream content,
                                   java.lang.String folderPath,
                                   AccessControlList acl,
                                   boolean doParse,
                                   ParserCallback callback)
                            throws IfsException,
                                   java.io.IOException

  Create a Document in iFS.
  Parameters:
    `name` - Name of the document to be created
    `content` - InputStream to read contents from; if null, empty document is created
    `folderPath` - Absolute path of folder in which to create the document
    `acl` - ACL to be assigned to the new document; if null, sess user's default ACL will be used
    `doParse` - If 'True', input stream will be parsed using a parser which is determined based on the file extension
    `callback` - Parser callback to be specified if `doParse` is 'True'
  Returns:
    Document (the new Document created)
  Throws:
    `IfsException(68003)` - - if `folderPath` is not a Folder.
    `IfsException(68004)` - - if `folderPath` is not found.
    `IfsException(68010)` - - if a document by that name already exists.

### createFolder

    public Folder createFolder(java.lang.String name,
                               Folder destfolder,
                               boolean createParents,
                               AccessControlList acl)
                        throws IfsException

  Create a Folder in iFS.
  Parameters:
    `name` - Name of the Folder to be created; name can also be in the format of a path (relative to destFolder) if createParents is 'True' (eg. "a/b/c")
    `destfolder` - Folder in which to create the new folder
    `createParents` - If true, non-existing parent folders will be created
    `acl` - ACL to be assigned to new folder(s) created; if null, session user's default ACL will be used
  Returns:
    Folder (the new folder created)
  Throws:
    `IfsException` - - if operation failed.

### delete

    public void delete(PublicObject po)
                throws IfsException

  Delete a PublicObject.
  Parameters:
    `po` - PublicObject to be deleted.
  Returns:
    None
  Throws:
    `IfsException` - - if operation failed.

### delete

    public void delete(Folder folder,
                       boolean recursive)
                throws IfsException

  Delete a Folder. If recursive if 'True', subfolders will be deleted.
  Parameters:
    `folder` - Folder object to be deleted
    `recursive` - If 'True', subfolders will be deleted
  Returns:
    None
  Throws:
    `IfsException(68020)` - - if `folder` is non-empty, and `recursive` is 'False'.

### findPublicObjectById

    public PublicObject findPublicObjectById(java.lang.Long id)
                                      throws IfsException

  Returns the PublicObject having the specified `id`.
  Parameters:
    `id` - Id of the PublicObject
  Returns:
    PublicObject
  Throws:
    `IfsException` - - if operation failed.

### findPublicObjectByPath

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

  Returns the PublicObject pointed to by `path`.
  Parameters:
    `path` - Path to the PublicObject
  Returns:
    PublicObject
  Throws:
    `IfsException` - - if operation failed.

### getAttribute

    public AttributeValue getAttribute(PublicObject po,
                                       java.lang.String attrName)
                                throws IfsException

  Return a specified attribute of a PublicObject.
  Parameters:
    `po` - PublicObject from which to get the attribute
    `attrName` - Name of the attribute
  Returns:
    AttributeValue
  Throws:
    `IfsException` - - if operation failed.

### getAttributes

    public AttributeValue[] getAttributes(PublicObject po,
                                          java.lang.String[] attrNames)
                                   throws IfsException

  Return the specified attributes of a PublicObject.
  Parameters:
    `po` - PublicObject from which to get the attributes
    `attrNames` - A list of attributes to return
  Returns:
    An array of AttributeValue objects
  Throws:
    `IfsException` - - if operation failed.

### getCurrentUser

    public DirectoryUser getCurrentUser()
                                 throws IfsException

  Display the current user in the session.
  Returns:
    DirectoryUser
  Throws:
    `IfsException` - - if operation failed.

### getDocumentContent

    public java.io.InputStream getDocumentContent(Document doc)
                                           throws IfsException,
                                                  java.io.IOException

  Retrieve the content of a Document as a stream.
  Parameters:
    `doc` - Document from which to retrieve content
  Returns:
    InputStream
  Throws:
    `IfsException` - - if operation failed.

### getHistory

    public VersionDescription[] getHistory(PublicObject po)
                                    throws IfsException

  Retrieve the revision history of the specified PublicObject.
  Parameters:
    `po` - PublicObject from which to get history
  Returns:
    An array of VersionDescription objects
  Throws:
    `IfsException(68012)` - - if `po` is not versioned.

### getLibrarySession

    public LibrarySession getLibrarySession()

  Return the LibrarySession object being used to communicate with iFS.
  Parameters:
    `None` -
  Returns:
    LibrarySession

### getParents

    public Folder[] getParents(PublicObject po)
                        throws IfsException

  Return a list of parent Folders that reference the specified PublicObject.
  Parameters:
    `po` - PublicObject from which to retrieve parents
  Returns:
    An array of Folder objects
  Throws:
    `IfsException` - - if operation failed.

### isCheckedOut

    public boolean isCheckedOut(PublicObject po)
                         throws IfsException

  Check to see if a PublicObject is currently checked out. Return 'True' if checked out, 'False' otherwise.
  Parameters:
    `po` - PublicObject
  Returns:
    boolean
  Throws:
    `IfsException(68012)` - - if po is not versioned.

### isVersioned

    public boolean isVersioned(PublicObject po)
                        throws IfsException

  Check to see if a PublicObject is versioned.
  Parameters:
    `po` - PublicObject
  Returns:
    boolean
  Throws:
    `IfsException` - - if operation failed.

### listFolder

    public PublicObject[] listFolder(Folder folder,
                                     java.lang.String pattern)
                              throws IfsException

  Return the items of the specified folder whose names match `pattern`.
  Parameters:
    `folder` - Folder to list contents of
    `pattern` - Filename pattern to be matched
  Returns:
    An array of PublicObject
  Throws:
    `IfsException` - - if operation failed.

### makeVersioned

    public PublicObject makeVersioned(PublicObject po)
                               throws IfsException

  Convert an unversioned PublicObject into versioned PublicObject.
  Parameters:
    `doc` - Unversioned document to convert
  Returns:
    Document
  Throws:
    `IfsException` - - if operation failed.

### move

    public PublicObject move(Folder fromFolder,
                             Folder toFolder,
                             PublicObject po,
                             java.lang.String newName,
                             AccessControlList acl,
                             boolean overwrite)
                      throws IfsException

  Move a PublicObject from `fromFolder` to `toFolder` with the new name `newName`; if specified.
  Parameters:
    `fromFolder` - Folder in which the PO belongs
    `toFolder` - Folder to which to move PO
    `po` - PublicObject to move
    `newName` - New name to be assigned to the moved PO
    `acl` - ACL to be used on the moved object; if null, acl will not be touched
    `overwrite` - If 'True', overwrite existing PublicObject in folder
  Returns:
    PublicObject
  Throws:
    `IfsException(68018)` - - if po is checked out.
    `IfsException(68019)` - - if po is an unfoldered version document.

### removeFolderRelationship

    public void removeFolderRelationship(Folder folder,
                                         PublicObject po,
                                         boolean rmNoRef)
                                  throws IfsException

  Removes the relationship between a Folder and a PublicObject. If `rmNoRef` is 'True', `po` will be deleted if there are no other relationships existing for `po`.
  Parameters:
    `folder` - Folder which contains a reference to `po`
    `po` - PublicObject from which to remove reference
    `rmNoRef` - If True, `po` will be removed when there are no more existing relationships
  Returns:
    None
  Throws:
    `IfsException` - - if operation failed.
  See Also:
    `delete(PublicObject)`

### rename

    public void rename(PublicObject po,
                       java.lang.String newName)
                throws IfsException

  Rename a PublicObject.
  Parameters:
    `po` - PublicObject to be renamed
    `newName` - New name to be assigned
  Returns:
    None
  Throws:
    `IfsException(68005)` - - if newName already exists.

### renderAsStream

    public java.io.InputStream renderAsStream(PublicObject po,
                                              java.lang.String rendererType,
                                              java.lang.String rendererName)
                                       throws IfsException

  Render the object out as a stream.
  Parameters:
    `po` - PublicObject
    `rendererType` - String
    `rendererName` - String
  Returns:
    InputStream

### setAttribute

    public void setAttribute(PublicObject po,
                             java.lang.String name,
                             AttributeValue value)
                      throws IfsException

  Set an attribute for a PublicObject in iFS.
  Parameters:
    `po` - PublicObject for which to set the attribute
    `name` - Name of the attribute
    `value` - Attribute value to be set
  Returns:
    None
  Throws:
    `IfsException` - if operation failed.

### setAttributes

    public void setAttributes(PublicObject po,
                              java.lang.String[] names,
                              AttributeValue[] values)
                       throws IfsException

  Set attributes for a PublicObject in iFS.
  Parameters:
    `po` - PublicObject for which to set the attributes
    `names` - Namess of the attributes
    `values` - Attribute values to be set
  Returns:
    None
  Throws:
    `IfsException` - - if operation failed.

### setLibrarySession

    public void setLibrarySession(LibrarySession session)
                           throws IfsException

  Set a new LibrarySession to communicate with iFS.
  Parameters:
    `session` - LibrarySession object
  Returns:
    None

### updateDocument

    public Document updateDocument(java.lang.String name,
                                   java.io.InputStream content,
                                   java.lang.String folderPath,
                                   AccessControlList acl,
                                   boolean doParse,
                                   ParserCallback callback)
                            throws IfsException,
                                   java.io.IOException

  Update a document in iFS.
  Parameters:
    `name` - Name of the document
    `content` - InputStream from which to read the document contents
    `folderPath` - Absolute path of folder in which to update the document
    `acl` - ACL to be assigned to the document; if null, session user's default ACL will be used
    `doParse` - If 'True', input stream will be parsed using a parser which is determined based on the file extension
    `callback` - Parser callback to be specified if doParse is 'True'
  Returns:
    Document (the updated document)
  Throws:
    `IfsException(68003)` - if folderPath is not a Folder.
    `IfsException(68004)` - if folderPath is not found.

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