com.sap.netweaver.bc.serialize

Interface ISerializerRegistrator

All Known Implementing Classes:
Registrator

public interface ISerializerRegistrator

central place to for all ITransportable implementations to manager their collaboration with the transport service. At the same time this is the place for the transport service and the ITransportHandler implementations to retrieve all the classes which need to be adressed when importing or exporting an object

Copyright 2004 SAP AG


Nested Class Summary
static class ISerializerRegistrator.PropertyUsage
           
 
Field Summary
static ISerializerRegistrator.PropertyUsage APPLICATION_PROPERTIES
           
static ISerializerRegistrator.PropertyUsage RESOURCE_PROPERTIES
           
 
Method Summary
 void claim(IClaimStaker claimstaker)
          iterates over all repositories available and calls the claim(IClaimStaker, RID) for each of the repositories prefixes.
 void claim(IClaimStaker claimstaker, RID prefix)
          adds the claims of the given claimstaker to the list of claimed properties.
 void deregister(ISerializer serializer)
          deregisters a serializer for all repositories it has been registered for.
 boolean deregister(ISerializer transportable, RID prefix)
           
 PropertiesClaim getClaim(RID rid, ISerializerRegistrator.PropertyUsage usage)
           
 EntryList list(RID prefix)
           
 void register(ISerializer serializer, boolean isCore)
           
 void register(ISerializer serializer, IRepositoryManager manager, boolean isCore)
          the same method as register(ISerializer, RID, boolean), but uses the IRepositoryManager.getPrefix() method to calculate the RID
 void register(ISerializer transportable, RID prefix, boolean isCore)
          if a transportable with the same ID is already registered here, the method will raise a TransportException, because the IDs registered for a certain RID must be unique.
 void register(ISerializer transportable, RID prefix, boolean isCore, int position)
          if a transportable with the same ID is already registered here, the method will raise a TransportException, because the IDs registered for a certain RID must be unique.
 RID[] registeredRIDs()
           
 

Field Detail

RESOURCE_PROPERTIES

static final ISerializerRegistrator.PropertyUsage RESOURCE_PROPERTIES

APPLICATION_PROPERTIES

static final ISerializerRegistrator.PropertyUsage APPLICATION_PROPERTIES
Method Detail

register

void register(ISerializer transportable,
              RID prefix,
              boolean isCore)
              throws SerializationException
if a transportable with the same ID is already registered here, the method will raise a TransportException, because the IDs registered for a certain RID must be unique.

Parameters:
transportable - to register for the given prefix, must not be null
prefix - the RID to register the transportable for, must not be null
isCore - flag to tell if the whole serialization process has to be cancelled, if this serializer fails. Use this flag with care. It should be only used for services that are relevant for security or the actual content of the resource
Throws:
SerializationException

register

void register(ISerializer transportable,
              RID prefix,
              boolean isCore,
              int position)
              throws SerializationException
if a transportable with the same ID is already registered here, the method will raise a TransportException, because the IDs registered for a certain RID must be unique.

Parameters:
transportable - to register for the given prefix, must not be null
prefix - the RID to register the transportable for, must not be null
isCore - flag to tell if the whole serialization process has to be cancelled, if this serializer fails. Use this flag with care. It should be only used for services that are relevant for security or the actual content of the resource
position - an explicit position in the calling sequence for serializers. Note that an implementation of this interface may not use this inofrmation. Also, there is no guarantee that other serializers will be active for the given RID.
Throws:
SerializationException

register

void register(ISerializer serializer,
              IRepositoryManager manager,
              boolean isCore)
              throws SerializationException
the same method as register(ISerializer, RID, boolean), but uses the IRepositoryManager.getPrefix() method to calculate the RID

Parameters:
serializer -
manager -
isCore -
Throws:
SerializationException

register

void register(ISerializer serializer,
              boolean isCore)
              throws SerializationException
Parameters:
serializer - to register for all repositories available, must not be null
isCore - flag to tell if the whole serialization process has to be cancelled, if this serializer fails. Use this flag with care. It should be only used for services that are relevant for security or the actual content of the resource
Throws:
SerializationException

deregister

boolean deregister(ISerializer transportable,
                   RID prefix)
                   throws SerializationException
Parameters:
transportable - the transportable to deregister, must not be null
prefix - the prefix to deregister the transportable for, must not be null
Returns:
if the given transportable has not been registered, the method will return false, it will return true otherwise
Throws:
TransportException
SerializationException

deregister

void deregister(ISerializer serializer)
                throws SerializationException
deregisters a serializer for all repositories it has been registered for.

Parameters:
serializer - the serializer to deregister, must not be null
Throws:
TransportException
SerializationException

list

EntryList list(RID prefix)
Parameters:
prefix - the RID to retrieve all transportables for, must not be null
Returns:
a list of the registered transportables for the given RID, might be empty but must not be null. A modification of the array by the calling class must not modify the registration of transportables within this registrator

registeredRIDs

RID[] registeredRIDs()
Returns:
all RID s that ISerializer instances have been defined for. Might return an empty array, but never null.

claim

void claim(IClaimStaker claimstaker,
           RID prefix)
adds the claims of the given claimstaker to the list of claimed properties. As the name claim already suggests, this is by no means binding for any other claimstaker. Each implementing class is free to ignore claims made by other claimstakers. If in doubt, the class can check for claimed IPropertyName instances by calling the getClaims(RID rid) method. Note possible race-conditions if another class added claims in between the two method calls.

Parameters:
claimstaker - the class that wants to claim exclusive ownership of certain IPropertyName while serialization of a resource. Must not be null
prefix - the prefix of the repository to claim ownership of the properties for.

claim

void claim(IClaimStaker claimstaker)
           throws ResourceException
iterates over all repositories available and calls the claim(IClaimStaker, RID) for each of the repositories prefixes.

Throws:
ResourceException - if the ResourceFactory cannot retrieve the collection of IRepositoryManager instances.

getClaim

PropertiesClaim getClaim(RID rid,
                         ISerializerRegistrator.PropertyUsage usage)
Parameters:
rid - RID of the resource to get the properties claim for. Must not be null
Returns:
the aggregated claim of all claims done up to this point in time. A calling class must never hold a reference of this object for longer than a method call, as this aggregation might become outdated.
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 2014 SAP AG Complete Copyright Notice