org.kuali.rice.kns.service.impl
Class ModuleServiceBase

java.lang.Object
  extended by org.kuali.rice.kns.service.impl.ModuleServiceBase
All Implemented Interfaces:
ModuleService, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
KEWModuleService, KimModuleService, KNSModuleService, KSBModuleService

public class ModuleServiceBase
extends Object
implements ModuleService

This class implements ModuleService interface.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
protected  org.springframework.context.ApplicationContext applicationContext
           
protected  BusinessObjectDictionaryService businessObjectDictionaryService
           
protected  BusinessObjectService businessObjectService
           
protected  KualiModuleService kualiModuleService
           
protected static org.apache.log4j.Logger LOG
           
protected  LookupService lookupService
           
protected  ModuleConfiguration moduleConfiguration
           
 
Constructor Summary
ModuleServiceBase()
           
 
Method Summary
 void afterPropertiesSet()
           
<T extends ExternalizableBusinessObject>
T
createNewObjectFromExternalizableClass(Class<T> boClass)
           
 BusinessObjectDictionaryService getBusinessObjectDictionaryService()
           
 BusinessObjectRelationship getBusinessObjectRelationship(Class boClass, String attributeName, String attributePrefix)
           
 BusinessObjectService getBusinessObjectService()
           
<T extends ExternalizableBusinessObject>
T
getExternalizableBusinessObject(Class<T> businessObjectClass, Map<String,Object> fieldValues)
          This method gets the externalizable business object, given its type and a map of primary keys and values
 BusinessObjectEntry getExternalizableBusinessObjectDictionaryEntry(Class businessObjectInterfaceClass)
          This method gets the business object dictionary entry for the passed in externalizable business object class.
<E extends ExternalizableBusinessObject>
Class<E>
getExternalizableBusinessObjectImplementation(Class<E> externalizableBusinessObjectInterface)
          For a given ExternalizableBusinessObject interface, return the implementation class provided by this module.
 String getExternalizableBusinessObjectInquiryUrl(Class inquiryBusinessObjectClass, Map<String,String[]> parameters)
          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.
 String getExternalizableBusinessObjectLookupUrl(Class inquiryBusinessObjectClass, Map<String,String> parameters)
          This overridden method ...
<T extends ExternalizableBusinessObject>
List<T>
getExternalizableBusinessObjectsList(Class<T> externalizableBusinessObjectClass, Map<String,Object> fieldValues)
          This method gets the list of externalizable business objects, given its type and a map of primary keys and values.
<T extends ExternalizableBusinessObject>
List<T>
getExternalizableBusinessObjectsListForLookup(Class<T> externalizableBusinessObjectClass, Map<String,Object> fieldValues, boolean unbounded)
          This method gets the list of externalizable business objects for lookup, given its type and a map of primary keys and values.
protected  String getInquiryUrl(Class inquiryBusinessObjectClass)
           
 KualiModuleService getKualiModuleService()
           
protected  LookupService getLookupService()
          Gets the lookupService attribute.
 ModuleConfiguration getModuleConfiguration()
          This method returns the module configuration.
protected  Properties getUrlParameters(String businessObjectClassAttribute, Map<String,String[]> parameters)
           
 boolean isExternalizable(Class boClazz)
          This method determines whether or not a bo class is externalizable.
 boolean isExternalizableBusinessObjectInquirable(Class boClass)
           
 boolean isExternalizableBusinessObjectLookupable(Class boClass)
           
 boolean isResponsibleFor(Class businessObjectClass)
          This method determines whether this service is responsible for the business object class passed in, or not.
 boolean isResponsibleForJob(String jobName)
          This method determines whether this service is responsible for the given jobname, or not.
 List<List<String>> listAlternatePrimaryKeyFieldNames(Class businessObjectInterfaceClass)
          This overridden method ...
 List listPrimaryKeyFieldNames(Class businessObjectInterfaceClass)
          This method returns the list of primary keys for the EBO.
