public interface ISerializer
IResource
. is taken. This snapshot can be stored within the
system or send to another instance of a KMC runtime. The data written out by
an implementation using the export
method will be used to
reconstruct the resource as it was at the time the snapshot was taken.
Instances must be registered with the central
ISerializerRegistrator
.
Copyright 2004 SAP AG
Modifier and Type | Interface and Description |
---|---|
static class |
ISerializer.DeserializationParameters |
static class |
ISerializer.IDValidator |
static class |
ISerializer.ImportMode
Utility Class used to define the different ways a deserialization can occur.
|
static class |
ISerializer.SerializationParameters
Container to group all the data needed for the export step
|
Modifier and Type | Field and Description |
---|---|
static ISerializer.ImportMode |
ADD_AND_DELETE |
static ISerializer.ImportMode |
ADD_ONLY |
static ISerializer.ImportMode |
MERGE_FOLDER |
static String |
VALID_CHARS |
Modifier and Type | Method and Description |
---|---|
IDeserializer |
deserialize(ISerializer.DeserializationParameters parameters)
called to actually recreate the snapshot of the
resource
denoted by the RID passed here. |
String |
getDisplayName(Locale locale)
Gets the localized display name of this ISerializer.
|
HeaderData |
getHeaderData() |
String |
getID()
Gets the unique identifier of this ISerializer.
|
boolean |
isDeserializable(ISerializer.DeserializationParameters parameters)
Returns whether this serializer is able to import content for resources in
the repository denoted by its root resource passed in
parameter . |
boolean |
isSerializable(ISerializer.SerializationParameters params)
Returns whether this serializer wants to export content for resources in
the repository denoted by its root resource passed in
parameter . |
void |
serialize(ISerializer.SerializationParameters params)
Exports that part of the content of the specified
resource
this serializer is responsible for. |
static final ISerializer.ImportMode ADD_ONLY
static final ISerializer.ImportMode ADD_AND_DELETE
static final ISerializer.ImportMode MERGE_FOLDER
static final String VALID_CHARS
String getID()
ISerializerRegistrator
. So for each
RID
in the registrator, only one ISeralizer
can have a certain ID. The returned string must not be null
,
must not consist of only blanks. It must only contain characters stated in
the VALID_CHARS
constant of this interface. You can check
validity by using ISerializer.IDValidator.isValid(String)
. A
serializer with an invalid ID will not be registered with the Registrator
instead, a runtime exception will be thrown.String getDisplayName(Locale locale)
locale
- the Locale
null
boolean isSerializable(ISerializer.SerializationParameters params) throws SerializationException
parameter
.
If an implementation returns false
, the callback method
serialize(com.sap.netweaver.bc.serialize.ISerializer.SerializationParameters)
will not be called for resources of that repository
within the current serialization cycle.
params
- defining the parameters for the call, must not be
null
ISerializer
should be called for
resources in the repository defined in the parameters
parameter.SerializationException
- If the exception is thrown, the calling
class should interpret this exception the same way as it would
interpret a false
as return valuevoid serialize(ISerializer.SerializationParameters params) throws SerializationException
resource
this serializer is responsible for.
If the implementing class does not need to serialize any data for the
given IResource
, it should not call the
IXMLSerializer
supplied in the params-container. If that xmlserializer
is called, it will create an xml-file or snippet for the calling class. This
will result in a call to that class when the deserialization is triggered as
well. So the unneeded call to the xmlserializer results in a double performance
overhead.
params
- defining the parameters for the call, must not be
null
SerializationException
- The calling class has to ensure, that any
Stream
object passed to this method will be
properly closed. Depending on the severity of the exception, the
snapshot of the complete resource has to be aborted.boolean isDeserializable(ISerializer.DeserializationParameters parameters) throws SerializationException
parameter
.
If an implementation returns false
, the callback method
deserialize(com.sap.netweaver.bc.serialize.ISerializer.DeserializationParameters)
will not be called for resources of that repository
within the current deserialization cycle.
parameters
- defining the parameters for the call, must not be
null
ISerializer
should be called for
resources in the repository defined in the parameters
parameter.SerializationException
- If the exception is thrown, the calling
class should interpret this exception the same way as it would
interpret a false
as return valueIDeserializer deserialize(ISerializer.DeserializationParameters parameters) throws SerializationException
resource
denoted by the RID
passed here. The data created in the
serialize(com.sap.netweaver.bc.serialize.ISerializer.SerializationParameters)
will be used for this. Only data created by this
serializer will be available. It will be available exactly as it was
created.parameters
- defining the parameters for the call, must not be
null
serialize(com.sap.netweaver.bc.serialize.ISerializer.SerializationParameters)
method. Must not be null
SerializationException
- Depending on the severity of the exception,
the snapshot of the complete resource has to be aborted.HeaderData getHeaderData()
ISerializer
implementation. Must not return null
, but might
return an empty instance.Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice