Project Wonder 5.0

er.corebusinesslogic
Class ERCoreBusinessLogic

java.lang.Object
  extended by er.extensions.ERXFrameworkPrincipal
      extended by er.corebusinesslogic.ERCoreBusinessLogic

public class ERCoreBusinessLogic
extends ERXFrameworkPrincipal


Nested Class Summary
 
Nested classes/interfaces inherited from class er.extensions.ERXFrameworkPrincipal
ERXFrameworkPrincipal.Observer
 
Field Summary
protected  com.webobjects.foundation.NSArray _emailsForProblemRecipients
          caches the email addresses to send to in the case of problems
protected  java.lang.String _problemEmailDomain
          caches the problem email address domain
static org.apache.log4j.Logger log
          logging support
static java.lang.String ProblemEmailDomainPropertyKey
          property key that holds the email domain of the generated from email
static java.lang.String ProblemEmailRecipientsPropertyKey
          property key that holds the emails of those who recieve problem emails
static java.lang.Class[] REQUIRES
           
protected static ERCoreBusinessLogic sharedInstance
          holds the shared instance reference
 
Fields inherited from class er.extensions.ERXFrameworkPrincipal
initializedFrameworks, launchingFrameworks
 
Constructor Summary
ERCoreBusinessLogic()
           
 
Method Summary
static com.webobjects.eocontrol.EOEnterpriseObject actor()
          Gets the actor.
static com.webobjects.eocontrol.EOEnterpriseObject actor(com.webobjects.eocontrol.EOEditingContext ec)
          Gets the actor as a local instance in the given context.
 void addPreferenceRelationshipToActorEntity(java.lang.String entityName)
           
 void addPreferenceRelationshipToActorEntity(java.lang.String entityName, java.lang.String attributeNameToJoin)
          Registers a run-time relationship called "preferences" on the actor entity of your business logic.
 void createTables(com.webobjects.eocontrol.EOEditingContext ec)
           
 void createTables(com.webobjects.eocontrol.EOEditingContext ec, java.lang.String modelName)
           
 com.webobjects.foundation.NSArray emailsForProblemRecipients()
          Gets the array of email addresses to send emails about problems to.
 java.lang.String extraInfoString(com.webobjects.foundation.NSDictionary extraInfo, int indent)
           
 void finishInitialization()
          Called when it is time to finish the initialization of the framework.
 void initializeSharedData()
          Initializes the shared eof data.
static void invalidateStaticValueForKeyCache()
           
 java.lang.String problemEmailDomain()
          Gets the problem email domain.
 void reportException(java.lang.Throwable exception, com.webobjects.foundation.NSDictionary extraInfo)
          Reports an exception.
static void setActor(com.webobjects.eocontrol.EOEnterpriseObject actor)
          Sets the actor in the current thread storage.
 void setEmailsForProblemRecipients(com.webobjects.foundation.NSArray a)
          Sets the emails for problem recipients.
 void setProblemEmailDomain(java.lang.String value)
          Sets the problem email domain.
static ERCoreBusinessLogic sharedInstance()
          Gets the shared instance of the ERCoreBusinessLogic.
 boolean shouldMailReportedExceptions()
           
static int staticStoredIntValueForKey(java.lang.String key)
           
static int staticStoredIntValueForKey(java.lang.String key, boolean noCache)
           
static int staticStoredIntValueForKey(java.lang.String key, com.webobjects.eocontrol.EOEditingContext ec)
           
static java.lang.String staticStoredValueForKey(java.lang.String key)
           
static java.lang.String staticStoredValueForKey(java.lang.String key, boolean noCache)
           
static java.lang.String staticStoredValueForKey(java.lang.String key, com.webobjects.eocontrol.EOEditingContext ec)
           
static void takeStaticStoredValueForKey(java.lang.String value, java.lang.String key)
           
static void takeStaticStoredValueForKey(java.lang.String value, java.lang.String key, com.webobjects.eocontrol.EOEditingContext editingContext)
           
 
Methods inherited from class er.extensions.ERXFrameworkPrincipal
didFinishInitialization, initialize, setUpFrameworkPrincipalClass, sharedInstance, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

public static final org.apache.log4j.Logger log
logging support


ProblemEmailDomainPropertyKey

