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.fdk
Class Item

    java.lang.Object
      oracle.ifs.fdk.Item

All Implemented Interfaces:
  java.io.Serializable

    public class Item

extends java.lang.Object
implements java.io.Serializable

Represents an item abstraction of a persistent repository object, such as a document, folder, link, user, group, category, etc. The type of items are defined by the type safe enum `ItemType`.

An Item always contains three attributes:

1. ID - the ID of the persistent repository object
2. NAME - the name of the repository object
3. TYPE - the type of the object

An Item may also contain an optional number of attributes that the caller may be interested in and explicitly requests.

See Also:
  `NamedValue`, `AttributeRequest`, `ItemTypes`, Serialized Form

Constructor Summary
`Item()` Default constructor in other to be a Java Bean.
`Item(FdkSession session, LibraryObject reposObject, AttributeRequest[] attributes)` Constructor that converts a repository object into an Item.

Method Summary
`java.util.Map` | `attributesMap()` Returns all the attributes as a map.
`static Item[]` | `convertToItems(FdkSession session, LibraryObject[] reposObjects, AttributeRequest[] attributes)` Converts a list of repository objects to the corresponding Items.
`long` | `getId()` Returns the ID of the item.
`java.lang.String` | `getName()` Returns the name of the item.
`NamedValue[]` | `getRequestedAttributes()` Returns the optionally requested attributes of the item or `null` if no optional attributes are present.
`java.lang.String` | `getType()` Returns the type of the item.
`void` | `setId(long id)` Always throws a RuntimeException.
`void` | `setName(java.lang.String name)` Always throws a RuntimeException.
`void` | `setRequestedAttributes(NamedValue[] attrs)` Always throws a RuntimeException.
`void` | `setType(java.lang.String type)` Always throws a RuntimeException.
`java.lang.String` | `toString()` Returns a string representation of an item.

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

Constructor Detail

### Item

    public Item()

  Default constructor in other to be a Java Bean.

  Do NOT use this constructor, it will thorw a `RuntimeException`

### Item

    public Item(FdkSession session,
                LibraryObject reposObject,
                AttributeRequest[] attributes)
         throws FdkException

  Constructor that converts a repository object into an Item.

  Parameters:
    `session` - The user session to use.
    `reposObject` - The repository object to convert.
    `attributes` - The optional attributes to be filled in. Can be `null`. It is legal to request attributes that are not applicable to the repository object, they will not be filled in.
  Throws:
    `FdkException` - if the conversion fails.
  (Unpublished)

Method Detail

### getId

    public long getId()

  Description copied from class: `Item`
  Returns the ID of the item.

### setId

    public void setId(long id)

  Description copied from class: `Item`
  Always throws a RuntimeException. Method needs to be here in order for the object to be a Java Bean.

  Throws:
    `java.lang.RuntimeException` - Always.
  (Unpublished)

### getName

    public java.lang.String getName()

  Description copied from class: `Item`
  Returns the name of the item.

### setName

    public void setName(java.lang.String name)

  Description copied from class: `Item`
  Always throws a RuntimeException. Method needs to be here in order for the object to be a Java Bean.

  Throws:
    `java.lang.RuntimeException` - Always.
  (Unpublished)

### getType

    public java.lang.String getType()

  Description copied from class: `Item`
  Returns the type of the item. The return value is one of the constants defined in `ItemTypes`, hence when running in-process it is recommended that the return value is compared against one of the constants using the double-equal "==" operator rather than `equals()`.

### setType

    public void setType(java.lang.String type)

  Description copied from class: `Item`
  Always throws a RuntimeException. Method needs to be here in order for the object to be a Java Bean.

  Throws:
    `java.lang.RuntimeException` - Always.
  (Unpublished)

### getRequestedAttributes

    public NamedValue[] getRequestedAttributes()

  Description copied from class: `Item`
  Returns the optionally requested attributes of the item or `null` if no optional attributes are present. Note that the return value does not include the ID, NAME and TYPE attributes.

  NOTE: When running the client code in-process, the method `attributesMap()` MUST be used instead. It will be more efficient to retrieve the attributes from a map than from an array.

### setRequestedAttributes

    public void setRequestedAttributes(NamedValue[] attrs)

  Description copied from class: `Item`
  Always throws a RuntimeException. Method needs to be here in order for the object to be a Java Bean.

  Throws:
    `java.lang.RuntimeException` - Always.
  (Unpublished)

### attributesMap

    public java.util.Map attributesMap()

  Description copied from class: `Item`
  Returns all the attributes as a map. The map will also contain the the default attributes ID, NAME and TYPE besides the optionally requested ones.

  NOTES:
  This method is not available for remote clients, it is a convenience method for in-process clients only. Remote clients should call `getRequestedAttributes()` and use `ClientUtils.namedValuesToMap()` to do the conversion.
  For performance reasons, in-process callers should use this method rather than `getRequestedAttributes()`.
  The returned map is unmodifiable.

  (Unpublished)

### toString

    public java.lang.String toString()

  Description copied from class: `Item`
  Returns a string representation of an item.

  NOTE: Calling this method is not cheap, protect debugging code so that the string is not computed unnecessarily when not in debug mode.

  Overrides:
    `toString` in class `java.lang.Object`

### convertToItems

    public static Item[] convertToItems(FdkSession session,
                                        LibraryObject[] reposObjects,
                                        AttributeRequest[] attributes)
                                 throws FdkException

  Description copied from class: `Item`
  Converts a list of repository objects to the corresponding Items.

  Parameters:
    `session` - The user session to use.
    `reposObjects` - The repository objects to convert.
    `attributes` - The optional attributes to fill in for each Item. Can be `null`. It is legal to request attributes that are not applicable to the repository object, they will not be filled in.
  Returns:
    The array of Item representations for the repository objects.
  Throws:
    `FdkException` - If the conversion for any of the Items fails.
  (Unpublished)

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