org.kuali.rice.krad.service.impl
Class RemoteModuleServiceBase

java.lang.Object
  extended by 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:
CoreServiceRemoteModuleService, KewRemoteModuleService, KimRemoteModuleService, LocationRemoteModuleService, ModuleServiceBase

public abstract class RemoteModuleServiceBase
extends Object
implements ModuleService


Nested Class Summary
protected static class RemoteModuleServiceBase.BaseLookupUrlsHolder
           
 
Field Summary
protected  org.springframework.context.ApplicationContext applicationContext
           
protected  ConfigurationService kualiConfigurationService
           
protected  KualiModuleService kualiModuleService
           
protected static org.apache.log4j.Logger LOG
           
protected  LookupService lookupService
           
protected  ModuleConfiguration moduleConfiguration
           
 
Constructor Summary
RemoteModuleServiceBase()
           
 
Method Summary
 void afterPropertiesSet()
           
<T extends ExternalizableBusinessObject>
T
createNewObjectFromExternalizableClass(Class<T> boClass)
           
protected  String getBaseInquiryUrl()
          Returns the base URL to use for inquiry requests to objects within the module
protected  String getBaseLookupUrl()
          Returns the base URL to use for lookup requests to objects within the module
 DataObjectRelationship getBusinessObjectRelationship(Class boClass, String attributeName, String attributePrefix)
           
 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)
          Deprecated. 
 String getExternalizableBusinessObjectLookupUrl(Class inquiryBusinessObjectClass, Map<String,String> parameters)
          Deprecated. 
<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.
 String getExternalizableDataObjectInquiryUrl(Class<?> inquiryDataObjectClass, Properties parameters)
          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 getExternalizableDataObjectLookupUrl(Class<?> lookupDataObjectClass, Properties parameters)
          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
protected  String getInquiryUrl(Class inquiryBusinessObjectClass)
          Deprecated. 
protected  ConfigurationService getKualiConfigurationService()
           
 KualiModuleService getKualiModuleService()
           
protected  LookupService getLookupService()
          Gets the lookupService attribute.
 ModuleConfiguration getModuleConfiguration()
          This method returns the module configuration.
protected  String getRiceBaseLookupUrl()
          Returns the base lookup URL for the Rice server
protected  Properties getUrlParameters(String businessObjectClassAttribute, Map<String,String[]> parameters)
          Deprecated. 
 boolean goToCentralRiceForInquiry()
          This method determines whether or not the central rice server should be used for lookups.
 boolean isExternalizable(Class boClazz)
          This method determines whether or not a bo class is externalizable.
 boolean isLocked()
          This method determines whether or not this module is currently locked
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.
 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 setKualiConfigurationService(ConfigurationService kualiConfigurationService)
           
 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
 
Methods inherited from interface org.kuali.rice.krad.service.ModuleService
getExternalizableBusinessObject, getExternalizableBusinessObjectsList, isExternalizableBusinessObjectInquirable, isExternalizableBusinessObjectLookupable
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG

moduleConfiguration

protected ModuleConfiguration moduleConfiguration

kualiModuleService

protected KualiModuleService kualiModuleService

applicationContext

protected org.springframework.context.ApplicationContext applicationContext

kualiConfigurationService

protected ConfigurationService kualiConfigurationService

lookupService

protected LookupService lookupService
Constructor Detail

RemoteModuleServiceBase

public RemoteModuleServiceBase()
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)

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.

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)

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)

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
See Also:
ModuleService.getExternalizableDataObjectInquiryUrl(java.lang.Class, java.util.Properties)

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
See Also:
ModuleService.getExternalizableDataObjectLookupUrl(java.lang.Class, java.util.Properties)

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. 

This overridden method ...

Specified by:
getExternalizableBusinessObjectLookupUrl in interface ModuleService
Returns:
See Also:
ModuleService.getExternalizableBusinessObjectLookupUrl(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)

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.krad.service.ModuleService#retrieveExternalizableBusinessObjectIfNecessary(org.kuali.rice.krad.bo.BusinessObject, org.kuali.rice.krad.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.krad.service.ModuleService#retrieveExternalizableBusinessObjectIfNecessary(org.kuali.rice.krad.bo.BusinessObject, org.kuali.rice.krad.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)

getUrlParameters

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


getInquiryUrl

@Deprecated
protected String getInquiryUrl(Class inquiryBusinessObjectClass)
Deprecated. 


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)

createNewObjectFromExternalizableClass

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

getBusinessObjectRelationship

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

getKualiModuleService

public KualiModuleService getKualiModuleService()
Returns:
the kualiModuleService

setKualiModuleService

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

getKualiConfigurationService

protected ConfigurationService getKualiConfigurationService()

setKualiConfigurationService

public void setKualiConfigurationService(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
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)

isLocked

public boolean isLocked()
This method determines whether or not this module is currently locked

Specified by:
isLocked in interface ModuleService
See Also:
ModuleService.isLocked()

getLookupService

protected LookupService getLookupService()
Gets the lookupService attribute.

Returns:
Returns the lookupService.

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:


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