public interface JetspeedSerializer
The Serializer is capable of reading and writing the current content of the Jetspeed environment to and from XML files. The component can be used from a standalone java application for seeding a new database or from a running portal as an administrative backup/restore function.
The XML file needs to indicate whether passwords used in credentials
are plain text or whether they are encoded. The import algoritm can determine -
prior to reading users - which encode/decode scheme was used and if
Modifier and Type | Field and Description |
---|---|
static short |
DECODING_SUPPORTED
the passwords are encoded and the provider is the same as the data source
and we have a 2-way algorithm
|
static String |
DEFAULT_TAG_SNAPSHOT_NAME
the main tag in the XML file
|
static short |
ERROR_DECODING
Error in determening correct password handling
|
static short |
INVALID_PASSWORDS
the passwords are encoded and the current provider is DIFFERENT....
|
static String |
KEY_BACKUP_BEFORE_PROCESS |
static String |
KEY_EXPORT_INDENTATION |
static String |
KEY_LOGGER |
static String |
KEY_OVERWRITE_EXISTING |
static String |
KEY_PROCESS_CAPABILITIES |
static String |
KEY_PROCESS_PERMISSIONS |
static String |
KEY_PROCESS_PORTAL_PREFERENCES |
static String |
KEY_PROCESS_PROFILER |
static String |
KEY_PROCESS_SSO |
static String |
KEY_PROCESS_USER_PREFERENCES |
static String |
KEY_PROCESS_USER_TEMPLATES |
static String |
KEY_PROCESS_USERS
export/import instructions
|
static short |
NO_DECODING
the passwords are in clear text
|
static short |
PASSTHRU_REQUIRED
the passwords are encoded and the provider is the same as the data
source, but is a 1-way algorithm
|
static String[] |
TAG_SNAPSHOT_NAMES |
Modifier and Type | Method and Description |
---|---|
void |
deleteData() |
void |
deleteData(Map<String,Object> settings) |
void |
exportData(String name,
String exportFileName)
Main routine to export the set of data elements and write them to the
named XML file.
|
void |
exportData(String name,
String exportFileName,
Map<String,Object> settings)
Main routine to export the set of data elements and write them to the
named XML file.
|
Map<String,Object> |
getDefaultSettings() |
List<JetspeedComponentSerializer> |
getSerializers() |
void |
importData(String importFileName)
Main routine to import the set of data elements and write them to the
current environment.
|
void |
importData(String importFileName,
Map<String,Object> settings)
Main routine to import the set of data elements and write them to the
current environment.
|
static final short ERROR_DECODING
static final short NO_DECODING
static final short PASSTHRU_REQUIRED
static final short DECODING_SUPPORTED
static final short INVALID_PASSWORDS
static final String KEY_PROCESS_USERS
static final String KEY_PROCESS_CAPABILITIES
static final String KEY_PROCESS_PROFILER
static final String KEY_PROCESS_PERMISSIONS
static final String KEY_PROCESS_USER_PREFERENCES
static final String KEY_PROCESS_PORTAL_PREFERENCES
static final String KEY_PROCESS_USER_TEMPLATES
static final String KEY_PROCESS_SSO
static final String KEY_LOGGER
static final String KEY_OVERWRITE_EXISTING
static final String KEY_BACKUP_BEFORE_PROCESS
static final String KEY_EXPORT_INDENTATION
static final String DEFAULT_TAG_SNAPSHOT_NAME
the main tag in the XML file
static final String[] TAG_SNAPSHOT_NAMES
List<JetspeedComponentSerializer> getSerializers()
void exportData(String name, String exportFileName) throws SerializerException
name
- of the snapshotexportFileName
- SerializerException
void exportData(String name, String exportFileName, Map<String,Object> settings) throws SerializerException
The caller can adjust the default behavior by passign in a map of flags. Each map entry is keyed by a key Constant and the associated Boolean value, for exammple KEY_PROCESS_USER_PREFERENCES, Boolean.FALSE would cause the serializer to skip user preferences.
Note that ProfilingRules require the users . Hence turning off User collection will automatically turn off the Profiling rules
name
- of the snapshotexportFileName
- settings
- optional Map overwriting default export behaviorSerializerException
void importData(String importFileName) throws SerializerException
importFileName
- SerializerException
void importData(String importFileName, Map<String,Object> settings) throws SerializerException
Existing entries (like users) etc. will be overwritten with the provided data.
The caller can adjust the default behavior by passign in a map of flags. Each map entry is keyed by a key Constant and the associated Boolean value, for exammple KEY_PROCESS_USER_PREFERENCES, Boolean.FALSE would cause the serializer to skip user preferences.
Note that settings are valid throughout each invocation. Therefore if a caller wants to preserve current users and only add new entries while at the same time overwrite all profiling rules, exportData has to be invoked twice - once to process only the users with the no-overwrite option and once to process the profiling rules
importFileName
- settings
- optional Map overwriting default import behaviorSerializerException
void deleteData() throws SerializerException
SerializerException
void deleteData(Map<String,Object> settings) throws SerializerException
SerializerException
Copyright © 1999–2016 The Apache Software Foundation. All rights reserved.