public class ComponentPostMetadata extends Object implements Serializable
ViewPostMetadata
,
Serialized FormConstructor and Description |
---|
ComponentPostMetadata(String id)
Constructor taking the id for the component to store metadata for.
|
Modifier and Type | Method and Description |
---|---|
void |
addData(String key,
Object value)
Adds a new data entry to the components post data.
|
Map<String,Object> |
getData()
General post data that has been stored for the component.
|
Object |
getData(String key)
Retrieves a post data value for the component.
|
String |
getId()
Id for the component the post metadata is associated with.
|
String |
getPath()
Path of the component within the view structure (tree).
|
Map<String,String> |
getPhasePathMapping()
Map containing the path for the component at each lifecycle phase.
|
Map<String,List<String>> |
getRefreshPathMappings()
Map of property paths whose lifecycle will be run when the component is refreshed.
|
boolean |
isDetachedComponent()
Indicates whether the component is detached from the view (not in the view's structure, but an external
component, for example a dialog).
|
void |
setData(Map<String,Object> data) |
void |
setDetachedComponent(boolean isDetachedComponent) |
void |
setId(String id) |
void |
setPath(String path) |
void |
setPhasePathMapping(Map<String,String> phasePathMapping) |
void |
setRefreshPathMappings(Map<String,List<String>> refreshPathMappings) |
public ComponentPostMetadata(String id)
id
- component idpublic String getId()
The id can be used to retrieve the component post metadata from the view post metadata
public String getPath()
This is set during the lifecycle process and used to retrieve the component for refresh calls
public Map<String,String> getPhasePathMapping()
Note this is only stored if the path of the component is different from the getPath()
at any of the phases
public void setPhasePathMapping(Map<String,String> phasePathMapping)
getPhasePathMapping()
public Map<String,List<String>> getRefreshPathMappings()
Each map entry contains a tree of paths to process for each of the lifecycle phases. This is so parents of the component (in each phase) are picked up during the refresh process
public void setRefreshPathMappings(Map<String,List<String>> refreshPathMappings)
getRefreshPathMappings()
public boolean isDetachedComponent()
This is used by the component refresh process to determine whether it can get the component instance by its path from the view (in the case of the component being attached), or if it must use its id (in the case of the component being detached).
public void setDetachedComponent(boolean isDetachedComponent)
isDetachedComponent
public Map<String,Object> getData()
Holds the general post data for a component. Any piece of data can be added to this map and then retrieved on a post call (for example in a controller method)
Note map returned is unmodifiable. Use addData(java.lang.String,
java.lang.Object)
to add new data entries
public void addData(String key, Object value)
key
- key for data, which is used to retrieve the datavalue
- data valuegetData()
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.