com.sapportals.wcm.service.objecttypehandler

Class ObjectTypeHandlerUtil

java.lang.Object
  extended by com.sapportals.wcm.service.objecttypehandler.ObjectTypeHandlerUtil

public class ObjectTypeHandlerUtil
extends Object

TODO: Description of the interface.


Constructor Summary
ObjectTypeHandlerUtil(IResource res)
           
 
Method Summary
 IActionList getMergedActions(IObjectTypeHandlerList list)
           
 Collection getMergedMultiValuedProperties(IObjectTypeHandlerList list, String propertykey)
           
 Properties getMergedProperties(IObjectTypeHandlerList list)
           
 IObjectTypeHandlerList rankHandlers(IObjectTypeHandlerList list)
          The ranking mechanism works after the following schema: For every selection criteria given in an IObjectTypeHandler , the algorithms gives points to this handler if a path is given -> 8 points if a resource type is given -> 4 points if a mimetype is given -> 2 points if an extension is given -> 1 point If several handlers have the same score after that procedure, the length of the resource path acts as the tie breaker: The more folders of the path are specified, the more exact the match naturally becomes.
 String writeDebugInformation(IResource res, IObjectTypeHandlerList result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectTypeHandlerUtil

public ObjectTypeHandlerUtil(IResource res)
                      throws com.sapportals.wcm.WcmException
Parameters:
res - if null is given, the class cannot be constructed.
Throws:
com.sapportals.wcm.WcmException - Exception raised in failure situation
com.sapportals.wcm.WcmException - if the given IResource is null .
Method Detail

getMergedActions

public IActionList getMergedActions(IObjectTypeHandlerList list)
                             throws com.sapportals.wcm.WcmException
Parameters:
list - TBD: Description of the incoming method parameter
Returns:
mergedActions
Throws:
com.sapportals.wcm.WcmException - Exception raised in failure situation

getMergedProperties

public Properties getMergedProperties(IObjectTypeHandlerList list)
                               throws com.sapportals.wcm.WcmException
Parameters:
list - TBD: Description of the incoming method parameter
Returns:
mergedProperties
Throws:
com.sapportals.wcm.WcmException - Exception raised in failure situation

getMergedMultiValuedProperties

public Collection getMergedMultiValuedProperties(IObjectTypeHandlerList list,
                                                 String propertykey)
                                          throws com.sapportals.wcm.WcmException
Throws:
com.sapportals.wcm.WcmException

rankHandlers

public IObjectTypeHandlerList rankHandlers(IObjectTypeHandlerList list)
                                    throws com.sapportals.wcm.WcmException
The ranking mechanism works after the following schema: For every selection criteria given in an IObjectTypeHandler , the algorithms gives points to this handler if a path is given -> 8 points if a resource type is given -> 4 points if a mimetype is given -> 2 points if an extension is given -> 1 point If several handlers have the same score after that procedure, the length of the resource path acts as the tie breaker: The more folders of the path are specified, the more exact the match naturally becomes. If this is still tied, then the OTH-Files are valid for the exact same set of resources. This points to a less-optimal configuration. In this case, the behavior of the method is not determined.

Parameters:
list - a list of matching handlers
Returns:
the list of handlers, ranked by matching: The best matching handler is in first position
Throws:
com.sapportals.wcm.WcmException - Exception raised in failure situation

writeDebugInformation

public String writeDebugInformation(IResource res,
                                    IObjectTypeHandlerList result)
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM


Copyright 2012 SAP AG Complete Copyright Notice