public interface IVariantManager
isA(ILogicalVariantResource.class) might not return true
for all resources.
The manager has access to the variant context as a map of properties which is attached to the access context ().
To support applications not aware of variants the repository should be able to work with a default context if the
variant context is missing. The repository should also be able to use default values for missing properties.
Alternative in both cased: throw an IAccessContext.getVariantContext() .
Because the variant context may contain properties of other repository types, unknown properties have to be ignored.
If a property name is known but the type does not match or the value is not allowed, an
InvalidVariantContextException has to be thrown.
com.sapportals.wcm.repository.variants.ILogicalVariantResource
com.sapportals.wcm.repository.variants.IPhysicalVariantResourceInvalidVariantContextException
| Modifier and Type | Method and Description |
|---|---|
List |
findPhysicalResources(IResourceHandle logicalResourceHandle,
Map contextProperties)
Returns a list of all physical resources which match the given map of context-relevant properties.
|
Map |
getAllInvariantProperties(IResourceHandle logicalResourceHandle)
Returns a map of all invariant properties of the logical resource.
|
IProperty |
getInvariantProperty(IResourceHandle logicalResourceHandle,
IPropertyName propertyName)
Returns the specified invariant property or
null if it does not exist. |
Map |
getListedInvariantProperties(IResourceHandle logicalResourceHandle,
List propertyNameList)
Returns a map of invariant properties with the specified names.
|
IResourceHandle |
getLogicalResource(IResourceHandle physicalResourceHandle)
Returns the logical resource handle the physical resource handle belongs to - must not be
null. |
IResourceHandle |
getPhysicalResource(IResourceHandle logicalResourceHandle)
Returns the physical resource handle that was the result of the context resolution for the given logical resource
handle (at the time when the logical resource handle was created).
|
boolean |
isLogicalResource(IResourceHandle handle)
Returns
true if the given handle refers to a logical resource. |
boolean |
isPhysicalResource(IResourceHandle handle)
Returns
true if the given handle refers to a physical resource. |
boolean isPhysicalResource(IResourceHandle handle) throws ResourceException
true if the given handle refers to a physical resource.handle - A resource handletrue if the given handle refers to a physical resource.ResourceException - exceptionboolean isLogicalResource(IResourceHandle handle) throws ResourceException
true if the given handle refers to a logical resource.handle - A resource handletrue if the given handle refers to a logical resource.ResourceException - exceptionIResourceHandle getPhysicalResource(IResourceHandle logicalResourceHandle) throws ResourceException
logicalResourceHandle - parameterResourceExceptionIResourceHandle getLogicalResource(IResourceHandle physicalResourceHandle) throws ResourceException
null.physicalResourceHandle - parameternull.ResourceException - exception with resourceList findPhysicalResources(IResourceHandle logicalResourceHandle, Map contextProperties) throws ResourceException, OperationNotSupportedException
null the list must contain all existing physical
resources (at least one). If one of the properties in the map is not a known context property an exception
has to be thrown.logicalResourceHandle - The handle of a logical resource.contextProperties - A map of context properties to be used as a search condition. Map keys:
IPropertyName Map values
IPropertynull.ResourceException - If one of the properties in the map is not a known context property.OperationNotSupportedExceptionMap getAllInvariantProperties(IResourceHandle logicalResourceHandle) throws ResourceException
logicalResourceHandle - parameterIPropertyName, values = IProperty. The map may be
empty but not null.ResourceException - exception with resourceMap getListedInvariantProperties(IResourceHandle logicalResourceHandle, List propertyNameList) throws ResourceException
logicalResourceHandle - parameterpropertyNameList - A list of property names - must not be null. Names of non-invariant properties are
ignored.IPropertyName, values = IProperty. The map may be
empty but not null.ResourceException - exception with resourceIProperty getInvariantProperty(IResourceHandle logicalResourceHandle, IPropertyName propertyName) throws ResourceException
null if it does not exist.logicalResourceHandle - parameterpropertyName - parameternull if it does not exist.ResourceException - exception with resource| Access Rights |
|---|
| 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 2017 SAP AG Complete Copyright Notice