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.impl
Class Utils

    java.lang.Object
      oracle.ifs.fdk.impl.Utils

    public class Utils

extends java.lang.Object

A collection of static FDK utilities.

Constructor Summary
`protected` | `Utils()` Construct a Utils.

Method Summary
`static void` | `addAuditTypestoDefinition(LibrarySession ls, AuditTypeListDefinition atlDef, NamedValue[] auditTypesNamedValues)` Populates the AuditTypeListDefinition with the given Audit Types.
`static void` | `checkInvalidAttributes(java.util.Map attrMap)` If any attributes remain, then they are invalid.
`static NamedValue[]` | `convertValuesToSimpleTypeArrays(NamedValue[] source, long longNull, int intNull, boolean boolNull)` Converts any values of a NamedValue array that are Java type wrapper arrays (such as Long[], Double[], or Boolean[]) to their simple type array counterparts (such as long[], double[], or boolean[]), replacing null elements in the source arrays with default values.
`static int` | `getAuditOperationType(LibrarySession session, java.lang.String opTypeKey)` Returns the audit op type (int) corresponding to a audit op type key (String).
`static AuditTypeList` | `getAuditTypeList(LibrarySession ls, java.lang.Long id)` Returns an AuditTypeList from a given ID or throws an exception if the item cannot be found or it is not an AuditTypeList.
`static java.lang.String` | `getAuditTypeOperationKey(LibrarySession session, int opType)` Returns the audit operation key (String) for the given audit operation type.
`static DefinitionObject` | `getDefinitionObject(LibrarySession ls, long id)` Returns a DefinitionObject from a given ID or throws an exception if the item cannot be found or it is not a DefinitionObject.
`static DefinitionObject` | `getDefinitionObject(LibrarySession ls, java.lang.Long id)` Returns a DefinitionObject from a given ID or throws an exception if the item cannot be found or it is not a DefinitionObject.
`static DirectoryGroup` | `getDirectoryGroup(LibrarySession ls, java.lang.Long id)` Returns a DirectoryGroup from a given ID or throws an exception if the item cannot be found or it is not a DirectoryGroup.
`static DirectoryObject` | `getDirectoryObject(LibrarySession ls, java.lang.Long id)` Returns a DirectoryObject from a given ID or throws an exception if the item cannot be found or it is not a DirectoryObject.
`static Document` | `getDocument(LibrarySession ls, long id)` Returns the Document from a given ID or throws an exception if the item cannot be found or it is not a Document.
`static Document` | `getDocument(LibrarySession ls, java.lang.Long id)` Returns the Document from a given ID or throws an exception if the item cannot be found or it is not a Document.
`static Folder` | `getFolder(LibrarySession ls, AttributeValue av)` Returns the Folder from a given AttributeValue or throws an exception if the item cannot be found or it is not a Folder.
`static Folder` | `getFolder(LibrarySession ls, long id)` Returns the Folder from a given ID or throws an exception if the item cannot be found or it is not a Folder.
`static Folder` | `getFolder(LibrarySession ls, java.lang.Long id)` Returns the Folder from a given ID or throws an exception if the item cannot be found or it is not a Folder.
`static java.lang.Long` | `getId(LibraryObject reposObject)` Returns the ID of a repository object, ignoring any exceptions.
`static NamedValue[]` | `getIdErrorInfo(long id)` Returns an NamedValue[] info filled in with the ID of the object where the error occured.
`static NamedValue[]` | `getIdErrorInfo(java.lang.Long id)` Returns an NamedValue[] info filled in with the ID of the object where the error occured.
`static LifecyclePolicy` | `getLifecyclePolicy(LibrarySession ls, java.lang.Long id)` Returns the LifecyclePolicy for the given ID.
`static Link` | `getLink(LibrarySession ls, long id)` Returns the Link from a given ID or throws an exception if the item cannot be found or it is not a Link.
`static Link` | `getLink(LibrarySession ls, java.lang.Long id)` Returns the Link from a given ID or throws an exception if the item cannot be found or it is not a Link.
`static Media` | `getMedia(LibrarySession ls, java.lang.Long id)` Returns the Media from a given ID or throws an exception if the item cannot be found or it is not a Media object.
`static Media` | `getMedia(LibrarySession ls, java.lang.String mediaName)` Returns the Media given its name or throws an exception if the item cannot be found.
`static PublicObject` | `getPublicObject(LibrarySession ls, long id)` Returns the PublicObject from a given ID or throws an exception if the item cannot be found or it is not a PublicObject.
`static PublicObject` | `getPublicObject(LibrarySession ls, java.lang.Long id)` Returns the PublicObject from a given ID or throws an exception if the item cannot be found or it is not a PublicObject.
`static DirectoryUser` | `getUser(LibrarySession ls, java.lang.Long id)` Returns a DirectoryUser from a given ID or throws an exception if the item cannot be found or it is not a DirectoryUser.
`static VersionDescription` | `getVersionDescription(LibrarySession ls, long id)` Returns the VersionDescription from a given ID or throws an exception if the item cannot be found or it is not a VersionDescription.
`static VersionDescription` | `getVersionDescription(LibrarySession ls, java.lang.Long id)` Returns the VersionDescription from a given ID or throws an exception if the item cannot be found or it is not a VersionDescription.
`static NamedValue[]` | `mergeAttributeArrays(NamedValue[] master, NamedValue[] slave)` Merges two arrays of attributes.
`static AttributeValue` | `toAttributeValue(NamedValue nv)` Convert a NamedValue to an AttributeValue.
`static AttributeValue[]` | `toAttributeValues(NamedValue[] nvs)` Convert a NamedValue array to an AttributeValue array.
`static NamedValue` | `toNamedValue(AttributeValue av)` Converts an AttributeValue to a NamedValue.
`static NamedValue[]` | `toNamedValues(AttributeValue[] avs)` Converts an AttributeValue array to a NamedValue array.

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

