public abstract class AwardSyncHelperBase extends Object implements AwardSyncHelper
| Modifier and Type | Field and Description |
|---|---|
protected String |
DELIMITER
Delimiter used between fields for the object data description
|
protected org.apache.commons.logging.Log |
LOG |
| Constructor and Description |
|---|
AwardSyncHelperBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
applySyncChange(Award award,
AwardSyncChange change)
Applies the associated change to award.
|
protected void |
applySyncChange(org.kuali.rice.krad.bo.PersistableBusinessObject object,
AwardSyncChange change,
String attrName,
AwardSyncXmlExport xmlExport)
Applies the xmlExport keys and values to the object.
|
protected void |
applySyncChange(org.kuali.rice.krad.bo.PersistableBusinessObject object,
AwardSyncChange change,
String attrName,
Collection<AwardSyncXmlExport> xmlExports)
Creates all items defined by xmlExports and adds them to the attribute.
|
protected List<AwardSyncXmlExport> |
buildXmlExport(Collection syncables)
Loops through a collection of business objects to return a list of
AwardSyncXmlExport. |
AwardSyncXmlExport |
buildXmlExport(org.kuali.rice.krad.bo.PersistableBusinessObject syncable,
String attrName)
Builds the xmlExport maps for syncable and an optional attrName including
parent references.
|
protected AwardSyncXmlExport |
buildXmlExport(org.kuali.rice.krad.bo.PersistableBusinessObject syncable,
String attrName,
String childAttr,
AwardSyncXmlExport childExport,
boolean walkParents)
Using annotations set on the class and reflection creates a map based hierarchy of objects
from the award attribute down to the BO this is initially called on.
|
AwardSyncChange |
createAwardSyncChange(AwardSyncType syncType,
org.kuali.rice.krad.bo.PersistableBusinessObject syncableObject,
String awardAttrName,
String boAttrName)
Create an award sync change for the syncableObject.
|
protected org.kuali.rice.krad.bo.PersistableBusinessObject |
createNewItem(AwardSyncChange change,
AwardSyncXmlExport xmlExport)
Creates a new item based on the key values and values passed in.
|
protected Field |
findField(Class clazz,
String propertyName)
Recursively ascends the class tree to find the property field.
|
AwardSyncUtilityService |
getAwardSyncUtilityService() |
protected abstract String |
getDataDesc(org.kuali.rice.krad.bo.PersistableBusinessObject syncableObject,
String attrName)
Returns the data description for this object type.
|
protected abstract String |
getObjectDesc(org.kuali.rice.krad.bo.PersistableBusinessObject syncableObject,
String attrName)
Returns the object description for this object type.
|
protected PropertyDescriptor |
getPropertyDescriptor(org.kuali.rice.krad.bo.PersistableBusinessObject object,
String attributeName)
Finds the bean property descriptor for the names attribute.
|
protected Object |
getPropertyValue(org.kuali.rice.krad.bo.PersistableBusinessObject object,
String attributeName)
Finds the property descriptor for the named attribute and returns the value retrieved using the read method
|
protected Object |
getValueForExport(Object propertyValue)
Returns a value for export based on the property type.
|
void |
setAwardSyncUtilityService(AwardSyncUtilityService awardSyncUtilityService) |
protected void |
setValuesOnSyncable(org.kuali.rice.krad.bo.PersistableBusinessObject syncable,
Map<String,Object> values,
AwardSyncChange change)
Recursively sets values on this syncable working way down in the object tree found in the values map.
|
protected final org.apache.commons.logging.Log LOG
protected final String DELIMITER
public AwardSyncChange createAwardSyncChange(AwardSyncType syncType, org.kuali.rice.krad.bo.PersistableBusinessObject syncableObject, String awardAttrName, String boAttrName) throws NoSuchFieldException, IllegalAccessException, InvocationTargetException
AwardSyncHelpercreateAwardSyncChange in interface AwardSyncHelperawardAttrName - attribute on the award under which syncableObject can be foundboAttrName - attribute on the syncableObject that should be synced by this changeNoSuchFieldExceptionIllegalAccessExceptionInvocationTargetExceptionorg.kuali.kra.award.awardhierarchy.sync.helpers.AwardSyncHelper#createAwardSyncChange(org.kuali.kra.award.awardhierarchy.sync.AwardSyncType, org.kuali.rice.krad.bo.BusinessObject, java.lang.String, java.lang.String)protected abstract String getObjectDesc(org.kuali.rice.krad.bo.PersistableBusinessObject syncableObject, String attrName)
syncableObject - attrName - protected abstract String getDataDesc(org.kuali.rice.krad.bo.PersistableBusinessObject syncableObject, String attrName)
syncableObject - attrName - public AwardSyncXmlExport buildXmlExport(org.kuali.rice.krad.bo.PersistableBusinessObject syncable, String attrName) throws NoSuchFieldException, IllegalAccessException, InvocationTargetException
AwardSyncHelperbuildXmlExport in interface AwardSyncHelperNoSuchFieldExceptionIllegalAccessExceptionInvocationTargetExceptionorg.kuali.kra.award.awardhierarchy.sync.helpers.AwardSyncHelper#buildXmlExport(org.kuali.kra.award.awardhierarchy.sync.AwardHierarchySyncable, java.lang.String)protected AwardSyncXmlExport buildXmlExport(org.kuali.rice.krad.bo.PersistableBusinessObject syncable, String attrName, String childAttr, AwardSyncXmlExport childExport, boolean walkParents) throws NoSuchFieldException, IllegalAccessException, InvocationTargetException
syncable - attrName - childAttr - childExport - walkParents - NoSuchFieldExceptionIllegalAccessExceptionInvocationTargetExceptionprotected Object getValueForExport(Object propertyValue) throws NoSuchFieldException, IllegalAccessException, InvocationTargetException
AwardSyncXmlExport. If the value is a simple
business object it will return an AwardSyncXmlExport. Otherwise the return will
be the value itself.propertyValue - NoSuchFieldExceptionIllegalAccessExceptionInvocationTargetExceptionprotected List<AwardSyncXmlExport> buildXmlExport(Collection syncables) throws NoSuchFieldException, IllegalAccessException, InvocationTargetException
AwardSyncXmlExport.syncables - NoSuchFieldExceptionIllegalAccessExceptionInvocationTargetExceptionprotected Field findField(Class clazz, String propertyName)
clazz - propertyName - public void applySyncChange(Award award, AwardSyncChange change) throws NoSuchFieldException, IllegalAccessException, InvocationTargetException, ClassNotFoundException, NoSuchMethodException, InstantiationException, AwardSyncException
AwardSyncHelperapplySyncChange in interface AwardSyncHelperNoSuchFieldExceptionIllegalAccessExceptionInvocationTargetExceptionClassNotFoundExceptionNoSuchMethodExceptionInstantiationExceptionAwardSyncExceptionorg.kuali.kra.award.awardhierarchy.sync.helpers.AwardSyncHelper#applySyncChange(org.kuali.kra.award.home.Award, org.kuali.kra.award.awardhierarchy.sync.AwardSyncChange, boolean)protected void applySyncChange(org.kuali.rice.krad.bo.PersistableBusinessObject object,
AwardSyncChange change,
String attrName,
AwardSyncXmlExport xmlExport)
throws NoSuchFieldException,
IllegalAccessException,
InvocationTargetException,
ClassNotFoundException,
NoSuchMethodException,
InstantiationException
setValuesOnSyncable(org.kuali.rice.krad.bo.PersistableBusinessObject, java.util.Map<java.lang.String, java.lang.Object>, org.kuali.kra.award.awardhierarchy.sync.AwardSyncChange).object - change - attrName - xmlExport - NoSuchFieldExceptionIllegalAccessExceptionInvocationTargetExceptionClassNotFoundExceptionNoSuchMethodExceptionInstantiationExceptionprotected void applySyncChange(org.kuali.rice.krad.bo.PersistableBusinessObject object,
AwardSyncChange change,
String attrName,
Collection<AwardSyncXmlExport> xmlExports)
throws ClassNotFoundException,
NoSuchMethodException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchFieldException
object - change - attrName - xmlExports - ClassNotFoundExceptionNoSuchMethodExceptionInstantiationExceptionIllegalAccessExceptionInvocationTargetExceptionNoSuchFieldExceptionprotected org.kuali.rice.krad.bo.PersistableBusinessObject createNewItem(AwardSyncChange change, AwardSyncXmlExport xmlExport) throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchFieldException
change - xmlExport - ClassNotFoundExceptionNoSuchMethodExceptionInstantiationExceptionIllegalAccessExceptionInvocationTargetExceptionNoSuchFieldExceptionprotected void setValuesOnSyncable(org.kuali.rice.krad.bo.PersistableBusinessObject syncable,
Map<String,Object> values,
AwardSyncChange change)
throws NoSuchFieldException,
IllegalAccessException,
InvocationTargetException,
ClassNotFoundException,
NoSuchMethodException,
InstantiationException
syncable - values - change - NoSuchFieldExceptionIllegalAccessExceptionInvocationTargetExceptionClassNotFoundExceptionNoSuchMethodExceptionInstantiationExceptionprotected PropertyDescriptor getPropertyDescriptor(org.kuali.rice.krad.bo.PersistableBusinessObject object, String attributeName)
object - attributeName - protected Object getPropertyValue(org.kuali.rice.krad.bo.PersistableBusinessObject object, String attributeName) throws IllegalAccessException, InvocationTargetException
object - attributeName - IllegalAccessExceptionInvocationTargetExceptionpublic AwardSyncUtilityService getAwardSyncUtilityService()
public void setAwardSyncUtilityService(AwardSyncUtilityService awardSyncUtilityService)
Copyright © 2013 The Kuali Foundation. All Rights Reserved.