com.sap.mdm.repository.commands
Class ArchiveRepositoryCommand

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.ArchiveRepositoryCommand
All Implemented Interfaces:
Command, PassportSupport

public class ArchiveRepositoryCommand
extends AbstractServerSessionCommand

A command for archiving a repository. This is useful for the purpose of making a backup or transferring a repository to another DBMS. The archive file is SAP's proprietary format. NOTE: This command used to take in a repository session. This command had be changed to take in a server session. The setRepositoryIdentifier is also required.

See Also:
UnarchiveRepositoryCommand

Constructor Summary
ArchiveRepositoryCommand(ConnectionAccessor connection)
          Creates a new instance of this command.
ArchiveRepositoryCommand(ServerSessionContext ctx)
          Creates a new instance of this command by context.
 
Method Summary
 String getArchiveFileName()
          Retrieves the archive file name.
 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.
 RepositoryIdentifier getRepositoryIdentifier()
          Returns the specified repository.
 int getSegmentSize()
          Returns the segment size in megabytes.
 boolean isOverwrite()
          Returns whether to overwrite the existing repository.
 boolean isSchemaOnly()
          Returns whether to operate only on the schema.
 void setArchiveFileName(String fileName)
          Sets the archive file name (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 setRepositoryIdentifier(RepositoryIdentifier reposDef)
          Specifies the repository to operate on (required).
 void setSchemaOnly(boolean schemaOnly)
          Specifies whether to archive only the schema (optional).
 void setSegmentSize(int segmentSize)
          Sets the segment size in megabytes (optional).
 
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

ArchiveRepositoryCommand

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

Parameters:
connection - the connections to the server.

ArchiveRepositoryCommand

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

Parameters:
ctx - the repository session context.
Method Detail

setSchemaOnly

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

Parameters:
schemaOnly - true to archive only the schema, 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 mask.

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.

getArchiveFileName

public String getArchiveFileName()
Retrieves the archive file name.

Returns:
the archive file name.

setArchiveFileName

public void setArchiveFileName(String fileName)
Sets the archive file name (required).

Parameters:
fileName - the archive file name.

getSegmentSize

public int getSegmentSize()
Returns the segment size in megabytes.

Returns:
the segment size.

setSegmentSize

public void setSegmentSize(int segmentSize)
Sets the segment size in megabytes (optional). The default is as big as it can.

Parameters:
segmentSize - the segment size.

setRepositoryIdentifier

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

Parameters:
reposDef - the repository.

getRepositoryIdentifier

public RepositoryIdentifier getRepositoryIdentifier()
Returns the specified repository.

Returns:
the repository.


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.