Constructor Detail

### Utils

    protected Utils()

  Construct a Utils.

Method Detail

### mergeAttributeArrays

    public static NamedValue[] mergeAttributeArrays(NamedValue[] master,
                                                    NamedValue[] slave)

  Description copied from class: `Utils`
  Merges two arrays of attributes. Any entries in the slave array that already exist in the master array will be ignored. The new entries in the slave array will be appended to the end of the master array.

  NOTE: This method may return the master or slave array references if one or the other is `null`. Calling code should be careful if it needs to make any changes to the resulting array. Also note that the actual references to the individual arrays entries will be used, no deep cloning is being done.

  Parameters:
    `master` - The master array of attributes. Can be `null`.
    `slave` - The slave array of attributes. Can be `null`.

### getIdErrorInfo

    public static NamedValue[] getIdErrorInfo(java.lang.Long id)

  Description copied from class: `Utils`
  Returns an NamedValue[] info filled in with the ID of the object where the error occured.

### getIdErrorInfo

    public static NamedValue[] getIdErrorInfo(long id)

  Description copied from class: `Utils`
  Returns an NamedValue[] info filled in with the ID of the object where the error occured.

### toNamedValues

    public static NamedValue[] toNamedValues(AttributeValue[] avs)
                                      throws FdkException

  Description copied from class: `Utils`
  Converts an AttributeValue array to a NamedValue array.

  Returns null if the specified AttributeValue array is null or empty.

  Parameters:
    `avs` - the AttributeValue array to convert.
  Returns:
    the equivalent values represented as a NamedValue array.
  Throws:
    `FdkException` - if the operation fails.

