SAP NetWeaver '04

com.sapportals.wcm.repository.filter
Class AbstractFilterManager

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.framework_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.repository.filter.AbstractFilterManager
All Implemented Interfaces:
IComponent, IComponentInfo, IConfigurable, ILifecycleInfo, IStartable, IThreadSafe
Direct Known Subclasses:
AbstractContentFilterManager, AbstractNamespaceFilterManager, AbstractPropertyFilterManager, AbstractRidFilterManager, AbstractUriFilterManager

public abstract class AbstractFilterManager
extends java.lang.Object
implements IComponent, IConfigurable, IStartable, IComponentInfo, ILifecycleInfo, IThreadSafe

Abstract base class for all filter managers.

Copyright (c) SAP AG 2001 - 2002


Inner Class Summary
static interface AbstractFilterManager.CFG
          TBD: Description of the class.
static interface AbstractFilterManager.FILTER_PRIO
          TBD: Description of the class.
protected static interface AbstractFilterManager.TYPE
          TBD: Description of the class.
 
Field Summary
protected  IConfiguration config
           
protected  java.util.Properties properties
           
protected  ComponentStateHandler stateHandler
           
 
Constructor Summary
  AbstractFilterManager()
          The default constructor
protected AbstractFilterManager(java.util.Properties properties)
          Deprecated. As of EP 5.0 SP5, replaced by default (public, no arguments) constructor.
 
Method Summary
protected  void callUpdateFilter(java.lang.String id, java.lang.Integer prio, java.lang.String prefix, PathPatternMatcher mimePattern, PathPatternMatcher extPattern, PathPatternMatcher pathPattern, java.lang.String resourceType, java.util.ArrayList managerIDs, int type)
          Update the filter properties of runtime.
protected abstract  void changeSystemProperties(IConfiguration newConfig)
          Changes the system properties of a filter manager.
protected  void checkNotReconfigurableAttributes(java.lang.String[] notReconfigurable, IConfiguration newConfig)
          Helper method for reconfigure() implementations.
 void configure(IConfiguration config)
          Passes the configuration data to the configurable.
protected static java.util.Properties convertConfigToProperties(IConfiguration config)
          Helper method for conversion of configuration data into properties.
protected static java.util.Properties convertConfigToProperties(IConfiguration config, java.lang.String prefix)
          Helper method for conversion of configuration data into properties.
 java.util.Date getCreationDate()
          Returns the date and time of the creation of the component instance.
 java.lang.String getDescription(java.util.Locale locale)
          Returns a description of the components purpose or null .
 java.lang.String getID()
           
 ConfigurationException getLastConfigurationException()
          Returns the exception thrown in the last call to IConfigurable.configure(IConfiguration), or IReconfigurable.reconfigure(IConfiguration).
 java.util.Date getLastReconfigurationDate()
          Returns the date and time of the last reconfiguration of this component.
 java.lang.String getName()
          Returns the component's human-readable name or null .
 java.util.Date getNextAutoRestartDate()
          Returns the date and time of the next automatic restart of the component.
 java.util.Properties getProperties()
          Returns some arbitrary properties with information about the component or null .
 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.
protected  java.util.ArrayList parseValueList(java.lang.String values, java.lang.String separator)
          Helper method: Tokenize a string with a separator char into a List
protected  void shutDown()
          Deprecated. As of EP 5.0 SP5, replaced by startUpImpl().
protected  void shutDownImpl()
          The implementation must overwrite this method if it has to release resources acquired during startup.
 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 startUp()
          Deprecated. As of EP 5.0 SP5, replaced by shutDownImpl().
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.
protected  void throwConfigurationException(java.lang.String text, java.lang.String location, java.lang.String propName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

protected java.util.Properties properties

config

protected IConfiguration config

stateHandler

protected final ComponentStateHandler stateHandler
Constructor Detail

AbstractFilterManager

public AbstractFilterManager()
The default constructor

AbstractFilterManager

protected AbstractFilterManager(java.util.Properties properties)
Deprecated. As of EP 5.0 SP5, replaced by default (public, no arguments) constructor.

Parameters:
properties - TBD: Description of the incoming method parameter
Method Detail

getID

public final java.lang.String getID()

configure

public final void configure(IConfiguration config)
                     throws ConfigurationException
Description copied from interface: IConfigurable
Passes the configuration data to the configurable. This method will by called by the CRT only once. It is called after construction and contextualization and before startup (if implemented).
Specified by:
configure in interface IConfigurable
Following copied from interface: com.sapportals.wcm.crt.component.IConfigurable
Parameters:
configuration - the component's configuration data.
Throws:
ConfigurationException - Exception raised in failure situation

start

public final void start()
                 throws StartupException
Description copied from interface: IStartable
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). This method is only called once during the life-time of a component except an AutoRestartException was thrown.
Specified by:
start in interface IStartable
Following copied from interface: com.sapportals.wcm.crt.component.IStartable
Throws:
StartupException - If the initialization failed because neccessary resources could not be allocated.

