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.utils.common
Class PublicObjectUtilities

    java.lang.Object
      oracle.ifs.utils.common.PublicObjectUtilities

    public class PublicObjectUtilities

extends java.lang.Object

The `PublicObjectUtilities.java` class - Utils used by: Helps to create content on FileSystem

Field Summary
`protected LibrarySession` | `m_session` the session

Constructor Summary
`PublicObjectUtilities(LibrarySession session)` Creates a ContentResolver

Method Summary
`PublicObject` | `copyPublicObject(Folder dest, PublicObject po, java.lang.String newName)` Performs a copy and rename of an Item.
`PublicObject` | `copyPublicObjectWithVersioning(Folder dest, PublicObject po, java.lang.String newName)` Performs a copy and rename of an Item following the veriosning semantics will follow verioning semantics in Folder dest
`Document` | `createDocument(Folder parent, java.io.InputStream in, java.lang.String name, AccessControlList acl, boolean takeAclFromParent)` encapsulates plain non-versioned document creation given a parent folder, a name, and an inputstream; will not update a prior existing object in parent, will throw an IfsException simply because an object already exists in parent with name
`Document` | `createDocument(Folder parent, java.io.InputStream in, java.lang.String name, java.lang.String classname, AccessControlList acl, boolean takeAclFromParent)` encapsulates plain non-versioned document creation given a parent folder, a name, and an inputstream; will not update a prior existing object in parent, will throw an IfsException simply because an object already exists in parent with name
`Family` | `createFamily(Folder parent, java.io.InputStream in, java.lang.String name, AccessControlList acl, boolean takeAclFromParent)` Creates a Family with an initial doc.
`Folder` | `createFolder(Folder parent, java.lang.String name, AccessControlList acl)` Creates a default folder
`Folder` | `createFolder(Folder parent, java.lang.String name, AccessControlList acl, boolean takeAclFromParent)` Creates a default folder
`Folder` | `createFolderPath(java.lang.String path, AccessControlList acl)` Creates all folders in a path where the path contains at least one folder to be created.
`Folder` | `createFolderPath(java.lang.String path, AccessControlList acl, boolean takeAclFromParent)` Creates all folders in a path where the path contains at least one folder to be created.
`protected DocumentDefinition` | `getDocDef(Folder parent, java.io.InputStream in, java.lang.String name, AccessControlList acl, boolean takeAclFromParent)` defines what it means to be a plain non versioned doc
`protected FolderDefinition` | `getFolderDef(Folder parent, java.lang.String name, AccessControlList acl, boolean takeAclFromParent)` defines what it means to be a plain non versioned doc
`protected VersionDescriptionDefinition` | `getVersionDef(Folder parent, java.io.InputStream in, java.lang.String name, AccessControlList acl, boolean takeAclFromParent)` defines what it means to be a Family with an initial doc defined in in
`void` | `movePublicObject(Folder src, Folder dest, PublicObject po, java.lang.String newName)` Performs a move and rename of an Item, if the src and dest are the same just a rename is performed, newName can be the same as the po.getName()
`void` | `movePublicObjectWithFormatUpdate(Folder src, Folder dest, PublicObject po, java.lang.String newName)` Performs a move and rename of an Item, if the src and dest are the same just a rename is performed, newName can be the same as the po.getName().
`void` | `movePublicObjectWithVersioning(Folder src, Folder dest, PublicObject po, java.lang.String newName)` Performs a move and rename of an Item, if the src and dest are the same just a rename is performed, newName can be the same as the po.getName() will follow verioning semantics in Folder dest
`PublicObject` | `putAsDocumentWithVersioning(Folder parent, java.io.InputStream in, java.lang.String name, AccessControlList acl, boolean takeAclFromParent)` encapsulates the ftpish notion of a put given a parent folder, a name, and an inputstream; will create or update existing PO depending prior existence of an object in parent, if creating a plain non-versioned Document is created will not IfsException simply because an object does or doesn't exist at the path, but will throw if folders in path do not exist; may throw if world changes in terms of items in the folder during call
`PublicObject` | `putAsFamilyWithVersioning(Folder parent, java.io.InputStream in, java.lang.String name, AccessControlList acl, boolean takeAclFromParent)` encapsulates the ftpish notion of a put given a parent folder, a name, and an inputstream; will create or update depending prior existence of an object in parent, if creating a Family with an inital version of a document whose content is the inputstream is created will not IfsException simply because an object does or doesn't exist at the path, but will throw if folders in path do not exist; may throw if world changes in terms of items in the folder during call
`PublicObject` | `putPublicObjectWithVersioning(Folder parent, java.io.InputStream in, java.lang.String name, java.lang.String classname, AccessControlList acl, boolean takeAclFromParent)` encapsulates the ftpish notion of a put given a parent folder, a name, and an inputstream; will create or update existing PO depending prior existence of an object in parent, if creating an object of class classname is created.
`AccessControlList` | `resolveAcl(AccessControlList overriddingAcl, boolean fromParent, Folder parent)` Resolves the acl to use based on an overridding acl, parent, and a boolean.
`static LibraryObjectDefinition` | `setAcl(LibraryObjectDefinition def, AccessControlList acl, Folder parent, boolean takeAclFromParent)` defines how to set an acl based on a absolute acl, a boolean, and a parent folder
`Document` | `updateFolderedPublicObjectWithVersioning(Folder parent, java.io.InputStream in, java.lang.String name, AccessControlList acl, boolean takeAclFromParent)` encapsulates the item update given a parent folder, a name, and an inputstream; will update a prior existing object in parent, will throw an IfsException simply because an object doesn't exist in parent
`PublicObject` | `updateFolderedPublicObjectWithVersioning(Folder parent, PublicObject currentObject, PublicObject newObject)` performs update of an existing object using iFS versioning.
`Family` | `versionPublicObject(Folder parent, PublicObject po)` This method creates a family with an initial po.

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

