com.sapportals.wcm.repository.manager.entrypoints

Class AbstractEntryPointsProvider

java.lang.Object
  extended by com.sapportals.wcm.repository.manager.entrypoints.AbstractEntryPointsProvider
All Implemented Interfaces:
IEntryPointsProvider

public abstract class AbstractEntryPointsProvider
extends Object
implements IEntryPointsProvider

Generic functionalities to handle entry points


Field Summary
 
Fields inherited from interface com.sapportals.wcm.repository.manager.entrypoints.IEntryPointsProvider
IVIEW_PARAM_CONTEXT_ID
 
Constructor Summary
AbstractEntryPointsProvider(String providerName, int priority, boolean isActive)
          Constructs a new entry point provider
 
Method Summary
 void addAndRemoveRootEntryPoints(ICollection parentCollection, IEntryPointList entryPoints, DisplayMode displayMode)
          Handles the already existing list of entry points on the first level of the entry points hierarchy.
 IEntryPointList getEntryPointChildren(ICollection parentCollection, IEntryPoint parentEntryPoint, DisplayMode displayMode)
          Gets entry points as children for a specific folder inside a entry points hierarchy.
 String getName()
          Gets the name of the entry points provider
 String getOptionalBundleFile()
          Gets the optional bundle file.
 int getPriority()
          Gets the priority of the provider
 IPropertyMap getProperties(IResource resource, IEntryPoint entryPoint, DisplayMode displayMode)
          Gets properties of an entry point represented by a resource
protected  IPropertyMap getPropertiesForInternalLink(com.sapportals.wcm.util.uri.RID targetRid, IResourceContext context, boolean nameAsFallback)
           
 IProperty getProperty(IPropertyName propertyName, IResource resource, IEntryPoint entryPoint, DisplayMode displayMode)
          Gets a property of an entry point represented by a resource
protected  IProperty getPropertyForInternalLink(IPropertyName propertyName, com.sapportals.wcm.util.uri.RID targetRid, IResourceContext context, boolean nameAsFallback)
          Gets a property for an internal link.
 boolean isActive()
          Checks if the provider is in state active
 void setOptionalBundleFile(String optionalBundleFile)
          Sets the optional bundle file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEntryPointsProvider

public AbstractEntryPointsProvider(String providerName,
                                   int priority,
                                   boolean isActive)
Constructs a new entry point provider

Parameters:
providerName - name of the entry point provider
priority - priority of the entry point provider
isActive - determines if the provider is in state active or not Parameter configurable had to be removed since the referenced API is not released for public use
Method Detail

getName

public String getName()
Gets the name of the entry points provider

Specified by:
getName in interface IEntryPointsProvider
Returns:
provider name

getPriority

public int getPriority()
Gets the priority of the provider

Specified by:
getPriority in interface IEntryPointsProvider
Returns:
provider priority

isActive

public boolean isActive()
Checks if the provider is in state active

Specified by:
isActive in interface IEntryPointsProvider
Returns:
true if the provider is active

setOptionalBundleFile

public void setOptionalBundleFile(String optionalBundleFile)
Description copied from interface: IEntryPointsProvider
Sets the optional bundle file.

Specified by:
setOptionalBundleFile in interface IEntryPointsProvider

getOptionalBundleFile

public String getOptionalBundleFile()
Description copied from interface: IEntryPointsProvider
Gets the optional bundle file.

Specified by:
getOptionalBundleFile in interface IEntryPointsProvider
Returns:
optional bundle file name, if existing

addAndRemoveRootEntryPoints

public void addAndRemoveRootEntryPoints(ICollection parentCollection,
                                        IEntryPointList entryPoints,
                                        DisplayMode displayMode)
                                 throws com.sapportals.wcm.WcmException
Handles the already existing list of entry points on the first level of the entry points hierarchy. New entry points can be added and entry points of other providers can be removed.

Specified by:
addAndRemoveRootEntryPoints in interface IEntryPointsProvider
Parameters:
parentCollection - root folder of the entry points repository
entryPoints - entry point list that can be manipulated
displayMode - display mode of the current request
Throws:
com.sapportals.wcm.WcmException

getEntryPointChildren

public IEntryPointList getEntryPointChildren(ICollection parentCollection,
                                             IEntryPoint parentEntryPoint,
                                             DisplayMode displayMode)
                                      throws com.sapportals.wcm.WcmException
Gets entry points as children for a specific folder inside a entry points hierarchy. Only the provider that provided the first level entry point of this hierarchy is called.

Specified by:
getEntryPointChildren in interface IEntryPointsProvider
Parameters:
parentCollection - parent folder inside the entry points repository
parentEntryPoint - parent entry point (also repesented as parent folder)
displayMode - display mode of the current request
Returns:
list of entry points as children of the parent entry point
Throws:
com.sapportals.wcm.WcmException

getProperties

public IPropertyMap getProperties(IResource resource,
                                  IEntryPoint entryPoint,
                                  DisplayMode displayMode)
                           throws ResourceException
Gets properties of an entry point represented by a resource

Specified by:
getProperties in interface IEntryPointsProvider
Parameters:
resource - entry point resource
entryPoint - entry point (also repesented as resource)
displayMode - display mode of the current request
Returns:
properties of the entry point
Throws:
ResourceException

getProperty

public IProperty getProperty(IPropertyName propertyName,
                             IResource resource,
                             IEntryPoint entryPoint,
                             DisplayMode displayMode)
                      throws ResourceException
Gets a property of an entry point represented by a resource

Specified by:
getProperty in interface IEntryPointsProvider
Parameters:
propertyName - name of the property
resource - entry point resource
entryPoint - entry point (also repesented as resource)
displayMode - display mode of the current request
Returns:
property of the entry point
Throws:
ResourceException

getPropertyForInternalLink

protected final IProperty getPropertyForInternalLink(IPropertyName propertyName,
                                                     com.sapportals.wcm.util.uri.RID targetRid,
                                                     IResourceContext context,
                                                     boolean nameAsFallback)
                                              throws ResourceException
Gets a property for an internal link. If the target resource returns null and it is an internal link itself the target resource is asked for the property. If the property is the display name property and no value is returned optionally the name of the target resource is used as display name

Parameters:
propertyName - property name
targetRid - target RID
context - resource context
nameAsFallback - if true as last fallback the name of the target resource is used as display name, if the display name property is requested
Returns:
requested property
Throws:
ResourceException

getPropertiesForInternalLink

protected final IPropertyMap getPropertiesForInternalLink(com.sapportals.wcm.util.uri.RID targetRid,
                                                          IResourceContext context,
                                                          boolean nameAsFallback)
                                                   throws ResourceException
Throws:
ResourceException
Access Rights

This class can be accessed from:


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 2012 SAP AG Complete Copyright Notice