public class RenamePublicObjectAction extends LibrarySessionAction
Modifier and Type | Field and Description |
---|---|
static String |
APPEND_IF_NAME_EXISTS
Option key mapping to whether numbers should be appended to the end of
existing names.
|
static 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 String |
NEW_NAME
Option key mapping to the new name to assign to the source PublicObject.
|
static String |
SOURCE
Option key mapping to the source PublicObject in iFS.
|
RESTART_SERVICE
CONTINUE_ON_ERROR, m_defaultOptions, m_options
APPEND_LOG, DATABASE_TYPE, 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 and Description |
---|
RenamePublicObjectAction()
Creates a new RenamePublicObjectAction without specifying a target
PublicObject or a new name.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(LibrarySession sess)
Renames the target PublicObject.
|
void |
failed(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(String newName)
Sets the new name to assign to the target PublicObject.
|
void |
setSource(String source)
Sets the source PublicObject to rename.
|
void |
stop()
Attempts to stop this Action.
|
perform, setDomain, setForSchemaUpgrade, setPassword, setRestartService, setSchemaPassword, setUser
getDescription, getName, getValue, isContinueOnError, isPostgres, putValue, setDefaultOptions, setDescription, setName, setOptions
public static final String SOURCE
public static final String NEW_NAME
public static final String APPEND_IF_NAME_EXISTS
public static final String FAIL_IF_NOT_FOUND
public RenamePublicObjectAction()
appendIfNameExists
is set to true
and failIfFileNotFound
is set
to false
.public void setSource(String source)
source
- the path (in iFS) of the target PublicObject.public void setNewName(String newName)
newName
- the name to rename the PublicObject to.public void setAppendIfNameExists(boolean append)
append
- whether to append an integer to the end of the new name
if a PublicObject with that name already exists.public void setFailIfFileNotFound(boolean fail)
fail
- whether to fail if the target PublicObject cannot be found.public void execute(LibrarySession sess) throws IfsException, ActionFailedException
execute
in class LibrarySessionAction
sess
- the connected LibrarySession (in admin mode if possible).IfsException
- if a database error occurs.ActionFailedException
- if any other error occurs.public void stop()
public void failed(Throwable error)
error
- the error that occurred.Copyright © 2023. All rights reserved.