org.kuali.kfs.coa.service.impl
Class OrganizationReversionDetailTrickleDownInactivationServiceImpl.TrickleDownStatus

java.lang.Object
  extended by org.kuali.kfs.coa.service.impl.OrganizationReversionDetailTrickleDownInactivationServiceImpl.TrickleDownStatus
Enclosing class:
OrganizationReversionDetailTrickleDownInactivationServiceImpl

protected class OrganizationReversionDetailTrickleDownInactivationServiceImpl.TrickleDownStatus
extends Object

Inner class to keep track of what organization reversions were inactivated and which had errors when the persisting of the inactivation was attempted


Constructor Summary
OrganizationReversionDetailTrickleDownInactivationServiceImpl.TrickleDownStatus(String successfullyChangedOrganizationReversionDetailsMessageKey, String erroredOutOrganizationReversionDetailsMessageKey)
          Constructs a OrganizationReversionDetailTrickleDownInactivationServiceImpl
 
Method Summary
 void addErrorPersistingOrganizationReversionDetail(OrganizationReversionDetail organizationReversionDetail)
          Adds an organization reversion detail which could not successful persist its activation to the error message list
 void addOrganizationReversionDetail(OrganizationReversionDetail organizationReversionDetail)
          Adds an organization reversion detail which had a successfully persisted activation to the message list
protected  org.kuali.rice.kns.bo.Note buildNote(String description, String messageKey, org.kuali.rice.kns.bo.Note noteTemplate, org.kuali.rice.kns.bo.PersistableBusinessObject noteParent)
          Builds a note
protected  List<org.kuali.rice.kns.bo.Note> generateNotes(String messageKey, org.kuali.rice.kns.bo.PersistableBusinessObject noteParent, List<OrganizationReversionDetail> organizationReversionDetails)
          Builds a List of Notes out of a list of OrganizationReversionDescriptions
protected  List<String> generateOrganizationReversionDetailsForNotes(List<OrganizationReversionDetail> organizationReversionDetails)
          Builds organization reverion detail descriptions to populate notes
protected  int getDetailsPerNote()
           
protected  String getOrganizationReversionDetailDescription(OrganizationReversionDetail organizationReversionDetail)
          Beautifully and eloquently describes an organization reversion detail
protected  void saveAllNotes(List<OrganizationReversionDetail> organizationReversionDetails, String messageKey, String documentNumber)
          Saves notes to a document
 void saveErrorNotes(String documentNumber)
          Adds all the notes about inactivations which couldn't be saved
 void saveSuccesfullyChangedNotes(String documentNumber)
          Adds all the notes about successful inactivations
 void setErroredOutOrganizationReversionDetailsMessageKey(String erroredOutOrganizationReversionDetailsMessageKey)
          Sets the erroredOutOrganizationReversionDetailsMessageKey attribute value.
 void setSuccessfullyChangedOrganizationReversionDetailsMessageKey(String successfullyChangedOrganizationReversionDetailsMessageKey)
          Sets the successfullyChangedOrganizationReversionDetailsMessageKey attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrganizationReversionDetailTrickleDownInactivationServiceImpl.TrickleDownStatus

public OrganizationReversionDetailTrickleDownInactivationServiceImpl.TrickleDownStatus(String successfullyChangedOrganizationReversionDetailsMessageKey,
                                                                                       String erroredOutOrganizationReversionDetailsMessageKey)
Constructs a OrganizationReversionDetailTrickleDownInactivationServiceImpl

Method Detail

addOrganizationReversionDetail

public void addOrganizationReversionDetail(OrganizationReversionDetail organizationReversionDetail)
Adds an organization reversion detail which had a successfully persisted activation to the message list

Parameters:
organizationReversionDetail - the detail to add to the list

addErrorPersistingOrganizationReversionDetail

public void addErrorPersistingOrganizationReversionDetail(OrganizationReversionDetail organizationReversionDetail)
Adds an organization reversion detail which could not successful persist its activation to the error message list

Parameters:
organizationReversionDetail - the detail to add to the list

getDetailsPerNote

protected int getDetailsPerNote()
Returns:
the number of details we want per note

generateNotes

protected List<org.kuali.rice.kns.bo.Note> generateNotes(String messageKey,
                                                         org.kuali.rice.kns.bo.PersistableBusinessObject noteParent,
                                                         List<OrganizationReversionDetail> organizationReversionDetails)
Builds a List of Notes out of a list of OrganizationReversionDescriptions

Parameters:
messageKey - the key of the note text in ApplicationResources.properties
noteParent - the thing to stick the note on
organizationReversionDetails - the List of OrganizationReversionDetails to make notes about
Returns:
a List of Notes

buildNote

protected org.kuali.rice.kns.bo.Note buildNote(String description,
                                               String messageKey,
                                               org.kuali.rice.kns.bo.Note noteTemplate,
                                               org.kuali.rice.kns.bo.PersistableBusinessObject noteParent)
Builds a note

Parameters:
description - a description to put into the message of the note
messageKey - the key of the note text in ApplicationResources.properties
noteTemplate - the template for the note
noteParent - the thing to stick the note on
Returns:
the built note

generateOrganizationReversionDetailsForNotes

protected List<String> generateOrganizationReversionDetailsForNotes(List<OrganizationReversionDetail> organizationReversionDetails)
Builds organization reverion detail descriptions to populate notes

Parameters:
organizationReversionDetails - the list of details to convert to notes
Returns:
a List of notes

getOrganizationReversionDetailDescription

protected String getOrganizationReversionDetailDescription(OrganizationReversionDetail organizationReversionDetail)
Beautifully and eloquently describes an organization reversion detail

Parameters:
organizationReversionDetail - the organization reversion detail to describe
Returns:
the funny, heart-breaking, and ultimately inspiring resultant description

saveAllNotes

protected void saveAllNotes(List<OrganizationReversionDetail> organizationReversionDetails,
                            String messageKey,
                            String documentNumber)
Saves notes to a document

Parameters:
organizationReversionDetails - the details to make notes about
messageKey - the message key of the text of the note
documentNumber - the document number to write to

saveSuccesfullyChangedNotes

public void saveSuccesfullyChangedNotes(String documentNumber)
Adds all the notes about successful inactivations

Parameters:
documentNumber - document number to save them to

saveErrorNotes

public void saveErrorNotes(String documentNumber)
Adds all the notes about inactivations which couldn't be saved

Parameters:
documentNumber - the document number to save them to

setErroredOutOrganizationReversionDetailsMessageKey

public void setErroredOutOrganizationReversionDetailsMessageKey(String erroredOutOrganizationReversionDetailsMessageKey)
Sets the erroredOutOrganizationReversionDetailsMessageKey attribute value.

Parameters:
erroredOutOrganizationReversionDetailsMessageKey - The erroredOutOrganizationReversionDetailsMessageKey to set.

setSuccessfullyChangedOrganizationReversionDetailsMessageKey

public void setSuccessfullyChangedOrganizationReversionDetailsMessageKey(String successfullyChangedOrganizationReversionDetailsMessageKey)
Sets the successfullyChangedOrganizationReversionDetailsMessageKey attribute value.

Parameters:
successfullyChangedOrganizationReversionDetailsMessageKey - The successfullyChangedOrganizationReversionDetailsMessageKey to set.


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