public class ComponentUtils extends Object
Component
instancesConstructor and Description |
---|
ComponentUtils() |
Modifier and Type | Method and Description |
---|---|
static <T extends Component> |
copy(T component) |
static <T extends Component> |
copy(T component,
String idSuffix) |
static <T extends Component> |
copyComponent(T component,
String addBindingPrefix,
String idSuffix) |
static <T extends Component> |
copyComponentList(List<T> components,
String idSuffix) |
static <T extends Field> |
copyFieldList(List<T> fields,
String idSuffix) |
static <T extends Field> |
copyFieldList(List<T> fields,
String addBindingPrefix,
String idSuffix) |
static <T> T |
copyObject(T object) |
static List<Component> |
getAllNestedComponents(Component component) |
static List<String> |
getComponentPropertyNames(Class<? extends Component> componentClass) |
static <T extends Component> |
getComponentsOfType(List<? extends Component> items,
Class<T> componentType) |
static <T extends Component> |
getComponentsOfTypeDeep(Component component,
Class<T> componentType) |
static <T extends Component> |
getComponentsOfTypeDeep(List<? extends Component> items,
Class<T> componentType) |
protected static Object |
getCopyPropertyValue(Set<String> propertiesForReferenceCopy,
String propertyName,
Object propertyValue) |
protected static <T> T |
getNewInstance(T object) |
static void |
prefixBindingPath(DataBinding field,
String addBindingPrefix) |
static void |
prefixBindingPath(List<? extends Field> fields,
String addBindingPrefix) |
static void |
prefixBindingPathNested(Component component,
String addBindingPrefix) |
static void |
pushObjectToContext(Component component,
String contextName,
Object contextValue) |
static void |
pushObjectToContext(List<? extends Component> components,
String contextName,
Object contextValue) |
static void |
setComponentPropertyDeep(Component component,
String propertyPath,
Object propertyValue) |
static void |
setComponentsPropertyDeep(List<? extends Component> components,
String propertyPath,
Object propertyValue) |
static List<? extends Ordered> |
sort(List<? extends Ordered> items,
int defaultOrderSequence)
Performs sorting logic of the given list of
Ordered
instances by its order property |
static void |
updateContextForLine(Component component,
Object collectionLine,
int lineIndex) |
static void |
updateContextsForLine(List<? extends Component> components,
Object collectionLine,
int lineIndex) |
static void |
updateIdsWithSuffixNested(Component component,
String idSuffix) |
static void |
updateIdsWithSuffixNested(List<? extends Component> components,
String idSuffix) |
static void |
updateIdWithSuffix(Component component,
String idSuffix) |
public ComponentUtils()
public static <T> T copyObject(T object)
protected static Object getCopyPropertyValue(Set<String> propertiesForReferenceCopy, String propertyName, Object propertyValue)
protected static <T> T getNewInstance(T object)
public static <T extends Field> List<T> copyFieldList(List<T> fields, String addBindingPrefix, String idSuffix)
public static <T extends Field> List<T> copyFieldList(List<T> fields, String idSuffix)
public static <T extends Component> T copyComponent(T component, String addBindingPrefix, String idSuffix)
public static <T extends Component> List<T> copyComponentList(List<T> components, String idSuffix)
public static <T extends Component> List<T> getComponentsOfType(List<? extends Component> items, Class<T> componentType)
public static <T extends Component> List<T> getComponentsOfTypeDeep(List<? extends Component> items, Class<T> componentType)
public static <T extends Component> List<T> getComponentsOfTypeDeep(Component component, Class<T> componentType)
public static List<Component> getAllNestedComponents(Component component)
public static void prefixBindingPath(List<? extends Field> fields, String addBindingPrefix)
public static void prefixBindingPathNested(Component component, String addBindingPrefix)
public static void prefixBindingPath(DataBinding field, String addBindingPrefix)
public static void updateIdsWithSuffixNested(List<? extends Component> components, String idSuffix)
public static void updateIdsWithSuffixNested(Component component, String idSuffix)
public static void updateIdWithSuffix(Component component, String idSuffix)
public static void setComponentsPropertyDeep(List<? extends Component> components, String propertyPath, Object propertyValue)
public static void setComponentPropertyDeep(Component component, String propertyPath, Object propertyValue)
public static List<String> getComponentPropertyNames(Class<? extends Component> componentClass)
public static void pushObjectToContext(List<? extends Component> components, String contextName, Object contextValue)
public static void pushObjectToContext(Component component, String contextName, Object contextValue)
public static void updateContextsForLine(List<? extends Component> components, Object collectionLine, int lineIndex)
public static void updateContextForLine(Component component, Object collectionLine, int lineIndex)
public static List<? extends Ordered> sort(List<? extends Ordered> items, int defaultOrderSequence)
Ordered
instances by its order property
Items list is sorted based on its order property. Lower order values are placed higher in the list. If a item does not have a value assigned for the order (or is equal to the default order of 0), it will be assigned the a value based on the given order sequence integer. If two or more items share the same order value, all but the last item found in the list will be removed.
items
- defaultOrderSequence
- Component.getOrder()
,
org.springframework.core.Ordered
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.