Field Detail

### m_session

    protected LibrarySession m_session

  Description copied from class: `PublicObjectUtilities`
  the session

Constructor Detail

### PublicObjectUtilities

    public PublicObjectUtilities(LibrarySession session)

  Creates a ContentResolver

Method Detail

### putPublicObjectWithVersioning

    public PublicObject putPublicObjectWithVersioning(Folder parent,
                                                      java.io.InputStream in,
                                                      java.lang.String name,
                                                      java.lang.String classname,
                                                      AccessControlList acl,
                                                      boolean takeAclFromParent)
                                               throws java.io.IOException,
                                                      IfsException

  Description copied from class: `PublicObjectUtilities`
  encapsulates the ftpish notion of a put given a parent folder, a name, and an inputstream; will create or update existing PO depending prior existence of an object in parent, if creating an object of class classname is created. will not throw an IfsException simply because an object does or doesn't exist at the path, but will throw if folders in path do not exist; may throw if world changes in terms of items in the folder during call

  Parameters:
    `parent` - the folder where the item goes
    `in` - the content stream
    `name` - the name of the item
    `classname` - the classname of the new object, must be Document.CLASS_NAME or a subclass of Document
    `acl` - the acl to be set on the object when method returns; can be null
    `takeAclFromParent` - only checked if acl == null
  Returns:
    PublicObject the object foldered at parent.name
  Throws:
    `java.io.IOException`
    `IfsException`

### putAsDocumentWithVersioning

    public PublicObject putAsDocumentWithVersioning(Folder parent,
                                                    java.io.InputStream in,
                                                    java.lang.String name,
                                                    AccessControlList acl,
                                                    boolean takeAclFromParent)
                                             throws java.io.IOException,
                                                    IfsException

  Description copied from class: `PublicObjectUtilities`
  encapsulates the ftpish notion of a put given a parent folder, a name, and an inputstream; will create or update existing PO depending prior existence of an object in parent, if creating a plain non-versioned Document is created will not IfsException simply because an object does or doesn't exist at the path, but will throw if folders in path do not exist; may throw if world changes in terms of items in the folder during call

  Parameters:
    `parent` - the folder where the item goes
    `in` - the content stream
    `name` - the name of the item
    `acl` - the ACL to be set on the object when method returns; can be null
    `takeAclFromParent` - only checked if acl == null
  Returns:
    PublicObject the object foldered at parent.name
  Throws:
    `java.io.IOException`
    `IfsException`

