public abstract class AbstractManager extends Object implements IManager, IResourceEventSender, IThreadSafe, IContainer, IConfigurable, IStartable, IComponentInfo, ILifecycleInfo
Created 20. März 2003
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractManager.ResourceEventType |
class |
AbstractManager.RMVarEvent
This class is used internally by the RF.
|
| Modifier and Type | Field and Description |
|---|---|
protected IConfiguration |
config
This manager's configuration
|
protected String |
prefix |
protected ComponentStateHandler |
stateHandler |
static int |
VAR_TYPE_LOGICAL |
static int |
VAR_TYPE_NONE |
static int |
VAR_TYPE_PHYSICAL |
| Constructor and Description |
|---|
AbstractManager()
Construct object of class AbstractManager.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkNotReconfigurableAttributes(String[] notReconfigurable,
IConfiguration newConfig)
Helper method for reconfigure() implementations.
|
void |
configure(IConfiguration config)
Passes the configuration data to the configurable.
|
void |
contextualize(IContext context)
Pass the context to the component.
|
protected Properties |
convertConfigToProperties(IConfiguration config,
String prefix)
Helper method for conversion of configuration data into properties.
|
boolean |
equals(Object other) |
boolean |
eventsEnabled()
Returns true if standard resource events should be sent by the framework.
|
IBasicVersioningManager |
getBasicVersioningManager() |
IBindingManager |
getBindingManager() |
IComponentManager |
getComponentManager()
Returns the component manager for accessing this container's child
components.
|
IConfiguration |
getConfig() |
IContentManager |
getContentManager() |
Date |
getCreationDate()
Returns the date and time of the creation of the component instance.
|
String |
getDescription() |
String |
getDescription(Locale locale)
Returns a description of the components purpose or
null . |
IResourceEventBroker |
getEventBroker()
Returns the event broker assigned to this repository.
|
IEventList |
getEvents()
Returns a list of event templates for all possible events of this sender.
|
IEventList |
getEvents(IResource resource)
This method is used to report all possible events for a resource.
|
String |
getId()
Get the unique id of the repository manager (usually assigned and made
unique through the configuration framework).
|
IIdMapperManager |
getIdMapperManager() |
ConfigurationException |
getLastConfigurationException()
Returns the exception thrown in the last call to
IConfigurable.configure(IConfiguration),
or IReconfigurable.reconfigure(IConfiguration). |
Date |
getLastReconfigurationDate()
Returns the date and time of the last reconfiguration of this component.
|
ILockManager |
getLockManager() |
String |
getName()
Returns the component's human-readable name or
null . |
NameInfo |
getNameInfo()
Get the
NameInfo of a repository manager. |
INamespaceManager |
getNamespaceManager() |
Date |
getNextAutoRestartDate()
Returns the date and time of the next automatic restart of the component.
|
Properties |
getProperties()
Returns some arbitrary properties with information about the component or
null . |
IPropertyManager |
getPropertyManager() |
String |
getRidPrefix()
Get the root token of a resource id, this resource manager claims
responsibility for.
|
ISecurityManager |
getSecurityManager() |
StartupException |
getStartupException()
Returns the exception thrown in the last call to
IStartable.start(),
Can be null . |
ComponentState |
getState()
Returns the current life-cycle state of the component.
|
Map |
getSubManagers()
Get map of sub managers indexed by sub manager interface, e.g. a repository
manager with a content and property sub manager implemented in one class
and a separate security sub manager implemented in another class, returns a
map with the content and property sub manager added twice via the content
sub manager interface and the property sub manager interface and the
security sub manager via the security sub manager interface.
|
ITypeManager |
getTypeManager() |
IVariantManager |
getVariantManager() |
int |
hashCode() |
boolean |
mustSendResourceEventType(int type)
ResourceImpl will call this method to check if a given resource event type must be sent at all.
|
protected void |
reconfigureDescription(IConfiguration newConfig) |
protected boolean |
reconfigureSecurityManager(IConfiguration newConfig)
Must be called by the RM implementation in its reconfigure() method if reconfiguration of security managers at
runtime must be supported.
|
protected void |
registerSecurityManager(String name,
String manager) |
IResourceEvent |
sendEvent(IResource resource,
int type,
String correlationId,
Object param,
Integer variantResType)
The Repository Framework will call this method to send the standard resource events.
|
IVariantResourceEvent |
sendLREvent(IResource resource,
int type,
String correlationId,
Object param,
int subType,
IResource physicalResource)
The Repository Framework will call this method to send the standard resource events for variant resources.
|
protected void |
sendRepositoryEvent(IResourceHandle handle,
AbstractManager.ResourceEventType type,
Object param)
The Repository Manager implementation might use this method to generate resource events.
|
protected void |
sendRepositoryVariantEvent(IResourceHandle lrHandle,
IResourceHandle prHandle,
AbstractManager.ResourceEventType type,
Object param,
boolean prEvent)
Send an event for a variant resource - both physical and logical resource handles have to be specified.
|
IResourceEvent |
sendSpecialMoveEvent(IResource resource,
int type,
String correlationId,
Object param,
RID specialRID)
The Repository Framework will call this method to send the standard resource events
|
protected void |
shutDownImpl()
The implementation must overwrite this method if it has to release resources acquired during shutdown.
|
void |
start()
A component must implement this method if it has initial startup handling
to do before being accessible (acquire resources, open connections to
remote systems, etc).
|
protected void |
startUpImpl()
The implementation must overwrite this method if it has initial startup handling to do (acquire resources, open
connections to remote systems, etc).
|
void |
stop()
This method is only called once during the life-time of a component.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetSupportedOptions, lookup, lookup, lookupprotected final ComponentStateHandler stateHandler
protected IConfiguration config
protected String prefix
public static final int VAR_TYPE_NONE
public static final int VAR_TYPE_LOGICAL
public static final int VAR_TYPE_PHYSICAL
public AbstractManager()
public IConfiguration getConfig()
public IVariantManager getVariantManager()
public IBindingManager getBindingManager()
public IIdMapperManager getIdMapperManager()
public ISecurityManager getSecurityManager()
public INamespaceManager getNamespaceManager()
public ITypeManager getTypeManager()
public IPropertyManager getPropertyManager()
public ILockManager getLockManager()
public IBasicVersioningManager getBasicVersioningManager()
public IContentManager getContentManager()
public String getId()
IManagerpublic String getRidPrefix()
IManagergetRidPrefix in interface IManagerpublic NameInfo getNameInfo()
IManagerNameInfo of a repository manager. The NameInfo
contains information about the restrictions for resource and collection
names.getNameInfo in interface IManagerpublic Map getSubManagers()
IManagergetSubManagers in interface IManagerpublic IResourceEventBroker getEventBroker()
sendRepositoryEvent(IResourceHandle, AbstractManager.ResourceEventType, Object) method.public String getDescription()
public final ComponentState getState()
ILifecycleInfonull
.getState in interface ILifecycleInfonull
.public final Date getCreationDate()
ILifecycleInfonull . This property usually makes sense only for components
that implement the IThreadSafe interface.getCreationDate in interface ILifecycleInfonull .public IEventList getEvents()
IEventSendergetEvents in interface IEventSenderpublic IEventList getEvents(IResource resource)
IResourceEventSendergetEvents in interface IResourceEventSenderresource - The resourcepublic IComponentManager getComponentManager()
IContainergetComponentManager in interface IContainerpublic String getName()
IComponentInfonull .getName in interface IComponentInfonull .public String getDescription(Locale locale)
IComponentInfonull .getDescription in interface IComponentInfolocale - Selects the language of the description text - can be
null .null .public Properties getProperties()
IComponentInfonull .getProperties in interface IComponentInfonull .protected final Properties convertConfigToProperties(IConfiguration config, String prefix)
config - to be converted to propertiesprefix - to prepend to all attribute namespublic ConfigurationException getLastConfigurationException()
ILifecycleInfoIConfigurable.configure(IConfiguration),
or IReconfigurable.reconfigure(IConfiguration). Can be
null .getLastConfigurationException in interface ILifecycleInfonull.public StartupException getStartupException()
ILifecycleInfoIStartable.start(),
Can be null .getStartupException in interface ILifecycleInfonull.public Date getLastReconfigurationDate()
ILifecycleInfonull .getLastReconfigurationDate in interface ILifecycleInfonull .public Date getNextAutoRestartDate()
ILifecycleInfonull .getNextAutoRestartDate in interface ILifecycleInfonull .AutoRestartExceptionpublic final boolean mustSendResourceEventType(int type)
type - the type of ResourceEvent to sendpublic final IResourceEvent sendEvent(IResource resource, int type, String correlationId, Object param, Integer variantResType) throws WcmException
variantResType - resource type parametertype - The event typecorrelationId - The id of correlationparam - parameterresource - parameterWcmException - exceptionpublic final IVariantResourceEvent sendLREvent(IResource resource, int type, String correlationId, Object param, int subType, IResource physicalResource) throws WcmException
physicalResource - resource parameterparam - simple parametertype - The event typesubType - parameter for sub typeresource - resource parametercorrelationId - id of the correlationWcmException - resource exceptionpublic final IResourceEvent sendSpecialMoveEvent(IResource resource, int type, String correlationId, Object param, RID specialRID) throws WcmException
param - simple parameterresource - the resource parametertype - The event typespecialRID - parametercorrelationId - id of the correlationresource - exceptionWcmExceptionprotected final void sendRepositoryEvent(IResourceHandle handle, AbstractManager.ResourceEventType type, Object param) throws ResourceException
AbstractManager.ResourceEventType has to be extended. This class
specifies the predefined Repository Framework events but usually it is not necessary for a manager to send these
events for standard operations (delete, create, etc.) because these event types are generated by the framework.handle - The resource handle to attach to the event. If null is specified this method does nothing.type - The event typeparam - The event parametersResourceException - resource exceptionprotected final void sendRepositoryVariantEvent(IResourceHandle lrHandle, IResourceHandle prHandle, AbstractManager.ResourceEventType type, Object param, boolean prEvent) throws ResourceException
lrHandle - The handle of the logical resource that will be attached to the eventprHandle - The handle of the physicalresource that will be attached to the eventtype - the type of resourceparam - parameterprEvent - pre event parameter
true if the event should be created for the physical resource (not the logical resource).ResourceException - with resourcesendRepositoryEvent(IResourceHandle, AbstractManager.ResourceEventType, Object)public boolean eventsEnabled()
public final void configure(IConfiguration config) throws ConfigurationException
IConfigurableconfigure in interface IConfigurableconfig - the component's configuration data.ConfigurationException - Exception raised in failure situationpublic final void start()
throws StartupException
IStartableAutoRestartException was thrown.start in interface IStartableStartupException - If the initialization failed because neccessary
resources could not be allocated.public final void stop()
IStartablestop in interface IStartablepublic void contextualize(IContext context) throws ContextException
IContextualizablecontextualize in interface IContextualizablecontext - The context objectsContextException - if the context is invalidprotected void startUpImpl()
throws ConfigurationException,
StartupException
IStartable interface of the CRT this method will be called only once. It will be
called on systen start up or when a new instance of this component is added to the persistence configuration.ConfigurationException - exception with configurationsStartupException - exception with start upprotected void shutDownImpl()
IStartable interface of the CRT this method will be
called only once. It will be called when the component is removed from the persistent configuration or when the
system shuts down.protected final void checkNotReconfigurableAttributes(String[] notReconfigurable, IConfiguration newConfig) throws ConfigurationException
notReconfigurable - An array of names of attributes that cannot be canged wihout restarting the component/server.newConfig - The new configuration data received as argument of the reconfigure() method.ConfigurationException - exception of configurationsprotected final boolean reconfigureSecurityManager(IConfiguration newConfig) throws ConfigurationException
newConfig - The new configuration data (paramater of the reconfigure() method).ConfigurationException - If the new sub manager can not be started.
If the sub manager implements other sub manager interfaces than ISecurityManager.
If the sub manager does not implement ISecurityManager.
If the sub manager does not extend AbstractRepositorySubManager.protected final void reconfigureDescription(IConfiguration newConfig)
| 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 2017 SAP AG Complete Copyright Notice