atg.commerce.csr.approvals
Class Approval

java.lang.Object
  extended by atg.commerce.csr.approvals.Approval
All Implemented Interfaces:
java.io.Serializable

public class Approval
extends java.lang.Object
implements java.io.Serializable

Class to represent an Approval

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
           
protected  atg.repository.RepositoryItem mAgentProfile
           
protected  java.lang.String mApprovalType
           
protected  java.lang.String mApproverId
           
protected  java.util.Date mCompletionDate
           
protected  java.util.Date mCreationDate
           
protected  java.lang.String mCustomerProfileId
           
protected  java.util.Map<java.lang.String,java.io.Serializable> mExtraData
           
protected  atg.repository.RepositoryItem mRepositoryItem
           
protected  java.lang.String mSiteId
           
protected  java.lang.String mState
           
protected  atg.repository.RepositoryItem mTicket
           
 
Constructor Summary
Approval()
           
Approval(java.lang.String pApprovalType, atg.repository.RepositoryItem pAgentProfile, atg.repository.RepositoryItem pTicket, java.lang.String pSiteId, java.lang.String pCustomerProfileId)
          Creates an approval object containing the supplied parameters.
 
Method Summary
 atg.repository.RepositoryItem getAgentProfile()
          Returns the agent profile as a RepositoryItem.
 java.lang.String getApprovalType()
          Returns the approval type as a string.
 java.lang.String getApproverId()
          Returns the approver id as a String.
 java.io.Serializable getAttribute(java.lang.String pKey)
          gets an attribute from the Approval object
 java.util.Date getCompletionDate()
          Returns the completion date as a Date.
 java.util.Date getCreationDate()
          Returns the creation date as a Date.
 java.lang.String getCustomerProfileId()
          Returns the customer profile id as a String.
 java.lang.String getId()
          returns the ID from the associated Repository Item
 atg.repository.RepositoryItem getRepositoryItem()
          Returns the repository item on the approval.
 java.lang.String getSiteId()
          Returns the site as a String.
 java.lang.String getState()
          Returns the state as a String.
 atg.repository.RepositoryItem getTicket()
          Returns the ticket as a RepositoryItem.
 void setAgentProfile(atg.repository.RepositoryItem pAgentProfile)
          Sets the agent profile as a RepositoryItem.
 void setApprovalType(java.lang.String pApprovalKey)
          Sets the approval type as a string.
 void setApproverId(java.lang.String pApproverId)
          Sets the approver id as a String.
 void setAttribute(java.lang.String pKey, java.io.Serializable pValue)
          add extra attributes to the approval for use in type specific processing
 void setCompletionDate(java.util.Date pCompletionDate)
          Sets the completion date as a Date.
 void setCreationDate(java.util.Date pCreationDate)
          Sets the creation date as a Date.
 void setCustomerProfileId(java.lang.String pCustomerProfileId)
          Sets the customer profile id as a String.
 void setRepositoryItem(atg.repository.RepositoryItem pRepositoryItem)
          Sets the repository item on the approval.
 void setSiteId(java.lang.String pSiteId)
          Sets the site as a String.
 void setState(java.lang.String pState)
          Sets the state as a String.
 void setTicket(atg.repository.RepositoryItem pTicket)
          Sets the ticket as a RepositoryItem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values

mApprovalType

protected java.lang.String mApprovalType

mAgentProfile

protected atg.repository.RepositoryItem mAgentProfile

mTicket

protected atg.repository.RepositoryItem mTicket

mExtraData

protected java.util.Map<java.lang.String,java.io.Serializable> mExtraData

mRepositoryItem

protected atg.repository.RepositoryItem mRepositoryItem

mSiteId

protected java.lang.String mSiteId

mCustomerProfileId

protected java.lang.String mCustomerProfileId

mApproverId

protected java.lang.String mApproverId

mState

protected java.lang.String mState

mCreationDate

protected java.util.Date mCreationDate

mCompletionDate

protected java.util.Date mCompletionDate
Constructor Detail

Approval

public Approval(java.lang.String pApprovalType,
                atg.repository.RepositoryItem pAgentProfile,
                atg.repository.RepositoryItem pTicket,
                java.lang.String pSiteId,
                java.lang.String pCustomerProfileId)
Creates an approval object containing the supplied parameters. Used by the Approvals Manager