### putAsFamilyWithVersioning

    public PublicObject putAsFamilyWithVersioning(Folder parent,
                                                  java.io.InputStream in,
                                                  java.lang.String name,
                                                  AccessControlList acl,
                                                  boolean takeAclFromParent)
                                           throws java.io.IOException,
                                                  IfsException

  Description copied from class: `PublicObjectUtilities`
  encapsulates the ftpish notion of a put given a parent folder, a name, and an inputstream; will create or update depending prior existence of an object in parent, if creating a Family with an inital version of a document whose content is the inputstream is created will not IfsException simply because an object does or doesn't exist at the path, but will throw if folders in path do not exist; may throw if world changes in terms of items in the folder during call

  Parameters:
    `parent` - the folder where the item goes
    `in` - the content stream
    `name` - the name of the item
    `acl` - the ACL to be set on the object when method returns; can be null
    `takeAclFromParent` - only checked if acl == null
  Throws:
    `java.io.IOException`
    `IfsException`

### updateFolderedPublicObjectWithVersioning

    public PublicObject updateFolderedPublicObjectWithVersioning(Folder parent,
                                                                 PublicObject currentObject,
                                                                 PublicObject newObject)
                                                          throws IfsException

  Description copied from class: `PublicObjectUtilities`
  performs update of an existing object using iFS versioning. While this signature is more general behavior differs from other signature. The other signature updates Documents, this one replaces them uses a transaction

  Returns:
    the PO referenced in the path
  Throws:
    `IfsException`

### updateFolderedPublicObjectWithVersioning

    public Document updateFolderedPublicObjectWithVersioning(Folder parent,
                                                             java.io.InputStream in,
                                                             java.lang.String name,
                                                             AccessControlList acl,
                                                             boolean takeAclFromParent)
                                                      throws IfsException,
                                                             java.io.IOException

  Description copied from class: `PublicObjectUtilities`
  encapsulates the item update given a parent folder, a name, and an inputstream; will update a prior existing object in parent, will throw an IfsException simply because an object doesn't exist in parent

  Parameters:
    `parent` - the folder where the item goes
    `in` - the content stream
    `name` - the name of the item
    `acl` - the ACL to be set on the object when method returns; can be null
    `takeAclFromParent` - only checked if acl == null
  Returns:
    returns the PO referenced by the path
  Throws:
    `IfsException`
    `java.io.IOException`

### createFamily

    public Family createFamily(Folder parent,
                               java.io.InputStream in,
                               java.lang.String name,
                               AccessControlList acl,
                               boolean takeAclFromParent)
                        throws IfsException

  Description copied from class: `PublicObjectUtilities`
  Creates a Family with an initial doc.

  Parameters:
    `parent` - the folder in which to place the family
    `in` - the initial doc's content
    `acl` - the overidding acl
    `takeAclFromParent` - if acl == null and true acl of family will be set to the acl of the parent
  Throws:
    `IfsException`

### versionPublicObject

    public Family versionPublicObject(Folder parent,
                                      PublicObject po)
                               throws IfsException

  Description copied from class: `PublicObjectUtilities`
  This method creates a family with an initial po. The name of the family is the same as the po. Will throw an NPE if parent is null

  Parameters:
    `parent` - the parent of the po. can't be null
    `po` - the publicobject to be famlied.
  Returns:
    PublicObject the Family that replaced the original in the path
  Throws:
    `IfsException`

