com.ibm.commerce.tools.contract.beans
Class ContractDataBean

java.lang.Object
  |
  +--com.ibm.commerce.tools.contract.beans.ContractDataBean
All Implemented Interfaces:
DataBean, InputDataBean, java.io.Serializable, SmartDataBean

public class ContractDataBean
extends java.lang.Object
implements SmartDataBean

Retrieve all the data associated with an Contract. Set the Contract and language identifiers in order to populate the bean.

See Also:
Serialized Form

Field Summary
protected  java.lang.String storeId
           
 
Fields inherited from interface com.ibm.commerce.beans. SmartDataBean
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.beans. DataBean
emptyString
 
Constructor Summary
ContractDataBean()
          Create a ContractDataBean
ContractDataBean(java.lang.Long newContractId, java.lang.Integer newLangId)
          Construct an ContractDataBean from an existing Contract identifier
 
Method Summary
 boolean fulfills(java.lang.Long member, java.lang.String relationship)
          Determines if a given member fulfills a given relationship with the resource.
 java.lang.Long getAccountId()
          Get the account identifier of the account this contract belongs to
 java.util.Vector getBuyerName()
          Get the customer names assigned to the contract
 java.lang.String getBuyerName(int index)
          Get a customer name assigned to the contract
 java.lang.String getBuyerNumber(int index)
          Get a customer identifer assigned to the contract
  CommandContext getCommandContext()
          Returns the current command's context
 java.util.Vector getContractAttachments()
          Get the list of attachments on the contract
 java.lang.String getContractComment()
          Get the comments in the contract
 java.lang.String getContractDescription()
          Get the description of the contract
 java.lang.String getContractId()
          Get the identifier of the contract
 java.lang.String getContractName()
          Get the name of the contract
 java.lang.String getContractOrigin()
          Get the origin of the contract
 java.lang.String getContractState()
          Get the state of the contract
 java.lang.String getContractStoreId()
          Gets the contract store id
 java.lang.String getContractStoreName()
          Gets the contractStoreName
 java.lang.String getContractStoreStatus()
          Gets the contract store status
 java.lang.String getContractStoreURL()
          Gets the contract store URL
 java.lang.String getContractTitle()
          Get the title of the contract
 java.lang.String getContractUsage()
          Get the usage type of the contract
 java.sql.Timestamp getCreateDate()
          Get the creation date of the contract
 boolean getCreditLineAllowed()
          Can the contract use the credit line defined in the account
 java.lang.String getCustomerName()
          Gets the customer name, used when account is also listed
 com.ibm.commerce.security.Protectable getDelegate()
          Return the access control delegate of this databean
 java.sql.Timestamp getEndDate()
          Get the end date of the contract
 java.lang.Long getEntityId()
          Get the entity identifier for UBF
 java.lang.String getMajorVersionNumber()
          Get the major version number of the contract
 java.lang.Long getMemberId()
          Get the member identifier of the owner of the contract
 java.lang.String getMinorVersionNumber()
          Get the minor version number of the contract
 java.lang.Long getOwner()
          Get the owner of the contract
 java.lang.String getReferenceContractId()
          Get the id of the contract this contract refers to
 java.lang.String getReferenceContractName()
          Get the name of the contract this contract refers to
  TypedProperty getRequestProperties()
          Get the request properties
 java.sql.Timestamp getStartDate()
          Get the start date of the contract
 java.lang.Integer getStateIdentifier()
          Get the state identifier for UBF
 java.lang.String[] getStoreentIndentifiersFromContract()
          Gets the storeent identifiers (Hosted Reseller Store Name) with given contract Id
 java.lang.String getUpdateDate()
          Get the update date of the contract
 void populate()
          Retreive the data for the contract This method does nothing because we do not want to load all of the data at one time.
 void save()
          Method for UBF
 void setBuyerName(java.lang.String newBuyerName, int index)
          Set a customer name assigned to the contract
 void setCommandContext( CommandContext newICommandContext)
          Set the command context
 void setContractId(java.lang.String contractId)
          Sets the contract id
 void setContractName(java.lang.String newContractName)
          Sets the contract's name
 void setContractState(java.lang.String state)
          Sets the state
 void setContractStoreId(java.lang.String contractStoreId)
          Sets the contract store id
 void setContractStoreName(java.lang.String contractStoreName)
          Sets the contract store name
 void setContractStoreStatus(java.lang.String contractStoreStatus)
          Sets the contract store status
 void setContractTitle(java.lang.String contractDescription)
          Sets the description
 void setCreateDate(java.sql.Timestamp newCreateDate)
          Sets the create date
 void setCustomerName(java.lang.String customerName)
          Sets the customer name, used when account is also listed
 void setEndDate(java.sql.Timestamp newEndDate)
          Sets the end date
 void setEntityId(java.lang.Long aId)
          Set the entity identifier for UBF
 void setRequestProperties( TypedProperty param)
          Set the requestProperties associated with the data bean.
 void setStartDate(java.sql.Timestamp startDate)
          Sets the start date
 void setStateIdentifier(java.lang.Integer aStateIdentifier)
          Set the state identifier for UBF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

