Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

HBCI::OutboxJobNewStandingOrder Class Reference

Job that creates a new standing order for a Account at the bank. More...

#include <outboxstojobs.h>

Inheritance diagram for HBCI::OutboxJobNewStandingOrder:

Inheritance graph
[legend]
List of all members.

Public Methods

 OutboxJobNewStandingOrder (Pointer< Customer > c, Pointer< Account > a, const StandingOrder &newOrder)
 ~OutboxJobNewStandingOrder ()
const StandingOrder & standingOrder () const
bool createHBCIJobs (Pointer< MessageQueue > mbox, int n=0)
bool evaluate ()
bool stillMessagesToSend (int nextMsg) const
bool commit (int msgNumber=HBCI_COMMIT_WHOLE_JOB)
string description () const
JobProgressType type () const
list< int > resultCodes () const

Static Public Methods

int maxDescriptionLines (const Bank &forBank)
int minDaysToExec (const Bank &forBank)
int maxDaysToExec (const Bank &forBank)
list< int > monthlyCycle (const Bank &forBank)
list< int > execDaysMonth (const Bank &forBank)
list< int > weeklyCycle (const Bank &forBank)
list< int > execDaysWeek (const Bank &forBank)
list< int > transactionCodes (const Bank &forBank)
bool isSupported (Pointer< Account > forAccount)
 Checks if creating a standing order is supported for the specified account.

const Limit limit (Pointer< Account > forAccount)
 Returns the limit for standing orders.


Detailed Description

Job that creates a new standing order for a Account at the bank.

This job creates a new standing order.

Author:
Fabian Kaiser<openhbci@derzach.de>


Constructor & Destructor Documentation

HBCI::OutboxJobNewStandingOrder::OutboxJobNewStandingOrder (  Pointer< Customer >    c,
Pointer< Account >    a,
const StandingOrder &    newOrder
) 
 

HBCI::OutboxJobNewStandingOrder::~OutboxJobNewStandingOrder (    ) 
 


Member Function Documentation

bool HBCI::OutboxJobNewStandingOrder::commit (  int    msgNumber = HBCI_COMMIT_WHOLE_JOB )  [virtual]
 

Call this method to commit changes to the system.

Since Jobs do not change the system you may call this method to commit the changes. A job for getting the balance for example may decide to store the retrieved balance in the corresponding account.

Parameters:
msgNumber  Number of the message for which the response should be committed. As a job may consist of more than one message, it might be necessary to commit recieved changes before the rest of the job is sent. This method is called for each message and finally for the whole job (if called for the whol job, msgNumber is set to HBCI_COMMIT_WHOLE_JOB)
Author:
Martin Preuss<martin@libchipcard.de>
Returns :
true on success, false otherwise

Implements HBCI::OutboxJob.

bool HBCI::OutboxJobNewStandingOrder::createHBCIJobs (  Pointer< MessageQueue >    mbox,
int    n = 0
)  [virtual]
 

Let the job create the "real" jobs and add them to the message queue given.

Author:
Martin Preuss<martin@libchipcard.de>
Returns :
true on success, false otherwise
Parameters:
mbox  pointer to the messagebox to add the jobs to
n  the number of the message to create. In most cases this is zero.

Implements HBCI::OutboxJob.

string HBCI::OutboxJobNewStandingOrder::description (    )  const [virtual]
 

Return a short description of what the job is supposed to do.

Author:
Martin Preuss<martin@libchipcard.de>

Implements HBCI::OutboxJob.

bool HBCI::OutboxJobNewStandingOrder::evaluate (    )  [virtual]
 

Let the job check the result and set the flags.

Let the job check the result. This means checking the results of all Jobs involved (which otherwise is not done automatically). This method sets its status and result accordingly -- otherwise the status and result flags might not be up-to-date.

Author:
Martin Preuss<martin@libchipcard.de>
Returns :
true if job was successfull, false otherwise

Implements HBCI::OutboxJob.

list<int> HBCI::OutboxJobNewStandingOrder::execDaysMonth (  const Bank &    forBank )  [static]
 

Bank-information - needed to create a valid order
Returns a list of all days that are allowed for monthly execution.
Possible values:

  • 0 - everything from 1 to 30
  • 1 - the 1st of each month
  • 2 - the 2nd of each moth
  • ...
  • 30 - the 30th of each month
  • 98 - (last-1) of each month
  • 99 - last of each month

