com.sap.netweaver.coll.attachment

Class RepositoryAttachmentManager

java.lang.Object
  extended by com.sapportals.wcm.repository.service.AbstractRepositoryService
      extended by com.sap.netweaver.coll.attachment.RepositoryAttachmentManager
All Implemented Interfaces:
IRepositoryAttachment, com.sap.netweaver.km.monitor.IMonitorInfoProvider, IAutoStartable, IComponent, IComponentInfo, IComponentListener, IConfigurable, ILifecycleInfo, IReconfigurable, IStartable, IThreadSafe, IResourceEventReceiver, com.sapportals.wcm.repository.service.archiving.IArchivingRMService, IRepositoryService, IEventReceiver

public class RepositoryAttachmentManager
extends AbstractRepositoryService
implements IRepositoryAttachment, IResourceEventReceiver, IThreadSafe, com.sapportals.wcm.repository.service.archiving.IArchivingRMService, 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.repository.service.AbstractRepositoryService
AbstractRepositoryService.CONFIG_ATTRIBUTE_NAME
 
Field Summary
 
Fields inherited from class com.sapportals.wcm.repository.service.AbstractRepositoryService
config, description, id, PARAMETER_ACTION, PARAMETER_FALSE, PARAMETER_IS_GLOBAL, PARAMETER_LOCATION, PARAMETER_POPUP, PARAMETER_PREFIX, PARAMETER_REPOSITORY, PARAMETER_RESOURCE, PARAMETER_SERVICE, PARAMETER_TRUE, properties, stateHandler
 
Fields inherited from interface com.sap.netweaver.coll.attachment.IRepositoryAttachment
serviceName
 
Constructor Summary
RepositoryAttachmentManager()
          Constructor for the GlobalAttachmentManager object
 
Method Summary
protected  void addRepositoryAssignment(IRepositoryManager mgr)
          Called by the framework if a new repository with services is added or the service was added to the list of an existing repository.
 void archive(com.sapportals.wcm.util.uri.RID resourceRID, com.sapportals.wcm.util.uri.RID relativeNamespace, com.sapportals.wcm.repository.service.archiving.IArchivingDelegate delegate)
           
 int getAttachmentCount(IResource resource)
          returns number of Attachments for a given Resource
 IAttachmentList getAttachmentList(IResource resource, boolean create)
          returns AttachmentList and may create one if it does not exist yet
 IAttachmentList getAttachmentList(IResource resource, boolean create, long lifetime)
          returns AttachmentList and may create one if it does not exist yet
protected  IResourceContext getContext()
           
 String getServiceType()
          Get the service's service type, as defined in IWcmConfig.
 void received(IEvent event)
          This method will be called by the broker with an event.
 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 startup.
protected  void startUpImpl(Collection repositoryManagers)
          Description of the Method
 
Methods inherited from class com.sapportals.wcm.repository.service.AbstractRepositoryService
acceptServletCall, configure, convertConfigData, convertConfigToProperties, convertConfigToProperties, convertStatus, createPropertyList, getCreationDate, getDescription, getDescription, getID, getInstanceType, getLastConfigurationException, getLastReconfigurationDate, getName, getNextAutoRestartDate, getProperties, getStartupException, getState, notify, removeRepositoryAssignment, 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

RepositoryAttachmentManager

public RepositoryAttachmentManager()
Constructor for the GlobalAttachmentManager object

Method Detail

addRepositoryAssignment

protected void addRepositoryAssignment(IRepositoryManager mgr)
Description copied from class: AbstractRepositoryService
Called by the framework if a new repository with services is added or the service was added to the list of an existing repository.

Overrides:
addRepositoryAssignment in class AbstractRepositoryService
Parameters:
mgr - The repository manager instance that this service was assigned to in configuration.

getServiceType

public String getServiceType()
Description copied from interface: IRepositoryService
Get the service's service type, as defined in IWcmConfig.

Specified by:
getServiceType in interface IRepositoryService
Returns:
The service type constant for this service.

received

public void received(IEvent event)
Description copied from interface: IEventReceiver
This method will be called by the broker with an event.

Specified by:
received in interface IEventReceiver
Parameters:
event - the event sent by the sender (maybe mapped, see IEventMapper).

getAttachmentList

public IAttachmentList getAttachmentList(IResource resource,
                                         boolean create)
                                  throws com.sapportals.wcm.WcmException
returns AttachmentList and may create one if it does not exist yet

Specified by:
getAttachmentList in interface IRepositoryAttachment
Parameters:
resource - resource whose Attachment shall be handled (might be null)
create - Shall AttachmentList be created
Returns:
IAttachmentList
Throws:
com.sapportals.wcm.WcmException

getAttachmentList

public IAttachmentList getAttachmentList(IResource resource,
                                         boolean create,
                                         long lifetime)
                                  throws com.sapportals.wcm.WcmException
returns AttachmentList and may create one if it does not exist yet

Specified by:
getAttachmentList in interface IRepositoryAttachment
Parameters:
resource - resource whose Attachment shall be handled (might be null)
create - Shall AttachmentList be created
lifetime - lifetime of Attachments in millisecons (0 => never expires)
Returns:
IAttachmentList
Throws:
com.sapportals.wcm.WcmException

startUpImpl

protected void startUpImpl(Collection repositoryManagers)
                    throws ConfigurationException,
                           StartupException
Description of the Method

Overrides:
startUpImpl in class AbstractRepositoryService
Parameters:
repositoryManagers - Description of the Parameter
Throws:
ConfigurationException - Exception raised in failure situation
StartupException - Exception raised in failure situation

shutDownImpl

protected void shutDownImpl()
Description copied from class: AbstractRepositoryService
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.

Overrides:
shutDownImpl in class AbstractRepositoryService

getAttachmentCount

public int getAttachmentCount(IResource resource)
                       throws com.sapportals.wcm.WcmException
returns number of Attachments for a given Resource

Specified by:
getAttachmentCount in interface IRepositoryAttachment
Parameters:
resource - resource whose Attachments shall be counted
Returns:
number of Attachments
Throws:
com.sapportals.wcm.WcmException

archive

public void archive(com.sapportals.wcm.util.uri.RID resourceRID,
                    com.sapportals.wcm.util.uri.RID relativeNamespace,
                    com.sapportals.wcm.repository.service.archiving.IArchivingDelegate delegate)
             throws com.sapportals.wcm.repository.service.archiving.ArchivingException
Specified by:
archive in interface com.sapportals.wcm.repository.service.archiving.IArchivingRMService
Throws:
com.sapportals.wcm.repository.service.archiving.ArchivingException

getContext

protected IResourceContext getContext()
                               throws ResourceException
Throws:
ResourceException

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