com.sapportals.wcm.repository.service.colltransport

Class CollaborationTransportExport

java.lang.Object
  extended by com.sapportals.wcm.repository.service.colltransport.CollaborationTransportExport
All Implemented Interfaces:
IClaimStaker, ISerializer

public final class CollaborationTransportExport
extends Object
implements ISerializer, IClaimStaker


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.sap.netweaver.bc.serialize.ISerializer
ISerializer.DeserializationParameters, ISerializer.IDValidator, ISerializer.ImportMode, ISerializer.SerializationParameters
 
Field Summary
 
Fields inherited from interface com.sap.netweaver.bc.serialize.ISerializer
ADD_AND_DELETE, ADD_ONLY, MERGE_FOLDER, VALID_CHARS
 
Constructor Summary
CollaborationTransportExport(String id, String repository, String root, String tag, String name, PropertyName propName, IPropertyNameList propList, boolean doAnonym, boolean doRes)
          Constructor of Collaboration Transport
 
Method Summary
 IDeserializer deserialize(ISerializer.DeserializationParameters parameters)
          called to actually recreate the snapshot of the resource denoted by the RID passed here.
 PropertiesClaim getClaim(ISerializerRegistrator.PropertyUsage usage)
           
 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 parameters)
          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 parameters)
          Exports that part of the content of the specified resource this serializer is responsible for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollaborationTransportExport

public CollaborationTransportExport(String id,
                                    String repository,
                                    String root,
                                    String tag,
                                    String name,
                                    PropertyName propName,
                                    IPropertyNameList propList,
                                    boolean doAnonym,
                                    boolean doRes)
Constructor of Collaboration Transport

Parameters:
id - the id of used by Transport Service
repository - where items are stored
root - Path in repository where items are stored
tag - tag used to identify start of XML-File
name - Name of the Transport
propName - personalized Property which will be transported
propList - List of properties which shall not be transported
doAnonym - shall be transported anonymous
doRes - shall resources be transported
Method Detail

getDisplayName

public String getDisplayName(Locale locale)
Description copied from interface: ISerializer
Gets the localized display name of this ISerializer.

Specified by:
getDisplayName in interface ISerializer
Parameters:
locale - the Locale
Returns:
the localized display name or null

serialize

public void serialize(ISerializer.SerializationParameters parameters)
               throws SerializationException
Description copied from interface: ISerializer
Exports that part of the content of the specified 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.

Specified by:
serialize in interface ISerializer
Parameters:
parameters - defining the parameters for the call, must not be null
Throws:
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.

deserialize

public IDeserializer deserialize(ISerializer.DeserializationParameters parameters)
                          throws SerializationException
Description copied from interface: ISerializer
called to actually recreate the snapshot of the resource denoted by the RID passed here. The data created in the ISerializer.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.

Specified by:
deserialize in interface ISerializer
Parameters:
parameters - defining the parameters for the call, must not be null
Returns:
the handler which will be called when parsing the data created in the ISerializer.serialize(com.sap.netweaver.bc.serialize.ISerializer.SerializationParameters)method. Must not be null
Throws:
SerializationException - Depending on the severity of the exception, the snapshot of the complete resource has to be aborted.

isSerializable

public boolean isSerializable(ISerializer.SerializationParameters parameters)
                       throws SerializationException
Description copied from interface: ISerializer
Returns whether this serializer wants to export content for resources in the repository denoted by its root resource passed in parameter.

If an implementation returns false, the callback method ISerializer.serialize(com.sap.netweaver.bc.serialize.ISerializer.SerializationParameters)will not be called for resources of that repository within the current serialization cycle.

Specified by:
isSerializable in interface ISerializer
Parameters:
parameters - defining the parameters for the call, must not be null
Returns:
flag, if this ISerializer should be called for resources in the repository defined in the parameters parameter.
Throws:
SerializationException - If the exception is thrown, the calling class should interpret this exception the same way as it would interpret a false as return value

isDeserializable

public boolean isDeserializable(ISerializer.DeserializationParameters parameters)
                         throws SerializationException
Description copied from interface: ISerializer
Returns whether this serializer is able to import content for resources in the repository denoted by its root resource passed in parameter.

If an implementation returns false, the callback method ISerializer.deserialize(com.sap.netweaver.bc.serialize.ISerializer.DeserializationParameters)will not be called for resources of that repository within the current deserialization cycle.

Specified by:
isDeserializable in interface ISerializer
Parameters:
parameters - defining the parameters for the call, must not be null
Returns:
flag, if this ISerializer should be called for resources in the repository defined in the parameters parameter.
Throws:
SerializationException - If the exception is thrown, the calling class should interpret this exception the same way as it would interpret a false as return value

getHeaderData

public HeaderData getHeaderData()
Specified by:
getHeaderData in interface ISerializer
Returns:
the properties of this instance of a ISerializer implementation. Must not return null, but might return an empty instance.

getID

public String getID()
Description copied from interface: ISerializer
Gets the unique identifier of this ISerializer. Must be unique in the matching table of the 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.

Specified by:
getID in interface ISerializer
Returns:
the unique identifier

getClaim

public PropertiesClaim getClaim(ISerializerRegistrator.PropertyUsage usage)
Specified by:
getClaim in interface IClaimStaker
Parameters:
usage - the application the properties are claimed for. Use the constants provided by the ISerializerRegistrator for this. Must not be null.
Returns:
the properties the implementing class wants to claim as its own. Might contain no values, but must not be null. This information is handled in a static way - the claim that has been provided once by the implementing class will be kept that way during the runtime of the VM
Access Rights

This class can be accessed from:


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 2011 SAP AG Complete Copyright Notice