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.admin.actions
Class RenamePublicObjectAction

    java.lang.Object
      oracle.ifs.utils.action.AbstractAction
          oracle.ifs.admin.actions.LibrarySessionAction
              oracle.ifs.admin.actions.RenamePublicObjectAction

All Implemented Interfaces:
  Action, IfsParameters

    public class RenamePublicObjectAction

extends LibrarySessionAction

Renames a PublicObject given a source path and a new name. Optionally, if the new name is already in use, the PublicObject will be named by concatenating the new name with an integer from 0..Integer.MAX_VALUE. If all of these names are taken, this Action will fail. This Action will optionally fail if the target PublicObject cannot be found. RenamePublicObjectAction defines four options:
source
new_name
append_if_name_exists
fail_if_not_found

(Unpublished)
Modified:
  lsaenz 11/07/2000 Changed to use options rather than members., lsaenz 08/17/2000 Added boolean property: failIfFileNotFound., lsaenz 08/16/2000 Created.

Field Summary
`static java.lang.String` | `APPEND_IF_NAME_EXISTS` Option key mapping to whether numbers should be appended to the end of existing names.
`static java.lang.String` | `FAIL_IF_NOT_FOUND` Option key mapping to whether this action should fail if the source PublicObject cannot be found (if false, it will just skip).
`static java.lang.String` | `NEW_NAME` Option key mapping to the new name to assign to the source PublicObject.
`static java.lang.String` | `SOURCE` Option key mapping to the source PublicObject in iFS.

Fields inherited from class oracle.ifs.admin.actions.LibrarySessionAction
`RESTART_SERVICE`

Fields inherited from class oracle.ifs.utils.action.AbstractAction
`CONTINUE_ON_ERROR, m_defaultOptions, m_options`

Fields inherited from interface oracle.ifs.utils.common.IfsParameters
`APPEND_LOG, DATABASE_URL, DB_USER_NAME, DB_USER_PASSWORD, DOMAIN_TYPE, ENABLE_SSL_SUPPORT, FOR_SCHEMA_UPGRADE, IFS_DOMAIN_DISPLAY_NAME, IFS_DOMAIN_NAME, IFS_SCHEMA_NAME, IFS_SCHEMA_PASSWORD, IFS_SERVICE_NAME, IFS_USER_NAME, IFS_USER_PASSWORD, INCLUDE_PATH, INITIAL_CONTEXT_FACTORY, LDAP_URL_DAS_LOOKUP, LDAP_USER_NAME, LDAP_USER_PASSWORD, OUTPUT_FILE, PARAMETER_FILE, REGISTRY, SCHEMA_VERSION_KEY, SECURITY_PROTOCOL_NAME, SERVICE_CONFIGURATION_NAME`

Constructor Summary
`RenamePublicObjectAction()` Creates a new RenamePublicObjectAction without specifying a target PublicObject or a new name.

Method Summary
`void` | `execute(LibrarySession sess)` Renames the target PublicObject.
`void` | `failed(java.lang.Throwable error)` Does nothing.
`void` | `setAppendIfNameExists(boolean append)` Sets whether or not this Action will append an integer to the new name for the target PublicObject if a PublicObject with the new name already exists.
`void` | `setFailIfFileNotFound(boolean fail)` Sets whether or not this Action will fail if the target PublicObject cannot be found.
`void` | `setNewName(java.lang.String newName)` Sets the new name to assign to the target PublicObject.
`void` | `setSource(java.lang.String source)` Sets the source PublicObject to rename.
`void` | `stop()` Attempts to stop this Action.

Methods inherited from class oracle.ifs.admin.actions.LibrarySessionAction
`perform, setDomain, setForSchemaUpgrade, setPassword, setRestartService, setSchemaPassword, setUser`

Methods inherited from class oracle.ifs.utils.action.AbstractAction
`getDescription, getName, getValue, isContinueOnError, putValue, setDefaultOptions, setDescription, setName, setOptions`

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

Field Detail

### SOURCE

    public static final java.lang.String SOURCE

  Description copied from class: `RenamePublicObjectAction`
  Option key mapping to the source PublicObject in iFS. Defined as "renamepo.source".

  See Also:
    Constant Field Values

### NEW_NAME

    public static final java.lang.String NEW_NAME

  Description copied from class: `RenamePublicObjectAction`
  Option key mapping to the new name to assign to the source PublicObject. Defined as "renamepo.new_name".

  See Also:
    Constant Field Values

### APPEND_IF_NAME_EXISTS

    public static final java.lang.String APPEND_IF_NAME_EXISTS

  Description copied from class: `RenamePublicObjectAction`
  Option key mapping to whether numbers should be appended to the end of existing names. Defined as "renamepo.append_if_name_exists".

  See Also:
    Constant Field Values

### FAIL_IF_NOT_FOUND

    public static final java.lang.String FAIL_IF_NOT_FOUND

  Description copied from class: `RenamePublicObjectAction`
  Option key mapping to whether this action should fail if the source PublicObject cannot be found (if false, it will just skip). Defined as "renamepo.fail_if_not_found".

  See Also:
    Constant Field Values

Constructor Detail

### RenamePublicObjectAction

    public RenamePublicObjectAction()

  Creates a new RenamePublicObjectAction without specifying a target PublicObject or a new name. By default, `appendIfNameExists` is set to `true` and `failIfFileNotFound` is set to `false`.

Method Detail

### setSource

    public void setSource(java.lang.String source)

  Description copied from class: `RenamePublicObjectAction`
  Sets the source PublicObject to rename.

  Parameters:
    `source` - the path (in iFS) of the target PublicObject.

### setNewName

    public void setNewName(java.lang.String newName)

  Description copied from class: `RenamePublicObjectAction`
  Sets the new name to assign to the target PublicObject.

  Parameters:
    `newName` - the name to rename the PublicObject to.

### setAppendIfNameExists

    public void setAppendIfNameExists(boolean append)

  Description copied from class: `RenamePublicObjectAction`
  Sets whether or not this Action will append an integer to the new name for the target PublicObject if a PublicObject with the new name already exists.

  Parameters:
    `append` - whether to append an integer to the end of the new name if a PublicObject with that name already exists.

### setFailIfFileNotFound

    public void setFailIfFileNotFound(boolean fail)

  Description copied from class: `RenamePublicObjectAction`
  Sets whether or not this Action will fail if the target PublicObject cannot be found.

  Parameters:
    `fail` - whether to fail if the target PublicObject cannot be found.

### execute

    public void execute(LibrarySession sess)
                 throws IfsException,
                        ActionFailedException

  Description copied from class: `RenamePublicObjectAction`
  Renames the target PublicObject.

  Specified by:
    `execute` in class `LibrarySessionAction`
  Parameters:
    `sess` - the connected LibrarySession (in admin mode if possible).
  Throws:
    `IfsException` - if a database error occurs.
    `ActionFailedException` - if any other error occurs.

### stop

    public void stop()

  Description copied from class: `RenamePublicObjectAction`
  Attempts to stop this Action.

### failed

    public void failed(java.lang.Throwable error)

  Description copied from class: `RenamePublicObjectAction`
  Does nothing.

  Parameters:
    `error` - the error that occurred.

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