### toNamedValue

    public static NamedValue toNamedValue(AttributeValue av)
                                   throws FdkException

  Description copied from class: `Utils`
  Converts an AttributeValue to a NamedValue.

  Returns null if the specified AttributeValue is null.

  Parameters:
    `av` - the AttributeValue to convert.
  Returns:
    the equivalent value represented as a NamedValue.
  Throws:
    `FdkException` - if the operation fails.

### toAttributeValue

    public static AttributeValue toAttributeValue(NamedValue nv)
                                           throws FdkException

  Description copied from class: `Utils`
  Convert a NamedValue to an AttributeValue.

  Returns null if the specified NamedValue is null.

  Parameters:
    `nv` - the NamedValue instance to convert.
  Returns:
    the equivalent values represented as an AttributeValue
  Throws:
    `FdkException` - if the operation fails.

### toAttributeValues

    public static AttributeValue[] toAttributeValues(NamedValue[] nvs)
                                              throws FdkException

  Description copied from class: `Utils`
  Convert a NamedValue array to an AttributeValue array.

  Returns null if the specified NamedValue array is null or empty.

  Parameters:
    `nvs` - the NamedValue array to convert.
  Returns:
    the equivalent values represented as an AttributeValue array.
  Throws:
    `FdkException` - if the operation fails.

### convertValuesToSimpleTypeArrays

    public static NamedValue[] convertValuesToSimpleTypeArrays(NamedValue[] source,
                                                               long longNull,
                                                               int intNull,
                                                               boolean boolNull)

  Description copied from class: `Utils`
  Converts any values of a NamedValue array that are Java type wrapper arrays (such as Long[], Double[], or Boolean[]) to their simple type array counterparts (such as long[], double[], or boolean[]), replacing null elements in the source arrays with default values.

  Parameters:
    `source` - the source NamedValue array whose Java type wrapper array values should be replaced with simple type array values
    `longNull` - the null value for long[] and double[] values
    `intNull` - the null value for int[] values
    `boolNull` - the null value for boolean[] values
  Returns:
    a new NamedValue array whose Java type wrapper array values have been replaced with simple type arrays

### addAuditTypestoDefinition

    public static void addAuditTypestoDefinition(LibrarySession ls,
                                                 AuditTypeListDefinition atlDef,
                                                 NamedValue[] auditTypesNamedValues)
                                          throws FdkException

  Description copied from class: `Utils`
  Populates the AuditTypeListDefinition with the given Audit Types.

  Parameters:
    `ls` - library session
    `auditTypesNamedValues` - array of NamedValue representing audit types; Name of the NamedValue should be audit operation type key string and the value should be the Integer object for audit operation success mode.
  Throws:
    `FdkException` - if the operation fails

### getAuditTypeOperationKey

    public static java.lang.String getAuditTypeOperationKey(LibrarySession session,
                                                            int opType)
                                                     throws FdkException

  Description copied from class: `Utils`
  Returns the audit operation key (String) for the given audit operation type.

  Parameters:
    `session` - library session
    `opType` - audit opType
  Returns:
    audit opType key
  Throws:
    `FdkException` - if the operation fails

### getAuditOperationType

    public static int getAuditOperationType(LibrarySession session,
                                            java.lang.String opTypeKey)
                                     throws FdkException

  Description copied from class: `Utils`
  Returns the audit op type (int) corresponding to a audit op type key (String).

  Parameters:
    `session` - library session
    `opTypeKey` - audit operation type key
  Returns:
    audit operation type
  Throws:
    `FdkException` - if the operation fails

### getId

    public static java.lang.Long getId(LibraryObject reposObject)

  Description copied from class: `Utils`
  Returns the ID of a repository object, ignoring any exceptions. It returns `null` if the the ID cannot be obtained.

  Parameters:
    `reposObject` - The repository object.

### getDefinitionObject

    public static DefinitionObject getDefinitionObject(LibrarySession ls,
                                                       long id)
                                                throws FdkException

  Description copied from class: `Utils`
  Returns a DefinitionObject from a given ID or throws an exception if the item cannot be found or it is not a DefinitionObject.

  Parameters:
    `ls` - The LibrarySession to use.
    `id` - The ID of the defininitionObject to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getDefinitionObject

    public static DefinitionObject getDefinitionObject(LibrarySession ls,
                                                       java.lang.Long id)
                                                throws FdkException

  Description copied from class: `Utils`
  Returns a DefinitionObject from a given ID or throws an exception if the item cannot be found or it is not a DefinitionObject.

  Parameters:
    `ls` - The LibrarySession to use.
    `id` - The ID of the defininitionObject to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getDocument

    public static Document getDocument(LibrarySession ls,
                                       long id)
                                throws FdkException

  Description copied from class: `Utils`
  Returns the Document from a given ID or throws an exception if the item cannot be found or it is not a Document.

  Parameters:
    `ls` - the LibrarySession to use.
    `id` - the ID of the Document to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getDocument

    public static Document getDocument(LibrarySession ls,
                                       java.lang.Long id)
                                throws FdkException

  Description copied from class: `Utils`
  Returns the Document from a given ID or throws an exception if the item cannot be found or it is not a Document.

  Parameters:
    `ls` - The LibrarySession to use.
    `id` - The ID of the Document to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getPublicObject

    public static PublicObject getPublicObject(LibrarySession ls,
                                               long id)
                                        throws FdkException

  Description copied from class: `Utils`
  Returns the PublicObject from a given ID or throws an exception if the item cannot be found or it is not a PublicObject.

  Parameters:
    `ls` - the LibrarySession to use.
    `id` - the ID of the PublicObject to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getPublicObject

    public static PublicObject getPublicObject(LibrarySession ls,
                                               java.lang.Long id)
                                        throws FdkException

  Description copied from class: `Utils`
  Returns the PublicObject from a given ID or throws an exception if the item cannot be found or it is not a PublicObject.

  Parameters:
    `ls` - the LibrarySession to use.
    `id` - the ID of the PublicObject to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getFolder

    public static Folder getFolder(LibrarySession ls,
                                   long id)
                            throws FdkException

  Description copied from class: `Utils`
  Returns the Folder from a given ID or throws an exception if the item cannot be found or it is not a Folder.

  Parameters:
    `ls` - the LibrarySession to use.
    `id` - the ID of the folder to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getFolder

    public static Folder getFolder(LibrarySession ls,
                                   java.lang.Long id)
                            throws FdkException

  Description copied from class: `Utils`
  Returns the Folder from a given ID or throws an exception if the item cannot be found or it is not a Folder.

  Parameters:
    `ls` - The LibrarySession to use.
    `id` - The ID of the folder to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getFolder

    public static Folder getFolder(LibrarySession ls,
                                   AttributeValue av)
                            throws FdkException

  Description copied from class: `Utils`
  Returns the Folder from a given AttributeValue or throws an exception if the item cannot be found or it is not a Folder.

  Parameters:
    `ls` - the LibrarySession to use.
    `av` - the AttributeValue holding the folder to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getLink

    public static Link getLink(LibrarySession ls,
                               long id)
                        throws FdkException

  Description copied from class: `Utils`
  Returns the Link from a given ID or throws an exception if the item cannot be found or it is not a Link.

  Parameters:
    `ls` - the LibrarySession to use.
    `id` - the ID of the link to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getLink

    public static Link getLink(LibrarySession ls,
                               java.lang.Long id)
                        throws FdkException

  Description copied from class: `Utils`
  Returns the Link from a given ID or throws an exception if the item cannot be found or it is not a Link.

  Parameters:
    `ls` - The LibrarySession to use.
    `id` - The ID of the link to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getUser

    public static DirectoryUser getUser(LibrarySession ls,
                                        java.lang.Long id)
                                 throws FdkException

  Description copied from class: `Utils`
  Returns a DirectoryUser from a given ID or throws an exception if the item cannot be found or it is not a DirectoryUser.

  Parameters:
    `ls` - The LibrarySession to use.
    `id` - The ID of the user to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getDirectoryGroup

    public static DirectoryGroup getDirectoryGroup(LibrarySession ls,
                                                   java.lang.Long id)
                                            throws FdkException

  Description copied from class: `Utils`
  Returns a DirectoryGroup from a given ID or throws an exception if the item cannot be found or it is not a DirectoryGroup.

  Parameters:
    `ls` - The LibrarySession to use.
    `id` - The ID of the group to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getDirectoryObject

    public static DirectoryObject getDirectoryObject(LibrarySession ls,
                                                     java.lang.Long id)
                                              throws FdkException

  Description copied from class: `Utils`
  Returns a DirectoryObject from a given ID or throws an exception if the item cannot be found or it is not a DirectoryObject.

  Parameters:
    `ls` - The LibrarySession to use.
    `id` - The ID of the DO to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getAuditTypeList

    public static AuditTypeList getAuditTypeList(LibrarySession ls,
                                                 java.lang.Long id)
                                          throws FdkException

  Description copied from class: `Utils`
  Returns an AuditTypeList from a given ID or throws an exception if the item cannot be found or it is not an AuditTypeList.

  Parameters:
    `ls` - The LibrarySession to use
    `id` - The ID of the AuditTypeList to retrieve
  Throws:
    `FdkException` - if the operation fails.