stop

public final void stop()
Description copied from interface: IStartable
This method is only called once during the life-time of a component. It is called by the CRT when the component was removed from the configuration or the system shuts down. A stopped component can not be (re)started. After a shutdown the component instance will be finalized by the Java VM as soon as no other components in the system holds a reference to it.
Specified by:
stop in interface IStartable

getName

public java.lang.String getName()
Description copied from interface: IComponentInfo
Returns the component's human-readable name or null .
Specified by:
getName in interface IComponentInfo
Following copied from interface: com.sapportals.wcm.crt.component.IComponentInfo
Returns:
the component's human-readable name or null .

getDescription

public java.lang.String getDescription(java.util.Locale locale)
Description copied from interface: IComponentInfo
Returns a description of the components purpose or null .
Specified by:
getDescription in interface IComponentInfo
Following copied from interface: com.sapportals.wcm.crt.component.IComponentInfo
Parameters:
locale - Selects the language of the description text - can be null .
Returns:
a description of the components purpose or null .

getProperties

public java.util.Properties getProperties()
Description copied from interface: IComponentInfo
Returns some arbitrary properties with information about the component or null .
Specified by:
getProperties in interface IComponentInfo
Following copied from interface: com.sapportals.wcm.crt.component.IComponentInfo
Returns:
some arbitrary properties with information about the component or null .

getState

public final ComponentState getState()
Description copied from interface: ILifecycleInfo
Returns the current life-cycle state of the component. Can be null .
Specified by:
getState in interface ILifecycleInfo
Following copied from interface: com.sapportals.wcm.crt.component.ILifecycleInfo
Returns:
the current life-cycle state of the component. Can be null .

getLastConfigurationException

public ConfigurationException getLastConfigurationException()
Description copied from interface: ILifecycleInfo
Returns the exception thrown in the last call to IConfigurable.configure(IConfiguration), or IReconfigurable.reconfigure(IConfiguration). Can be null .
Specified by:
getLastConfigurationException in interface ILifecycleInfo
Following copied from interface: com.sapportals.wcm.crt.component.ILifecycleInfo
Returns:
lastConfigurationException

getStartupException

public StartupException getStartupException()
Description copied from interface: ILifecycleInfo
Returns the exception thrown in the last call to IStartable.start(), Can be null .
Specified by:
getStartupException in interface ILifecycleInfo
Following copied from interface: com.sapportals.wcm.crt.component.ILifecycleInfo
Returns:
startupException

getCreationDate

public final java.util.Date getCreationDate()
Description copied from interface: ILifecycleInfo
Returns the date and time of the creation of the component instance. Can be null . This property usually makes sense only for components that implement the IThreadSafe interface.
Specified by:
getCreationDate in interface ILifecycleInfo
Following copied from interface: com.sapportals.wcm.crt.component.ILifecycleInfo
Returns:
the date and time of the creation of the component instance. Can be null .

getLastReconfigurationDate

public java.util.Date getLastReconfigurationDate()
Description copied from interface: ILifecycleInfo
Returns the date and time of the last reconfiguration of this component. Can be null .
Specified by:
getLastReconfigurationDate in interface ILifecycleInfo
Following copied from interface: com.sapportals.wcm.crt.component.ILifecycleInfo
Returns:
the date and time of the last reconfiguration of this component. Can be null .

getNextAutoRestartDate