storeId

protected java.lang.String storeId
Constructor Detail

ContractDataBean

public ContractDataBean()
Create a ContractDataBean

ContractDataBean

public ContractDataBean(java.lang.Long newContractId,
                        java.lang.Integer newLangId)
Construct an ContractDataBean from an existing Contract identifier
Parameters:
newContractId - an existing Contract identifier
newLangId - the language identifier for which language to retrieve the data
Method Detail

getAccountId

public java.lang.Long getAccountId()
Get the account identifier of the account this contract belongs to
Returns:
the account id

getBuyerName

public java.util.Vector getBuyerName()
Get the customer names assigned to the contract
Returns:
an array of the customer names

getBuyerName

public java.lang.String getBuyerName(int index)
Get a customer name assigned to the contract
Returns:
the customer name assigned to the contract

getBuyerNumber

public java.lang.String getBuyerNumber(int index)
Get a customer identifer assigned to the contract
Returns:
the customer identifier

getCommandContext

public CommandContext getCommandContext()
Returns the current command's context
Specified by:
getCommandContext in interface SmartDataBean
Returns:
the command context

getContractAttachments

public java.util.Vector getContractAttachments()
Get the list of attachments on the contract
Returns:
the list of attachments

getContractComment

public java.lang.String getContractComment()
Get the comments in the contract
Returns:
the contract comments

getContractDescription

public java.lang.String getContractDescription()
Get the description of the contract
Returns:
the description of the contract

getContractId

public java.lang.String getContractId()
Get the identifier of the contract
Returns:
the identifier of the contract

getContractName

public java.lang.String getContractName()
Get the name of the contract
Returns:
the name of the contract

getContractOrigin

public java.lang.String getContractOrigin()
Get the origin of the contract
Returns:
the origin of the contract

getContractState

public java.lang.String getContractState()
Get the state of the contract
Returns:
the state of the contract

getContractTitle

public java.lang.String getContractTitle()
Get the title of the contract
Returns:
the title of the contract

getContractUsage

public java.lang.String getContractUsage()
Get the usage type of the contract
Returns:
the usage type of the contract

getCreateDate

public java.sql.Timestamp getCreateDate()
Get the creation date of the contract
Returns:
the creation date of the contract

getUpdateDate

public java.lang.String getUpdateDate()
Get the update date of the contract
Returns:
the update date of the contract

getCreditLineAllowed

public boolean getCreditLineAllowed()
Can the contract use the credit line defined in the account
Returns:
true if the contract can use the credit line defined in the account

getReferenceContractId

public java.lang.String getReferenceContractId()
Get the id of the contract this contract refers to
Returns:
the id of the contract to which this contract refers

getReferenceContractName

public java.lang.String getReferenceContractName()
Get the name of the contract this contract refers to
Returns:
the name of the contract this contract refers to

getCustomerName

public java.lang.String getCustomerName()
Gets the customer name, used when account is also listed
Returns:
the customer name

getDelegate

public com.ibm.commerce.security.Protectable getDelegate()
                                                  throws java.lang.Exception
Return the access control delegate of this databean
Returns:
the access control delegate of this databean
Throws:
java.lang.Exception

getEndDate

public java.sql.Timestamp getEndDate()
Get the end date of the contract
Returns:
the end date of the contract

getEntityId

public java.lang.Long getEntityId()
Get the entity identifier for UBF
Returns:
the entity identifier for UBF

getMajorVersionNumber

public java.lang.String getMajorVersionNumber()
Get the major version number of the contract
Returns:
the major version number of the contract

getMemberId

public java.lang.Long getMemberId()
Get the member identifier of the owner of the contract
Returns:
the member identifier of the owner of the contract

getMinorVersionNumber

public java.lang.String getMinorVersionNumber()
Get the minor version number of the contract
Returns:
the minor version number of the contract

getOwner

public java.lang.Long getOwner()
                        throws java.lang.Exception,
                               java.rmi.RemoteException