<T extends ExternalizableBusinessObject>
T
retrieveExternalizableBusinessObjectIfNecessary(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
 List<? extends ExternalizableBusinessObject> retrieveExternalizableBusinessObjectsList(BusinessObject businessObject, String externalizableRelationshipName, Class externalizableClazz)
          This method assumes that the externalizableClazz is an interface and gets the concrete implementation for it
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setKualiModuleService(KualiModuleService kualiModuleService)
           
 void setModuleConfiguration(ModuleConfiguration moduleConfiguration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG

moduleConfiguration

protected ModuleConfiguration moduleConfiguration

businessObjectService

protected BusinessObjectService businessObjectService

lookupService

protected LookupService lookupService

businessObjectDictionaryService

protected BusinessObjectDictionaryService businessObjectDictionaryService

kualiModuleService

protected KualiModuleService kualiModuleService

applicationContext

protected org.springframework.context.ApplicationContext applicationContext
Constructor Detail

ModuleServiceBase

public ModuleServiceBase()
Method Detail

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
Returns:
See Also:
ModuleService.isResponsibleFor(java.lang.Class)

isResponsibleForJob

public boolean isResponsibleForJob(String jobName)
Description copied from interface: ModuleService
This method determines whether this service is responsible for the given jobname, or not.

Specified by:
isResponsibleForJob in interface ModuleService
Returns:
See Also:
ModuleService.isResponsibleFor(java.lang.Class)

getExternalizableBusinessObject

public <T extends ExternalizableBusinessObject> T getExternalizableBusinessObject(Class<T> businessObjectClass,
                                                                                  Map<String,Object> fieldValues)
Description copied from interface: ModuleService
This method gets the externalizable business object, given its type and a map of primary keys and values

Specified by:
getExternalizableBusinessObject in interface ModuleService
Returns:
See Also:
ModuleService.getExternalizableBusinessObject(java.lang.Class, java.util.Map)

getExternalizableBusinessObjectsList

public <T extends ExternalizableBusinessObject> List<T> getExternalizableBusinessObjectsList(Class<T> externalizableBusinessObjectClass,
                                                                                             Map<String,Object> fieldValues)
Description copied from interface: ModuleService
This method gets the list of externalizable business objects, given its type and a map of primary keys and values.

Specified by:
getExternalizableBusinessObjectsList in interface ModuleService
Returns:
See Also:
ModuleService.getExternalizableBusinessObject(java.lang.Class, java.util.Map)

getExternalizableBusinessObjectsListForLookup

public <T extends 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
Returns:
See Also:
ModuleService.getExternalizableBusinessObjectsListForLookup(java.lang.Class, java.util.Map, boolean)

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
Returns:

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
Returns:
See Also:
ModuleService.getExternalizableBusinessObjectDictionaryEntry(java.lang.Class)

getExternalizableBusinessObjectInquiryUrl

public String getExternalizableBusinessObjectInquiryUrl(Class inquiryBusinessObjectClass,
                                                        Map<String,String[]> parameters)
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.

getUrlParameters

protected Properties getUrlParameters(String businessObjectClassAttribute,
                                      Map<String,String[]> parameters)

getInquiryUrl

protected String getInquiryUrl(Class inquiryBusinessObjectClass)

getExternalizableBusinessObjectLookupUrl

public String getExternalizableBusinessObjectLookupUrl(Class inquiryBusinessObjectClass,
                                                       Map<String,String> parameters)
This overridden method ...

Specified by:
getExternalizableBusinessObjectLookupUrl in interface ModuleService
Returns:
See Also:
ModuleService.getExternalizableBusinessObjectLookupUrl(java.lang.Class, java.util.Map)

retrieveExternalizableBusinessObjectIfNecessary

public <T extends ExternalizableBusinessObject> T retrieveExternalizableBusinessObjectIfNecessary(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
Returns:
See Also:
org.kuali.rice.kns.service.ModuleService#retrieveExternalizableBusinessObjectIfNecessary(org.kuali.rice.kns.bo.BusinessObject, org.kuali.rice.kns.bo.BusinessObject, java.lang.String)

retrieveExternalizableBusinessObjectsList

public List<? extends ExternalizableBusinessObject> retrieveExternalizableBusinessObjectsList(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
Returns:
See Also:
org.kuali.rice.kns.service.ModuleService#retrieveExternalizableBusinessObjectIfNecessary(org.kuali.rice.kns.bo.BusinessObject, org.kuali.rice.kns.bo.BusinessObject, java.lang.String)

getExternalizableBusinessObjectImplementation

public <E extends 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
See Also:
ModuleService.getExternalizableBusinessObjectImplementation(java.lang.Class)

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception
See Also:
InitializingBean.afterPropertiesSet()

getModuleConfiguration

public ModuleConfiguration getModuleConfiguration()
Description copied from interface: ModuleService
This method returns the module configuration.

Specified by:
getModuleConfiguration in interface ModuleService
Returns:
the moduleConfiguration

setModuleConfiguration

public void setModuleConfiguration(ModuleConfiguration moduleConfiguration)
Parameters:
moduleConfiguration - the moduleConfiguration to set

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
Returns:
See Also:
ModuleService.isExternalizable(java.lang.Class)

isExternalizableBusinessObjectLookupable

public boolean isExternalizableBusinessObjectLookupable(Class boClass)
Specified by:
isExternalizableBusinessObjectLookupable in interface ModuleService
Returns:

isExternalizableBusinessObjectInquirable

public boolean isExternalizableBusinessObjectInquirable(Class boClass)
Specified by:
isExternalizableBusinessObjectInquirable in interface ModuleService
Returns:

createNewObjectFromExternalizableClass

public <T extends ExternalizableBusinessObject> T createNewObjectFromExternalizableClass(Class<T> boClass)
Specified by:
createNewObjectFromExternalizableClass in interface ModuleService
Returns:

getBusinessObjectRelationship

public BusinessObjectRelationship getBusinessObjectRelationship(Class boClass,
                                                                String attributeName,
                                                                String attributePrefix)

getBusinessObjectDictionaryService

public BusinessObjectDictionaryService getBusinessObjectDictionaryService()

getBusinessObjectService

public BusinessObjectService getBusinessObjectService()
Returns:
the businessObjectService

getLookupService

protected LookupService getLookupService()
Gets the lookupService attribute.

Returns:
Returns the lookupService.

getKualiModuleService

public KualiModuleService getKualiModuleService()
Returns:
the kualiModuleService

setKualiModuleService

public void setKualiModuleService(KualiModuleService kualiModuleService)
Parameters:
kualiModuleService - the kualiModuleService to set

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
See Also:
ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)

listAlternatePrimaryKeyFieldNames

public List<List<String>> listAlternatePrimaryKeyFieldNames(Class businessObjectInterfaceClass)
This overridden method ...

Specified by:
listAlternatePrimaryKeyFieldNames in interface ModuleService
Returns:
List of List of Strings.
See Also:
ModuleService.listAlternatePrimaryKeyFieldNames(java.lang.Class)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.