public class ExportTask extends SessionedTask<byte[]>
Export can be done either at the resource level, or at the project level with different implications at import time.
Import behavior |
---|
Modifier and Type | Method and Description |
---|---|
protected byte[] |
_execute()
Subclasses implement this method
|
static byte[] |
exportProjectLevel(ConfigService configService, java.lang.String session, java.util.Collection<Ref> refs, EncryptionScope escope, char[] passphrase)
export configuration at the project level
|
static byte[] |
exportResourceLevel(ConfigService configService, java.lang.String session, java.util.Collection<Ref> refs, boolean includeDependencies, EncryptionScope escope, char[] passphrase)
exports configuration at the resource level
|
assertExists, assertLocation, assertNONResource, assertNotExists, assertNotLocationData, assertNotNull, assertNotNullElement, assertResource, assertSimple, call, doExecute, doExecute, doExecute, doExecute, expand, getConfigContext, getConfigMBean, getConfigService, getDescription, getSession, isLocation, isReadOnlyTransaction, requiresSystemTransaction
public static byte[] exportProjectLevel(ConfigService configService, java.lang.String session, java.util.Collection<Ref> refs, EncryptionScope escope, char[] passphrase) throws java.lang.Exception
configService
-session
- the session to export fromrefs
- set of project references to exportescope
- the encryption scope. If null or EncryptionScope.NoEncryption
no encryption is performedpassphrase
- the passphrasejava.lang.Exception
public static byte[] exportResourceLevel(ConfigService configService, java.lang.String session, java.util.Collection<Ref> refs, boolean includeDependencies, EncryptionScope escope, char[] passphrase) throws java.lang.Exception
configService
-session
- the session to export fromrefs
- references to resources, folders, projects and/or Domain reference (See Ref.DOMAIN
). If a folder, project or Domain reference is specified, all the resources under that location are exported, along with project and folder properties (e.g., project/folder description). The project and folder properties can also be exported directly by specifying the reference to the LocationData resource that contains these properties (See Ref.makeLocationDataRef(Ref)
) Using a project reference in this collection does not indicate that the project is exported at the project level. But rather, it serves as a convenient way to export all resources under a particular project using the resource-level exportincludeDependencies
- whether to include dependencies when exporting the given set of references.escope
- the encryption scope. If null or EncryptionScope.NoEncryption
no encryption is performedpassphrase
- the passphrasejava.lang.Exception
protected byte[] _execute() throws java.lang.Exception
SessionedTask
_execute
in class SessionedTask<byte[]>
java.lang.Exception