SAP NetWeaver '04

com.sapportals.wcm.repository.service.timebasedpublish
Interface ITimebasedPublishServiceManager

[contained in: com.sap.km.cm.repository.service.base.par - km.shared.repository.service.timebasedpublish_api.jar]
All Superinterfaces:
IEventSender, IRepositoryService

public interface ITimebasedPublishServiceManager
extends IRepositoryService, IEventSender

The main interface for the time-based publishing service that controls the visibility of resources. It defines methods to set or read the time when a resource in a repository is visible or hidden. These methods are mainly used by the user interface. A scheduler task has to be configured to call the handle... methods at regular intervals. A namespace filter is responsible for finding out, whether a resource is visible or hidden.

Passing null as an argument in methods causes an exception unless otherwise stated in the method description.

Whether a resource is visible or hidden depends on the user:


Method Summary
 ITimebasedPublishEvent getTimebasedPublishEventTemplate(int type)
          Get a ITimebasedPublishEvent-template for the given ITimebasedPublishEvent-type.
 void handleInvisibleResources()
          Searches for all resources which have become invisible since the last call of this method and sends an event for every resource to inform other services about these hidden resources.
 void handleVisibleResources()
          Searches for all resources which have become visible since the last call of this method and sends an event for every resource to inform other services about the visibility of these resources.
 boolean isTimebasePublishEnabled(IResource impResource)
          Checks whether time-based publishing has been enabled for the resource.
 boolean isVisible(IResource impResource)
          Checks whether all conditions for the visibility of the time-based publishing service have been fullfilled.
 java.util.Date readInvalidDate(IResource impResource)
          Reads the date on which a resource will be hidden.
 java.util.Date readValidDate(IResource impResource)
          Reads the date on which a resource will be visible.
 void saveInvalidDate(IResource impResource, java.util.Date invalidDate)
          Saves the date on which a resource will become visible.
 void saveValidDate(IResource impResource, java.util.Date validDate)
          Saves the date on which a resource will be hidden.
 void setTimebasePublishEnabled(ICollection impFolder, boolean enabled)
          Enables the time-based publishing service for a folder When the time-based publishing service is enabled for a folder, the visibility of all children within this folder is controlled by the time-based publishing service.
 
Methods inherited from interface com.sapportals.wcm.repository.service.IRepositoryService
acceptServletCall, getDescription, getDescription, getID, getServiceType
 
Methods inherited from interface com.sapportals.wcm.util.events.IEventSender
getEvents
 

Method Detail

setTimebasePublishEnabled

public void setTimebasePublishEnabled(ICollection impFolder,
                                      boolean enabled)
                               throws WcmException
Enables the time-based publishing service for a folder When the time-based publishing service is enabled for a folder, the visibility of all children within this folder is controlled by the time-based publishing service.
Parameters:
impFolder - the folder to enable the service for
enabled - true, if the service is enabled

isTimebasePublishEnabled

public boolean isTimebasePublishEnabled(IResource impResource)
                                 throws WcmException
Checks whether time-based publishing has been enabled for the resource. Time-based publishing can be set for each folder. If the impResource is a collection, the settings for this collection are checked. Otherwise, the settings for the parent collection of the impResource are checked. Returns false if the impResource is null.
Parameters:
impResource - resource to check
Returns:
true if the service has been enabled for the resource

saveValidDate

public void saveValidDate(IResource impResource,
                          java.util.Date validDate)
                   throws WcmException
Saves the date on which a resource will be hidden. Passing null as validDate deletes the previous setting.
Parameters:
impResource - the current resource
validDate - the date on which the resource becomes valid

saveInvalidDate

public void saveInvalidDate(IResource impResource,
                            java.util.Date invalidDate)
                     throws WcmException
Saves the date on which a resource will become visible. Passing null as invalidDate deletes the previous setting.
Parameters:
impResource - the current resource
invalidDate - the date on which the resource becomes invalid

readValidDate

public java.util.Date readValidDate(IResource impResource)
                             throws WcmException
Reads the date on which a resource will be visible. Returns null if no date is maintained.
Parameters:
impResource - the current resource
Returns:
the date on which the resource becomes valid

readInvalidDate

public java.util.Date readInvalidDate(IResource impResource)
                               throws WcmException
Reads the date on which a resource will be hidden. Returns null if no date is maintained.
Parameters:
impResource - the current resource
Returns:
the date on which the resource becomes invalid

isVisible

public boolean isVisible(IResource impResource)
                  throws WcmException
Checks whether all conditions for the visibility of the time-based publishing service have been fullfilled. A resource is visible for authors when it is in the valid timeframe and the valid event has been sent. This method is used by the namespace filter
Parameters:
impResource - the current resource
Returns:
true if the resource is visible for the current user

handleVisibleResources

public void handleVisibleResources()
                            throws WcmException
Searches for all resources which have become visible since the last call of this method and sends an event for every resource to inform other services about the visibility of these resources. This method is usually called by a scheduler task

handleInvisibleResources

public void handleInvisibleResources()
                              throws WcmException
Searches for all resources which have become invisible since the last call of this method and sends an event for every resource to inform other services about these hidden resources. This method is usually called from a scheduler task

getTimebasedPublishEventTemplate

public ITimebasedPublishEvent getTimebasedPublishEventTemplate(int type)
Get a ITimebasedPublishEvent-template for the given ITimebasedPublishEvent-type.
Parameters:
type - the ITimebasedPublishEvent-type to get the template for.
Returns:
an ITimebasedPublishEvent-template for the given type or null if the given type is not valid.

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.