|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sapportals.wcm.rendering.base.ResourcePropertyAmalgamation
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.
| Nested Class Summary | |
static class |
ResourcePropertyAmalgamation.Mode
|
class |
ResourcePropertyAmalgamation.UnavailableEntries
wraps a map to allow simpler access to an IResource as the key
to a map entry and the Set of IPropertyName elements
as value of the entry. |
| Field Summary | |
static ResourcePropertyAmalgamation.Mode |
ADD
|
static ResourcePropertyAmalgamation.Mode |
UPDATE
|
| Constructor Summary | |
ResourcePropertyAmalgamation()
|
|
| Method Summary | |
void |
add(IResource resource,
IPropertyMap map,
ResourcePropertyAmalgamation.Mode mode)
adds the given IPropertyMap to the map of available properties
for the given IResource. |
void |
add(IResource resource,
IProperty prop,
ResourcePropertyAmalgamation.Mode mode)
adds the given IProperty to the map of available properties for
the given IResource. |
boolean |
declareUnavailable(IResource resource,
IPropertyName name)
marks the given property name as unavailable from the framework so that no calls to the framework will be made to retrieve it. |
IPropertyNameList |
declareUnavailable(IResource resource,
IPropertyNameList list)
marks the given property names as unavailable from the framework so that no calls to the framework will be made to retrieve them. |
IPropertyMap |
getProperties(IResource resource)
returns all properties available from the framework. |
IPropertyMap |
getProperties(IResource resource,
IPropertyNameList list)
returns the properties defined for the given resource which are accessed through the given list. |
IProperty |
getProperty(IResource resource,
IPropertyName name)
returns the property defined for the given resource that is accessed through the given name. |
void |
readProperties(IResourceList resources,
IPropertyNameList names)
|
void |
remove(IResource resource)
removes the resource and all its properties retrieved from the internal data structures from this class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final ResourcePropertyAmalgamation.Mode ADD
public static final ResourcePropertyAmalgamation.Mode UPDATE
| Constructor Detail |
public ResourcePropertyAmalgamation()
| Method Detail |
public void add(IResource resource,
IProperty prop,
ResourcePropertyAmalgamation.Mode mode)
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
resource - Description of the Parameterprop - Description of the Parametermode - Description of the Parameter
public void readProperties(IResourceList resources,
IPropertyNameList names)
public void add(IResource resource,
IPropertyMap map,
ResourcePropertyAmalgamation.Mode mode)
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
.
resource - Description of the Parametermap - Description of the Parametermode - Description of the Parameterpublic IPropertyMap getProperties(IResource resource)
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.
resource - Description of the Parameter
public IProperty getProperty(IResource resource,
IPropertyName name)
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
resource - Description of the Parametername - Description of the Parameter
null
public IPropertyMap getProperties(IResource resource,
IPropertyNameList list)
null, a NullPointerException
will be thrown
resource - Description of the Parameterlist - Description of the Parameter
public void remove(IResource resource)
resource - Description of the Parameter
public IPropertyNameList declareUnavailable(IResource resource,
IPropertyNameList list)
null, or a NullPointerException is thrown
resource - the resource for which the properties are to be declared unavailablelist - the properties that are to be declared unavailable
null.
public boolean declareUnavailable(IResource resource,
IPropertyName name)
false. Both given parameters
must not be null, or a NullPointerException is thrown
resource - the resource for which the property is to be declared unavailablename - the property that is to be declared unavailable
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||