### createDocument

    public Document createDocument(Folder parent,
                                   java.io.InputStream in,
                                   java.lang.String name,
                                   AccessControlList acl,
                                   boolean takeAclFromParent)
                            throws IfsException,
                                   java.io.IOException

  Description copied from class: `PublicObjectUtilities`
  encapsulates plain non-versioned document creation given a parent folder, a name, and an inputstream; will not update a prior existing object in parent, will throw an IfsException simply because an object already exists in parent with name

  Parameters:
    `parent` - the folder where the item goes
    `in` - the content stream
    `name` - the name of the document
    `acl` - the ACL to be set on the document when method returns; can be null
    `takeAclFromParent` - only checked if acl == null
  Throws:
    `IfsException`
    `java.io.IOException`

### createDocument

    public Document createDocument(Folder parent,
                                   java.io.InputStream in,
                                   java.lang.String name,
                                   java.lang.String classname,
                                   AccessControlList acl,
                                   boolean takeAclFromParent)
                            throws IfsException,
                                   java.io.IOException

  Description copied from class: `PublicObjectUtilities`
  encapsulates plain non-versioned document creation given a parent folder, a name, and an inputstream; will not update a prior existing object in parent, will throw an IfsException simply because an object already exists in parent with name

  Parameters:
    `parent` - the folder where the item goes
    `in` - the content stream
    `name` - the name of the document
    `classname` - the classname of the new object, must be Document.CLASS_NAME or a subclass of Document
    `acl` - the ACL to be set on the document when method returns; can be null
    `takeAclFromParent` - only checked if acl == null
  Throws:
    `IfsException`
    `java.io.IOException`

### createFolderPath

    public Folder createFolderPath(java.lang.String path,
                                   AccessControlList acl)
                            throws IfsException

  Description copied from class: `PublicObjectUtilities`
  Creates all folders in a path where the path contains at least one folder to be created. Will throw if any folder name in the path, is not a folder. will throw if all folders already exist. uses a transaction; either all paths will be created or none;

  Parameters:
    `path` - The path
  Returns:
    Folder the top existing Folder
  Throws:
    `IfsException`

### createFolderPath

    public Folder createFolderPath(java.lang.String path,
                                   AccessControlList acl,
                                   boolean takeAclFromParent)
                            throws IfsException

  Description copied from class: `PublicObjectUtilities`
  Creates all folders in a path where the path contains at least one folder to be created. Will throw if any folder name in the path, is not a folder. will throw if all folders already exist. uses a transaction; either all paths will be created or none;

  Parameters:
    `path` - The path
  Returns:
    Folder the top existing Folder
  Throws:
    `IfsException`

### createFolder

    public Folder createFolder(Folder parent,
                               java.lang.String name,
                               AccessControlList acl)
                        throws IfsException

  Description copied from class: `PublicObjectUtilities`
  Creates a default folder

  Parameters:
    `parent` - the folder where this folder should be created; if null an unfoldered Folder is created
    `name` - the name of the new folder
    `acl` - the acl to be set; can be null
  Throws:
    `IfsException`

### createFolder

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

  Description copied from class: `PublicObjectUtilities`
  Creates a default folder

  Parameters:
    `parent` - the folder where this folder should be created; if null an unfoldered Folder is created
    `name` - the name of the new folder
    `acl` - the acl to be set; can be null
    `takeAclFromParent` - wether to take acl from parent; only checked if acl is null
  Throws:
    `IfsException`

### movePublicObjectWithVersioning

    public void movePublicObjectWithVersioning(Folder src,
                                               Folder dest,
                                               PublicObject po,
                                               java.lang.String newName)
                                        throws IfsException

  Description copied from class: `PublicObjectUtilities`
  Performs a move and rename of an Item, if the src and dest are the same just a rename is performed, newName can be the same as the po.getName() will follow verioning semantics in Folder dest

  Throws:
    `IfsException`

### movePublicObject

    public void movePublicObject(Folder src,
                                 Folder dest,
                                 PublicObject po,
                                 java.lang.String newName)
                          throws IfsException

  Description copied from class: `PublicObjectUtilities`
  Performs a move and rename of an Item, if the src and dest are the same just a rename is performed, newName can be the same as the po.getName()

  Throws:
    `IfsException`