### getVersionDescription

    public static VersionDescription getVersionDescription(LibrarySession ls,
                                                           long id)
                                                    throws FdkException

  Description copied from class: `Utils`
  Returns the VersionDescription from a given ID or throws an exception if the item cannot be found or it is not a VersionDescription.

  Parameters:
    `ls` - the LibrarySession to use.
    `id` - the ID of the VersionDescription to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getVersionDescription

    public static VersionDescription getVersionDescription(LibrarySession ls,
                                                           java.lang.Long id)
                                                    throws FdkException

  Description copied from class: `Utils`
  Returns the VersionDescription from a given ID or throws an exception if the item cannot be found or it is not a VersionDescription.

  Parameters:
    `ls` - The LibrarySession to use.
    `id` - The ID of the VersionDescription to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getLifecyclePolicy

    public static LifecyclePolicy getLifecyclePolicy(LibrarySession ls,
                                                     java.lang.Long id)
                                              throws FdkException

  Description copied from class: `Utils`
  Returns the LifecyclePolicy for the given ID. Throws an exception if the item cannot be found or the ID does not refer to a LifecyclePolicy.

  Parameters:
    `ls` - The LibrarySession to use.
    `id` - The ID of the LifecyclePolicy.
  Throws:
    `FdkException` - if the operation fails.

### getMedia

    public static Media getMedia(LibrarySession ls,
                                 java.lang.Long id)
                          throws FdkException

  Description copied from class: `Utils`
  Returns the Media from a given ID or throws an exception if the item cannot be found or it is not a Media object.

  Parameters:
    `ls` - The LibrarySession to use.
    `id` - The ID of the Media to retrieve.
  Throws:
    `FdkException` - if the operation fails.

### getMedia

    public static Media getMedia(LibrarySession ls,
                                 java.lang.String mediaName)
                          throws IfsException,
                                 FdkException

  Description copied from class: `Utils`
  Returns the Media given its name or throws an exception if the item cannot be found.

  Parameters:
    `ls` - The LibrarySession to use.
    `mediaName` - The name of the Media to retrieve.
  Throws:
    `IfsException` - if the operation fails.
    `FdkException` - if the media is not found.

### checkInvalidAttributes

    public static void checkInvalidAttributes(java.util.Map attrMap)
                                       throws FdkException

  Description copied from class: `Utils`
  If any attributes remain, then they are invalid.

  Parameters:
    `attrMap` - the attributes
  Throws:
    `FdkException` - if the operation fails.

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