Interface Inquirable

All Known Implementing Classes:
InquirableImpl

public interface Inquirable
Provides the contract for implementing an inquiry within the inquiry framework
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    buildInquirableLink(Object dataObject, String propertyName, Inquiry inquiry)
    Invoked by the ViewHelperService to build a link to the inquiry
    boolean
    canViewInquiryNoteAttachment(org.kuali.rice.kim.api.identity.Person user)
    Checks appropriate permissions to determine whether the given user is authorized to download note attachments associated with this inquiry data object.
    Class for the data object the inquirable should retrieve
    Responsible for retrieving the data object from its data source (database, service call, etc) based on the given map of field name/value pairs
    void
    setDataObjectClass(Class<?> dataObjectClass)
     
  • Method Details

    • getDataObjectClass

      Class<?> getDataObjectClass()
      Class for the data object the inquirable should retrieve

      Must be set before invoking any other operations on the Inquirable, including the retrieveDataObject method

      Returns:
      inquiry data object class
    • setDataObjectClass

      void setDataObjectClass(Class<?> dataObjectClass)
      See Also:
    • retrieveDataObject

      Object retrieveDataObject(Map<String,String> fieldValues)
      Responsible for retrieving the data object from its data source (database, service call, etc) based on the given map of field name/value pairs

      Given map can contain more than fields (primary key or other) necessary for retrieving the data object. Method will use the fields necessary based on the metadata for the data object class configured on the inquirable

      Parameters:
      fieldValues - - a map of string field names and values
      Returns:
      the data object or null if not found
    • buildInquirableLink

      void buildInquirableLink(Object dataObject, String propertyName, Inquiry inquiry)
      Invoked by the ViewHelperService to build a link to the inquiry

      Note this is used primarily for custom Inquirable implementations to customize the inquiry class or parameters for an inquiry. Instead of building the full inquiry link, implementations can make a callback to org.kuali.rice.krad.uif.widget.Inquiry.buildInquiryLink(Object, String, Classinvalid input: '<'?>, Mapinvalid input: '<'String, String>) given an inquiry class and parameters to build the link field.

      Parameters:
      dataObject - - parent object for the inquiry property
      propertyName - - name of the property the inquiry is being built for
      inquiry - - instance of the inquiry widget being built for the property
    • canViewInquiryNoteAttachment

      boolean canViewInquiryNoteAttachment(org.kuali.rice.kim.api.identity.Person user)
      Checks appropriate permissions to determine whether the given user is authorized to download note attachments associated with this inquiry data object. Should probably be in an authorizer class, but since inquiries don't always have document or view associations this is the next best place.
      Parameters:
      user - - the user for whom to check authorization
      Returns:
      whether or not the user is authorized to download note attachments