Parameters:
pApprovalType - - Corresponds to the type of ApprovalHandler which will deal with the approval
pAgentProfile - - The profile of the agent who submitted the order
pTicket - - The current ticket
pSite - - The current Site Id
pCustomerProfileId - - The customer profile associated with the order

Approval

public Approval()
Method Detail

setApprovalType

public void setApprovalType(java.lang.String pApprovalKey)
Sets the approval type as a string. The type is a key denoting which ApprovalHandler type to use.

Parameters:
pApprovalType - the ApprovalType to set

getApprovalType

public java.lang.String getApprovalType()
Returns the approval type as a string. The type is a key denoting which ApprovalHandler type to use.

Returns:
the ApprovalType

setAgentProfile

public void setAgentProfile(atg.repository.RepositoryItem pAgentProfile)
Sets the agent profile as a RepositoryItem. This is the profile of the agent requiring approval.

Parameters:
pAgentProfile - the AgentProfile to set

getAgentProfile

public atg.repository.RepositoryItem getAgentProfile()
Returns the agent profile as a RepositoryItem. This is the profile of the agent requiring approval.

Returns:
the AgentProfile

setTicket

public void setTicket(atg.repository.RepositoryItem pTicket)
Sets the ticket as a RepositoryItem. This is the ticket associated with the approval.

Parameters:
pTicket - the Ticket to set

getTicket

public atg.repository.RepositoryItem getTicket()
Returns the ticket as a RepositoryItem. This is the ticket associated with the approval.

Returns:
the Ticket

setSiteId

public void setSiteId(java.lang.String pSiteId)
Sets the site as a String. This is the site id from which the approval has been created.

Parameters:
pSiteId - the Site to set

getSiteId

public java.lang.String getSiteId()
Returns the site as a String. This is the site id from which the approval has been created.

Returns:
the SiteId

setRepositoryItem

public void setRepositoryItem(atg.repository.RepositoryItem pRepositoryItem)
Sets the repository item on the approval. This is the approval repository's representation of the approval.

Parameters:
pRepositoryItem - the RepositoryItem to set

getRepositoryItem

public atg.repository.RepositoryItem getRepositoryItem()
Returns the repository item on the approval. This is the approval repository's representation of the approval.

Returns:
the RepositoryItem

getId

public java.lang.String getId()
returns the ID from the associated Repository Item


setAttribute

public void setAttribute(java.lang.String pKey,
                         java.io.Serializable pValue)
add extra attributes to the approval for use in type specific processing

Parameters:
pKey - - the key - STRING
pValue - - the value - OBJECT

getAttribute

public java.io.Serializable getAttribute(java.lang.String pKey)
gets an attribute from the Approval object

Parameters:
pKey -
Returns:

setCustomerProfileId

public void setCustomerProfileId(java.lang.String pCustomerProfileId)
Sets the customer profile id as a String. This is the id of the customer for which the approval has been created.

Parameters:
pCustomerProfileId - the CustomerProfileId to set

getCustomerProfileId

public java.lang.String getCustomerProfileId()
Returns the customer profile id as a String. This is the id of the customer for which the approval has been created.

Returns:
the CustomerProfileId

setApproverId

public void setApproverId(java.lang.String pApproverId)
Sets the approver id as a String. This is the id of the approving agent for the approval.

Parameters:
pApproverId - the ApproverId to set

getApproverId

public java.lang.String getApproverId()
Returns the approver id as a String. This is the id of the approving agent for the approval.

Returns:
the mApproverId

getCreationDate

public java.util.Date getCreationDate()
Returns the creation date as a Date. This is the timestamp from when the approval was created.

Returns:
the mCreationDate

setCreationDate

public void setCreationDate(java.util.Date pCreationDate)
Sets the creation date as a Date. This is the timestamp from when the approval was created.

Parameters:
pCreationDate - the CreationDate to set

getCompletionDate

public java.util.Date getCompletionDate()
Returns the completion date as a Date. This is the timestamp from when the approval was completed.

Returns:
the mCompletionDate

setCompletionDate

public void setCompletionDate(java.util.Date pCompletionDate)
Sets the completion date as a Date. This is the timestamp from when the approval was completed.

Parameters:
pCreationDate - the CreationDate to set

setState

public void setState(java.lang.String pState)
Sets the state as a String. This is the state the Approval is in.

Parameters:
pState - the state to set

getState

public java.lang.String getState()
Returns the state as a String. This is the state the Approval is in.

Returns:
the state