### movePublicObjectWithFormatUpdate

    public void movePublicObjectWithFormatUpdate(Folder src,
                                                 Folder dest,
                                                 PublicObject po,
                                                 java.lang.String newName)
                                          throws IfsException

  Description copied from class: `PublicObjectUtilities`
  Performs a move and rename of an Item, if the src and dest are the same just a rename is performed, newName can be the same as the po.getName(). This method will not work correctly with Families. This method should only be called by SMB for production 1.0

  Throws:
    `IfsException`

### copyPublicObjectWithVersioning

    public PublicObject copyPublicObjectWithVersioning(Folder dest,
                                                       PublicObject po,
                                                       java.lang.String newName)
                                                throws IfsException

  Description copied from class: `PublicObjectUtilities`
  Performs a copy and rename of an Item following the veriosning semantics will follow verioning semantics in Folder dest

  Parameters:
    `dest` - the FOLDER for the copy to be foldered in
    `po` - the PublicObject to be copied
    `newName` - the name to be set on the copy
  Throws:
    `if` - the operation fails
    `IfsException`

### copyPublicObject

    public PublicObject copyPublicObject(Folder dest,
                                         PublicObject po,
                                         java.lang.String newName)
                                  throws IfsException

  Description copied from class: `PublicObjectUtilities`
  Performs a copy and rename of an Item.

  Parameters:
    `dest` - the FOLDER for the copy to be foldered in
    `po` - the PublicObject to be copied
    `newName` - the name to be set on the copy
  Throws:
    `if` - the operation fails
    `IfsException`

### resolveAcl

    public AccessControlList resolveAcl(AccessControlList overriddingAcl,
                                        boolean fromParent,
                                        Folder parent)
                                 throws IfsException

  Description copied from class: `PublicObjectUtilities`
  Resolves the acl to use based on an overridding acl, parent, and a boolean.

  Parameters:
    `overriddingAcl` - if not null this will be returned
    `fromParent` - whether to take the acl from the parent if overridding acl is null
    `parent` - the parent Folder
  Throws:
    `IfsException`

### getVersionDef

    protected VersionDescriptionDefinition getVersionDef(Folder parent,
                                                         java.io.InputStream in,
                                                         java.lang.String name,
                                                         AccessControlList acl,
                                                         boolean takeAclFromParent)
                                                  throws IfsException

  Description copied from class: `PublicObjectUtilities`
  defines what it means to be a Family with an initial doc defined in in

  Throws:
    `IfsException`

### getDocDef

    protected DocumentDefinition getDocDef(Folder parent,
                                           java.io.InputStream in,
                                           java.lang.String name,
                                           AccessControlList acl,
                                           boolean takeAclFromParent)
                                    throws IfsException

  Description copied from class: `PublicObjectUtilities`
  defines what it means to be a plain non versioned doc

  Throws:
    `IfsException`

### getFolderDef

    protected FolderDefinition getFolderDef(Folder parent,
                                            java.lang.String name,
                                            AccessControlList acl,
                                            boolean takeAclFromParent)
                                     throws IfsException

  Description copied from class: `PublicObjectUtilities`
  defines what it means to be a plain non versioned doc

  Throws:
    `IfsException`

### setAcl

    public static LibraryObjectDefinition setAcl(LibraryObjectDefinition def,
                                                 AccessControlList acl,
                                                 Folder parent,
                                                 boolean takeAclFromParent)
                                          throws IfsException

  Description copied from class: `PublicObjectUtilities`
  defines how to set an acl based on a absolute acl, a boolean, and a parent folder

  Parameters:
    `acl` - the ACL to be set on the object when method returns; can be null
    `takeAclFromParent` - only checked if acl == null
    `parent` - the folder where acl should be taken from if ((acl == null) && (takeAclFromParent))
  Throws:
    `IfsException`

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