com.sapportals.wcm.rendering.base

Class ResourcePropertyAmalgamation

java.lang.Object
  extended by com.sapportals.wcm.rendering.base.ResourcePropertyAmalgamation

Deprecated. As of NetWeaver 7.1

public final class ResourcePropertyAmalgamation
extends Object

acts as a layer between the repository framework and its caching mechanism for access by many Threads and the different rendering classes involved in the rendering of a single iView. This class must not be persisted via HttpRequests but rather be refilled for every request-cycle. It is only intended to speed up parallel calls to the repository framework by centralizing all calls for IPropertys of an IResource by first checking, if this property has already been retrieved from the RF and - if so - returning it instead of passing the call again to the RF. It also checks if an earlier call to the RF has been unsuccessful. If so, it will simply return null and not try again to retrieve this property. This mechanism must only be used for the display of information. Any decision to edit the underlying IResource must only be made using the original properties retrieved by the IResource's method getProperties or the like.

Since:
EP5, SP6 or EP6, SP1

Nested Class Summary
static class ResourcePropertyAmalgamation.Mode
          Deprecated. As of NetWeaver 7.1
 class ResourcePropertyAmalgamation.UnavailableEntries
          Deprecated. As of NetWeaver 7.1
 
Field Summary
static ResourcePropertyAmalgamation.Mode ADD
          Deprecated.  
static ResourcePropertyAmalgamation.Mode UPDATE
          Deprecated.  
 
Constructor Summary
ResourcePropertyAmalgamation()
          Deprecated.  
 
Method Summary
 void add(IResource resource, IPropertyMap map, ResourcePropertyAmalgamation.Mode mode)
          Deprecated. As of NetWeaver 7.1
 void add(IResource resource, IProperty prop, ResourcePropertyAmalgamation.Mode mode)
          Deprecated. As of NetWeaver 7.1
 boolean declareUnavailable(IResource resource, IPropertyName name)
          Deprecated. As of NetWeaver 7.1
 IPropertyNameList declareUnavailable(IResource resource, IPropertyNameList list)
          Deprecated. As of NetWeaver 7.1
 IPropertyMap getProperties(IResource resource)
          Deprecated. As of NetWeaver 7.1
 IPropertyMap getProperties(IResource resource, IPropertyNameList list)
          Deprecated. As of NetWeaver 7.1
 IProperty getProperty(IResource resource, IPropertyName name)
          Deprecated. As of NetWeaver 7.1
 ResourceCommandAmalgamation getResourceCommandAmalg()
          Deprecated.  
 void readProperties(IResourceList resources, IPropertyNameList names)
          Deprecated. As of NetWeaver 7.1
 void remove(IResource resource)
          Deprecated. As of NetWeaver 7.1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADD

public static final ResourcePropertyAmalgamation.Mode ADD
Deprecated. 

UPDATE

public static final ResourcePropertyAmalgamation.Mode UPDATE
Deprecated. 
Constructor Detail

ResourcePropertyAmalgamation

public ResourcePropertyAmalgamation()
Deprecated. 
Method Detail

add

public void add(IResource resource,
                IProperty prop,
                ResourcePropertyAmalgamation.Mode mode)
Deprecated. As of NetWeaver 7.1

adds the given IProperty to the map of available properties for the given IResource. If the mode is ADD, the property will only be added, if no property with this key already exists for this resource in this class. If the mode is UPDATE, an eventually already existing value will be replaced with the given property. A NullPointerException is thrown, if one of the parameters is null

Parameters:
resource - Description of the Parameter
prop - Description of the Parameter
mode - Description of the Parameter

readProperties

public void readProperties(IResourceList resources,
                           IPropertyNameList names)
Deprecated. As of NetWeaver 7.1


add

public void add(IResource resource,
                IPropertyMap map,
                ResourcePropertyAmalgamation.Mode mode)
Deprecated. As of NetWeaver 7.1

adds the given IPropertyMap to the map of available properties for the given IResource. If the mode is ADD, the properties of the given map will only be added, if no property with this key already exist for this resource in this class. If the mode is UPDATE, an eventually already existing value will be replaced with the property in the given map. A NullPointerException is thrown, if one of the parameters is null .

Parameters:
resource - Description of the Parameter
map - Description of the Parameter
mode - Description of the Parameter

getProperties

public IPropertyMap getProperties(IResource resource)
Deprecated. As of NetWeaver 7.1

returns all properties available from the framework. If additional properties have been defined for the resource by the add method, these properties will be returned as well. If an exception occurs when trying to load the properties from the framework, it will be shown in the logging as a warning. An empty IPropertyMap will be returned. Additional calls of this method will not be routed to the framework.

Parameters:
resource - Description of the Parameter
Returns:
The properties value

getProperty

public IProperty getProperty(IResource resource,
                             IPropertyName name)
Deprecated. As of NetWeaver 7.1

returns the property defined for the given resource that is accessed through the given name. If the name is not in the internal map of properties for this resource (or if no map exists up to this point), a call to the RepositoryFramework is done. If this call fails to retrieve the property, this information will be logged (as a debug or a warning, depending if an exception was thrown by the RepositoryFramework), null will be returned. At the same time, this resource/name tuple will be marked as an unavailable property. If the same combination is requested at a later time, no call to the framework is done. If one of the parameters is null, a NullPointerException will be thrown

Parameters:
resource - Description of the Parameter
name - Description of the Parameter
Returns:
the valid property or null

getResourceCommandAmalg

public ResourceCommandAmalgamation getResourceCommandAmalg()
Deprecated. 

getProperties

public IPropertyMap getProperties(IResource resource,
                                  IPropertyNameList list)
Deprecated. As of NetWeaver 7.1

returns the properties defined for the given resource which are accessed through the given list. All properties not yet retrieved from the RepositoryFramework will be retrieved here, unless they are marked as an unavailable tuple. If one of the parameters is null, a NullPointerException will be thrown

Parameters:
resource - Description of the Parameter
list - Description of the Parameter
Returns:
The properties value

remove

public void remove(IResource resource)
Deprecated. As of NetWeaver 7.1

removes the resource and all its properties retrieved from the internal data structures from this class.

Parameters:
resource - Description of the Parameter

declareUnavailable

public IPropertyNameList declareUnavailable(IResource resource,
                                            IPropertyNameList list)
Deprecated. As of NetWeaver 7.1

marks the given property names as unavailable from the framework so that no calls to the framework will be made to retrieve them. If a property has already been set by another class that uses this amalgamation, this property's name will be included in the returned property name list. Both given parameters must not be null, or a NullPointerException is thrown

Parameters:
resource - the resource for which the properties are to be declared unavailable
list - the properties that are to be declared unavailable
Returns:
the list of properties that are already available for this resource and were to be declared unavailable. Might be an empty list, but never null.

declareUnavailable

public boolean declareUnavailable(IResource resource,
                                  IPropertyName name)
Deprecated. As of NetWeaver 7.1

marks the given property name as unavailable from the framework so that no calls to the framework will be made to retrieve it. If the property has already been set by another class that uses this amalgamation, the method will return false. Both given parameters must not be null, or a NullPointerException is thrown

Parameters:
resource - the resource for which the property is to be declared unavailable
name - the property that is to be declared unavailable
Returns:
flag stating if the property was declared unavailable or not.
Access Rights

This class can be accessed from:


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


Copyright 2014 SAP AG Complete Copyright Notice