com.sap.netweaver.coll.attachment

Class GlobalAttachmentManager

java.lang.Object
  extended by com.sapportals.wcm.service.AbstractService
      extended by com.sap.netweaver.coll.attachment.GlobalAttachmentManager
All Implemented Interfaces:
IGlobalAttachment, com.sap.netweaver.km.monitor.IMonitorInfoProvider, IComponent, IComponentInfo, IConfigurable, ILifecycleInfo, IReconfigurable, IStartable, IThreadSafe, IService

public class GlobalAttachmentManager
extends AbstractService
implements IGlobalAttachment, IThreadSafe, IReconfigurable

Interface for the attachment service. Attachments are stored as Files in the Repository "attachment". Copyright (c) SAP AG 2002


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sapportals.wcm.service.AbstractService
AbstractService.CONFIG_ATTRIBUTE_NAME
 
Field Summary
 
Fields inherited from class com.sapportals.wcm.service.AbstractService
config, properties, stateHandler
 
Constructor Summary
GlobalAttachmentManager()
          Constructor for the GlobalAttachmentManager object
 
Method Summary
 IAttachmentList getAttachmentList(IResourceContext context, String id, boolean create)
          returns AttachmentList and may create one if it does not exist yet
 IAttachmentList getAttachmentList(IResourceContext context, String id, boolean create, long lifetime)
          returns AttachmentList and may create one if it does not exist yet
 void reconfigure(IConfiguration configuration)
          Passes the new configuration data to the component.
protected  void shutDownImpl()
          The implementation must overwrite this method if it has to release resources acquired during shutdown.
protected  void startUpImpl()
          This method is called by the framework when the WCM System is starting.
 
Methods inherited from class com.sapportals.wcm.service.AbstractService
configure, convertConfigData, convertConfigToProperties, convertConfigToProperties, convertStatus, createPropertyList, getCreationDate, getDescription, getDescription, getID, getLastConfigurationException, getLastReconfigurationDate, getName, getNextAutoRestartDate, getProperties, getStartupException, getState, getType, postService, preService, retrieveMonitorData, shutDown, start, startUp, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalAttachmentManager

public GlobalAttachmentManager()
Constructor for the GlobalAttachmentManager object

Method Detail

shutDownImpl

protected void shutDownImpl()
Description copied from class: AbstractService
The implementation must overwrite this method if it has to release resources acquired during shutdown. 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.

Overrides:
shutDownImpl in class AbstractService

startUpImpl

protected void startUpImpl()
                    throws ConfigurationException,
                           StartupException
This method is called by the framework when the WCM System is starting. The service implementation can perform initialization tasks here. Among other things the service could request instances of other components if it depends on them for it's initialization. The framework will detect cyclic dependencies during this start-up process and throw an exception.

Overrides:
startUpImpl in class AbstractService
Throws:
com.sapportals.wcm.WcmException - If the initialization of the service failed
ConfigurationException - Exception raised in failure situation
StartupException - Exception raised in failure situation

getAttachmentList

public IAttachmentList getAttachmentList(IResourceContext context,
                                         String id,
                                         boolean create)
                                  throws NoAttachmentListException
returns AttachmentList and may create one if it does not exist yet

Specified by:
getAttachmentList in interface IGlobalAttachment
Parameters:
id - id of Business Object (or anything else) for which Attachment shall be handled (might be null)
create - Shall AttachmentList be created
context - Resource Context
Returns:
IAttachmentList or null
Throws:
com.sapportals.wcm.WcmException
NoAttachmentListException

getAttachmentList

public IAttachmentList getAttachmentList(IResourceContext context,
                                         String id,
                                         boolean create,
                                         long lifetime)
                                  throws NoAttachmentListException
returns AttachmentList and may create one if it does not exist yet

Specified by:
getAttachmentList in interface IGlobalAttachment
Parameters:
id - id of Business Object (or anything else) for which Attachment shall be handled (might be null)
create - Shall AttachmentList be created
lifetime - lifetime of Attachments in millisecons (0 => never expires)
context - Resource Context
Returns:
IAttachmentList
Throws:
com.sapportals.wcm.WcmException
NoAttachmentListException

reconfigure

public void reconfigure(IConfiguration configuration)
                 throws ConfigurationException
Description copied from interface: IReconfigurable
Passes the new configuration data to the component. This method is called by the CRT whenever the configuration was changed.

Specified by:
reconfigure in interface IReconfigurable
Parameters:
configuration - The new configuration data.
Throws:
ConfigurationException - Exception raised in failure situation


Copyright 2011 SAP AG Complete Copyright Notice