list<int> HBCI::OutboxJobNewStandingOrder::execDaysWeek (  const Bank &    forBank )  [static]
 

Bank-information - needed to create a valid order
Returns a list of all days that are allowed for weekly execution.
Possible values:

  • 0 - everything from 1 to 7
  • 1 - the 1st of each week
  • 2 - the 2nd of each week
  • ...
  • 7 - the 7th of each week

bool HBCI::OutboxJobNewStandingOrder::isSupported (  Pointer< Account >    forAccount )  [static]
 

Checks if creating a standing order is supported for the specified account.

If this method returns <false>, your application should provide a way to allow this job anyway because some banks just don't tell you that they support this job for the specified account. Only if <true> is returned, you can be sure this job is supported.

const Limit HBCI::OutboxJobNewStandingOrder::limit (  Pointer< Account >    forAccount )  [static]
 

Returns the limit for standing orders.

Note: Not all banks tell us about the existance of a limit. There might be a limit for this job even if limit().isValid()==false!

int HBCI::OutboxJobNewStandingOrder::maxDaysToExec (  const Bank &    forBank )  [static]
 

Bank-information - needed to create a valid order
Returns the max. number of days to elapse before the order may be executed the first time (next time if you are modifying an existing order)

int HBCI::OutboxJobNewStandingOrder::maxDescriptionLines (  const Bank &    forBank )  [static]
 

Bank-information - needed to create a valid order
Returns the max. allowed number of lines in the description-field

int HBCI::OutboxJobNewStandingOrder::minDaysToExec (  const Bank &    forBank )  [static]
 

Bank-information - needed to create a valid order
Returns the min. number of days to elapse before the order may be executed the first time (next time if you are modifying an existing order)

list<int> HBCI::OutboxJobNewStandingOrder::monthlyCycle (  const Bank &    forBank )  [static]
 

Bank-information - needed to create a valid order
Returns a list of all monthly cycles that are allowed.
Possible values:

  • 0 - everything from 1 to 12
  • 1 - every month
  • 2 - every second month
  • ...
  • 12 - once a year

list<int> HBCI::OutboxJobNewStandingOrder::resultCodes (    )  const [virtual]
 

Returns a list of result codes of this job.

This can be used to get more detailed information if the result of this job was HBCI_JOB_RESULT_FAILED. In that case, you can traverse this list, checking for resultcodes >= 9000. Each of those can be the source of the job failure, so you can react accordingly. HBCI spec suggests that the most important of them can be found at the front() already, but that depends on your bank.

Note: A resultcode >= 9000 does not automatically mean an error, see MessageQueue::getResult().

See also:
MessageQueue::getResult(), Job::errorcodeIsLibraryBug()

Implements HBCI::OutboxAccountJob.

const StandingOrder& HBCI::OutboxJobNewStandingOrder::standingOrder (    )  const [inline]
 

Return the order this job is/was supposed to create.

bool HBCI::OutboxJobNewStandingOrder::stillMessagesToSend (  int    nextMsg )  const [virtual]
 

Returns true if there are still messages to be sent.

Checks if there are still messages to be sent. This is needed because some jobs don't know the number of messages they consist of, until they are executed.

Parameters:
nextMsg  The number (starting with 0) of the message that would be sent next
Returns :
true If there are unsent messages left
Author:
Fabian Kaiser<openhbci@derzach.de>

Reimplemented from HBCI::OutboxJob.

list<int> HBCI::OutboxJobNewStandingOrder::transactionCodes (  const Bank &    forBank )  [static]
 

Bank-information - needed to create a valid order
Returns a list of all transaction codes that are allowed

See also:
transactionCode()

JobProgressType HBCI::OutboxJobNewStandingOrder::type (    )  const [inline, virtual]
 

Return the JobProgressType of this job.

Author:
Christian Stimming <stimming@tuhh.de>

Implements HBCI::OutboxJob.

list<int> HBCI::OutboxJobNewStandingOrder::weeklyCycle (  const Bank &    forBank )  [static]
 

Bank-information - needed to create a valid order
Returns a list of all weekly cycles that are allowed.
Possible values:

  • 0 - everything from 1 to 52
  • 1 - every week
  • 2 - every 2nd week
  • ...
  • 52 - every 52nd week


The documentation for this class was generated from the following file:
Generated on Mon Jun 23 13:41:15 2003 for openhbci by doxygen1.2.17