public final class Registrator extends Object implements ISerializerRegistrator, IComponentListener
Copyright 2004 SAP AG
Modifier and Type | Class and Description |
---|---|
static class |
Registrator.ShutdownListener |
ISerializerRegistrator.PropertyUsage
APPLICATION_PROPERTIES, RESOURCE_PROPERTIES
Modifier and Type | Method and Description |
---|---|
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 serializer,
RID prefix) |
PropertiesClaim |
getClaim(RID rid,
ISerializerRegistrator.PropertyUsage usage) |
static ISerializerRegistrator |
getInstance() |
Registrator.ShutdownListener |
getListener()
backdoor-method for hot-reload functionality.
|
EntryList |
list(RID rid) |
void |
notify(ComponentEvent event)
A component was added, reconfigured or will be removed.
|
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 serializer,
RID prefix,
boolean isCore)
expects the RID to start with the
RID.PATH_SEPARATOR |
void |
register(ISerializer serializer,
RID prefix,
boolean isCore,
int position)
expects the RID to start with the
RID.PATH_SEPARATOR |
RID[] |
registeredRIDs() |
public static ISerializerRegistrator getInstance()
public void register(ISerializer serializer, RID prefix, boolean isCore) throws SerializationException
RID.PATH_SEPARATOR
register
in interface ISerializerRegistrator
serializer
- 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 resourceSerializationException
- SerializationExceptionpublic void register(ISerializer serializer, IRepositoryManager manager, boolean isCore) throws SerializationException
ISerializerRegistrator
register(ISerializer, RID, boolean)
, but
uses the IRepositoryManager.getPrefix()
method to calculate
the RID
register
in interface ISerializerRegistrator
serializer
- Serializermanager
- RepositoryManagerisCore
- isCoreSerializationException
- SerializationExceptionpublic void register(ISerializer serializer, RID prefix, boolean isCore, int position) throws SerializationException
RID.PATH_SEPARATOR
register
in interface ISerializerRegistrator
serializer
- 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 resourceposition
- 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.SerializationException
- SerializationExceptionpublic boolean deregister(ISerializer serializer, RID prefix) throws SerializationException
deregister
in interface ISerializerRegistrator
serializer
- the transportable to deregister, must not be
null
prefix
- the prefix to deregister the transportable for, must not be
null
false
, it will return true
otherwiseSerializationException
- SerializationExceptionpublic EntryList list(RID rid)
list
in interface ISerializerRegistrator
rid
- the RID to retrieve all transportables for, must not be
null
null
. A modification of the
array by the calling class must not modify the registration of
transportables within this registratorpublic RID[] registeredRIDs()
registeredRIDs
in interface ISerializerRegistrator
RID
s that ISerializer
instances
have been defined for. Might return an empty array, but never
null
.public Registrator.ShutdownListener getListener()
public void register(ISerializer serializer, boolean isCore) throws SerializationException
register
in interface ISerializerRegistrator
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 resourceSerializationException
- SerializationExceptionpublic void deregister(ISerializer serializer) throws SerializationException
ISerializerRegistrator
deregister
in interface ISerializerRegistrator
serializer
- the serializer to deregister, must not be
null
SerializationException
- SerializationExceptionpublic void claim(IClaimStaker claimstaker, RID prefix)
ISerializerRegistrator
IPropertyName
instances by calling the
getClaims(RID rid)
method. Note possible race-conditions if
another class added claims in between the two method calls.claim
in interface ISerializerRegistrator
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.public void claim(IClaimStaker claimstaker) throws ResourceException
ISerializerRegistrator
claim(IClaimStaker, RID)
for each of the repositories
prefixes.claim
in interface ISerializerRegistrator
claimstaker
- claimstakerResourceException
- if the ResourceFactory
cannot
retrieve the collection of IRepositoryManager
instances.public PropertiesClaim getClaim(RID rid, ISerializerRegistrator.PropertyUsage usage)
getClaim
in interface ISerializerRegistrator
rid
- RID of the resource to get the properties claim for. Must not be
null
usage
- usagepublic void notify(ComponentEvent event)
IComponentListener
notify
in interface IComponentListener
event
- the component eventComponentEvent.Type
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