Get the owner of the contract
Returns:
the id of the owner of the contract
Throws:
throws - a remote exception
java.lang.Exception
java.rmi.RemoteException

getRequestProperties

public TypedProperty getRequestProperties()
Get the request properties
Specified by:
getRequestProperties in interface InputDataBean
Returns:
null at this point in time

getStartDate

public java.sql.Timestamp getStartDate()
Get the start date of the contract
Returns:
the start date of the contract

getStateIdentifier

public java.lang.Integer getStateIdentifier()
Get the state identifier for UBF
Returns:
the state identifier for UBF

populate

public void populate()
              throws java.lang.Exception
Retreive the data for the contract This method does nothing because we do not want to load all of the data at one time. Each method load the necessary data.
Specified by:
populate in interface SmartDataBean
Throws:
java.lang.Exception

save

public void save()
Method for UBF

setBuyerName

public void setBuyerName(java.lang.String newBuyerName,
                         int index)
Set a customer name assigned to the contract
Parameters:
newBuyerName - the buyer name to be set
index - the index of the new buyer's name

setCommandContext

public void setCommandContext(CommandContext newICommandContext)
Set the command context
Specified by:
setCommandContext in interface SmartDataBean
Parameters:
newICommandContext - sets the command context

setCustomerName

public void setCustomerName(java.lang.String customerName)
Sets the customer name, used when account is also listed
Parameters:
customerName - the customer name to set

setEntityId

public void setEntityId(java.lang.Long aId)
Set the entity identifier for UBF
Parameters:
aId - the entity id to be set

setRequestProperties

public void setRequestProperties(TypedProperty param)
Description copied from interface: InputDataBean
Set the requestProperties associated with the data bean. If the requestProperties is null when the activate method on the DataBeanManager is invoked, the DataBeanManager sets the request properties based on the request properties set in the request.
Specified by:
setRequestProperties in interface InputDataBean

setStateIdentifier

public void setStateIdentifier(java.lang.Integer aStateIdentifier)
Set the state identifier for UBF
Parameters:
aStateIdentifier - sets the state identifier

fulfills

public boolean fulfills(java.lang.Long member,
                        java.lang.String relationship)
                 throws java.lang.Exception,
                        java.rmi.RemoteException
Determines if a given member fulfills a given relationship with the resource.
Parameters:
member - the member id of the contract
relationship - the relationship the member has with respect to the resource
Returns:
true if the member fulfills the relationship with the resource
Throws:
raises - a remote exception
raises - an exception
java.lang.Exception
java.rmi.RemoteException

setContractId

public void setContractId(java.lang.String contractId)
Sets the contract id
Parameters:
contractId - the contract id to set

setStartDate

public void setStartDate(java.sql.Timestamp startDate)
Sets the start date
Parameters:
startDate - the startDate to set

setEndDate

public void setEndDate(java.sql.Timestamp newEndDate)
Sets the end date
Parameters:
newEndDate - the endDate to set

setCreateDate

public void setCreateDate(java.sql.Timestamp newCreateDate)
Sets the create date
Parameters:
newCreateDate - the create date to set

setContractTitle

public void setContractTitle(java.lang.String contractDescription)
Sets the description
Parameters:
contractDescription - the contract description to set

setContractName

public void setContractName(java.lang.String newContractName)
Sets the contract's name
Parameters:
newContractName - the contract name

setContractState

public void setContractState(java.lang.String state)
Sets the state
Parameters:
state - the state to set

getContractStoreName

public java.lang.String getContractStoreName()
Gets the contractStoreName
Returns:
the contract store name

setContractStoreName

public void setContractStoreName(java.lang.String contractStoreName)
Sets the contract store name
Parameters:
contractStoreName - the contract store name

getContractStoreStatus

public java.lang.String getContractStoreStatus()
Gets the contract store status
Returns:
the store status

setContractStoreStatus

public void setContractStoreStatus(java.lang.String contractStoreStatus)
Sets the contract store status
Parameters:
contractStoreStatus - sets the contract store status

getContractStoreId

public java.lang.String getContractStoreId()
Gets the contract store id
Returns:
the contract store id

getContractStoreURL

public java.lang.String getContractStoreURL()
Gets the contract store URL
Returns:
the contract store URL

setContractStoreId

public void setContractStoreId(java.lang.String contractStoreId)
Sets the contract store id
Parameters:
contractStoreId - sets the contract store's id

getStoreentIndentifiersFromContract

public java.lang.String[] getStoreentIndentifiersFromContract()
Gets the storeent identifiers (Hosted Reseller Store Name) with given contract Id
Returns:
the storeent indentifier(s) that is associated with the current contract