Package org.kuali.rice.krad.service.impl
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected org.kuali.rice.core.api.config.property.ConfigurationServiceprotected KualiModuleServiceprotected LegacyDataAdapterprotected static final org.apache.logging.log4j.Loggerprotected LookupServiceprotected ModuleConfiguration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid<T extends org.kuali.rice.krad.bo.ExternalizableBusinessObject>
TcreateNewObjectFromExternalizableClass(Class<T> boClass) protected StringReturns the base URL to use for inquiry requests to objects within the moduleprotected StringReturns the base URL to use for lookup requests to objects within the moduleorg.kuali.rice.krad.bo.DataObjectRelationshipgetBusinessObjectRelationship(Class boClass, String attributeName, String attributePrefix) getExternalizableBusinessObjectDictionaryEntry(Class businessObjectInterfaceClass) This method gets the business object dictionary entry for the passed in externalizable business object class.<E extends org.kuali.rice.krad.bo.ExternalizableBusinessObject>
Class<E> getExternalizableBusinessObjectImplementation(Class<E> externalizableBusinessObjectInterface) For a given ExternalizableBusinessObject interface, return the implementation class provided by this module.getExternalizableBusinessObjectInquiryUrl(Class inquiryBusinessObjectClass, Map<String, String[]> parameters) Deprecated.getExternalizableBusinessObjectLookupUrl(Class inquiryBusinessObjectClass, Map<String, String> parameters) Deprecated.<T extends org.kuali.rice.krad.bo.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.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 informationgetExternalizableDataObjectLookupUrl(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 searchedprotected StringgetInquiryUrl(Class inquiryBusinessObjectClass) Deprecated.protected org.kuali.rice.core.api.config.property.ConfigurationServiceprotected LegacyDataAdapterprotected LookupServiceThis method returns the module configuration.protected StringReturns the base lookup URL for the Rice serverprotected PropertiesgetUrlParameters(String businessObjectClassAttribute, Map<String, String[]> parameters) Deprecated.booleanThis method determines whether or not the central rice server should be used for lookups.booleanisExternalizable(Class boClazz) This method determines whether or not a bo class is externalizable.booleanisLocked()This method determines whether or not this module is currently locked.protected static booleanisNonBlankValueForKey(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.booleanisResponsibleFor(Class businessObjectClass) This method determines whether this service is responsible for the business object class passed in, or not.listAlternatePrimaryKeyFieldNames(Class businessObjectInterfaceClass) This method returns a list of alternate primary keys.listPrimaryKeyFieldNames(Class businessObjectInterfaceClass) This method returns the list of primary keys for the EBO.protected booleanpackagePrefixesMatchesDataObject(Class dataObjectClass) protected booleanpersistenceProvidersMatchDataObject(Class dataObjectClass) <T extends org.kuali.rice.krad.bo.ExternalizableBusinessObject>
TretrieveExternalizableBusinessObjectIfNecessary(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 itList<? 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.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetKualiConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService) voidsetKualiModuleService(KualiModuleService kualiModuleService) voidsetModuleConfiguration(ModuleConfiguration moduleConfiguration) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.service.ModuleService
getExternalizableBusinessObject, getExternalizableBusinessObjectsList, isExternalizableBusinessObjectInquirable, isExternalizableBusinessObjectLookupable
-
Field Details
-
LOG
protected static final org.apache.logging.log4j.Logger LOG -
moduleConfiguration
-
kualiModuleService
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
kualiConfigurationService
protected org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService -
lookupService
-
legacyDataAdapter
-
-
Constructor Details
-
RemoteModuleServiceBase
public RemoteModuleServiceBase()
-
-
Method Details
-
isResponsibleFor
Description copied from interface:ModuleServiceThis method determines whether this service is responsible for the business object class passed in, or not.- Specified by:
isResponsibleForin interfaceModuleService- Parameters:
businessObjectClass-- Returns:
- true if this module is responsible for the business object
-
packagePrefixesMatchesDataObject
- Parameters:
dataObjectClass- the dataobject class- Returns:
- true if package prefixes has been defined and matches a package containing the dataObject
-
persistenceProvidersMatchDataObject
- Parameters:
dataObjectClass- the dataobject class- Returns:
- true if a PersistenceProvider which handles the class is registered with the ModuleConfiguration
-
isNonBlankValueForKey
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 fromkey- the key to use- Returns:
- true if there is a non-blank value in the map for the given key.
-
listPrimaryKeyFieldNames
Description copied from interface:ModuleServiceThis method returns the list of primary keys for the EBO.- Specified by:
listPrimaryKeyFieldNamesin interfaceModuleService- Parameters:
businessObjectInterfaceClass-- Returns:
- list of primary key field names
-
getExternalizableBusinessObjectDictionaryEntry
public BusinessObjectEntry getExternalizableBusinessObjectDictionaryEntry(Class businessObjectInterfaceClass) Description copied from interface:ModuleServiceThis method gets the business object dictionary entry for the passed in externalizable business object class.- Specified by:
getExternalizableBusinessObjectDictionaryEntryin interfaceModuleService- Parameters:
businessObjectInterfaceClass-- Returns:
- business object
-
getExternalizableDataObjectInquiryUrl
public String getExternalizableDataObjectInquiryUrl(Class<?> inquiryDataObjectClass, Properties parameters) Description copied from interface:ModuleServiceReturns 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:
getExternalizableDataObjectInquiryUrlin interfaceModuleService- Parameters:
inquiryDataObjectClass- - aExternalizableBusinessObjectmanaged by this moduleparameters- - 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
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:ModuleServiceReturns 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:
getExternalizableDataObjectLookupUrlin interfaceModuleService- Parameters:
lookupDataObjectClass- - aExternalizableBusinessObjectmanaged by this moduleparameters- - any parameters for the lookup call- Returns:
- String URL where externalizable object information may be searched
-
getRiceBaseLookupUrl
Returns the base lookup URL for the Rice server- Returns:
- String base lookup URL
-
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:ModuleServiceThis 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:
getExternalizableBusinessObjectInquiryUrlin interfaceModuleService- Parameters:
inquiryBusinessObjectClass- aExternalizableBusinessObjectmanaged by this moduleparameters- 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:ModuleServiceThis method gets the lookup url for the given externalizable business object properties.- Specified by:
getExternalizableBusinessObjectLookupUrlin interfaceModuleService- 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:ModuleServiceThis method gets the list of externalizable business objects for lookup, given its type and a map of primary keys and values.- Specified by:
getExternalizableBusinessObjectsListForLookupin interfaceModuleService- 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:
retrieveExternalizableBusinessObjectIfNecessaryin interfaceModuleService- 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:
retrieveExternalizableBusinessObjectsListin interfaceModuleService- 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:ModuleServiceFor a given ExternalizableBusinessObject interface, return the implementation class provided by this module.- Specified by:
getExternalizableBusinessObjectImplementationin interfaceModuleService
-
getUrlParameters
@Deprecated protected Properties getUrlParameters(String businessObjectClassAttribute, Map<String, String[]> parameters) Deprecated. -
getInquiryUrl
Deprecated. -
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
getModuleConfiguration
Description copied from interface:ModuleServiceThis method returns the module configuration.- Specified by:
getModuleConfigurationin interfaceModuleService- Returns:
- module configuration
-
setModuleConfiguration
-
isExternalizable
Description copied from interface:ModuleServiceThis method determines whether or not a bo class is externalizable.- Specified by:
isExternalizablein interfaceModuleService- 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:
createNewObjectFromExternalizableClassin interfaceModuleService- Type Parameters:
T- business object type- Parameters:
boClass- business object class- Returns:
- business object
-
getBusinessObjectRelationship
-
getKualiModuleService
-
setKualiModuleService
-
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:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
listAlternatePrimaryKeyFieldNames
Description copied from interface:ModuleServiceThis 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:
listAlternatePrimaryKeyFieldNamesin interfaceModuleService- 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:
isLockedin interfaceModuleService
-
getLookupService
-
getLegacyDataAdapter
-
goToCentralRiceForInquiry
public boolean goToCentralRiceForInquiry()Description copied from interface:ModuleServiceThis method determines whether or not the central rice server should be used for lookups.- Specified by:
goToCentralRiceForInquiryin interfaceModuleService- Returns:
- true if the central rice server should be used for lookups
-
toString
-