Class RemoteModuleServiceBase

java.lang.Object
org.kuali.rice.krad.service.impl.RemoteModuleServiceBase
All Implemented Interfaces:
ModuleService, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
ModuleServiceBase

public abstract class RemoteModuleServiceBase extends Object implements ModuleService
  • Field Details

    • LOG

      protected static final org.apache.logging.log4j.Logger LOG
    • moduleConfiguration

      protected ModuleConfiguration moduleConfiguration
    • kualiModuleService

      protected KualiModuleService kualiModuleService
    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • kualiConfigurationService

      protected org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService
    • lookupService

      protected LookupService lookupService
    • legacyDataAdapter

      protected LegacyDataAdapter legacyDataAdapter
  • Constructor Details

    • RemoteModuleServiceBase

      public RemoteModuleServiceBase()
  • Method Details

    • isResponsibleFor

      public boolean isResponsibleFor(Class businessObjectClass)
      Description copied from interface: ModuleService
      This method determines whether this service is responsible for the business object class passed in, or not.
      Specified by:
      isResponsibleFor in interface ModuleService
      Parameters:
      businessObjectClass -
      Returns:
      true if this module is responsible for the business object
    • packagePrefixesMatchesDataObject

      protected boolean packagePrefixesMatchesDataObject(Class dataObjectClass)
      Parameters:
      dataObjectClass - the dataobject class
      Returns:
      true if package prefixes has been defined and matches a package containing the dataObject
    • persistenceProvidersMatchDataObject

      protected boolean persistenceProvidersMatchDataObject(Class dataObjectClass)
      Parameters:
      dataObjectClass - the dataobject class
      Returns:
      true if a PersistenceProvider which handles the class is registered with the ModuleConfiguration
    • isNonBlankValueForKey

      protected static boolean isNonBlankValueForKey(Map<String,Object> map, String key)
      Utility method to check for the presence of a non blank value in the map for the given key Note: returns false if a null map is passed in.
      Parameters:
      map - the map to retrieve the value from
      key - the key to use
      Returns:
      true if there is a non-blank value in the map for the given key.
    • listPrimaryKeyFieldNames

      public List listPrimaryKeyFieldNames(Class businessObjectInterfaceClass)
      Description copied from interface: ModuleService
      This method returns the list of primary keys for the EBO.
      Specified by:
      listPrimaryKeyFieldNames in interface ModuleService
      Parameters:
      businessObjectInterfaceClass -
      Returns:
      list of primary key field names
    • getExternalizableBusinessObjectDictionaryEntry

      public BusinessObjectEntry getExternalizableBusinessObjectDictionaryEntry(Class businessObjectInterfaceClass)
      Description copied from interface: ModuleService
      This method gets the business object dictionary entry for the passed in externalizable business object class.
      Specified by:
      getExternalizableBusinessObjectDictionaryEntry in interface ModuleService
      Parameters:
      businessObjectInterfaceClass -
      Returns:
      business object
    • getExternalizableDataObjectInquiryUrl

      public String getExternalizableDataObjectInquiryUrl(Class<?> inquiryDataObjectClass, Properties parameters)
      Description copied from interface: ModuleService
      Returns a URL so that the inquiry framework may redirect a user to the appropriate (possibly external) website at which to view inquiry information
      Specified by:
      getExternalizableDataObjectInquiryUrl in interface ModuleService
      Parameters:
      inquiryDataObjectClass - - a ExternalizableBusinessObject managed by this module
      parameters - - any inquiry parameters, and the primary key values of the inquiry class would be in here
      Returns:
      String URL where externalizable object information may be viewed
    • getBaseInquiryUrl

      protected String getBaseInquiryUrl()
      Returns the base URL to use for inquiry requests to objects within the module
      Returns:
      String base inquiry URL
    • getExternalizableDataObjectLookupUrl

      public String getExternalizableDataObjectLookupUrl(Class<?> lookupDataObjectClass, Properties parameters)
      Description copied from interface: ModuleService
      Returns a URL so that the lookup framework may redirect a user to the appropriate (possibly external) website at which to the data for the object may be searched
      Specified by:
      getExternalizableDataObjectLookupUrl in interface ModuleService
      Parameters:
      lookupDataObjectClass - - a ExternalizableBusinessObject managed by this module
      parameters - - any parameters for the lookup call
      Returns:
      String URL where externalizable object information may be searched
    • getRiceBaseLookupUrl

      protected String getRiceBaseLookupUrl()
      Returns the base lookup URL for the Rice server
      Returns:
      String base lookup URL
    • getBaseLookupUrl

      protected String getBaseLookupUrl()
      Returns the base URL to use for lookup requests to objects within the module
      Returns:
      String base lookup URL
    • getExternalizableBusinessObjectInquiryUrl

      @Deprecated public String getExternalizableBusinessObjectInquiryUrl(Class inquiryBusinessObjectClass, Map<String,String[]> parameters)
      Deprecated.
      Description copied from interface: ModuleService
      This method returns a URL so that the inquiry framework may redirect a user to the appropriate (possibly external) website at which to view inquiry information.
      Specified by:
      getExternalizableBusinessObjectInquiryUrl in interface ModuleService
      Parameters:
      inquiryBusinessObjectClass - a ExternalizableBusinessObject managed by this module
      parameters - any inquiry parameters, and the primary key values of the inquiryBusinessObjectClass would be in here
      Returns:
      a URL where externalizable business object information may be viewed.
    • getExternalizableBusinessObjectLookupUrl

      @Deprecated public String getExternalizableBusinessObjectLookupUrl(Class inquiryBusinessObjectClass, Map<String,String> parameters)
      Deprecated.
      Description copied from interface: ModuleService
      This method gets the lookup url for the given externalizable business object properties.
      Specified by:
      getExternalizableBusinessObjectLookupUrl in interface ModuleService
      Parameters:
      parameters -
      Returns:
      lookup url
    • getExternalizableBusinessObjectsListForLookup

      public <T extends org.kuali.rice.krad.bo.ExternalizableBusinessObject> List<T> getExternalizableBusinessObjectsListForLookup(Class<T> externalizableBusinessObjectClass, Map<String,Object> fieldValues, boolean unbounded)
      Description copied from interface: ModuleService
      This method gets the list of externalizable business objects for lookup, given its type and a map of primary keys and values.
      Specified by:
      getExternalizableBusinessObjectsListForLookup in interface ModuleService
      Type Parameters:
      T -
      Parameters:
      externalizableBusinessObjectClass -
      fieldValues -
      unbounded -
      Returns:
      list of business objects
    • retrieveExternalizableBusinessObjectIfNecessary

      public <T extends org.kuali.rice.krad.bo.ExternalizableBusinessObject> T retrieveExternalizableBusinessObjectIfNecessary(org.kuali.rice.krad.bo.BusinessObject businessObject, T currentInstanceExternalizableBO, String externalizableRelationshipName)
      This method assumes that the property type for externalizable relationship in the business object is an interface and gets the concrete implementation for it
      Specified by:
      retrieveExternalizableBusinessObjectIfNecessary in interface ModuleService
      Parameters:
      businessObject -
      currentInstanceExternalizableBO -
      externalizableRelationshipName -
      Returns:
      business object
    • retrieveExternalizableBusinessObjectsList

      public List<? extends org.kuali.rice.krad.bo.ExternalizableBusinessObject> retrieveExternalizableBusinessObjectsList(org.kuali.rice.krad.bo.BusinessObject businessObject, String externalizableRelationshipName, Class externalizableClazz)
      This method assumes that the externalizableClazz is an interface and gets the concrete implementation for it.
      Specified by:
      retrieveExternalizableBusinessObjectsList in interface ModuleService
      Parameters:
      businessObject -
      externalizableRelationshipName -
      externalizableClazz -
      Returns:
      list of externalizable business objects
    • getExternalizableBusinessObjectImplementation

      public <E extends org.kuali.rice.krad.bo.ExternalizableBusinessObject> Class<E> getExternalizableBusinessObjectImplementation(Class<E> externalizableBusinessObjectInterface)
      Description copied from interface: ModuleService
      For a given ExternalizableBusinessObject interface, return the implementation class provided by this module.
      Specified by:
      getExternalizableBusinessObjectImplementation in interface ModuleService
    • getUrlParameters

      @Deprecated protected Properties getUrlParameters(String businessObjectClassAttribute, Map<String,String[]> parameters)
      Deprecated.
    • getInquiryUrl

      @Deprecated protected String getInquiryUrl(Class inquiryBusinessObjectClass)
      Deprecated.
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • getModuleConfiguration

      public ModuleConfiguration getModuleConfiguration()
      Description copied from interface: ModuleService
      This method returns the module configuration.
      Specified by:
      getModuleConfiguration in interface ModuleService
      Returns:
      module configuration
    • setModuleConfiguration

      public void setModuleConfiguration(ModuleConfiguration moduleConfiguration)
    • isExternalizable

      public boolean isExternalizable(Class boClazz)
      Description copied from interface: ModuleService
      This method determines whether or not a bo class is externalizable.
      Specified by:
      isExternalizable in interface ModuleService
      Parameters:
      boClazz -
      Returns:
      true if the class is externalizable
    • createNewObjectFromExternalizableClass

      public <T extends org.kuali.rice.krad.bo.ExternalizableBusinessObject> T createNewObjectFromExternalizableClass(Class<T> boClass)
      Specified by:
      createNewObjectFromExternalizableClass in interface ModuleService
      Type Parameters:
      T - business object type
      Parameters:
      boClass - business object class
      Returns:
      business object
    • getBusinessObjectRelationship

      public org.kuali.rice.krad.bo.DataObjectRelationship getBusinessObjectRelationship(Class boClass, String attributeName, String attributePrefix)
    • getKualiModuleService

      public KualiModuleService getKualiModuleService()
    • setKualiModuleService

      public void setKualiModuleService(KualiModuleService kualiModuleService)
    • getKualiConfigurationService

      protected org.kuali.rice.core.api.config.property.ConfigurationService getKualiConfigurationService()
    • setKualiConfigurationService

      public void setKualiConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService)
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • listAlternatePrimaryKeyFieldNames

      public List<List<String>> listAlternatePrimaryKeyFieldNames(Class businessObjectInterfaceClass)
      Description copied from interface: ModuleService
      This method returns a list of alternate primary keys. This is used when the "real" primary key is not the only one that can be used. For example, documentType has "documentTypeId" as its primary key, but the "name" could also be used. A List of Lists is returned because because there can be component keys: Ex: {name, date} {department, personId}
      Specified by:
      listAlternatePrimaryKeyFieldNames in interface ModuleService
      Parameters:
      businessObjectInterfaceClass -
      Returns:
      List of List of Strings.
    • isLocked

      public boolean isLocked()
      This method determines whether or not this module is currently locked.
      Specified by:
      isLocked in interface ModuleService
    • getLookupService

      protected LookupService getLookupService()
    • getLegacyDataAdapter

      protected LegacyDataAdapter getLegacyDataAdapter()
    • goToCentralRiceForInquiry

      public boolean goToCentralRiceForInquiry()
      Description copied from interface: ModuleService
      This method determines whether or not the central rice server should be used for lookups.
      Specified by:
      goToCentralRiceForInquiry in interface ModuleService
      Returns:
      true if the central rice server should be used for lookups
    • toString

      public String toString()
      Overrides:
      toString in class Object