Class ComponentPostMetadata
- All Implemented Interfaces:
Serializable
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor taking the id for the component to store metadata for. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new data entry to the components post data.getData()General post data that has been stored for the component.Retrieves a post data value for the component.getId()Id for the component the post metadata is associated with.getPath()Path of the component within the view structure (tree).Map containing the path for the component at each lifecycle phase.Map of property paths whose lifecycle will be run when the component is refreshed.Get the path of the first object in this components path.booleanIndicates whether the component is detached from the view (not in the view's structure, but an external component, for example a dialog).voidvoidsetDetachedComponent(boolean isDetachedComponent) voidvoidvoidsetPhasePathMapping(Map<String, String> phasePathMapping) voidsetRefreshPathMappings(Map<String, List<String>> refreshPathMappings)
-
Constructor Details
-
ComponentPostMetadata
Constructor taking the id for the component to store metadata for.- Parameters:
id- component id
-
-
Method Details
-
getId
Id for the component the post metadata is associated with.The id can be used to retrieve the component post metadata from the view post metadata
- Returns:
- component id
-
setId
- See Also:
-
getPath
Path of the component within the view structure (tree).This is set during the lifecycle process and used to retrieve the component for refresh calls
- Returns:
- path from view
-
setPath
- See Also:
-
getPhasePathMapping
Map containing the path for the component at each lifecycle phase.Note this is only stored if the path of the component is different from the
getPath()at any of the phases- Returns:
- map where key is the phase name and the value is the component's path
-
setPhasePathMapping
- See Also:
-
getRefreshPathMappings
Map of property paths whose lifecycle will be run when the component is refreshed.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
- Returns:
- map of refresh paths
-
setRefreshPathMappings
- See Also:
-
isDetachedComponent
public 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).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).
- Returns:
- boolean true if the component is detached, false if not
-
setDetachedComponent
public void setDetachedComponent(boolean isDetachedComponent) - See Also:
-
getData
General post data that has been stored for the component.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- Returns:
- unmodifiable map of data
-
setData
- See Also:
-
addData
Adds a new data entry to the components post data.- Parameters:
key- key for data, which is used to retrieve the datavalue- data value- See Also:
-
getData
Retrieves a post data value for the component.- Parameters:
key- key for the data value to retrieve- Returns:
- data value, or null if data does not exist
- See Also:
-
getRootObjectPath
Get the path of the first object in this components path.- Returns:
- the top most parent object's path for this component
-