public static final java.lang.String ProblemEmailDomainPropertyKey
property key that holds the email domain of the generated from email

See Also:
Constant Field Values

ProblemEmailRecipientsPropertyKey

public static final java.lang.String ProblemEmailRecipientsPropertyKey
property key that holds the emails of those who recieve problem emails

See Also:
Constant Field Values

sharedInstance

protected static ERCoreBusinessLogic sharedInstance
holds the shared instance reference


REQUIRES

public static final java.lang.Class[] REQUIRES

_emailsForProblemRecipients

protected com.webobjects.foundation.NSArray _emailsForProblemRecipients
caches the email addresses to send to in the case of problems


_problemEmailDomain

protected java.lang.String _problemEmailDomain
caches the problem email address domain

Constructor Detail

ERCoreBusinessLogic

public ERCoreBusinessLogic()
Method Detail

sharedInstance

public static ERCoreBusinessLogic sharedInstance()
Gets the shared instance of the ERCoreBusinessLogic.

Returns:
shared instance.

setActor

public static void setActor(com.webobjects.eocontrol.EOEnterpriseObject actor)
Sets the actor in the current thread storage.

Parameters:
actor - current user for this thread

actor

public static com.webobjects.eocontrol.EOEnterpriseObject actor(com.webobjects.eocontrol.EOEditingContext ec)
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

actor

public static com.webobjects.eocontrol.EOEnterpriseObject actor()
Gets the actor.

Returns:
current actor for the thread

staticStoredValueForKey

public static java.lang.String staticStoredValueForKey(java.lang.String key)

staticStoredIntValueForKey

public static int staticStoredIntValueForKey(java.lang.String key)

staticStoredValueForKey

public static java.lang.String staticStoredValueForKey(java.lang.String key,
                                                       boolean noCache)

staticStoredIntValueForKey

public static int staticStoredIntValueForKey(java.lang.String key,
                                             boolean noCache)

staticStoredValueForKey

public static java.lang.String staticStoredValueForKey(java.lang.String key,
                                                       com.webobjects.eocontrol.EOEditingContext ec)

staticStoredIntValueForKey

public static int staticStoredIntValueForKey(java.lang.String key,
                                             com.webobjects.eocontrol.EOEditingContext ec)

takeStaticStoredValueForKey

public static void takeStaticStoredValueForKey(java.lang.String value,
                                               java.lang.String key,
                                               com.webobjects.eocontrol.EOEditingContext editingContext)

takeStaticStoredValueForKey

public static void takeStaticStoredValueForKey(java.lang.String value,
                                               java.lang.String key)

invalidateStaticValueForKeyCache

public static void invalidateStaticValueForKeyCache()

finishInitialization

public void finishInitialization()
Called when it is time to finish the initialization of the framework.

Specified by:
finishInitialization in class ERXFrameworkPrincipal

initializeSharedData

public void initializeSharedData()
Initializes the shared eof data.


shouldMailReportedExceptions

public boolean shouldMailReportedExceptions()

addPreferenceRelationshipToActorEntity

public void addPreferenceRelationshipToActorEntity(java.lang.String entityName)

addPreferenceRelationshipToActorEntity

public void addPreferenceRelationshipToActorEntity(java.lang.String entityName,
                                                   java.lang.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.

emailsForProblemRecipients

public com.webobjects.foundation.NSArray emailsForProblemRecipients()
Gets the array of email addresses to send emails about problems to.

Returns:
array of email addresses

setEmailsForProblemRecipients

public void setEmailsForProblemRecipients(com.webobjects.foundation.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

problemEmailDomain

public java.lang.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

setProblemEmailDomain

public void setProblemEmailDomain(java.lang.String value)
Sets the problem email domain.

Parameters:
value - to set problem domain to

extraInfoString

public java.lang.String extraInfoString(com.webobjects.foundation.NSDictionary extraInfo,
                                        int indent)

reportException

public void reportException(java.lang.Throwable exception,
                            com.webobjects.foundation.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.

createTables

public void createTables(com.webobjects.eocontrol.EOEditingContext ec,
                         java.lang.String modelName)
                  throws java.sql.SQLException
Throws:
java.sql.SQLException

createTables

public void createTables(com.webobjects.eocontrol.EOEditingContext ec)
                  throws java.sql.SQLException
Throws:
java.sql.SQLException

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.