@Implementable
@AccessLevel(value=EXTERNAL)
public class AddressDataIntakeApplicationListener
extends java.lang.Object
IntakeApplication
from either the
Citizen Portal or Caseworker Application.
Customers who require custom address processing can extend this class, and within a Guice Module, bind the custom class to this class.
For example, a custom class,CustomAddressDataIntakeApplicationListener
extending this class would be bound in a module as follows:
bind(AddressDataIntakeApplicationListener.class).to(
CustomAddressDataIntakeApplicationListener.class)
Constructor and Description |
---|
AddressDataIntakeApplicationListener() |
Modifier and Type | Method and Description |
---|---|
protected void |
createCuramAddressesFromDatastore(curam.datastore.impl.Entity personEntity)
Creates
Address database records for the address
data
stored in the TempAddressLink and MailingAddress
datastore entities, for a given person. |
protected void |
createCuramAddressesFromMailingAddresses(curam.datastore.impl.Entity personEntity)
Creates
Address database records for the address
data
stored in the MailingAddress for a given person. |
protected void |
createCuramAddressesFromTempAddressLinks(curam.datastore.impl.Entity personEntity)
Creates
Address database records for the address
data
stored in the TempAddressLink for a given person. |
protected curam.core.struct.AddressDtls |
createCuramAddressFromDatastore(curam.datastore.impl.Entity address)
Creates an
Address database record for address data
stored in the datastore. |
protected curam.datastore.impl.Entity |
createOrUpdateMailingAddressEntity(curam.datastore.impl.Entity addressLinkEntity,
java.lang.Long personID)
Creates or updates a
MailingAddress datastore record for a
person, if the person has
answered 'yes' to AddressLink.isMailingAddressSameAsHome. |
protected void |
createResidentialAddressEntity(curam.datastore.impl.Entity addressLinkEntity,
java.lang.Long personID)
Creates a
ResidentialAddress datastore entity for a person
based on information stored in Address and
AddressLink datastore entities. |
protected curam.datastore.impl.Entity |
createTempAddressLinkEntity(curam.datastore.impl.Entity addressLinkEntity,
java.lang.Long personID)
Creates a
TempAddressLink datastore record for a person based
on information stored in Address and
AddressLink datastore entities. |
protected void |
deleteMailingAddressEntityIfNoMailingAddress(curam.datastore.impl.Entity personEntity)
For a given person delete any existing MailingAddress entity if the person
has answered that they have no fixed address and no mailing address.
|
protected curam.core.struct.AddressDtls |
getAddressData(curam.datastore.impl.Entity address)
Maps the address data stored in a datastore entity to an
AddressDtls struct. |
protected boolean |
isAppropriateApplicationType(curam.workspaceservices.intake.impl.IntakeApplication intakeApplication)
Indicates if a given application type can be processed by this class.
|
protected void |
mapAddressToMailingAddress(curam.datastore.impl.Entity mailingAddress,
curam.datastore.impl.Entity address)
Maps data attributes from an
Address datastore entity to a
MailingAddress datastore entity. |
protected void |
mapHouseholdToApplication(long rootEntityID)
Performs mapping from the
Household datastore entity to the
Application datastore entity for the following fields
isTaxReturnCurrentIncome
isESIncomecurrent
The fields are only mapped if they are not null
|
void |
preMapDataToCuram(curam.workspaceservices.intake.impl.IntakeApplication intakeApplication)
Processes the address data stored in the datastore for a
given intake application and creates structures required for the
datastore-to-evidence mapping that occurs later on during the application
submission process.
|
protected void |
updateDatastoreForAddressMappings(curam.datastore.impl.Entity personEntity)
For a given person, updates the address data in the datastore so that it is
in the correct
state for mapping to case evidence.
|
public AddressDataIntakeApplicationListener()
public void preMapDataToCuram(curam.workspaceservices.intake.impl.IntakeApplication intakeApplication) throws curam.util.exception.AppException, curam.util.exception.InformationalException
Household
datastore entity to the
Application
datastore entity for the following fields:
isTaxReturnCurrentIncome
and
isESIncomecurrent
Person
entity in the datastore:TempAddressLink
datastore record, based on
information stored in Address
and
AddressLink
datastore entities.ResidentialAddress
datastore record, based on
information stored in Address
and
AddressLink
datastore entities.MailingAddress
datastore record, if the person
has
answered 'yes' to AddressLink.isMailingAddressSameAsHome.
This is
also
based on
information stored in Address
and
AddressLink
datastore entities.TempAddressLink
record created above, create a
Curam
Address
database record and update
TempAddressLink.addressEvID
to point to the primary key of
that record.MailingAddress
record created above, create a
Curam
Address
database record and update
MailingAddress.mailingAddressEvID
and
MailingAddressLink.mailingAddressEvID
to point to the primary
key of
that record.TempAddressLink
, ResidentialAddress
and
MailingAddress
datastore entities will be used later during
the person registration and
datastore-to-evidence mapping phases of the application submission process.
TempAddressLink
and
MailingAddress
are used when mapping to the Application Case.
ResidentialAddress
and
MailingAddress
are used when mapping to the Participant Data
Case.intakeApplication
- The intake application currently being submitted.curam.util.exception.AppException
curam.util.exception.InformationalException
protected boolean isAppropriateApplicationType(curam.workspaceservices.intake.impl.IntakeApplication intakeApplication)
intakeApplication
- The intake application currently being submitted.protected void mapHouseholdToApplication(long rootEntityID)
Household
datastore entity to the
Application
datastore entity for the following fields
isTaxReturnCurrentIncome
isESIncomecurrent
null
rootEntityID
- The unique identifier of the root entity of the
related datastore.protected void updateDatastoreForAddressMappings(curam.datastore.impl.Entity personEntity)
TempAddressLink
,
ResidentialAddress
and
MailingAddress
datastore entities based on information stored
in the Address
and
AddressLink
datastore entities.personEntity
- The related person's datastore entity.protected void deleteMailingAddressEntityIfNoMailingAddress(curam.datastore.impl.Entity personEntity)
personEntity
- Entity of type Person.protected curam.datastore.impl.Entity createTempAddressLinkEntity(curam.datastore.impl.Entity addressLinkEntity, java.lang.Long personID)
TempAddressLink
datastore record for a person based
on information stored in Address
and
AddressLink
datastore entities.addressLinkEntity
- The related AddressLink
datastore
entity.personID
- The unique identifier of the related Person
datastore entity.TempAddressLink
datastore record, or
the existing record if one already existed.protected void createResidentialAddressEntity(curam.datastore.impl.Entity addressLinkEntity, java.lang.Long personID)
ResidentialAddress
datastore entity for a person
based on information stored in Address
and
AddressLink
datastore entities.
The ResidentialAddress
entity is required by Universal Access
when mapping address data during person registration.addressLinkEntity
- The related AddressLink
datastore
entity.personID
- The unique identifier of the related Person
datastore entity.protected curam.datastore.impl.Entity createOrUpdateMailingAddressEntity(curam.datastore.impl.Entity addressLinkEntity, java.lang.Long personID)
MailingAddress
datastore record for a
person, if the person has
answered 'yes' to AddressLink.isMailingAddressSameAsHome.
The MailingAddress
record is created or updated based on
information stored in Address
and
AddressLink
datastore entities.addressLinkEntity
- The related AddressLink
datastore
entity.personID
- The unique identifier of the related Person
datastore entity.MailingAddress
record or null
if
AddressLink.isMailingAddressSameAsHome is 'no', or if there
is no address.protected void mapAddressToMailingAddress(curam.datastore.impl.Entity mailingAddress, curam.datastore.impl.Entity address)
Address
datastore entity to a
MailingAddress
datastore entity.
The MailingAddress
entity is updated on the datastore when the
mapping is complete.mailingAddress
- The MailingAddress
address
- The Address
protected void createCuramAddressesFromDatastore(curam.datastore.impl.Entity personEntity) throws curam.util.exception.AppException, curam.util.exception.InformationalException
Address
database records for the address
data
stored in the TempAddressLink
and MailingAddress
datastore entities, for a given person.personEntity
- The Person
datastore entity.curam.util.exception.AppException
curam.util.exception.InformationalException
protected void createCuramAddressesFromTempAddressLinks(curam.datastore.impl.Entity personEntity) throws curam.util.exception.AppException, curam.util.exception.InformationalException
Address
database records for the address
data
stored in the TempAddressLink
for a given person.
The TempAddressLink.addressEvID
attribute is updated to point
to the primary key of the new address record.personEntity
- The Person
datastore entity.curam.util.exception.AppException
curam.util.exception.InformationalException
protected void createCuramAddressesFromMailingAddresses(curam.datastore.impl.Entity personEntity) throws curam.util.exception.AppException, curam.util.exception.InformationalException
Address
database records for the address
data
stored in the MailingAddress
for a given person.
The MailingAddress.mailingAddressEvID
and
MailingAddressLink.mailingAddressEvID
attributes are updated
to point to the primary key of the new address record.personEntity
- The Person
datastore entity.curam.util.exception.AppException
curam.util.exception.InformationalException
protected curam.core.struct.AddressDtls createCuramAddressFromDatastore(curam.datastore.impl.Entity address) throws curam.util.exception.AppException, curam.util.exception.InformationalException
Address
database record for address data
stored in the datastore.
The address data can be stored in either the Address
or
MailingAddress
datastore entites.address
- The datastore address dataAddress
record.curam.util.exception.AppException
curam.util.exception.InformationalException
protected curam.core.struct.AddressDtls getAddressData(curam.datastore.impl.Entity address) throws curam.util.exception.AppException, curam.util.exception.InformationalException
AddressDtls
struct.address
- The datastore address.AddressDtls
struct.curam.util.exception.AppException
curam.util.exception.InformationalException