public java.util.Date getNextAutoRestartDate()
Description copied from interface: ILifecycleInfo
Returns the date and time of the next automatic restart of the component. Can be null .
Specified by:
getNextAutoRestartDate in interface ILifecycleInfo
Following copied from interface: com.sapportals.wcm.crt.component.ILifecycleInfo
Returns:
the date and time of the next automatic restart of the component. Can be null .
See Also:
AutoRestartException

startUp

protected void startUp()
                throws WcmException
Deprecated. As of EP 5.0 SP5, replaced by shutDownImpl().

The implementation must overwrite this method if it has initial startup handling to do (acquire resources, open connections to remote systems, etc).
Throws:
WcmException - Exception raised in failure situation

shutDown

protected void shutDown()
                 throws WcmException
Deprecated. As of EP 5.0 SP5, replaced by startUpImpl().

The implementation must overwrite this method if it has to release resources acquired during shutdown.
Throws:
WcmException - Exception raised in failure situation

startUpImpl

protected void startUpImpl()
                    throws ConfigurationException,
                           StartupException
The implementation must overwrite this method if it has initial startup handling to do (acquire resources, open connections to remote systems, etc). Accoring to the contract of the 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.
Throws:
ConfigurationException - Exception raised in failure situation
StartupException - Exception raised in failure situation

shutDownImpl

protected void shutDownImpl()
The implementation must overwrite this method if it has to release resources acquired during startup. Accoring to the contract of the 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.

convertConfigToProperties

protected static final java.util.Properties convertConfigToProperties(IConfiguration config)
Helper method for conversion of configuration data into properties.
Parameters:
config - to be converted
Returns:
all attributes of the config object as properties

convertConfigToProperties

protected static final java.util.Properties convertConfigToProperties(IConfiguration config,
                                                                      java.lang.String prefix)
Helper method for conversion of configuration data into properties. Prefixes all attribute name with given prefix.
Parameters:
config - to be converted
prefix - to prepend to config's attribute names
Returns:
all attributes of the config object as properties

changeSystemProperties

protected abstract void changeSystemProperties(IConfiguration newConfig)
                                        throws ConfigurationException
Changes the system properties of a filter manager. Must be used by filter managers in the implementation of the reconfigure() method.
Parameters:
newConfig - The new configuration.
Throws:
ConfigurationException - If the new system properties are invalid

throwConfigurationException

protected final void throwConfigurationException(java.lang.String text,
                                                 java.lang.String location,
                                                 java.lang.String propName)
                                          throws ConfigurationException

checkNotReconfigurableAttributes

protected final void checkNotReconfigurableAttributes(java.lang.String[] notReconfigurable,
                                                      IConfiguration newConfig)
                                               throws ConfigurationException
Helper method for reconfigure() implementations. Throws a configuration exception if any of the specified attributes or any of the not reconfigurable framework attributes (e.g. prefix) has changed.
Parameters:
notReconfigurable -  
newConfig -  
Throws:
ConfigurationException -  

callUpdateFilter

protected final void callUpdateFilter(java.lang.String id,
                                      java.lang.Integer prio,
                                      java.lang.String prefix,
                                      PathPatternMatcher mimePattern,
                                      PathPatternMatcher extPattern,
                                      PathPatternMatcher pathPattern,
                                      java.lang.String resourceType,
                                      java.util.ArrayList managerIDs,
                                      int type)
                               throws java.lang.Exception
Update the filter properties of runtime.
Parameters:
id - TBD: Description of the incoming method parameter
prio - TBD: Description of the incoming method parameter
prefix - TBD: Description of the incoming method parameter
mimePattern - TBD: Description of the incoming method parameter
extPattern - TBD: Description of the incoming method parameter
pathPattern - TBD: Description of the incoming method parameter
resourceType - TBD: Description of the incoming method parameter
managerIDs - TBD: Description of the incoming method parameter
type - TBD: Description of the incoming method parameter
Throws:
java.lang.Exception - Exception raised in failure situation

parseValueList

protected final java.util.ArrayList parseValueList(java.lang.String values,
                                                   java.lang.String separator)
Helper method: Tokenize a string with a separator char into a List
Parameters:
values - TBD: Description of the incoming method parameter
separator - TBD: Description of the incoming method parameter
Returns:
TBD: Description of the outgoing return value

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.