| java.lang.Object org.kuali.core.util.FieldUtils
FieldUtils | public class FieldUtils (Code) | | This class is used to build Field objects from underlying data dictionary and general utility methods for handling fields.
|
Method Summary | |
public static void | applyAuthorization(Field field, MaintenanceDocumentAuthorizations auths) | public static Field | constructContainerField(String name, String label, List fields) | public static Field | constructContainerField(String name, String label, List fields, int numberOfColumns) Wraps list of fields into a Field of type CONTAINER and arrange them into multiple columns. | public static List | createAndPopulateFieldsForLookup(List<String> lookupFieldAttributeList, List<String> readOnlyFieldsList, Class businessObjectClass) | public static Field | fixFieldForForm(Field field, List keyFieldNames, String namePrefix, String maintenanceAction, boolean readOnly, MaintenanceDocumentAuthorizations auths) Does prefixing and read only settings of a Field UI for display in a maintenance document.
Parameters: field - - the Field object to be displayed Parameters: keyFieldNames - - Primary key property names for the business object being maintained. Parameters: namePrefix - - String to prefix Field names with. Parameters: maintenanceAction - - The maintenance action requested. Parameters: readOnly - - Indicates whether all fields should be read only. | public static Field | getPropertyField(Class businessObjectClass, String attributeName, boolean translateCheckboxes) Builds up a Field object based on the propertyName and business object class. | final public static boolean | isCollectionMultipleLookupEnabled(MaintainableCollectionDefinition definition) Returns whether the passed in collection has been properly configured in the maint doc dictionary to support multiple value
lookups. | protected static boolean | isLookupFieldLevelHelpDisabled(Class businessObjectClass, String attributeName) Determines whether field level help is disabled for the field corresponding to the businessObjectClass and attribute name
If this value is true and
FieldUtils.isLookupFieldLevelHelpEnabled(Class,String) returns false,
then the field level help will not be rendered. | protected static boolean | isLookupFieldLevelHelpEnabled(Class businessObjectClass, String attributeName) Determines whether field level help is enabled for the field corresponding to the businessObjectClass and attribute name
If this value is true, then the field level help will be enabled.
If false, then whether a field is enabled is determined by the value returned by
FieldUtils.isLookupFieldLevelHelpDisabled(Class,String) and the system-wide
parameter setting. | public static List | meshFields(List oldFields, List newFields, List keyFieldNames, String maintenanceAction, boolean readOnly, MaintenanceDocumentAuthorizations auths) Merges together fields and an old maintainble row and new maintainable row, for each field call fixFieldForForm. | public static List | meshRows(List oldRows, List newRows, List keyFieldNames, String maintenanceAction, boolean readOnly, MaintenanceDocumentAuthorizations auths) Merges together rows of an old maintainable section and new maintainable section. | public static List | meshSections(List oldSections, List newSections, List keyFieldNames, String maintenanceAction, boolean readOnly, MaintenanceDocumentAuthorizations auths) Merges together sections of the old maintainable and new maintainable. | final public static void | modifyFieldToSupportMultipleValueLookups(Field field, String parents, MaintainableCollectionDefinition definition) | public static Map | populateBusinessObjectFromMap(BusinessObject bo, Map fieldValues) Uses reflection to get the property names of the business object, then checks for the property name as a key in the passed
map. | public static Map | populateBusinessObjectFromMap(BusinessObject bo, Map fieldValues, String propertyNamePrefix) Uses reflection to get the property names of the business object, then checks for the property name as a key in the passed
map. | public static List | populateFieldsFromBusinessObject(List fields, BusinessObject bo) Uses reflection to get the property names of the business object, then checks for a matching field property name. | public static String | scrubWhitespace(String s) This method removes any duplicating spacing (internal or on the ends) from a String, meant to be exposed as a tag library
function.
Parameters: s - String to remove duplicate spacing from. | public static void | setInquiryURL(Field field, BusinessObject bo, String propertyName) | public static List | wrapFields(List fields) Wraps each Field in the list into a Row. | public static List<Row> | wrapFields(List<Field> fields, int numberOfColumns) This method is to implement multiple columns where the numberOfColumns is obtained from data dictionary. |
constructContainerField | public static Field constructContainerField(String name, String label, List fields)(Code) | | Wraps list of fields into a Field of type CONTAINER
Parameters: name - name for the field Parameters: label - label for the field Parameters: fields - list of fields that should be contained in the container Field of type CONTAINER |
constructContainerField | public static Field constructContainerField(String name, String label, List fields, int numberOfColumns)(Code) | | Wraps list of fields into a Field of type CONTAINER and arrange them into multiple columns.
Parameters: name - name for the field Parameters: label - label for the field Parameters: fields - list of fields that should be contained in the container Parameters: numberOfColumns - the number of columns for each row that the fields should be arranged into Field of type CONTAINER |
fixFieldForForm | public static Field fixFieldForForm(Field field, List keyFieldNames, String namePrefix, String maintenanceAction, boolean readOnly, MaintenanceDocumentAuthorizations auths)(Code) | | Does prefixing and read only settings of a Field UI for display in a maintenance document.
Parameters: field - - the Field object to be displayed Parameters: keyFieldNames - - Primary key property names for the business object being maintained. Parameters: namePrefix - - String to prefix Field names with. Parameters: maintenanceAction - - The maintenance action requested. Parameters: readOnly - - Indicates whether all fields should be read only. Field |
getPropertyField | public static Field getPropertyField(Class businessObjectClass, String attributeName, boolean translateCheckboxes)(Code) | | Builds up a Field object based on the propertyName and business object class.
Parameters: propertyName - Field |
isCollectionMultipleLookupEnabled | final public static boolean isCollectionMultipleLookupEnabled(MaintainableCollectionDefinition definition)(Code) | | Returns whether the passed in collection has been properly configured in the maint doc dictionary to support multiple value
lookups.
Parameters: definition - |
isLookupFieldLevelHelpDisabled | protected static boolean isLookupFieldLevelHelpDisabled(Class businessObjectClass, String attributeName)(Code) | | Determines whether field level help is disabled for the field corresponding to the businessObjectClass and attribute name
If this value is true and
FieldUtils.isLookupFieldLevelHelpEnabled(Class,String) returns false,
then the field level help will not be rendered. If both this and
FieldUtils.isLookupFieldLevelHelpEnabled(Class,String) return false, then the system-wide
setting will determine whether field level help is enabled. Note that if a field is read-only, that may cause field-level help to not be rendered.
Parameters: businessObjectClass - the looked up class Parameters: attributeName - the attribute for the field true if field level help is disabled, false if the value of this method should NOT be used to determine whether this method's return valueaffects the enablement of field level help |
isLookupFieldLevelHelpEnabled | protected static boolean isLookupFieldLevelHelpEnabled(Class businessObjectClass, String attributeName)(Code) | | Determines whether field level help is enabled for the field corresponding to the businessObjectClass and attribute name
If this value is true, then the field level help will be enabled.
If false, then whether a field is enabled is determined by the value returned by
FieldUtils.isLookupFieldLevelHelpDisabled(Class,String) and the system-wide
parameter setting. Note that if a field is read-only, that may cause field-level help to not be rendered.
Parameters: businessObjectClass - the looked up class Parameters: attributeName - the attribute for the field true if field level help is enabled, false if the value of this method should NOT be used to determine whether this method's return valueaffects the enablement of field level help |
meshFields | public static List meshFields(List oldFields, List newFields, List keyFieldNames, String maintenanceAction, boolean readOnly, MaintenanceDocumentAuthorizations auths)(Code) | | Merges together fields and an old maintainble row and new maintainable row, for each field call fixFieldForForm.
Parameters: oldFields - Parameters: newFields - Parameters: keyFieldNames - Parameters: maintenanceAction - Parameters: readOnly - List of Field objects |
meshRows | public static List meshRows(List oldRows, List newRows, List keyFieldNames, String maintenanceAction, boolean readOnly, MaintenanceDocumentAuthorizations auths)(Code) | | Merges together rows of an old maintainable section and new maintainable section.
Parameters: oldRows - Parameters: newRows - Parameters: keyFieldNames - Parameters: maintenanceAction - Parameters: readOnly - List of Row objects |
meshSections | public static List meshSections(List oldSections, List newSections, List keyFieldNames, String maintenanceAction, boolean readOnly, MaintenanceDocumentAuthorizations auths)(Code) | | Merges together sections of the old maintainable and new maintainable.
Parameters: oldSections - Parameters: newSections - Parameters: keyFieldNames - Parameters: maintenanceAction - Parameters: readOnly - List of Section objects |
modifyFieldToSupportMultipleValueLookups | final public static void modifyFieldToSupportMultipleValueLookups(Field field, String parents, MaintainableCollectionDefinition definition)(Code) | | This method modifies the passed in field so that it may be used to render a multiple values lookup button
Parameters: field - this object will be modified by this method Parameters: parents - Parameters: definition - |
populateBusinessObjectFromMap | public static Map populateBusinessObjectFromMap(BusinessObject bo, Map fieldValues)(Code) | | Uses reflection to get the property names of the business object, then checks for the property name as a key in the passed
map. If found, takes the value from the map and sets the business object property.
Parameters: bo - Parameters: fieldValues - Cached Values from any formatting failures |
populateBusinessObjectFromMap | public static Map populateBusinessObjectFromMap(BusinessObject bo, Map fieldValues, String propertyNamePrefix)(Code) | | Uses reflection to get the property names of the business object, then checks for the property name as a key in the passed
map. If found, takes the value from the map and sets the business object property.
Parameters: bo - Parameters: fieldValues - Parameters: propertyNamePrefix - this value will be prepended to all property names in the returned unformattable values map Cached Values from any formatting failures |
populateFieldsFromBusinessObject | public static List populateFieldsFromBusinessObject(List fields, BusinessObject bo)(Code) | | Uses reflection to get the property names of the business object, then checks for a matching field property name. If found,
takes the value of the business object property and populates the field value. Iterates through for all fields in the list.
Parameters: fields - list of Field object to populate Parameters: bo - business object to get field values from List of fields with values populated from business object. |
scrubWhitespace | public static String scrubWhitespace(String s)(Code) | | This method removes any duplicating spacing (internal or on the ends) from a String, meant to be exposed as a tag library
function.
Parameters: s - String to remove duplicate spacing from. String without duplicate spacing. |
wrapFields | public static List wrapFields(List fields)(Code) | | Wraps each Field in the list into a Row.
Parameters: fields - List of Row objects |
wrapFields | public static List<Row> wrapFields(List<Field> fields, int numberOfColumns)(Code) | | This method is to implement multiple columns where the numberOfColumns is obtained from data dictionary.
Parameters: fields - Parameters: numberOfColumns - |
|
|