com.sap.mdm.repository.commands
Class DuplicateRepositoryCommand

java.lang.Object
  extended bycom.sap.mdm.commands.AbstractCommandBase
      extended bycom.sap.mdm.commands.AbstractCommand
          extended bycom.sap.mdm.session.AbstractSessionCommand
              extended bycom.sap.mdm.session.AbstractServerSessionCommand
                  extended bycom.sap.mdm.repository.commands.DuplicateRepositoryCommand
All Implemented Interfaces:
Command, PassportSupport

public class DuplicateRepositoryCommand
extends AbstractServerSessionCommand

A command for duplicating a repository onto the same DBMS or onto a different DBMS.

Note:
Starting from SP5 Patch 01, this command had been changed to take in a server session. Originally, it takes in a repository session.

See Also:
ArchiveRepositoryCommand

Constructor Summary
DuplicateRepositoryCommand(ConnectionAccessor connection)
          Creates a new instance of this command.
DuplicateRepositoryCommand(ServerSessionContext ctx)
          Creates a new instance of this command by context.
 
Method Summary
 String getDBMSUserName()
          Returns the DBMS user name.
 String getDBMSUserPassword()
          Returns the DBMS user password.
 String getLogFileName()
          Returns the operation log for the execution of this command.
 int[] getMaskIds()
          Retrieves the mask IDs.
 int getMaskUse()
          Indicates whether masks are used.
 int getPartition()
          Returns the type of the partition.
 RepositoryIdentifier getSourceRepositoryIdentifier()
          Returns the specified source repository.
 RepositoryIdentifier getTargetRepositoryIdentifier()
          Returns the specified target repository.
 boolean isOverwrite()
          Returns whether to overwrite the existing repository.
 boolean isSchemaOnly()
          Returns whether to operate only on the schema.
 void setDBMSUserName(String name)
          Specifies the DBMS user name (required).
 void setDBMSUserPassword(String password)
          Specifies the DBMS user password (required).
 void setMaskIds(int[] maskIds)
          Specifies the masks to use (optional).
 void setMaskUse(int maskUse)
          Specifies whether masks are used (optional).
 void setOverwrite(boolean overwrite)
          Specifies whether to overwrite the existing repository (optional).
 void setPartition(int partition)
          Specifies the type of partition to use for the repository (optional).
 void setSchemaOnly(boolean schemaOnly)
          Specifies whether to operate only on the schema (optional).
 void setSourceRepositoryIdentifier(RepositoryIdentifier reposDef)
          Specifies the source repository to operate on (required).
 void setTargetRepositoryIdentifier(RepositoryIdentifier reposDef)
          Specifies the target repository to operate on (required).
 
Methods inherited from class com.sap.mdm.commands.AbstractCommand
getSession, setSession
 
Methods inherited from class com.sap.mdm.commands.AbstractCommandBase
execute, getPassport, isCommandComplete, setPassport
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DuplicateRepositoryCommand

public DuplicateRepositoryCommand(ConnectionAccessor connection)
Creates a new instance of this command.

Parameters:
connection - the connections to the server.

DuplicateRepositoryCommand

public DuplicateRepositoryCommand(ServerSessionContext ctx)
                           throws ConnectionException,
                                  SessionException
Creates a new instance of this command by context.

Parameters:
ctx - the repository session context.
Method Detail

setTargetRepositoryIdentifier

public void setTargetRepositoryIdentifier(RepositoryIdentifier reposDef)
Specifies the target repository to operate on (required).

Parameters:
reposDef - the repository.

getTargetRepositoryIdentifier

public RepositoryIdentifier getTargetRepositoryIdentifier()
Returns the specified target repository.

Returns:
the repository.

setSourceRepositoryIdentifier

public void setSourceRepositoryIdentifier(RepositoryIdentifier reposDef)
Specifies the source repository to operate on (required).

Parameters:
reposDef - the repository.

getSourceRepositoryIdentifier

public RepositoryIdentifier getSourceRepositoryIdentifier()
Returns the specified source repository.

Returns:
the repository.

setDBMSUserName

public void setDBMSUserName(String name)
Specifies the DBMS user name (required).

Parameters:
name - the DBMS user name.

getDBMSUserName

public String getDBMSUserName()
Returns the DBMS user name.

Returns:
the DBMS user name.

setDBMSUserPassword

public void setDBMSUserPassword(String password)
Specifies the DBMS user password (required).

Parameters:
password -

getDBMSUserPassword

public String getDBMSUserPassword()
Returns the DBMS user password.

Returns:
the DBMS user password.

setPartition

public void setPartition(int partition)
Specifies the type of partition to use for the repository (optional). The default is one partition.

Parameters:
partition - the partition type.

getPartition

public int getPartition()
Returns the type of the partition.

Returns:
the type of the partition.

setSchemaOnly

public void setSchemaOnly(boolean schemaOnly)
Specifies whether to operate only on the schema (optional). The default is false.

Parameters:
schemaOnly - true to perform the operator for schema only, otherwise false.

isSchemaOnly

public boolean isSchemaOnly()
Returns whether to operate only on the schema.

Returns:
whether to operate only on the schema.

isOverwrite

public boolean isOverwrite()
Returns whether to overwrite the existing repository.

Returns:
true to overwrite existing repository, otherwise false.

setOverwrite

public void setOverwrite(boolean overwrite)
Specifies whether to overwrite the existing repository (optional). The default is false.

Parameters:
overwrite - whether to overwrite existing repository.

getMaskIds

public int[] getMaskIds()
Retrieves the mask IDs.

Returns:
the mask IDs.

setMaskIds

public void setMaskIds(int[] maskIds)
Specifies the masks to use (optional). The default is no mask.

Parameters:
maskIds - the mask IDs.

getMaskUse

public int getMaskUse()
Indicates whether masks are used.

Returns:
whether masks are used

setMaskUse

public void setMaskUse(int maskUse)
Specifies whether masks are used (optional). The default is no masks.

Parameters:
maskUse - whether masks are used.

getLogFileName

public String getLogFileName()
Returns the operation log for the execution of this command.

Returns:
the log file name.


Copyright 2004-2007 by SAP AG. All Rights Reserved.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.