ERCoreBusinessLogic Class Reference

Inherits er::extensions::ERXFrameworkPrincipal.

Collaboration diagram for ERCoreBusinessLogic:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void addPreferenceRelationshipToActorEntity (String entityName, String attributeNameToJoin)
void addPreferenceRelationshipToActorEntity (String entityName)
void createTables (EOEditingContext ec) throws SQLException
void createTables (EOEditingContext ec, String modelName) throws SQLException
NSArray emailsForProblemRecipients ()
synchronized String extraInfoString (NSDictionary extraInfo, int indent)
void finishInitialization ()
void initializeSharedData ()
String problemEmailDomain ()
synchronized void reportException (Throwable exception, NSDictionary extraInfo)
void setEmailsForProblemRecipients (NSArray a)
void setProblemEmailDomain (String value)
boolean shouldMailReportedExceptions ()

Static Public Member Functions

static EOEnterpriseObject actor ()
static EOEnterpriseObject actor (EOEditingContext ec)
static void invalidateStaticValueForKeyCache ()
static void setActor (EOEnterpriseObject actor)
static ERCoreBusinessLogic sharedInstance ()
static int staticStoredIntValueForKey (String key, EOEditingContext ec)
static int staticStoredIntValueForKey (String key, boolean noCache)
static int staticStoredIntValueForKey (String key)
static String staticStoredValueForKey (String key, EOEditingContext ec)
static String staticStoredValueForKey (String key, boolean noCache)
static String staticStoredValueForKey (String key)
static void takeStaticStoredValueForKey (String value, String key)
static void takeStaticStoredValueForKey (String value, String key, EOEditingContext editingContext)

Static Public Attributes

static final Logger log = Logger.getLogger(ERCoreBusinessLogic.class)
static final String ProblemEmailDomainPropertyKey = "er.corebusinesslogic.ERCoreBusinessLogic.ProblemEmailDomain"
static final String ProblemEmailRecipientsPropertyKey = "er.corebusinesslogic.ERCoreBusinessLogic.ProblemEmailRecipients"
static final Class REQUIRES [] = new Class[] {ERXExtensions.class, ERDirectToWeb.class, ERJavaMail.class}

Protected Attributes

NSArray _emailsForProblemRecipients
String _problemEmailDomain

Static Protected Attributes

static ERCoreBusinessLogic sharedInstance

Static Package Functions

 [static initializer]


Member Function Documentation

[static initializer] (  )  [static, package]

Registers the class as the framework principal

static EOEnterpriseObject actor (  )  [static]

Gets the actor.

Returns:
current actor for the thread

static EOEnterpriseObject actor ( EOEditingContext  ec  )  [static]

Gets the actor as a local instance in the given context.

Parameters:
ec editing context to pull a local copy of the actor into
Returns:
actor instance in the given editing context

void addPreferenceRelationshipToActorEntity ( String  entityName,
String  attributeNameToJoin 
)

Registers a run-time relationship called "preferences" on the actor entity of your business logic. The framework needs preferences relationship to access user preferences for a specific actor. Call this method when you initialize your business logic layer. (Check BTBusinessLogic class as an example.)

Parameters:
entityName String name for your actor entity
attributeNameToJoin String attribute name on the actor entity; used by the relationship and typically it's the primary key.

void addPreferenceRelationshipToActorEntity ( String  entityName  ) 

void createTables ( EOEditingContext  ec  )  throws SQLException

void createTables ( EOEditingContext  ec,
String  modelName 
) throws SQLException

NSArray emailsForProblemRecipients (  ) 

Gets the array of email addresses to send emails about problems to.

Returns:
array of email addresses

synchronized String extraInfoString ( NSDictionary  extraInfo,
int  indent 
)

void finishInitialization (  )  [virtual]

Called when it is time to finish the initialization of the framework.

Implements ERXFrameworkPrincipal.

void initializeSharedData (  ) 

Initializes the shared eof data.

static void invalidateStaticValueForKeyCache (  )  [static]

String problemEmailDomain (  ) 

Gets the problem email domain. This is used for constructing the from address when reporting an exception. Should be of the form: foo.com.

Returns:
problem email address domain

synchronized void reportException ( Throwable  exception,
NSDictionary  extraInfo 
)

Reports an exception. If caching is enabled then the exception will also be emailed to the problem mail recipients.

Parameters:
exception to be reported
extraInfo dictionary of extra information about what was happening when the exception was thrown.

static void setActor ( EOEnterpriseObject  actor  )  [static]

Sets the actor in the current thread storage.

Parameters:
actor current user for this thread

void setEmailsForProblemRecipients ( NSArray  a  ) 

Sets the emails for problem recipients. Should be an array of email addresses to report exceptions to in production applications.

Parameters:
a array of email addresses

void setProblemEmailDomain ( String  value  ) 

Sets the problem email domain.

Parameters:
value to set problem domain to

static ERCoreBusinessLogic sharedInstance (  )  [static]

Gets the shared instance of the ERCoreBusinessLogic.

Returns:
shared instance.

boolean shouldMailReportedExceptions (  ) 

static int staticStoredIntValueForKey ( String  key,
EOEditingContext  ec 
) [static]

static int staticStoredIntValueForKey ( String  key,
boolean  noCache 
) [static]

static int staticStoredIntValueForKey ( String  key  )  [static]

static String staticStoredValueForKey ( String  key,
EOEditingContext  ec 
) [static]

static String staticStoredValueForKey ( String  key,
boolean  noCache 
) [static]

static String staticStoredValueForKey ( String  key  )  [static]

static void takeStaticStoredValueForKey ( String  value,
String  key 
) [static]

static void takeStaticStoredValueForKey ( String  value,
String  key,
EOEditingContext  editingContext 
) [static]


Member Data Documentation

NSArray _emailsForProblemRecipients [protected]

caches the email addresses to send to in the case of problems

caches the problem email address domain

final Logger log = Logger.getLogger(ERCoreBusinessLogic.class) [static]

logging support

Reimplemented from ERXFrameworkPrincipal.

final String ProblemEmailDomainPropertyKey = "er.corebusinesslogic.ERCoreBusinessLogic.ProblemEmailDomain" [static]

property key that holds the email domain of the generated from email

final String ProblemEmailRecipientsPropertyKey = "er.corebusinesslogic.ERCoreBusinessLogic.ProblemEmailRecipients" [static]

property key that holds the emails of those who recieve problem emails

final Class REQUIRES[] = new Class[] {ERXExtensions.class, ERDirectToWeb.class, ERJavaMail.class} [static]

ERCoreBusinessLogic sharedInstance [static, protected]

holds the shared instance reference


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:47 2012 for Project Wonder by  doxygen 1.5.8